[adios] 47/207: v1.4.1

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jun 12 06:04:33 UTC 2015


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

mckinstry pushed a commit to branch master
in repository adios.

commit 81e00a1da21b4a003ecb6619a84dc88823d230cb
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Apr 8 19:27:14 2013 +0100

    v1.4.1
---
 KNOWN_BUGS                                         |    12 +-
 Makefile.am                                        |    19 +-
 Makefile.in                                        |   486 +-
 NEWS                                               |    49 +-
 TODO                                               |    71 +-
 aclocal.m4                                         | 13244 +++---
 config.h.in                                        |    42 +-
 config/ac_cray_pmi.m4                              |   137 +
 config/ac_cray_ugni.m4                             |   144 +
 config/ac_dart.m4                                  |   116 -
 config/ac_dataspaces.m4                            |   145 +
 config/ac_dmalloc.m4                               |    64 +-
 config/ac_infiniband.m4                            |     4 +-
 config/ac_nc4par.m4                                |     5 +-
 config/depcomp                                     |   530 +
 config/ltmain.sh                                   | 13199 +++---
 configure                                          | 47047 ++++++++++---------
 configure.ac                                       |   222 +-
 examples/C/Makefile.am                             |     2 +-
 examples/C/Makefile.in                             |   341 +-
 examples/C/arrays/Makefile.am                      |     2 +-
 examples/C/arrays/Makefile.in                      |   280 +-
 examples/C/attributes/Makefile.am                  |     3 +-
 examples/C/attributes/Makefile.in                  |   290 +-
 examples/C/global-array-time/Makefile.am           |    11 +-
 examples/C/global-array-time/Makefile.in           |   321 +-
 .../C/global-array-time/adios_globaltime_no_xml.c  |    28 +-
 .../C/global-array-time/adios_read_globaltime.c    |     2 +-
 .../adios_read_globaltime_streaming.c              |   102 +
 examples/C/global-array/Makefile.am                |    27 +-
 examples/C/global-array/Makefile.in                |   412 +-
 examples/C/global-array/adios_global.c             |     2 +-
 examples/C/global-array/adios_global.xml           |     2 +-
 examples/C/global-array/adios_global_2files.c      |     2 +-
 examples/C/global-array/adios_global_no_xml.c      |     4 +-
 examples/C/global-array/adios_read_chunk.c         |   168 +
 .../{adios_global.c => adios_read_gpp.c}           |    37 +-
 examples/C/global-array/adios_read_writeblock.c    |    97 +
 examples/C/global-array/gread_temperature.ch       |    15 +-
 .../{adios_global_no_xml.c => no_xml_write_byid.c} |    62 +-
 examples/C/global-array/read_no_xml_write_byid.c   |   102 +
 examples/C/manual/Makefile.am                      |     2 +-
 examples/C/manual/Makefile.in                      |   290 +-
 examples/C/read_all/Makefile.am                    |     6 +-
 examples/C/read_all/Makefile.in                    |   279 +-
 examples/C/read_all/read_all.c                     |     6 +-
 examples/C/scalars/Makefile.am                     |     8 +-
 examples/C/scalars/Makefile.in                     |   303 +-
 examples/C/schema/Makefile.am                      |    31 +
 examples/C/{manual => schema}/Makefile.in          |   372 +-
 examples/C/schema/rectilinear.c                    |    89 +
 examples/C/schema/rectilinear.xml                  |    31 +
 examples/C/schema/structured.c                     |    92 +
 examples/C/schema/structured.xml                   |    57 +
 examples/C/schema/uniform.c                        |    78 +
 examples/C/schema/uniform.xml                      |    69 +
 examples/C/schema/unstructured.c                   |   441 +
 examples/C/schema/unstructured.xml                 |    37 +
 examples/C/stat/Makefile.am                        |     3 +-
 examples/C/stat/Makefile.in                        |   289 +-
 examples/C/stat/gwrite_stat.ch                     |     2 +-
 examples/C/stat/stat.xml                           |     4 +-
 examples/C/stat/stat_write.c                       |    68 +-
 examples/Fortran/Makefile.in                       |   339 +-
 examples/Fortran/arrays/Makefile.in                |   272 +-
 examples/Fortran/arrays/arrays_read.F90            |     1 +
 examples/Fortran/arrays/arrays_write.F90           |     1 +
 examples/Fortran/global-array-time/Makefile.in     |   267 +-
 .../Fortran/global-array-time/adios_globaltime.F90 |     1 +
 examples/Fortran/global-array/Makefile.am          |     7 +-
 examples/Fortran/global-array/Makefile.in          |   295 +-
 examples/Fortran/global-array/adios_global.F90     |     1 +
 .../Fortran/global-array/adios_global_no_xml.F90   |    20 +-
 ...ios_global_no_xml.F90 => no_xml_write_byid.F90} |    64 +-
 examples/Fortran/scalars/Makefile.in               |   272 +-
 examples/Fortran/scalars/scalars_read.F90          |     1 +
 examples/Fortran/scalars/scalars_write.F90         |     1 +
 examples/Makefile.in                               |   339 +-
 examples/coupling/.svn/all-wcprops                 |    47 +
 examples/coupling/.svn/entries                     |   273 +
 examples/coupling/.svn/format                      |     1 +
 examples/coupling/.svn/prop-base/job.svn-base      |     5 +
 examples/coupling/.svn/text-base/Makefile.svn-base |    45 +
 examples/coupling/.svn/text-base/README.svn-base   |   132 +
 .../.svn/text-base/coupling_reader_2D.F90.svn-base |   321 +
 .../.svn/text-base/coupling_reader_2D.xml.svn-base |    27 +
 .../.svn/text-base/coupling_writer_2D.F90.svn-base |   214 +
 .../.svn/text-base/coupling_writer_2D.xml.svn-base |    41 +
 examples/coupling/.svn/text-base/job.svn-base      |    89 +
 examples/coupling/.svn/tmp/tempfile.2.tmp          |    89 +
 examples/coupling/.svn/tmp/tempfile.tmp            |    89 +
 examples/coupling/Makefile                         |    45 +
 examples/coupling/README                           |   132 +
 examples/coupling/coupling_reader_2D.F90           |   321 +
 examples/coupling/coupling_reader_2D.xml           |    27 +
 examples/coupling/coupling_writer_2D.F90           |   214 +
 examples/coupling/coupling_writer_2D.xml           |    41 +
 examples/coupling/job                              |    89 +
 examples/skel/.svn/all-wcprops                     |     5 +
 examples/skel/.svn/entries                         |    43 +
 examples/skel/.svn/format                          |     1 +
 examples/skel/genarray3d/.svn/all-wcprops          |    11 +
 examples/skel/genarray3d/.svn/entries              |    62 +
 examples/skel/genarray3d/.svn/format               |     1 +
 .../.svn/text-base/genarray3d.xml.svn-base         |     4 +-
 .../skel/genarray3d}/genarray3d.xml                |     4 +-
 examples/skel/geos5/.svn/all-wcprops               |    11 +
 examples/skel/geos5/.svn/entries                   |    62 +
 examples/skel/geos5/.svn/format                    |     1 +
 .../skel/geos5/.svn/prop-base/geos5.xml.svn-base   |     5 +
 .../skel/geos5/.svn/text-base/geos5.xml.svn-base   |   301 +
 examples/skel/geos5/geos5.xml                      |   301 +
 examples/skel/grapes/.svn/all-wcprops              |    11 +
 examples/skel/grapes/.svn/entries                  |    62 +
 examples/skel/grapes/.svn/format                   |     1 +
 .../skel/grapes/.svn/text-base/grapes.xml.svn-base |    50 +
 examples/skel/grapes/grapes.xml                    |    50 +
 examples/skel/gts/.svn/all-wcprops                 |    11 +
 examples/skel/gts/.svn/entries                     |    62 +
 examples/skel/gts/.svn/format                      |     1 +
 examples/skel/gts/.svn/text-base/gts.xml.svn-base  |    82 +
 examples/skel/gts/gts.xml                          |    82 +
 examples/skel/s3d/.svn/all-wcprops                 |    11 +
 examples/skel/s3d/.svn/entries                     |    62 +
 examples/skel/s3d/.svn/format                      |     1 +
 examples/skel/s3d/.svn/text-base/s3d.xml.svn-base  |    26 +
 examples/skel/s3d/s3d.xml                          |    26 +
 examples/staging/.svn/all-wcprops                  |     5 +
 examples/staging/.svn/entries                      |    38 +
 examples/staging/.svn/format                       |     1 +
 examples/staging/stage_write/.svn/all-wcprops      |    83 +
 examples/staging/stage_write/.svn/entries          |   477 +
 examples/staging/stage_write/.svn/format           |     1 +
 .../stage_write/.svn/prop-base/job.svn-base        |     5 +
 .../text-base/Makefile.genarray_stream.svn-base    |    30 +
 .../stage_write/.svn/text-base/Makefile.svn-base   |    41 +
 .../stage_write/.svn/text-base/README.svn-base     |    47 +
 .../.svn/text-base/decompose.h.svn-base            |    17 +
 .../.svn/text-base/decompose_block.c.svn-base      |    91 +
 .../.svn/text-base/decompose_single.c.svn-base     |    27 +
 .../.svn/text-base/genarray_stream.F90.svn-base    |    96 +-
 .../.svn/text-base/genarray_stream.xml.svn-base    |     2 +-
 .../stage_write/.svn/text-base/job.svn-base        |    62 +
 .../.svn/text-base/stage_write.c.svn-base          |   430 +
 .../.svn/text-base/test_decompose.c.svn-base       |   134 +
 .../stage_write/.svn/text-base/utils.c.svn-base    |   211 +
 .../stage_write/.svn/text-base/utils.h.svn-base    |    50 +
 examples/staging/stage_write/Makefile              |    41 +
 .../staging/stage_write/Makefile.genarray_stream   |    30 +
 examples/staging/stage_write/README                |    47 +
 examples/staging/stage_write/decompose.h           |    17 +
 examples/staging/stage_write/decompose_block.c     |    91 +
 examples/staging/stage_write/decompose_single.c    |    27 +
 .../staging/stage_write/genarray_stream.F90        |    96 +-
 .../staging/stage_write/genarray_stream.xml        |     2 +-
 examples/staging/stage_write/job                   |    62 +
 examples/staging/stage_write/stage_write.c         |   430 +
 examples/staging/stage_write/test_decompose.c      |   134 +
 examples/staging/stage_write/utils.c               |   211 +
 examples/staging/stage_write/utils.h               |    50 +
 runconf                                            |   611 +-
 src/Makefile.am                                    |   553 +-
 src/Makefile.in                                    |  3638 +-
 src/adios.h                                        |   194 -
 src/adios_error.h                                  |    43 -
 src/adios_internals_mxml.c                         |  3437 --
 src/adios_read.c                                   |   145 -
 src/adios_read_hooks.h                             |    99 -
 src/adiosf.c                                       |   524 -
 src/bp_utils.h                                     |    67 -
 src/common_read.c                                  |   383 -
 src/common_read.h                                  |    65 -
 src/{ => core}/adios.c                             |   168 +-
 src/{ => core}/adios_bp_v1.c                       |   202 +-
 src/{ => core}/adios_bp_v1.h                       |     4 +-
 src/{ => core}/adios_endianness.c                  |     7 +-
 src/{ => core}/adios_endianness.h                  |     2 +-
 src/{ => core}/adios_error.c                       |    14 +-
 src/{ => core}/adios_internals.c                   |   492 +-
 src/{ => core}/adios_internals.h                   |    68 +-
 src/core/adios_internals_mxml.c                    |  4883 ++
 src/{ => core}/adios_internals_mxml.h              |    19 +-
 src/core/adios_logger.c                            |    60 +
 src/core/adios_logger.h                            |    41 +
 src/core/adios_read.c                              |   189 +
 src/{ => core}/adios_read_hooks.c                  |    40 +-
 src/core/adios_read_hooks.h                        |   110 +
 src/core/adios_read_v1.c                           |   827 +
 src/{ => core}/adios_socket.c                      |     0
 src/{ => core}/adios_socket.h                      |     0
 src/core/adios_timing.c                            |   285 +
 src/core/adios_timing.h                            |    45 +
 src/{ => core}/adios_transport_hooks.c             |    30 +-
 src/{ => core}/adios_transport_hooks.h             |    11 +-
 src/core/adiosf.c                                  |   840 +
 src/core/adiosf_defs_mod.f90                       |    96 +
 src/core/adiosf_read.c                             |   721 +
 src/core/adiosf_read_mod.f90                       |  2086 +
 src/{adiosf_read.c => core/adiosf_read_v1.c}       |   430 +-
 src/core/adiosf_write_mod.f90                      |  3678 ++
 src/{ => core}/bp_types.h                          |    19 +-
 src/{ => core}/bp_utils.c                          |  1523 +-
 src/core/bp_utils.h                                |    78 +
 src/{ => core}/buffer.c                            |    31 +-
 src/{ => core}/buffer.h                            |     2 +-
 src/{ => core}/common_adios.c                      |   272 +-
 src/{ => core}/common_adios.h                      |    33 +-
 src/core/common_read.c                             |   914 +
 src/core/common_read.h                             |   106 +
 src/{ => core}/ds_metadata.h                       |    23 +-
 src/{ => core}/futils.c                            |     6 +-
 src/{ => core}/futils.h                            |     0
 src/{ => core}/globals.c                           |    74 +-
 src/{ => core}/globals.h                           |    22 +-
 src/{ => core}/mpidummy.c                          |    58 +-
 src/core/util.c                                    |   551 +
 src/core/util.h                                    |    78 +
 src/{ => nssi}/adios_nssi_args.x                   |     0
 src/{ => nssi}/adios_nssi_config.c                 |     0
 src/{ => nssi}/adios_nssi_config.h                 |     0
 src/{ => nssi}/adios_nssi_filter.c                 |     0
 src/{ => nssi}/aggregation.cpp                     |     0
 src/{ => nssi}/aggregation.h                       |     0
 src/{ => nssi}/io_timer.h                          |     0
 src/{ => nssi}/nssi_coupling_server.cpp            |     0
 src/{ => nssi}/nssi_staging_server.cpp             |     0
 src/public/adios.h                                 |   144 +
 src/public/adios_error.h                           |   103 +
 src/public/adios_read.h                            |    21 +
 src/{adios_read.h => public/adios_read_v1.h}       |    36 +-
 src/public/adios_read_v1_defs.h                    |    56 +
 src/public/adios_read_v2.h                         |   541 +
 src/public/adios_selection.h                       |   177 +
 src/{ => public}/adios_types.h                     |     0
 src/{ => public}/mpidummy.h                        |    11 +
 src/read/read_bp.c                                 |  3524 ++
 src/read/read_bp_staged.c                          |  2597 +
 src/{read_bp_staged.c => read/read_bp_staged1.c}   |  2863 +-
 src/read/read_dataspaces.c                         |  1520 +
 src/{ => read}/read_datatap.c                      |     0
 src/{ => read}/read_dimes.c                        |     0
 src/{ => read}/read_nssi.c                         |     0
 src/read_bp.c                                      |  3521 --
 src/read_dart.c                                    |  1003 -
 src/{adios_dart.c => write/adios_dataspaces.c}     |   471 +-
 src/{ => write}/adios_datatap.c                    |    15 +-
 src/{ => write}/adios_dimes.c                      |    13 +-
 src/{ => write}/adios_mpi.c                        |   546 +-
 src/{ => write}/adios_mpi_amr.c                    |   943 +-
 src/{ => write}/adios_mpi_lustre.c                 |   237 +-
 src/{ => write}/adios_nc4.c                        |    46 +-
 src/{ => write}/adios_nssi.c                       |     3 +-
 src/{ => write}/adios_phdf5.c                      |    84 +-
 src/{ => write}/adios_posix.c                      |   201 +-
 src/{ => write}/adios_posix1.c                     |    13 +-
 tests/C/Makefile.am                                |     2 +-
 tests/C/Makefile.in                                |   275 +-
 tests/Fortran/Makefile.in                          |   267 +-
 tests/Makefile.in                                  |   339 +-
 tests/bp_read/Makefile.am                          |    12 +-
 tests/bp_read/Makefile.in                          |   324 +-
 tests/bp_read/bp_read_f.F90                        |   238 +-
 tests/bp_read/{bp_read_f.F90 => bp_read_f_v1.F90}  |    58 +-
 tests/genarray/Makefile.in                         |   282 +-
 tests/genarray/copyarray.F90                       |     9 +-
 tests/genarray/genarray.F90                        |     2 +
 tests/genarray/genarray3d.xml                      |     2 +-
 tests/suite/Makefile.in                            |   340 +-
 tests/suite/programs/Makefile.am                   |    78 +-
 tests/suite/programs/Makefile.in                   |   602 +-
 tests/suite/programs/adios_amr_write.c             |   101 +
 tests/suite/programs/adios_amr_write.xml           |    21 +
 tests/suite/programs/adios_amr_write_2vars.c       |   105 +
 tests/suite/programs/adios_amr_write_2vars.xml     |    22 +
 tests/suite/programs/adios_staged_read.c           |   190 +
 tests/suite/programs/adios_staged_read_2vars.c     |   272 +
 tests/suite/programs/adios_staged_read_v2.c        |   187 +
 tests/suite/programs/connect_to_space_subset.c     |   175 +
 tests/suite/programs/local_array_time.c            |   173 +
 tests/suite/programs/local_array_time.xml          |    17 +
 tests/suite/programs/many_vars.c                   |   418 +
 tests/suite/programs/selections.c                  |   486 +
 tests/suite/programs/two_groups.c                  |   287 +
 tests/suite/programs/write_alternate.c             |   525 +
 tests/suite/programs/write_alternate.xml           |    61 +
 tests/suite/programs/write_read.c                  |   852 +
 tests/suite/programs/write_read.xml                |   136 +
 tests/suite/reference/amr_write_read_1.txt         |     8 +
 tests/suite/reference/amr_write_read_2.txt         |    32 +
 tests/suite/reference/amr_write_read_2vars_1.txt   |    16 +
 tests/suite/reference/amr_write_read_2vars_2.txt   |    64 +
 tests/suite/reference/amr_write_read_2vars_3.txt   |     8 +
 tests/suite/reference/amr_write_read_2vars_4.txt   |    64 +
 tests/suite/reference/amr_write_read_2vars_5.txt   |    64 +
 tests/suite/reference/amr_write_read_3.txt         |     4 +
 tests/suite/reference/amr_write_read_4.txt         |    32 +
 tests/suite/reference/amr_write_read_5.txt         |    32 +
 tests/suite/reference/arrays_bpls.txt              |    11 +-
 tests/suite/reference/attributes_bpls.txt          |    23 +-
 tests/suite/reference/global_array_bpls.txt        |    19 +-
 tests/suite/reference/global_array_no_xml_bpls.txt |    12 +-
 .../suite/reference/global_array_no_xml_f_bpls.txt |    28 +
 tests/suite/reference/global_array_time_bpls.txt   |    24 +-
 ..._no_xml_bpls.txt => no_xml_write_byid_bpls.txt} |    11 +-
 tests/suite/reference/no_xml_write_byid_f_bpls.txt |    25 +
 tests/suite/reference/no_xml_write_byid_read.txt   |   213 +
 tests/suite/reference/scalars_write_bpls.txt       |    27 +-
 tests/suite/reference/write_read_bpls.txt          |    79 +
 tests/suite/tests/04_global_array.sh               |     6 +-
 tests/suite/tests/05_global_array_time.sh          |     8 +-
 tests/suite/tests/07_global_array_no_xml.sh        |    10 +-
 tests/suite/tests/08_amr_write_read.sh             |    75 +
 tests/suite/tests/09_amr_write_read_2vars.sh       |    57 +
 tests/suite/tests/10_write_read.sh                 |    58 +
 tests/suite/tests/11_write_alternate.sh            |    38 +
 tests/suite/tests/12_selections.sh                 |    36 +
 tests/suite/tests/13_write_byid.sh                 |    88 +
 tools/matlab/Makefile                              |    30 -
 utils/Makefile.am                                  |     2 +
 utils/Makefile.in                                  |   343 +-
 utils/adios_lint/Makefile.am                       |     2 +-
 utils/adios_lint/Makefile.in                       |   322 +-
 utils/bp2ascii/Makefile.am                         |     4 +-
 utils/bp2ascii/Makefile.in                         |   322 +-
 utils/bp2bp/Makefile.am                            |     4 +-
 utils/bp2bp/Makefile.in                            |   324 +-
 utils/bp2bp/bp2bp.c                                |  1726 +-
 utils/bp2h5/Makefile.am                            |    28 +-
 utils/bp2h5/Makefile.in                            |   346 +-
 utils/bp2h5/bp2h5.c                                |    30 +-
 utils/bp2ncd/Makefile.am                           |     2 +-
 utils/bp2ncd/Makefile.in                           |   322 +-
 utils/bpdump/Makefile.am                           |     2 +-
 utils/bpdump/Makefile.in                           |   322 +-
 utils/bpdump/bpdump.c                              |     2 +-
 utils/bpls/Makefile.am                             |     2 +-
 utils/bpls/Makefile.in                             |   322 +-
 utils/bpls/bpls.c                                  |   662 +-
 utils/bpls/bpls.h                                  |     6 +-
 utils/bpsplit/Makefile.am                          |     2 +-
 utils/bpsplit/Makefile.in                          |   332 +-
 utils/gpp/Makefile.am                              |     2 +-
 utils/gpp/Makefile.in                              |   273 +-
 utils/gpp/ad_config.py                             |   195 +
 utils/gpp/gpp.py                                   |   275 +-
 utils/gpp/gpp_types.py                             |    45 -
 utils/gpp/type_mapper.py                           |   108 +
 utils/gpp/xmlparser.py                             |   335 -
 utils/skel/Makefile.am                             |    32 +
 {tests/suite => utils/skel}/Makefile.in            |   494 +-
 utils/skel/bin/set_method.sh                       |    15 +
 utils/skel/bin/skel                                |   102 +
 utils/skel/bin/skel_extract.py                     |    90 +
 utils/skel/etc/Makefile.am                         |    15 +
 utils/{gpp => skel/etc}/Makefile.in                |   305 +-
 utils/skel/etc/compiler_fragment.mk                |     7 +
 utils/skel/etc/settings                            |    27 +
 utils/skel/etc/templates/Makefile.default.tpl      |    47 +
 utils/skel/etc/templates/submit_jaguar.tpl         |    28 +
 utils/skel/etc/templates/submit_sith.tpl           |    29 +
 utils/skel/lib/adios.py                            |   341 +
 utils/skel/lib/argparse.py                         |  2362 +
 utils/skel/lib/skel_cat.py                         |    77 +
 utils/skel/lib/skel_install.py                     |    10 +
 utils/skel/lib/skel_makefile.py                    |   136 +
 utils/skel/lib/skel_params.py                      |   101 +
 utils/skel/lib/skel_settings.py                    |    67 +
 utils/skel/lib/skel_source.py                      |   685 +
 utils/skel/lib/skel_submit.py                      |   137 +
 utils/skel/lib/skel_xml.py                         |   133 +
 utils/skel/lib/skelconf.py                         |   246 +
 utils/skel/lib/typeMapper.py                       |   108 +
 wrappers/.svn/all-wcprops                          |     5 +
 wrappers/.svn/dir-prop-base                        |     5 +
 wrappers/.svn/entries                              |    44 +
 wrappers/.svn/format                               |     1 +
 wrappers/java/.svn/all-wcprops                     |    41 +
 wrappers/java/.svn/entries                         |   350 +
 wrappers/java/.svn/format                          |     1 +
 .../java/.svn/text-base/CMakeLists.txt.svn-base    |    96 +
 wrappers/java/.svn/text-base/README.svn-base       |    49 +
 .../.svn/text-base/gov_ornl_ccs_Adios.cxx.svn-base |   578 +
 .../gov_ornl_ccs_AdiosBufferAllocWhen.cxx.svn-base |     0
 .../gov_ornl_ccs_AdiosDatatype.cxx.svn-base        |     0
 .../text-base/gov_ornl_ccs_AdiosFile.cxx.svn-base  |   102 +
 .../text-base/gov_ornl_ccs_AdiosFlag.cxx.svn-base  |     0
 .../text-base/gov_ornl_ccs_AdiosGroup.cxx.svn-base |    97 +
 .../gov_ornl_ccs_AdiosVarinfo.cxx.svn-base         |   175 +
 wrappers/java/CMakeLists.txt                       |    96 +
 wrappers/java/Modules/.svn/entries                 |   137 +
 wrappers/java/Modules/.svn/format                  |     1 +
 .../text-base/CMakeUtilityFunctions.cmake.svn-base |    19 +
 .../.svn/text-base/FindADIOS.cmake.svn-base        |   136 +
 .../FindPackageHandleStandardArgs.cmake.svn-base   |   260 +
 wrappers/java/Modules/CMakeUtilityFunctions.cmake  |    19 +
 wrappers/java/Modules/FindADIOS.cmake              |   136 +
 .../Modules/FindPackageHandleStandardArgs.cmake    |   260 +
 wrappers/java/README                               |    49 +
 wrappers/java/gov/.svn/all-wcprops                 |     5 +
 wrappers/java/gov/.svn/entries                     |    38 +
 wrappers/java/gov/.svn/format                      |     1 +
 wrappers/java/gov/ornl/.svn/all-wcprops            |     5 +
 wrappers/java/gov/ornl/.svn/entries                |    38 +
 wrappers/java/gov/ornl/.svn/format                 |     1 +
 wrappers/java/gov/ornl/ccs/.svn/all-wcprops        |    35 +
 wrappers/java/gov/ornl/ccs/.svn/entries            |   307 +
 wrappers/java/gov/ornl/ccs/.svn/format             |     1 +
 .../ornl/ccs/.svn/text-base/Adios.java.svn-base    |   266 +
 .../text-base/AdiosBufferAllocWhen.java.svn-base   |    17 +
 .../ccs/.svn/text-base/AdiosDatatype.java.svn-base |    33 +
 .../ccs/.svn/text-base/AdiosFile.java.svn-base     |    65 +
 .../ccs/.svn/text-base/AdiosFlag.java.svn-base     |    18 +
 .../ccs/.svn/text-base/AdiosGroup.java.svn-base    |    71 +
 .../ccs/.svn/text-base/AdiosTest.java.svn-base     |    50 +
 .../ccs/.svn/text-base/AdiosVarinfo.java.svn-base  |   151 +
 wrappers/java/gov/ornl/ccs/Adios.java              |   266 +
 .../java/gov/ornl/ccs/AdiosBufferAllocWhen.java    |    17 +
 wrappers/java/gov/ornl/ccs/AdiosDatatype.java      |    33 +
 wrappers/java/gov/ornl/ccs/AdiosFile.java          |    65 +
 wrappers/java/gov/ornl/ccs/AdiosFlag.java          |    18 +
 wrappers/java/gov/ornl/ccs/AdiosGroup.java         |    71 +
 wrappers/java/gov/ornl/ccs/AdiosTest.java          |    50 +
 wrappers/java/gov/ornl/ccs/AdiosVarinfo.java       |   151 +
 wrappers/java/gov_ornl_ccs_Adios.cxx               |   578 +
 .../java/gov_ornl_ccs_AdiosBufferAllocWhen.cxx     |     0
 wrappers/java/gov_ornl_ccs_AdiosDatatype.cxx       |     0
 wrappers/java/gov_ornl_ccs_AdiosFile.cxx           |   102 +
 wrappers/java/gov_ornl_ccs_AdiosFlag.cxx           |     0
 wrappers/java/gov_ornl_ccs_AdiosGroup.cxx          |    97 +
 wrappers/java/gov_ornl_ccs_AdiosVarinfo.cxx        |   175 +
 wrappers/java/test/.svn/all-wcprops                |    29 +
 wrappers/java/test/.svn/entries                    |   171 +
 wrappers/java/test/.svn/format                     |     1 +
 .../java/test/.svn/prop-base/test1.sh.svn-base     |     5 +
 .../java/test/.svn/prop-base/test2.sh.svn-base     |     5 +
 .../.svn/text-base/AdiosNoxmlTest.java.svn-base    |    57 +
 .../test/.svn/text-base/AdiosTest.java.svn-base    |   106 +
 .../java/test/.svn/text-base/test1.sh.svn-base     |    22 +
 .../java/test/.svn/text-base/test2.sh.svn-base     |    19 +
 wrappers/java/test/AdiosNoxmlTest.java             |    57 +
 wrappers/java/test/AdiosTest.java                  |   106 +
 .../java/test/test1.sh                             |    22 +
 wrappers/java/test/test2.sh                        |    19 +
 wrappers/matlab/.svn/all-wcprops                   |    11 +
 wrappers/matlab/.svn/entries                       |   307 +
 wrappers/matlab/.svn/format                        |     1 +
 wrappers/matlab/.svn/text-base/Makefile.svn-base   |    30 +
 .../matlab/.svn/text-base/adios.m.svn-base         |     0
 .../matlab/.svn/text-base/adiosclose.m.svn-base    |     0
 .../matlab/.svn/text-base/adiosclosec.c.svn-base   |     0
 .../matlab/.svn/text-base/adiosopen.m.svn-base     |     0
 .../matlab/.svn/text-base/adiosopenc.c.svn-base    |     0
 .../matlab/.svn/text-base/adiosread.m.svn-base     |     0
 .../matlab/.svn/text-base/adiosreadc.c.svn-base    |     0
 wrappers/matlab/Makefile                           |    30 +
 {tools => wrappers}/matlab/adios.m                 |     0
 {tools => wrappers}/matlab/adiosclose.m            |     0
 {tools => wrappers}/matlab/adiosclosec.c           |     0
 {tools => wrappers}/matlab/adiosopen.m             |     0
 {tools => wrappers}/matlab/adiosopenc.c            |     0
 {tools => wrappers}/matlab/adiosread.m             |     0
 {tools => wrappers}/matlab/adiosreadc.c            |     0
 wrappers/numpy/.svn/all-wcprops                    |    17 +
 wrappers/numpy/.svn/entries                        |   146 +
 wrappers/numpy/.svn/format                         |     1 +
 .../numpy/.svn/text-base/CMakeLists.txt.svn-base   |    60 +
 wrappers/numpy/.svn/text-base/README.svn-base      |    37 +
 wrappers/numpy/.svn/text-base/adios.pyx.svn-base   |   607 +
 wrappers/numpy/CMakeLists.txt                      |    60 +
 wrappers/numpy/Modules/.svn/entries                |   205 +
 wrappers/numpy/Modules/.svn/format                 |     1 +
 .../text-base/CMakeUtilityFunctions.cmake.svn-base |    19 +
 .../.svn/text-base/FindADIOS.cmake.svn-base        |   136 +
 .../.svn/text-base/FindMPI4Py.cmake.svn-base       |    65 +
 .../.svn/text-base/FindNumpy.cmake.svn-base        |    57 +
 .../FindPackageHandleStandardArgs.cmake.svn-base   |   260 +
 wrappers/numpy/Modules/CMakeUtilityFunctions.cmake |    19 +
 wrappers/numpy/Modules/FindADIOS.cmake             |   136 +
 wrappers/numpy/Modules/FindMPI4Py.cmake            |    65 +
 wrappers/numpy/Modules/FindNumpy.cmake             |    57 +
 .../Modules/FindPackageHandleStandardArgs.cmake    |   260 +
 wrappers/numpy/README                              |    37 +
 wrappers/numpy/adios.pyx                           |   607 +
 wrappers/numpy/example/.svn/all-wcprops            |    11 +
 wrappers/numpy/example/.svn/entries                |    62 +
 wrappers/numpy/example/.svn/format                 |     1 +
 .../example/.svn/prop-base/ncdf2bp.py.svn-base     |     5 +
 .../example/.svn/text-base/ncdf2bp.py.svn-base     |   126 +
 wrappers/numpy/example/ncdf2bp.py                  |   126 +
 wrappers/numpy/test/.svn/all-wcprops               |    17 +
 wrappers/numpy/test/.svn/entries                   |   239 +
 wrappers/numpy/test/.svn/format                    |     1 +
 .../.svn/prop-base/test_adios_noxml.sh.svn-base    |     5 +
 .../.svn/prop-base/test_adios_read.sh.svn-base     |     5 +
 .../.svn/prop-base/test_adios_write.sh.svn-base    |     5 +
 .../.svn/text-base/adios_noxml_test.py.svn-base    |    29 +
 .../.svn/text-base/adios_read_test.py.svn-base     |    14 +
 .../.svn/text-base/adios_write_test.py.svn-base    |    21 +
 .../.svn/text-base/test_adios_noxml.sh.svn-base    |    15 +
 .../.svn/text-base/test_adios_read.sh.svn-base     |    21 +-
 .../.svn/text-base/test_adios_write.sh.svn-base    |    21 +-
 wrappers/numpy/test/adios_noxml_test.py            |    29 +
 wrappers/numpy/test/adios_read_test.py             |    14 +
 wrappers/numpy/test/adios_write_test.py            |    21 +
 wrappers/numpy/test/test_adios_noxml.sh            |    15 +
 .../numpy/test/test_adios_read.sh                  |    21 +-
 .../numpy/test/test_adios_write.sh                 |    21 +-
 507 files changed, 111945 insertions(+), 54998 deletions(-)

diff --git a/KNOWN_BUGS b/KNOWN_BUGS
index 625c9ae..41b4e31 100644
--- a/KNOWN_BUGS
+++ b/KNOWN_BUGS
@@ -2,15 +2,17 @@
 Writing data
 ============
 
-1. If the size specified to the adios_group_size is too small, the output
-will be silently corrupt. Work around: make the size bigger. An error
-message will be added in later releases.
+- No-XML writing: The following scenario is not supported:
+  Define arrays sizes and offsets with numbers in the source code instead of references to scalar variables also written to the output AND write multiple blocks of the same variable from one process. The (bad) result is that each block's size definition will equal to the first definition.  
+  Solution: save the IDs returned by adios_define_variable() and use adios_write_byid() instead of adios_write()
 
 Reading data
 ============
 
-1. The read API defines void *mins and void *maxs returned by the adios_inq_var() funtion to contain the min/max of an array per timestep. In the current release these pointers are NULL always. 
-Only the gmin and gmax single values as global min/max of an array over all timesteps are available. 
+- Statistics: scalars over time have no statistics calculated when queried with adios_inq_var_stat(). Only the value written by rank 0 at the first step is seen. 
+Work around: adios_inq_var_stat() returns per-step statistics too, and at each step min/max equals the value at that step, so one can calculate a global min/max over time from this list. 
+
+
 
 
 
diff --git a/Makefile.am b/Makefile.am
index d7bf994..1b523ba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,18 +3,19 @@ SUBDIRS=src utils tests examples
 EXTRA_DIST = runconf \
              KNOWN_BUGS \
              adios_config \
-             tools/matlab/Makefile \
-             tools/matlab/adios.m \
-             tools/matlab/adiosclose.m \
-             tools/matlab/adiosopen.m \
-             tools/matlab/adiosread.m \
-             tools/matlab/adiosclosec.c \
-             tools/matlab/adiosopenc.c \
-             tools/matlab/adiosreadc.c \
              scripts/create.nssi.config.sh \
              scripts/kill.nssi.staging.sh \
              scripts/start.nssi.staging.sh
 
+#             wrappers/matlab/Makefile \
+#             wrappers/matlab/adios.m \
+#             wrappers/matlab/adiosclose.m \
+#             wrappers/matlab/adiosopen.m \
+#             wrappers/matlab/adiosread.m \
+#             wrappers/matlab/adiosclosec.c \
+#             wrappers/matlab/adiosopenc.c \
+#             wrappers/matlab/adiosreadc.c 
+
 bin_SCRIPTS = adios_config 
 
 if HAVE_NSSI
@@ -28,7 +29,7 @@ install-data-hook:
 	if type svnversion &>/dev/null; then \
 	    echo `svnversion`\" >> adios_config.flags; \
 	else \
-	    echo "unknown\""; >> adios_config.flags \
+	    echo "unknown\"" >> adios_config.flags; \
 	    echo "Error: svnversion command not found"; \
 	fi 
 	cp adios_config.flags $(DESTDIR)$(bindir)
diff --git a/Makefile.in b/Makefile.in
index 6ec3f1f..f34a4f2 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,15 +38,17 @@ host_triplet = @host@
 @HAVE_NSSI_TRUE@                   scripts/kill.nssi.staging.sh  \
 @HAVE_NSSI_TRUE@                   scripts/start.nssi.staging.sh
 
+subdir = .
 DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in $(srcdir)/adios_config.flags.in \
 	$(srcdir)/config.h.in $(top_srcdir)/configure AUTHORS COPYING \
 	ChangeLog INSTALL NEWS TODO config/compile config/config.guess \
-	config/config.sub config/install-sh config/ltmain.sh \
-	config/missing
-subdir = .
+	config/config.sub config/depcomp config/install-sh \
+	config/ltmain.sh config/missing
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -68,21 +68,48 @@ am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
+ configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
 CONFIG_CLEAN_FILES = adios_config.flags
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = 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__installdirs = "$(DESTDIR)$(bindir)"
-binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 SCRIPTS = $(bin_SCRIPTS)
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir dist dist-all distcheck
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -90,9 +117,34 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
 top_distdir = $(distdir)
 am__remove_distdir = \
-  { test ! -d $(distdir) \
-    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
-         && rm -fr $(distdir); }; }
+  { test ! -d "$(distdir)" \
+    || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr "$(distdir)"; }; }
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
@@ -119,32 +171,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -153,72 +205,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -229,11 +256,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -241,7 +268,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -267,26 +297,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -298,44 +321,58 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = src utils tests examples
 EXTRA_DIST = runconf \
              KNOWN_BUGS \
              adios_config \
-             tools/matlab/Makefile \
-             tools/matlab/adios.m \
-             tools/matlab/adiosclose.m \
-             tools/matlab/adiosopen.m \
-             tools/matlab/adiosread.m \
-             tools/matlab/adiosclosec.c \
-             tools/matlab/adiosopenc.c \
-             tools/matlab/adiosreadc.c \
              scripts/create.nssi.config.sh \
              scripts/kill.nssi.staging.sh \
              scripts/start.nssi.staging.sh
 
+
+#             wrappers/matlab/Makefile \
+#             wrappers/matlab/adios.m \
+#             wrappers/matlab/adiosclose.m \
+#             wrappers/matlab/adiosopen.m \
+#             wrappers/matlab/adiosread.m \
+#             wrappers/matlab/adiosclosec.c \
+#             wrappers/matlab/adiosopenc.c \
+#             wrappers/matlab/adiosreadc.c 
 bin_SCRIPTS = adios_config $(am__append_1)
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -347,15 +384,15 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-	      cd $(srcdir) && $(AUTOMAKE) --gnu  \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
 		&& exit 0; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -371,21 +408,22 @@ $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENC
 	$(SHELL) ./config.status --recheck
 
 $(top_srcdir)/configure:  $(am__configure_deps)
-	cd $(srcdir) && $(AUTOCONF)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
 
 config.h: stamp-h1
 	@if test ! -f $@; then \
 	  rm -f stamp-h1; \
-	  $(MAKE) stamp-h1; \
+	  $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
 	else :; fi
 
 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
 	@rm -f stamp-h1
 	cd $(top_builddir) && $(SHELL) ./config.status config.h
 $(srcdir)/config.h.in:  $(am__configure_deps) 
-	cd $(top_srcdir) && $(AUTOHEADER)
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
 	rm -f stamp-h1
 	touch $@
 
@@ -395,23 +433,38 @@ adios_config.flags: $(top_builddir)/config.status $(srcdir)/adios_config.flags.i
 	cd $(top_builddir) && $(SHELL) ./config.status $@
 install-binSCRIPTS: $(bin_SCRIPTS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	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 \
-	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-	    echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	    $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
-	  else :; fi; \
-	done
+	  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)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@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
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -420,8 +473,7 @@ clean-libtool:
 	-rm -rf .libs _libs
 
 distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
+	-rm -f libtool config.lt
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -430,7 +482,7 @@ uninstall-info-am:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -447,16 +499,15 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -482,16 +533,16 @@ maintainer-clean-recursive:
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -499,14 +550,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -518,93 +569,114 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
 	$(am__remove_distdir)
-	mkdir $(distdir)
-	$(mkdir_p) $(distdir)/. $(distdir)/config $(distdir)/scripts $(distdir)/tools/matlab
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
 	done
-	-find $(distdir) -type d ! -perm -755 -exec chmod a+rwx,go+rx {} \; -o \
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
 	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
 	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
-	  ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
-	|| chmod -R a+r $(distdir)
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
 dist-gzip: distdir
 	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
 	$(am__remove_distdir)
@@ -613,6 +685,14 @@ dist-bzip2: distdir
 	tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
 	$(am__remove_distdir)
 
+dist-lzma: distdir
+	tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+	$(am__remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+	$(am__remove_distdir)
+
 dist-tarZ: distdir
 	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 	$(am__remove_distdir)
@@ -636,13 +716,17 @@ dist dist-all: distdir
 distcheck: dist
 	case '$(DIST_ARCHIVES)' in \
 	*.tar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
 	*.tar.bz2*) \
-	  bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lzma*) \
+	  lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
 	*.tar.Z*) \
 	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
 	*.shar.gz*) \
-	  GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
 	*.zip*) \
 	  unzip $(distdir).zip ;;\
 	esac
@@ -650,9 +734,11 @@ distcheck: dist
 	mkdir $(distdir)/_build
 	mkdir $(distdir)/_inst
 	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
 	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
 	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
-	  && cd $(distdir)/_build \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
 	  && ../configure --srcdir=.. --prefix="$$dc_install_base" \
 	    $(DISTCHECK_CONFIGURE_FLAGS) \
 	  && $(MAKE) $(AM_MAKEFLAGS) \
@@ -674,13 +760,15 @@ distcheck: dist
 	  && rm -rf "$$dc_destdir" \
 	  && $(MAKE) $(AM_MAKEFLAGS) dist \
 	  && rm -rf $(DIST_ARCHIVES) \
-	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
 	$(am__remove_distdir)
 	@(echo "$(distdir) archives ready for distribution: "; \
 	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
-	  sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-	@cd $(distuninstallcheck_dir) \
+	@$(am__cd) '$(distuninstallcheck_dir)' \
 	&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
 	   || { echo "ERROR: files left after uninstall:" ; \
 	        if test -n "$(DESTDIR)"; then \
@@ -703,7 +791,7 @@ all-am: Makefile $(SCRIPTS) config.h
 installdirs: installdirs-recursive
 installdirs-am:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-recursive
 install-exec: install-exec-recursive
@@ -725,6 +813,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -745,6 +834,8 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
@@ -752,13 +843,30 @@ info-am:
 install-data-am:
 	@$(NORMAL_INSTALL)
 	$(MAKE) $(AM_MAKEFLAGS) install-data-hook
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
 
 install-exec-am: install-binSCRIPTS
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -779,26 +887,29 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-binSCRIPTS uninstall-info-am
+uninstall-am: uninstall-binSCRIPTS
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
+	ctags-recursive install-am install-data-am install-strip \
+	tags-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
-	check-am clean clean-generic clean-libtool clean-recursive \
-	ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
-	dist-shar dist-tarZ dist-zip distcheck distclean \
-	distclean-generic distclean-hdr distclean-libtool \
-	distclean-recursive distclean-tags distcleancheck distdir \
+.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 \
+	dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+	distcheck distclean distclean-generic distclean-hdr \
+	distclean-libtool distclean-tags distcleancheck distdir \
 	distuninstallcheck dvi dvi-am html html-am info info-am \
 	install install-am install-binSCRIPTS install-data \
-	install-data-am install-data-hook install-exec install-exec-am \
-	install-info install-info-am install-man install-strip \
+	install-data-am install-data-hook 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 installdirs-am \
-	maintainer-clean maintainer-clean-generic \
-	maintainer-clean-recursive mostlyclean mostlyclean-generic \
-	mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \
+	maintainer-clean maintainer-clean-generic mostlyclean \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
 	tags tags-recursive uninstall uninstall-am \
-	uninstall-binSCRIPTS uninstall-info-am
+	uninstall-binSCRIPTS
 
 
 install-data-hook:
@@ -806,10 +917,11 @@ install-data-hook:
 	if type svnversion &>/dev/null; then \
 	    echo `svnversion`\" >> adios_config.flags; \
 	else \
-	    echo "unknown\""; >> adios_config.flags \
+	    echo "unknown\"" >> adios_config.flags; \
 	    echo "Error: svnversion command not found"; \
 	fi 
 	cp adios_config.flags $(DESTDIR)$(bindir)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/NEWS b/NEWS
index a50d299..69ad792 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,50 @@
+1.4.1 Release Dec 2012
+    - aggregated file reader method (from 1.3.1): 
+      use ADIOS_READ_METHOD_BP_AGGREGATE
+    - memory limitation specified by user for chunked reading 
+      now taken into account in file reading
+    - stage writer example code for staged I/O
+      see examples/stage_write
+    - code coupling example code for file-based/staged coupling
+      see examples/coupling
+    - bp2h5 supports converting complex and double complex types
+    - new adios_write_byid() function to write multiple-blocks of
+      the same global array from a process
+    - fix: F90 modules: adios_write, adios_schedule_read
+    - fix: invalid "out of bound" errors when reading multiple steps 
+           of multi-dimensional arrays
+    - fix: double-free bug in support of old read API in Fortran
+    - fix: backward compatibility of old read API to read multi-group 
+           files (fixed "invalid variable id..." errors)
+
+1.4.0 Release July 2012
+    - new read API for staging method with step-by-step processing, 
+       also with non-blocking and chunking APIs
+    - visualization schema added to ADIOS XML format
+    - skel: I/O skeleton generator and evaluation tools
+    - unified error/debug logging
+    - attributes written from only 1 processor to save on metadata
+    - ADIOS version identifier in ADIOS-BP format
+    - extra hidden attributes (version, create/update times) 
+    - Java and Python bindings
+    - F90 modules adios_write_mod and adios_read_mod 
+          to check syntax at compile time
+
+
+1.3.1 Released Nov 2011
+    - fix: non-compliant MPI collective calls
+    - fix: MPI_AMR method caused MPI_Finalize issues on some clusters
+    - fix: histogram calculation: freeing memory too early
+
 1.3 Released July 12, 2011
     - New read method BP_STAGED for reading files with improved performance
-    - Changes in MPI_AMR and MPI_LUSTRE to support default parameters. Parameters for MPI_LUSTRE and MPI_AMR
-      in XML file are not mandatory any more.
+    - Changes in MPI_AMR and MPI_LUSTRE to support default parameters. 
+      Parameters for MPI_LUSTRE and MPI_AMR in XML file are not mandatory 
+      any more.
 
 1.2.1 Released Aug 25, 2010
-    - Bug fix in read API (arrays written every timestep but without time dimension caused aborts)
+    - Bug fix in read API (arrays written every timestep but without time 
+      dimension caused aborts)
     - DIMES method from Rutgers
 
 1.2 Released July 15, 2010
@@ -27,6 +67,7 @@
 1.0.1  Released on Dec 9, 2009
     - fix: builds read API on Mac (was broken at utils/bpdump)
     - fix: Fortran written BP files are correctly read by Fortran readers
-    - added adios_mpi_stripe2 method for improved performance on Lustre file system
+    - added adios_mpi_stripe2 method for improved performance on Lustre 
+      file system
 
 1.0  Released on Nov 18, 2009
diff --git a/TODO b/TODO
index 4e58486..03b242f 100644
--- a/TODO
+++ b/TODO
@@ -1,50 +1,47 @@
--  Make a utility for HPSS that will make an index only file
+WRITE
+=====
 
--  fsck utility to fix files that were not fully completely created correctly.
+- bring back "write=no" into XML tag to skip some variables
+- time-reset function for appending data to the same timestep ("extend" mode)
+- adios_init() should have a communicator parameter
+- complete error logging
 
--  Is the Fortran module interface complete?
+READ
+====
+- chunking: 
+  - support memory limit
 
--  Do we need the ADIOS_WRITE macros anymore? If so, we need to do this:
+- scalar written over timesteps (need to support old-fashioned way,
+i.e., scalar dimension is tagged with "time-index".)
 
-#define ADIOS_WRITE(a,b) call adios_write(a,'b'//char(0),b)
-to
-#define ADIOS_WRITE(a,b) call adios_write(a,#b//char(0),b)
+- missing data blocks when read should contain undef values
 
--  Auto generate the index file intended for the auto-split output (POSIX).
+- simple BP reader
+    - PG block selection read
+    - auto selection read
 
--  Formalize the resilience features of BP and add any features necessary.
+- DataSpaces staging method
+    - per block variable information
+    - statistics
+    - auto selection should do domain decomposition, not just return the 
+      whole dataset per process
 
--  fix MPI_STRIPE method to not require the conditional compilation to work
-properly.
+TEST
+=====
+The statistics of scalars written over multiple timestep. Particularly we 
+need to test adios_complex and adios_double_complex scalars.
 
--  Figure out why and fix append mode slowdown.
+BUILD
+=====
+- shared libraries (request by Numeca)
+- cross-compile support
+- separate source from build 
+- add version defines into adios public header (request by Michele Martone)
 
--  Add write="no" back in. This will force any array dimensions that use this
-to be stored as absolute numbers rather than references to vars.
+MANUAL
+=====
+- developer's manual
 
--  Figure out how to use the same XML file for the app and staging. We need
-some flag to recognize and parse differently. The idea is that we will specify
-the transport for a group is the staging method, but add a parameter, for
-example, that states which method to actually use in the staging area to write
-the data to disk. There might be more changes necessary to make this work.
 
--  Make the group_size optional. This would require making the buffer a
-maximum size and delaying the offset calculation until the close operation.
-There is also the issue of what to do if the buffer is exceeded. It probably
-only makes sense to abort. Otherwise, we'd have to do a big synch point that
-some processes might not be expecting. I don't think this is really a reasonable
-thing to do. Abort is about the only thing that can really work consistently.
 
--  Consider refiniements to the free-memory-percentage to better address
-very dynamic memory usage.
 
--  Add explicit support for "no values present" like NetCDF has.
-
--  Add a checksum data characteristic to the writing so that we can validate
-the data on reading.
-
--  fix the phdf5 method so that it uses the progressive assembly approach
-of the nc4 method.
-
--  fix the tests/genarray so that the 2d and 3d XML files don't collide on
-the group name internally (gpp.py will overwrite one with the other).
diff --git a/aclocal.m4 b/aclocal.m4
index 39ab2ce..dc3f143 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -11,103 +11,196 @@
 # 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
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
+[m4_warning([this file was generated for autoconf 2.63.
+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'.])])
+
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 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 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 48 AC_PROG_LIBTOOL
+# serial 56 LT_INIT
 
 
-# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
-# -----------------------------------------------------------
-# If this macro is not defined by Autoconf, define it here.
-m4_ifdef([AC_PROVIDE_IFELSE],
-         [],
-         [m4_define([AC_PROVIDE_IFELSE],
-	         [m4_ifdef([AC_PROVIDE_$1],
-		           [$2], [$3])])])
+# 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])])
 
 
-# AC_PROG_LIBTOOL
-# ---------------
-AC_DEFUN([AC_PROG_LIBTOOL],
-[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
-dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
-dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
-  AC_PROVIDE_IFELSE([AC_PROG_CXX],
-    [AC_LIBTOOL_CXX],
-    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
-  ])])
-dnl And a similar setup for Fortran 77 support
-  AC_PROVIDE_IFELSE([AC_PROG_F77],
-    [AC_LIBTOOL_F77],
-    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
-])])
-
-dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
-dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
-dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
-  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
-    [AC_LIBTOOL_GCJ],
-    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
-      [AC_LIBTOOL_GCJ],
-      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
-	[AC_LIBTOOL_GCJ],
-      [ifdef([AC_PROG_GCJ],
-	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([A][M_PROG_GCJ],
-	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
-       ifdef([LT_AC_PROG_GCJ],
-	     [define([LT_AC_PROG_GCJ],
-		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
-])])# AC_PROG_LIBTOOL
-
-
-# _AC_PROG_LIBTOOL
-# ----------------
-AC_DEFUN([_AC_PROG_LIBTOOL],
-[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
-AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
+# _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_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
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
 
 # This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+LIBTOOL_DEPS="$ltmain"
 
 # Always use our own libtool.
 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 AC_SUBST(LIBTOOL)dnl
 
-# Prevent multiple expansion
-define([AC_PROG_LIBTOOL], [])
-])# _AC_PROG_LIBTOOL
+_LT_SETUP
 
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
 
-# AC_LIBTOOL_SETUP
-# ----------------
-AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.50)dnl
-AC_REQUIRE([AC_ENABLE_SHARED])dnl
-AC_REQUIRE([AC_ENABLE_STATIC])dnl
-AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# 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 "X$cc_temp" | $Xsed -e 's%.*/%%' -e "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
+_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([AC_PROG_LD])dnl
-AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
-AC_REQUIRE([AC_PROG_NM])dnl
-
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
 AC_REQUIRE([AC_PROG_LN_S])dnl
-AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
-AC_REQUIRE([AC_OBJEXT])dnl
-AC_REQUIRE([AC_EXEEXT])dnl
+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_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])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
 
-AC_LIBTOOL_SYS_MAX_CMD_LEN
-AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-AC_LIBTOOL_OBJDIR
+_LT_CHECK_OBJDIR
 
-AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-_LT_AC_PROG_ECHO_BACKSLASH
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
 
 case $host_os in
 aix3*)
@@ -123,6294 +216,7759 @@ esac
 
 # Sed substitution that helps us do robust quoting.  It backslashifies
 # metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
 
 # Same as above, but do not quote variable references.
-[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+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'
 
-# Constants:
-rm="rm -f"
-
 # Global variables:
-default_ofile=libtool
+ofile=libtool
 can_build_shared=yes
 
 # All known linkers require a `.a' archive for static linking (except MSVC,
 # which needs '.lib').
 libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-AC_CHECK_TOOL(AR, ar, false)
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
 old_CC="$CC"
 old_CFLAGS="$CFLAGS"
 
 # Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
 test -z "$CC" && CC=cc
 test -z "$LTCC" && LTCC=$CC
 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$DLLTOOL" && DLLTOOL=dlltool
 test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
 test -z "$ac_objext" && ac_objext=o
 
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
 _LT_CC_BASENAME([$compiler])
 
 # Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
 case $deplibs_check_method in
 file_magic*)
   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    AC_PATH_MAGIC
+    _LT_PATH_MAGIC
   fi
   ;;
 esac
 
-AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
+# 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
 
-AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
-AC_ARG_WITH([pic],
-    [AC_HELP_STRING([--with-pic],
-	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
-    [pic_mode="$withval"],
-    [pic_mode=default])
-test -z "$pic_mode" && pic_mode=default
+# _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
 
-# Use C for the default configuration in the libtool script
-tagname=
-AC_LIBTOOL_LANG_C_CONFIG
-_LT_AC_TAGCONFIG
-])# AC_LIBTOOL_SETUP
 
 
-# _LT_AC_SYS_COMPILER
-# -------------------
-AC_DEFUN([_LT_AC_SYS_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
+# 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.
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+# _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
+])])])
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_AC_SYS_COMPILER
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
 
 
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
-AC_DEFUN([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
-  case $cc_temp in
-    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
-    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+# _LT_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_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-AC_DEFUN([_LT_COMPILER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_COMPILER_BOILERPLATE
+# _LT_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_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-AC_DEFUN([_LT_LINKER_BOILERPLATE],
-[ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-])# _LT_LINKER_BOILERPLATE
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
 
 
-# _LT_AC_SYS_LIBPATH_AIX
-# ----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_AC_SYS_LIBPATH_AIX
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
 
 
-# _LT_AC_SHELL_INIT(ARG)
-# ----------------------
-AC_DEFUN([_LT_AC_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
-	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
-	 [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_AC_SHELL_INIT
+# _lt_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_AC_PROG_ECHO_BACKSLASH
-# --------------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[_LT_AC_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
 
-case X$ECHO in
-X*--fallback-echo)
-  # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
-  ;;
-esac
 
-echo=${ECHO-echo}
-if test "X[$]1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X[$]1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell.
-  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
 
-if test "X[$]1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-[$]*
-EOF
-  exit 0
-fi
 
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+# 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)])])
 
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
-       echo_test_string=`eval $cmd` &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
 
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
+# lt_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_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
-    IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
 
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-	 test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-	 test "X$echo_testing_string" = "X$echo_test_string"; then
-	# Cool, printf works
-	:
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	export CONFIG_SHELL
-	SHELL="$CONFIG_SHELL"
-	export SHELL
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	echo="$CONFIG_SHELL [$]0 --fallback-echo"
-      else
-	# maybe with a smaller string...
-	prev=:
+# _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 "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
 
-	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
-	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-	  then
-	    break
-	  fi
-	  prev="$cmd"
-	done
 
-	if test "$prev" != 'sed 50q "[$]0"'; then
-	  echo_test_string=`eval $prev`
-	  export echo_test_string
-	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
-	else
-	  # Oops.  We lost completely, so just stick with echo.
-	  echo=echo
-	fi
-      fi
-    fi
-  fi
-fi
-fi
+# _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 "X$<var>" | $Xsed -e "$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)])])])
 
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
 
-AC_SUBST(ECHO)
-])])# _LT_AC_PROG_ECHO_BACKSLASH
+# _LT_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_AC_LOCK
-# -----------
-AC_DEFUN([_LT_AC_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
-    [AC_HELP_STRING([--disable-libtool-lock],
-	[avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+# _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
+])
 
-# 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"
+
+# _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'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
       ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
       ;;
     esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-   if test "$lt_cv_prog_gnu_ld" = yes; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -melf32bsmip"
-      ;;
-    *N32*)
-      LD="${LD-ld} -melf32bmipn32"
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[[\\\\\\\`\\"\\\$]]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
       ;;
-    *64-bit*)
-      LD="${LD-ld} -melf64bmip"
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
       ;;
     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*
-  ;;
+done
 
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *32-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_i386"
-          ;;
-        ppc64-*linux*|powerpc64-*linux*)
-          LD="${LD-ld} -m elf32ppclinux"
-          ;;
-        s390x-*linux*)
-          LD="${LD-ld} -m elf_s390"
-          ;;
-        sparc64-*linux*)
-          LD="${LD-ld} -m elf32_sparc"
-          ;;
-      esac
-      ;;
-    *64-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        ppc*-*linux*|powerpc*-*linux*)
-          LD="${LD-ld} -m elf64ppc"
-          ;;
-        s390*-*linux*)
-          LD="${LD-ld} -m elf64_s390"
-          ;;
-        sparc*-*linux*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
   ;;
+esac
 
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
-    [AC_LANG_PUSH(C)
-     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
-     AC_LANG_POP])
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
-  ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if AC_TRY_EVAL(ac_compile); then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)    LD="${LD-ld} -64" ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
+_LT_OUTPUT_LIBTOOL_INIT
+])
 
-AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
-  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
-  AC_CHECK_TOOL(AS, as, false)
-  AC_CHECK_TOOL(OBJDUMP, objdump, false)
-  ;;
-  ])
-esac
 
-need_locks="$enable_libtool_lock"
+# LT_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])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+  echo
+  AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
 
-])# _LT_AC_LOCK
+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]]
 
-# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
-[AC_REQUIRE([LT_AC_PROG_SED])
-AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$3"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-])
+  -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
 
-if test x"[$]$2" = xyes; then
-    ifelse([$5], , :, [$5])
-else
-    ifelse([$6], , :, [$6])
-fi
-])# AC_LIBTOOL_COMPILER_OPTION
+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.
 
-# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-#                          [ACTION-SUCCESS], [ACTION-FAILURE])
-# ------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
-[AC_CACHE_CHECK([$1], [$2],
-  [$2=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $3"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&AS_MESSAGE_LOG_FD
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         $2=yes
-       fi
-     else
-       $2=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
-])
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
 
-if test x"[$]$2" = xyes; then
-    ifelse([$4], , :, [$4])
-else
-    ifelse([$5], , :, [$5])
-fi
-])# AC_LIBTOOL_LINKER_OPTION
+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.
+if test "$no_create" != yes; then
+  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)
+fi
+])# LT_OUTPUT
 
-# AC_LIBTOOL_SYS_MAX_CMD_LEN
-# --------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
-[# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
-  i=0
-  teststring="ABCD"
 
-  case $build_os in
-  msdosdjgpp*)
-    # On DJGPP, this test can blow up pretty badly due to problems in libc
-    # (any single argument exceeding 2000 bytes causes a buffer overrun
-    # during glob expansion).  Even if it were fixed, the result of this
-    # check would be larger than it should be.
-    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
-    ;;
+# _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
 
-  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;
-    ;;
+    cfgfile="${ofile}T"
+    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+    $RM "$cfgfile"
 
-  cygwin* | mingw*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
+    cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
 
-  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;
-    ;;
+# `$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
 
-  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`
-    ;;
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
 
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
+_LT_EOF
 
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
-    ;;
-  *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
-	       = "XX$teststring") >/dev/null 2>&1 &&
-	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
-	    lt_cv_sys_max_cmd_len=$new_result &&
-	    test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      teststring=$teststring$teststring
-    done
-    teststring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+  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
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
-  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
-  AC_MSG_RESULT(none)
-fi
-])# AC_LIBTOOL_SYS_MAX_CMD_LEN
 
+  _LT_PROG_LTMAIN
 
-# _LT_AC_CHECK_DLFCN
-# ------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)dnl
-])# _LT_AC_CHECK_DLFCN
+  # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
 
+  _LT_PROG_XSI_SHELLFNS
 
-# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ---------------------------------------------------------------------
-AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
-  [$4]
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
 
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
 
-#include <stdio.h>
+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
 
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
 
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
-
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
+# 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], [])
 
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
 
-    exit (status);
-}]
-EOF
-  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) $1 ;;
-      x$lt_dlneed_uscore) $2 ;;
-      x$lt_dlunknown|x*) $3 ;;
-    esac
-  else :
-    # compilation failed
-    $3
-  fi
-fi
-rm -fr conftest*
-])# _LT_AC_TRY_DLOPEN_SELF
 
+# 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)],
+  [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
 
-# AC_LIBTOOL_DLOPEN_SELF
-# ----------------------
-AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
 
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
+# _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([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)])
+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], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
 
-  mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
+_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
 
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-   ;;
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
-  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
-    ])
-   ;;
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
-  *)
-    AC_CHECK_FUNC([shl_load],
-	  [lt_cv_dlopen="shl_load"],
-      [AC_CHECK_LIB([dld], [shl_load],
-	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
-	[AC_CHECK_FUNC([dlopen],
-	      [lt_cv_dlopen="dlopen"],
-	  [AC_CHECK_LIB([dl], [dlopen],
-		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
-	    [AC_CHECK_LIB([svld], [dlopen],
-		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
-	      [AC_CHECK_LIB([dld], [dld_link],
-		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
-	      ])
-	    ])
-	  ])
-	])
-      ])
-    ;;
-  esac
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
 
-  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"
+# _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
 
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
+# _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
 
-    AC_CACHE_CHECK([whether a program can dlopen itself],
-	  lt_cv_dlopen_self, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
-	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+# _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 test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 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"
     ])
-
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
-    	  lt_cv_dlopen_self_static, [dnl
-	  _LT_AC_TRY_DLOPEN_SELF(
-	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
-	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
-      ])
+    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" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
     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 ;;
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# 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
+  _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+  _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
-fi
-])# AC_LIBTOOL_DLOPEN_SELF
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    _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
+# -----------------------
+# 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.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`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 "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
 
-# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
-# ---------------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler
-AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
-  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&AS_MESSAGE_LOG_FD
-   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-     fi
-   fi
-   chmod u+w . 2>&AS_MESSAGE_LOG_FD
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
-])
-])# AC_LIBTOOL_PROG_CC_C_O
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+	 [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
 
 
-# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
-# -----------------------------------------
-# Check to see if we can do hard links to lock some files if needed
-AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
-[AC_REQUIRE([_LT_AC_LOCK])dnl
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
 
-hard_links="nottested"
-if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  AC_MSG_CHECKING([if we can lock with hard links])
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  AC_MSG_RESULT([$hard_links])
-  if test "$hard_links" = no; then
-    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
-    need_locks=warn
-  fi
+case X$lt_ECHO in
+X*--fallback-echo)
+  # Remove one level of quotation (which was required for Make).
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+  ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X[$]1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
+  :
 else
-  need_locks=no
+  # Restart under the correct shell.
+  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
 fi
-])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
-
 
-# AC_LIBTOOL_OBJDIR
-# -----------------
-AC_DEFUN([AC_LIBTOOL_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
+if test "X[$]1" = X--fallback-echo; then
+  # used as fallback echo
+  shift
+  cat <<_LT_EOF
+[$]*
+_LT_EOF
+  exit 0
 fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-])# AC_LIBTOOL_OBJDIR
-
 
-# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
-# ----------------------------------------------
-# Check hardcoding attributes.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_AC_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
-   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
-   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+# 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
 
-  # We can hardcode non-existant directories.
-  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
-     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
-    # Linking always hardcodes the temporary library directory.
-    _LT_AC_TAGVAR(hardcode_action, $1)=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+if test -z "$lt_ECHO"; then
+  if test "X${echo_test_string+set}" != Xset; then
+    # find a string as large as possible, as long as the shell can cope with it
+    for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+      then
+        break
+      fi
+    done
   fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
 
-if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
-])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+     test "X$echo_testing_string" = "X$echo_test_string"; then
+    :
+  else
+    # The Solaris, AIX, and Digital Unix default echo programs unquote
+    # backslashes.  This makes it impossible to quote backslashes using
+    #   echo "$something" | sed 's/\\/\\\\/g'
+    #
+    # So, first we look for a working echo in the user's PATH.
 
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
+    IFS="$lt_save_ifs"
 
-# AC_LIBTOOL_SYS_LIB_STRIP
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
-[striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-   darwin*)
-       if test -n "$STRIP" ; then
-         striplib="$STRIP -x"
-         AC_MSG_RESULT([yes])
-       else
-  AC_MSG_RESULT([no])
-fi
-       ;;
-   *)
-  AC_MSG_RESULT([no])
-    ;;
-  esac
-fi
-])# AC_LIBTOOL_SYS_LIB_STRIP
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+      else
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	  # Cool, printf works
+	  :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	  export CONFIG_SHELL
+	  SHELL="$CONFIG_SHELL"
+	  export SHELL
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+        else
+	  # maybe with a smaller string...
+	  prev=:
 
+	  for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+	    then
+	      break
+	    fi
+	    prev="$cmd"
+	  done
 
-# AC_LIBTOOL_SYS_DYNAMIC_LINKER
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
-[AC_MSG_CHECKING([dynamic linker characteristics])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+	  if test "$prev" != 'sed 50q "[$]0"'; then
+	    echo_test_string=`eval $prev`
+	    export echo_test_string
+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+	  else
+	    # Oops.  We lost completely, so just stick with echo.
+	    ECHO=echo
+	  fi
+        fi
+      fi
+    fi
   fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
 
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
 
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+    [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
 
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
 
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[[01]] | aix4.[[01]].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-	:
-      else
-	can_build_shared=no
-      fi
-      ;;
+# _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
-    # 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}'
+  fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
     else
-      # 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'
+      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
-    shlibpath_var=LIBPATH
   fi
+  rm -rf conftest*
   ;;
 
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+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*
   ;;
 
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
+*-*-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
   ;;
-
-bsdi[[45]]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if AC_TRY_EVAL(ac_compile); then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+	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
 
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
 
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+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 \$oldlib"
+    ;;
   *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
     ;;
   esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_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_CMD_OLD_ARCHIVE
 
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
 
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
+# _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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       $2=yes
+     fi
+   fi
+   $RM conftest*
+])
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
+if test x"[$]$2" = xyes; then
+    m4_if([$5], , :, [$5])
+else
+    m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
 
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[[123]]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
+
+# _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 "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         $2=yes
+       fi
+     else
+       $2=yes
+     fi
+   fi
+   $RM -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
     ;;
-  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
+
+  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;
     ;;
-  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
+
+  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;
     ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
+
+  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;
     ;;
-  esac
-  ;;
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
+  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`
+    ;;
 
-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"
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
+    ;;
+
+  osf*)
+    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+    # nice to cause kernel panics so lets avoid the loop below.
+    # First set a reasonable default.
+    lt_cv_sys_max_cmd_len=16384
+    #
+    if test -x /sbin/sysconfig; then
+      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+        *1*) lt_cv_sys_max_cmd_len=-1 ;;
+      esac
     fi
-    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'
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
     ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
-
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
-
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
-	else
-		version_type=irix
-	fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
+  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
     ;;
   *)
-    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
+    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"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$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
-  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
-  ;;
+])
+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
 
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
+# 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], [])
 
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
-    if AC_TRY_EVAL(ac_compile); then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
 
-  # 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/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
-  fi
 
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
+# _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 __oline__ "configure"
+#include "confdefs.h"
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
-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
-  ;;
+#include <stdio.h>
 
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
 
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
+/* 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
 
-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
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
+
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
   else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
+    puts (dlerror ());
 
-os2*)
-  libname_spec='$name'
-  shrext_cmds=".dll"
-  need_lib_prefix=no
-  library_names_spec='$libname${shared_ext} $libname.a'
-  dynamic_linker='OS/2 ld.exe'
-  shlibpath_var=LIBPATH
-  ;;
-
-osf3* | osf4* | osf5*)
-  version_type=osf
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
-  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
-  ;;
-
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
-
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
-
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
-
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-	;;
+  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
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
-
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
-
-*)
-  dynamic_linker=no
-  ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
-])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
 
 
-# _LT_AC_TAGCONFIG
-# ----------------
-AC_DEFUN([_LT_AC_TAGCONFIG],
-[AC_ARG_WITH([tags],
-    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
-        [include additional configurations @<:@automatic@:>@])],
-    [tagnames="$withval"])
-
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    AC_MSG_WARN([output file `$ofile' does not exist])
-  fi
+# 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=
 
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
-    else
-      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
-    fi
-  fi
-  if test -z "$LTCFLAGS"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
-  fi
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
 
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
 
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
-    "") ;;
-    *)  AC_MSG_ERROR([invalid tag name: $tagname])
-	;;
-    esac
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
 
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      AC_MSG_ERROR([tag name \"$tagname\" already exists])
-    fi
+  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
+    ])
+    ;;
 
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
+  *)
+    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
 
-      case $tagname in
-      CXX)
-	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-	    (test "X$CXX" != "Xg++"))) ; then
-	  AC_LIBTOOL_LANG_CXX_CONFIG
-	else
-	  tagname=""
-	fi
-	;;
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
 
-      F77)
-	if test -n "$F77" && test "X$F77" != "Xno"; then
-	  AC_LIBTOOL_LANG_F77_CONFIG
-	else
-	  tagname=""
-	fi
-	;;
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-      GCJ)
-	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-	  AC_LIBTOOL_LANG_GCJ_CONFIG
-	else
-	  tagname=""
-	fi
-	;;
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-      RC)
-	AC_LIBTOOL_LANG_RC_CONFIG
-	;;
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
 
-      *)
-	AC_MSG_ERROR([Unsupported tag name: $tagname])
-	;;
-      esac
+    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)
+    ])
 
-      # Append the new tag name to the list of available tags.
-      if test -n "$tagname" ; then
-      available_tags="$available_tags $tagname"
-    fi
+    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
-  done
-  IFS="$lt_save_ifs"
-
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    AC_MSG_ERROR([unable to update list of available tagged configurations.])
-  fi
-fi
-])# _LT_AC_TAGCONFIG
 
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
 
-# AC_LIBTOOL_DLOPEN
-# -----------------
-# enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN],
- [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_DLOPEN
+  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
 
-# AC_LIBTOOL_WIN32_DLL
-# --------------------
-# declare package support for building win32 DLLs
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
-])# AC_LIBTOOL_WIN32_DLL
+# 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], [])
 
 
-# AC_ENABLE_SHARED([DEFAULT])
+# _LT_COMPILER_C_O([TAGNAME])
 # ---------------------------
-# implement the --enable-shared flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([shared],
-    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
-	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
-])# AC_ENABLE_SHARED
-
-
-# AC_DISABLE_SHARED
-# -----------------
-# set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)
-])# AC_DISABLE_SHARED
+# 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:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&AS_MESSAGE_LOG_FD
+   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       _LT_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
 
-# AC_ENABLE_STATIC([DEFAULT])
-# ---------------------------
-# implement the --enable-static flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([static],
-    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
-	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
-])# AC_ENABLE_STATIC
 
+# _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])
 
-# AC_DISABLE_STATIC
-# -----------------
-# set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)
-])# AC_DISABLE_STATIC
+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
 
 
-# AC_ENABLE_FAST_INSTALL([DEFAULT])
-# ---------------------------------
-# implement the --enable-fast-install flag
-# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE([fast-install],
-    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
-    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
-    [p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac],
-    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
-])# AC_ENABLE_FAST_INSTALL
+# _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
 
 
-# AC_DISABLE_FAST_INSTALL
-# -----------------------
-# set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)
-])# AC_DISABLE_FAST_INSTALL
+# _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)])
 
-# AC_LIBTOOL_PICMODE([MODE])
-# --------------------------
-# implement the --with-pic flag
-# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)
-])# AC_LIBTOOL_PICMODE
+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
 
 
-# AC_PROG_EGREP
-# -------------
-# This is predefined starting with Autoconf 2.54, so this conditional
-# definition can be removed once we require Autoconf 2.54 or later.
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
-[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
-   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
-    fi])
- EGREP=$ac_cv_prog_egrep
- AC_SUBST([EGREP])
-])])
-
-
-# AC_PATH_TOOL_PREFIX
-# -------------------
-# find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] |  ?:[\\/]*])
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word.  This closes a longstanding sh security hole.
-  ac_dummy="ifelse([$2], , $PATH, [$2])"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$1; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    $EGREP "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<EOF 1>&2
+# _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
 
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
 
-EOF
-	  fi ;;
-	esac
-      fi
-      break
+# _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
+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
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # 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
-  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)
+  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; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
 else
-  AC_MSG_RESULT(no)
-fi
-])# AC_PATH_TOOL_PREFIX
+  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
 
-# AC_PATH_MAGIC
-# -------------
-# find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
-  else
-    MAGIC_CMD=:
-  fi
-fi
-])# AC_PATH_MAGIC
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
 
+  # AIX 3 has no versioning support, so we append a major version to the name.
+  soname_spec='${libname}${release}${shared_ext}$major'
+  ;;
 
-# AC_PROG_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH([gnu-ld],
-    [AC_HELP_STRING([--with-gnu-ld],
-	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
-    [test "$withval" = no || with_gnu_ld=yes],
-    [with_gnu_ld=no])
-AC_REQUIRE([LT_AC_PROG_SED])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by $CC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]]* | ?:[[\\/]]*)
-      re_direlt='/[[^/]][[^/]]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
+aix[[4-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  hardcode_into_libs=yes
+  if test "$host_cpu" = ia64; then
+    # AIX 5 supports IA64
+    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+    shlibpath_var=LD_LIBRARY_PATH
+  else
+    # With GCC up to 2.95.x, collect2 would create an import file
+    # for dependence libraries.  The import file would start with
+    # the line `#! .'.  This would cause the generated library to
+    # depend on `.', always an invalid library.  This was fixed in
+    # development snapshots of GCC prior to 3.0.
+    case $host_os in
+      aix4 | aix4.[[01]] | aix4.[[01]].*)
+      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+	   echo ' yes '
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+	:
+      else
+	can_build_shared=no
+      fi
       ;;
-  "")
-    # 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
+    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
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])# AC_PROG_LD
-
-
-# AC_PROG_LD_GNU
-# --------------
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
+    shlibpath_var=LIBPATH
+  fi
   ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# AC_PROG_LD_GNU
-
 
-# AC_PROG_LD_RELOAD_FLAG
-# ----------------------
-# find reload flag for linker
-#   -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files],
-  lt_cv_ld_reload_flag,
-  [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
+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}'
     ;;
-esac
-])# AC_PROG_LD_RELOAD_FLAG
-
-
-# AC_DEPLIBS_CHECK_METHOD
-# -----------------------
-# how to check for library dependencies
-#  -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
+  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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
   ;;
 
 beos*)
-  lt_cv_deplibs_check_method=pass_all
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
   ;;
 
 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'
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
   ;;
 
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
 
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    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
 
-freebsd* | kfreebsd*-gnu | dragonfly*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
       ;;
     esac
-  else
-    lt_cv_deplibs_check_method=pass_all
-  fi
-  ;;
+    ;;
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
   ;;
 
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
+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
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[[123]]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
   case $host_cpu in
   ia64*)
-    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
+    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*)
-    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+    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
     ;;
   *)
-    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
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
   ;;
 
-interix3*)
-  # 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)$'
+interix[[3-9]]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
   ;;
 
 irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
   esac
-  lt_cv_deplibs_check_method=pass_all
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
   ;;
 
 # This must be Linux ELF.
-linux*)
-  lt_cv_deplibs_check_method=pass_all
+linux* | k*bsd*-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'
+  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
+  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],
+       [shlibpath_overrides_runpath=yes])])
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # 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
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # 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;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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'
   ;;
 
 netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  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
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+    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
   ;;
 
-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
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
+*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*)
-  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)$'
+  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
-    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+    shlibpath_overrides_runpath=yes
   fi
   ;;
 
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
+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
   ;;
 
-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
+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"
   ;;
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
+rdos*)
+  dynamic_linker=no
   ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-])# AC_DEPLIBS_CHECK_METHOD
 
+solaris*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
 
-# AC_PROG_NM
-# ----------
-# find the pathname to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
-[if test -n "$NM"; then
-  # Let the user override the test.
-  lt_cv_path_NM="$NM"
-else
-  lt_nm_to_check="${ac_tool_prefix}nm"
-  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
-    lt_nm_to_check="$lt_nm_to_check nm"
+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
-  for lt_tmp_nm in $lt_nm_to_check; do
-    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
-      IFS="$lt_save_ifs"
-      test -z "$ac_dir" && ac_dir=.
-      tmp_nm="$ac_dir/$lt_tmp_nm"
-      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
-	# Check to see if the nm accepts a BSD-compat flag.
-	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
-	#   nm: unknown option "B" ignored
-	# Tru64's nm complains that /dev/null is an invalid object file
-	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
-	*/dev/null* | *'Invalid file or object type'*)
-	  lt_cv_path_NM="$tmp_nm -B"
-	  break
-	  ;;
-	*)
-	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
-	  */dev/null*)
-	    lt_cv_path_NM="$tmp_nm -p"
-	    break
-	    ;;
-	  *)
-	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
-	    continue # so that we can try to find one that supports BSD flags
-	    ;;
-	  esac
-	  ;;
-	esac
-      fi
-    done
-    IFS="$lt_save_ifs"
-  done
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-])# AC_PROG_NM
-
-
-# AC_CHECK_LIBM
-# -------------
-# check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
-  # These system don't have libm, or don't need it
-  ;;
-*-ncr-sysv4.3*)
-  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
-  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
-  ;;
-*)
-  AC_CHECK_LIB(m, cos, LIBM="-lm")
+  need_version=yes
   ;;
-esac
-])# AC_CHECK_LIBM
 
-
-# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl convenience library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-convenience to the configure arguments.  Note that
-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
-# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
-# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
-# (note the single quotes!).  If your package is not flat and you're not
-# using automake, define top_builddir and top_srcdir appropriately in
-# the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  case $enable_ltdl_convenience in
-  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
-  "") enable_ltdl_convenience=yes
-      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      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
-  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
-  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_CONVENIENCE
+  ;;
 
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
 
-# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
-# -----------------------------------
-# sets LIBLTDL to the link flags for the libltdl installable library and
-# LTDLINCL to the include flags for the libltdl header and adds
-# --enable-ltdl-install to the configure arguments.  Note that
-# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
-# and an installed libltdl is not found, it is assumed to be `libltdl'.
-# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
-# '${top_srcdir}/' (note the single quotes!).  If your package is not
-# flat and you're not using automake, define top_builddir and top_srcdir
-# appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-  AC_CHECK_LIB(ltdl, lt_dlinit,
-  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
-  [if test x"$enable_ltdl_install" = xno; then
-     AC_MSG_WARN([libltdl not installed, but installation disabled])
-   else
-     enable_ltdl_install=yes
-   fi
-  ])
-  if test x"$enable_ltdl_install" = x"yes"; then
-    ac_configure_args="$ac_configure_args --enable-ltdl-install"
-    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
-    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+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
-    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
-    LIBLTDL="-lltdl"
-    LTDLINCL=
+    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
-  # For backwards non-gettext consistent compatibility...
-  INCLTDL="$LTDLINCL"
-])# AC_LIBLTDL_INSTALLABLE
-
+  sys_lib_dlsearch_path_spec='/usr/lib'
+  ;;
 
-# AC_LIBTOOL_CXX
-# --------------
-# enable support for C++ libraries
-AC_DEFUN([AC_LIBTOOL_CXX],
-[AC_REQUIRE([_LT_AC_LANG_CXX])
-])# AC_LIBTOOL_CXX
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
 
+uts4*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
 
-# _LT_AC_LANG_CXX
-# ---------------
-AC_DEFUN([_LT_AC_LANG_CXX],
-[AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
-])# _LT_AC_LANG_CXX
+*)
+  dynamic_linker=no
+  ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
 
-# _LT_AC_PROG_CXXCPP
-# ------------------
-AC_DEFUN([_LT_AC_PROG_CXXCPP],
-[
-AC_REQUIRE([AC_PROG_CXX])
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  AC_PROG_CXXCPP
+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
-])# _LT_AC_PROG_CXXCPP
-
-# AC_LIBTOOL_F77
-# --------------
-# enable support for Fortran 77 libraries
-AC_DEFUN([AC_LIBTOOL_F77],
-[AC_REQUIRE([_LT_AC_LANG_F77])
-])# AC_LIBTOOL_F77
 
+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_AC_LANG_F77
-# ---------------
-AC_DEFUN([_LT_AC_LANG_F77],
-[AC_REQUIRE([AC_PROG_F77])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
-])# _LT_AC_LANG_F77
+_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([], [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
 
-# AC_LIBTOOL_GCJ
-# --------------
-# enable support for GCJ libraries
-AC_DEFUN([AC_LIBTOOL_GCJ],
-[AC_REQUIRE([_LT_AC_LANG_GCJ])
-])# AC_LIBTOOL_GCJ
-
-
-# _LT_AC_LANG_GCJ
-# ---------------
-AC_DEFUN([_LT_AC_LANG_GCJ],
-[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
-  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
-    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
-      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
-	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
-	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
-])# _LT_AC_LANG_GCJ
-
-
-# AC_LIBTOOL_RC
-# -------------
-# enable support for Windows resource files
-AC_DEFUN([AC_LIBTOOL_RC],
-[AC_REQUIRE([LT_AC_PROG_RC])
-_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
-])# AC_LIBTOOL_RC
-
-
-# AC_LIBTOOL_LANG_C_CONFIG
-# ------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
-AC_DEFUN([_LT_AC_LANG_C_CONFIG],
-[lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
-
-_LT_AC_SYS_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-AC_LIBTOOL_SYS_LIB_STRIP
-AC_LIBTOOL_DLOPEN_SELF
-
-# Report which library types will actually be built
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
-
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
+_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
 
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-    ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_C_CONFIG
-
-
-# AC_LIBTOOL_LANG_CXX_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
-AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
-[AC_LANG_PUSH(C++)
-AC_REQUIRE([AC_PROG_CXX])
-AC_REQUIRE([_LT_AC_PROG_CXXCPP])
-
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Dependencies to place before and after the object being linked:
-_LT_AC_TAGVAR(predep_objects, $1)=
-_LT_AC_TAGVAR(postdep_objects, $1)=
-_LT_AC_TAGVAR(predeps, $1)=
-_LT_AC_TAGVAR(postdeps, $1)=
-_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
+# 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], [])
 
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+# _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
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
+# 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
 
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
+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
 
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+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
-  $as_unset lt_cv_prog_gnu_ld
+  AC_MSG_CHECKING([for non-GNU ld])
 fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
-  lt_cv_path_LD=$lt_cv_path_LDCXX
+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
-  $as_unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+  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
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+  AC_MSG_RESULT(no)
 fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
 
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
 
-  AC_PROG_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], [])
 
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if test "$with_gnu_ld" = yes; then
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+# _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
 
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
 
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-	grep 'no-whole-archive' > /dev/null; then
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+# _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
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
     else
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
     fi
-  else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # linker, instead of GNU ld.  If possible, this setting should
-    # overridden to take advantage of the native linker features on
-    # the platform it is being used on.
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
+    ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
 
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
 
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-fi
+# _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.
 
-# PORTME: fill in a description of your system's C++ link characteristics
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-_LT_AC_TAGVAR(ld_shlibs, $1)=yes
 case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      aix_use_runtimelinking=no
-
-      # Test if we are trying to use run time linking or normal
-      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-      # need to do runtime linking.
-      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-	for ld_flag in $LDFLAGS; do
-	  case $ld_flag in
-	  *-brtl*)
-	    aix_use_runtimelinking=yes
-	    break
-	    ;;
-	  esac
-	done
-	;;
-      esac
+aix[[4-9]]*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-    # 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.
+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
+  ;;
 
-    _LT_AC_TAGVAR(archive_cmds, $1)=''
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+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'
+  ;;
 
-    if test "$GXX" = yes; then
-      case $host_os in aix4.[[012]]|aix4.[[012]].*)
-      # We only want to do this on AIX 4.2 and lower, the check
-      # below for broken collect2 doesn't work under 4.3+
-	collect2name=`${CC} -print-prog-name=collect2`
-	if test -f "$collect2name" && \
-	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	then
-	  # We have reworked collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	else
-	  # We have old collect2
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-	  # It fails to find uninstalled libraries when the uninstalled
-	  # path is not listed in the libpath.  Setting hardcode_minus_L
-	  # to unsupported forces relinking
-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-	fi
-	;;
-      esac
-      shared_flag='-shared'
-      if test "$aix_use_runtimelinking" = yes; then
-	shared_flag="$shared_flag "'${wl}-G'
-      fi
-    else
-      # not using gcc
-      if test "$host_cpu" = ia64; then
-	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-	# chokes on -Wl,-G. The following line is correct:
-	shared_flag='-G'
-      else
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag='${wl}-G'
-	else
-	  shared_flag='${wl}-bM:SRE'
-	fi
-      fi
-    fi
+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.
+  if ( 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
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
 
-    # It seems that -bexpall does not export symbols beginning with
-    # underscore (_), so it is better to generate a list of symbols to export.
-    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-      # Determine the default libpath from the value encoded in an empty executable.
-      _LT_AC_SYS_LIBPATH_AIX
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-      else
-	# Determine the default libpath from the value encoded in an empty executable.
-	_LT_AC_SYS_LIBPATH_AIX
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	# Warning - without using the other run time loading flags,
-	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	# Exported symbols can be pulled into shared objects from archives
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-	# This is similar to how AIX traditionally builds its shared libraries.
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-      fi
-    fi
-    ;;
-
-  beos*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
-    ;;
-
-  chorus*)
-    case $cc_basename in
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-
-  cygwin* | mingw* | pw32*)
-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-    # as there is no search path for DLLs.
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-    _LT_AC_TAGVAR(always_export_symbols, $1)=no
-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is; otherwise, prepend...
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	cp $export_symbols $output_objdir/$soname.def;
-      else
-	echo EXPORTS > $output_objdir/$soname.def;
-	cat $export_symbols >> $output_objdir/$soname.def;
-      fi~
-      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-    else
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    fi
+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*)
-        case $host_os in
-        rhapsody* | darwin1.[[012]])
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[[012]])
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-        esac
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-    if test "$GXX" = yes ; then
-      lt_int_apple_cc_single_mod=no
-      output_verbose_link_cmd='echo'
-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
-       lt_int_apple_cc_single_mod=yes
-      fi
-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      else
-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-        fi
-        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          else
-            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          fi
-            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-          ;;
-      esac
-      fi
-        ;;
 
-  dgux*)
-    case $cc_basename in
-      ec++*)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      ghcx*)
-	# Green Hills C++ Compiler
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  freebsd[[12]]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  freebsd-elf*)
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    ;;
-  freebsd* | kfreebsd*-gnu | dragonfly*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-    ;;
-  gnu*)
-    ;;
-  hpux9*)
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-				# but as the default
-				# location of the library.
-
-    case $cc_basename in
-    CC*)
-      # FIXME: insert proper C++ library support
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    aCC*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      #
-      # There doesn't appear to be a way to prevent this compiler from
-      # explicitly linking system object files so we need to strip them
-      # from the output so that they don't get included in the library
-      # dependencies.
-      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-      ;;
-    *)
-      if test "$GXX" = yes; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-        # FIXME: insert proper C++ library support
-        _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
-    ;;
-  hpux10*|hpux11*)
-    if test $with_gnu_ld = no; then
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-      case $host_cpu in
-      hppa*64*|ia64*)
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-        ;;
-      *)
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-        ;;
-      esac
-    fi
+freebsd* | dragonfly*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
     case $host_cpu in
-    hppa*64*|ia64*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
-    *)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
-					      # but as the default
-					      # location of the library.
+    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
+  ;;
 
-    case $cc_basename in
-      CC*)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      aCC*)
-	case $host_cpu in
-	hppa*64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	  ;;
-	ia64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	  ;;
-	*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	  ;;
-	esac
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test $with_gnu_ld = no; then
-	    case $host_cpu in
-	    hppa*64*)
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      ;;
-	    ia64*)
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      ;;
-	    *)
-	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      ;;
-	    esac
-	  fi
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  interix3*)
-    _LT_AC_TAGVAR(hardcode_direct, $1)=no
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-    # Instead, shared libraries are loaded at an image base (0x10000000 by
-    # default) and relocated if they conflict, which is a slow very memory
-    # consuming and fragmenting process.  To avoid this, we pick a random,
-    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    ;;
-  irix5* | irix6*)
-    case $cc_basename in
-      CC*)
-	# SGI C++
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-	# Archives containing C++ object files must be created using
-	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test "$with_gnu_ld" = no; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	  else
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
-	  fi
-	fi
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-	;;
-    esac
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC*)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
-	;;
-      icpc*)
-	# Intel C++
-	with_gnu_ld=yes
-	# version 8.0 and above of icpc choke on multiply defined symbols
-	# if we add $predep_objects and $postdep_objects, however 7.1 and
-	# earlier do not add the objects themselves.
-	case `$CC -V 2>&1` in
-	*"Version 7."*)
-  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-	  ;;
-	*)  # Version 8.0 or newer
-	  tmp_idyn=
-	  case $host_cpu in
-	    ia64*) tmp_idyn=' -i_dynamic';;
-	  esac
-  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-	  ;;
-	esac
-	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-	;;
-      pgCC*)
-        # Portland Group C++ compiler
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-        ;;
-      cxx*)
-	# Compaq C++
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-	runpath_var=LD_RUN_PATH
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx*)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    fi
-    # Workaround some broken pre-1.5 toolchains
-    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+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
     ;;
-  openbsd2*)
-    # C++ shared libraries are fairly broken
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+  hppa*64*)
+    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
-  openbsd*)
-    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    fi
-    output_verbose_link_cmd='echo'
+  *)
+    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
     ;;
-  osf3*)
-    case $cc_basename in
-      KCC*)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
+  esac
+  ;;
 
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+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)$'
+  ;;
 
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+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
+  ;;
 
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+# This must be Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-	;;
-      RCC*)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      cxx*)
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+  fi
+  ;;
 
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+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
+  ;;
 
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+*nto* | *qnx*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC*)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Archives containing C++ object files must be created using
-	# the KAI C++ compiler.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
-	;;
-      RCC*)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      cxx*)
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	  echo "-hidden">> $lib.exp~
-	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
-	  $rm $lib.exp'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+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
+  ;;
 
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-	else
-	  # FIXME: insert proper C++ library support
-	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	fi
-	;;
-    esac
+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*`
     ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
     ;;
-  sunos4*)
-    case $cc_basename in
-      CC*)
-	# Sun C++ 4.x
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      lcc*)
-	# Lucid
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
+  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 )'
     ;;
-  solaris*)
-    case $cc_basename in
-      CC*)
-	# Sun C++ 4.2, 5.x and Centerline C++
-        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
-	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	case $host_os in
-	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-	  *)
-	    # The C++ compiler is used as linker so we must use $wl
-	    # flag to pass the commands to the underlying system
-	    # linker. We must also pass each convience library through
-	    # to the system linker between allextract/defaultextract.
-	    # The C++ compiler will combine linker options so we
-	    # cannot just pass the convience library names through
-	    # without $wl.
-	    # Supported since Solaris 2.6 (maybe 2.5.1?)
-	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
-	    ;;
-	esac
-	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-
-	output_verbose_link_cmd='echo'
-
-	# Archives containing C++ object files must be created using
-	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
-	;;
-      gcx*)
-	# Green Hills C++ Compiler
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+  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
+  ;;
 
-	# The C++ compiler must be used to create the archive.
-	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	;;
-      *)
-	# GNU C++ compiler with Solaris linker
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
-	  if $CC --version | grep -v '^2\.7' > /dev/null; then
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-	  else
-	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
-	    # platform.
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-	  fi
-
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
-	fi
-	;;
-    esac
-    ;;
-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-      *)
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-    esac
-    ;;
-  sysv5* | sco3.2v5* | sco5v6*)
-    # Note: We can NOT use -z defs as we might desire, because we do not
-    # link with -lc, and that would cause any symbols used from libc to
-    # always be unresolved, which means just about no library would
-    # ever link correctly.  If we're not using GNU ld we use -z text
-    # though, which does catch some bad symbols but isn't as heavy-handed
-    # as -z defs.
-    # For security reasons, it is highly recommended that you always
-    # use absolute paths for naming shared libraries, and exclude the
-    # DT_RUNPATH tag from executables and libraries.  But doing so
-    # requires that you compile everything twice, which is a pain.
-    # So that behaviour is only enabled if SCOABSPATH is set to a
-    # non-empty value in the environment.  Most likely only useful for
-    # creating official distributions of packages.
-    # This is a hack until libtool officially supports absolute path
-    # names for shared libraries.
-    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-      *)
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-    esac
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC*)
-	# NonStop-UX NCC 3.20
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-    ;;
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 esac
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_AC_TAGVAR(GCC, $1)="$GXX"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_POSTDEP_PREDEP($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-])# AC_LIBTOOL_LANG_CXX_CONFIG
-
-# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
-# ------------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library.  It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
-int a;
-void foo (void) { a = 0; }
-EOF
-],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
-],[$1],[F77],[cat > conftest.$ac_ext <<EOF
-      subroutine foo
-      implicit none
-      integer*4 a
-      a=0
-      return
-      end
-EOF
-],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
-public class foo {
-  private int a;
-  public void bar (void) {
-    a = 0;
-  }
-};
-EOF
 ])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
-
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
-
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
-
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
-
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-	  || test $p = "-R"; then
-	 prev=$p
-	 continue
-       else
-	 prev=
-       fi
-
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
-	   # Internal compiler library paths should come after those
-	   # provided the user.  The postdeps already come after the
-	   # user supplied libs so there is no need to process them.
-	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
-	   else
-	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
-	   fi
-	   ;;
-	 # The "-l" case would never come before the object being
-	 # linked, so don't bother handling this case.
-	 esac
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
-	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
-	 else
-	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
-	 fi
-       fi
-       ;;
-
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-	 pre_test_object_deps_done=yes
-	 continue
-       fi
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
 
-       if test "$pre_test_object_deps_done" = no; then
-	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
-	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
-	 fi
-       else
-	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
-	 else
-	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
-	 fi
-       fi
-       ;;
+_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_CHECK_MAGIC_METHOD
 
-    *) ;; # Ignore the rest.
 
-    esac
+# 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
-
-  # Clean up.
-  rm -f a.out a.exe
+  : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+  NM="$lt_cv_path_NM"
 else
-  echo "libtool.m4: error: problem compiling $1 test program"
+  # Didn't find any BSD compatible name lister, look for dumpbin.
+  AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+  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:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&AS_MESSAGE_LOG_FD
+  (eval echo "\"\$as_me:__oline__: $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:__oline__: 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
 
-$rm -f confest.$objext
+# 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], [])
 
-# PORTME: override above test on systems where it is broken
-ifelse([$1],[CXX],
-[case $host_os in
-interix3*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  _LT_AC_TAGVAR(predep_objects,$1)=
-  _LT_AC_TAGVAR(postdep_objects,$1)=
-  _LT_AC_TAGVAR(postdeps,$1)=
-  ;;
 
-solaris*)
-  case $cc_basename in
-  CC*)
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
-    ;;
-  esac
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+  # These system don't have libm, or don't need it
+  ;;
+*-ncr-sysv4.3*)
+  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+  ;;
+*)
+  AC_CHECK_LIB(m, cos, LIBM="-lm")
   ;;
 esac
-])
-
-case " $_LT_AC_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
-])# AC_LIBTOOL_POSTDEP_PREDEP
+AC_SUBST([LIBM])
+])# LT_LIB_M
 
-# AC_LIBTOOL_LANG_F77_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
-AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
-[AC_REQUIRE([AC_PROG_F77])
-AC_LANG_PUSH(Fortran 77)
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
 
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_AC_TAGVAR(allow_undefined_flag, $1)=
-_LT_AC_TAGVAR(always_export_symbols, $1)=no
-_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_direct, $1)=no
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-_LT_AC_TAGVAR(hardcode_automatic, $1)=no
-_LT_AC_TAGVAR(module_cmds, $1)=
-_LT_AC_TAGVAR(module_expsym_cmds, $1)=
-_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_AC_TAGVAR(no_undefined_flag, $1)=
-_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
 
-# Source file extension for f77 test sources.
-ac_ext=f
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
 
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+if test "$GCC" = yes; then
+  _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
 
-# Code to be used in simple link tests
-lt_simple_link_test_code="      program t\n      end\n"
+  _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
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
 
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])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
 
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
+# 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?!! ;)]
 
-AC_MSG_CHECKING([if libtool supports shared libraries])
-AC_MSG_RESULT([$can_build_shared])
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
 
-AC_MSG_CHECKING([whether to build shared libraries])
-test "$can_build_shared" = "no" && enable_shared=no
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
 
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
+# Define system-specific variables.
 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*)
+  symcode='[[BCDT]]'
   ;;
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
+cygwin* | mingw* | pw32* | cegcc*)
+  symcode='[[ABCDGISTW]]'
+  ;;
+hpux*)
+  if test "$host_cpu" = ia64; then
+    symcode='[[ABCDEGRST]]'
   fi
   ;;
-esac
-AC_MSG_RESULT([$enable_shared])
-
-AC_MSG_CHECKING([whether to build static libraries])
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-AC_MSG_RESULT([$enable_static])
-
-_LT_AC_TAGVAR(GCC, $1)="$G77"
-_LT_AC_TAGVAR(LD, $1)="$LD"
-
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
-
-AC_LIBTOOL_CONFIG($1)
-
-AC_LANG_POP
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_F77_CONFIG
-
-
-# AC_LIBTOOL_LANG_GCJ_CONFIG
-# --------------------------
-# Ensure that the configuration vars for the C compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
-AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
+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
 
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+  symcode='[[ABCDGIRSTW]]' ;;
+esac
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
+# 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'"
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
+# 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'"
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
+# 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
 
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
 
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
+  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+  symxfrm="\\1 $ac_symprfx\\2 \\2"
 
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+  # 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};"\
+"     /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_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+  # Check to see that the pipe works correctly.
+  pipe_works=no
 
-AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
-AC_LIBTOOL_PROG_COMPILER_PIC($1)
-AC_LIBTOOL_PROG_CC_C_O($1)
-AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
-AC_LIBTOOL_PROG_LD_SHLIBS($1)
-AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
-AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+  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
 
-AC_LIBTOOL_CONFIG($1)
+  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
 
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_GCJ_CONFIG
+      # 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
+#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'
 
-# AC_LIBTOOL_LANG_RC_CONFIG
-# -------------------------
-# Ensure that the configuration vars for the Windows resource compiler are
-# suitably defined.  Those variables are subsequently used by
-# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
-AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
-AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
+	  cat <<_LT_EOF >> conftest.$ac_ext
 
-# Source file extension for RC test sources.
-ac_ext=rc
+/* The mapping between symbol names and symbols.  */
+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}
+};
 
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_AC_TAGVAR(objext, $1)=$objext
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+	  # Now try linking the two files.
+	  mv conftest.$ac_objext conftstm.$ac_objext
+	  lt_save_LIBS="$LIBS"
+	  lt_save_CFLAGS="$CFLAGS"
+	  LIBS="conftstm.$ac_objext"
+	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+	    pipe_works=yes
+	  fi
+	  LIBS="$lt_save_LIBS"
+	  CFLAGS="$lt_save_CFLAGS"
+	else
+	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+	fi
+      else
+	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+      fi
+    else
+      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+    fi
+  else
+    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+    cat conftest.$ac_ext >&5
+  fi
+  rm -rf conftest* conftst*
 
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+  # 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
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_AC_SYS_COMPILER
+_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_CMD_GLOBAL_SYMBOLS
 
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
 
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-_LT_AC_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+# _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)=
 
-AC_LIBTOOL_CONFIG($1)
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+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'
 
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# AC_LIBTOOL_LANG_RC_CONFIG
+    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
+      ;;
 
-# AC_LIBTOOL_CONFIG([TAGNAME])
-# ----------------------------
-# If TAGNAME is not passed, then create an initial libtool script
-# with a default configuration from the untagged config vars.  Otherwise
-# add code to config.status for appending the configuration named by
-# TAGNAME from the matching tagged config vars.
-AC_DEFUN([AC_LIBTOOL_CONFIG],
-[# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    _LT_AC_TAGVAR(compiler, $1) \
-    _LT_AC_TAGVAR(CC, $1) \
-    _LT_AC_TAGVAR(LD, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
-    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
-    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
-    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
-    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
-    _LT_AC_TAGVAR(old_archive_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
-    _LT_AC_TAGVAR(predep_objects, $1) \
-    _LT_AC_TAGVAR(postdep_objects, $1) \
-    _LT_AC_TAGVAR(predeps, $1) \
-    _LT_AC_TAGVAR(postdeps, $1) \
-    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
-    _LT_AC_TAGVAR(archive_cmds, $1) \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(postinstall_cmds, $1) \
-    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
-    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
-    _LT_AC_TAGVAR(no_undefined_flag, $1) \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
-    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
-    _LT_AC_TAGVAR(hardcode_automatic, $1) \
-    _LT_AC_TAGVAR(module_cmds, $1) \
-    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
-    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
-    _LT_AC_TAGVAR(exclude_expsyms, $1) \
-    _LT_AC_TAGVAR(include_expsyms, $1); do
-
-    case $var in
-    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_cmds, $1) | \
-    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(module_cmds, $1) | \
-    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
-    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
-    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+    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)=
+      ;;
+    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'
       ;;
     *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
       ;;
     esac
-  done
-
-  case $lt_echo in
-  *'\[$]0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
-    ;;
-  esac
-
-ifelse([$1], [],
-  [cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  AC_MSG_NOTICE([creating $ofile])],
-  [cfgfile="$ofile"])
-
-  cat <<__EOF__ >> "$cfgfile"
-ifelse([$1], [],
-[#! $SHELL
-
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-# The names of the tagged configurations supported by this script.
-available_tags=
-
-# ### BEGIN LIBTOOL CONFIG],
-[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
-
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
-
-# Is the compiler the GNU C compiler?
-with_gcc=$_LT_AC_TAGVAR(GCC, $1)
-
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
+  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
+	;;
+      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)
+	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*)
+	    # IBM XL 8.0 on PPC
+	    _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*)
+	;;
+      *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*)
+	    # 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'
 
-# A BSD-compatible nm program.
-NM=$lt_NM
+    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
+      ;;
 
-# A symbol stripping program
-STRIP=$lt_STRIP
+    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
+      ;;
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
+    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'])
+      ;;
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
+    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'
+      ;;
 
-# Used on cygwin: assembler.
-AS="$AS"
+    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
+      ;;
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+    interix[[3-9]]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+    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
+      ;;
 
-# How to pass a linker flag through the compiler.
-wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+    *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'
+      ;;
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+      fi
+      ;;
 
-# Old archive suffix (normally "a").
-libext="$libext"
+    *)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      _LT_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
+      ;;
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
+    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'])
+      ;;
 
-# Executable file suffix (normally "").
-exeext="$exeext"
+    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'
+      ;;
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-pic_mode=$pic_mode
+    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'
+      ;;
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
+    linux* | k*bsd*-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'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # 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*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	_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)='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # 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)=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
+    newsos6)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
+    *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'
+      ;;
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
+    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'
+      ;;
 
-# Do we need a version for libraries?
-need_version=$need_version
+    rdos*)
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+      ;;
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+    solaris*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+      *)
+	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+      esac
+      ;;
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+    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'
+      ;;
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+    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'
+      ;;
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
+    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
+      ;;
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
+    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'
+      ;;
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
+    unicos*)
+      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+      ;;
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
+    uts4*)
+      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      ;;
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
+    *)
+      _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_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+	[How to pass a linker flag through the compiler])
 
-# Library versioning type.
-version_type=$version_type
+#
+# 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])
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
+#
+# 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
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
+# _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_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'
+  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
+    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")) && ([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*)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  esac
+  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+  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_flag_spec_ld, $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=
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
+  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
+    ;;
+  esac
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
+  _LT_TAGVAR(ld_shlibs, $1)=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
+    # 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
+      *\ [[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
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
-archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
+    # 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
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
-module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
+_LT_EOF
+      fi
+      ;;
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    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
+      ;;
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    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
+      ;;
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+    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(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/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+      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
+      ;;
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+    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'
+      ;;
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    gnu* | linux* | tpf* | k*bsd*-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=
+	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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
+	  tmp_sharedflag='--shared' ;;
+	xl[[cC]]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	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; $ECHO \"$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'
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
+        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
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
+	case $cc_basename in
+	xlf*)
+	  # 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)=
+	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_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 $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        _LT_TAGVAR(ld_shlibs, $1)=no
+      fi
+      ;;
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
+    netbsd*)
+      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 $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'
+      fi
+      ;;
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	_LT_TAGVAR(ld_shlibs, $1)=no
+	cat <<_LT_EOF 1>&2
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
+*** 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.
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_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
+      ;;
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+    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
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+*** 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.
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+_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
+      ;;
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+    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
+      ;;
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	_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
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+    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
+      ;;
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
+    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
+	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")) && ([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
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
+	# 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
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
+      # 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.
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
+      _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,'
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
+      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
+      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
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
+      _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
+        _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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
+	 _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'
+	  # Exported symbols can be pulled into shared objects from archives
+	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	  _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
+      ;;
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+    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
+      ;;
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
+    bsdi[[45]]*)
+      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+      ;;
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+    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.
+      _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 `$ECHO "X$deplibs" | $Xsed -e '\''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(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+      ;;
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
+    darwin* | rhapsody*)
+      _LT_DARWIN_LINKER_FEATURES($1)
+      ;;
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    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
+      ;;
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+    freebsd1*)
+      _LT_TAGVAR(ld_shlibs, $1)=no
+      ;;
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
+    # 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
+      ;;
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
+    # 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
+      ;;
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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
+      ;;
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+    hpux9*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	_LT_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
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
+      # 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'
+      ;;
 
-# Symbols that must always be exported.
-include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${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_flag_spec_ld, $1)='+b $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
+      ;;
 
-ifelse([$1],[],
-[# ### END LIBTOOL CONFIG],
-[# ### END LIBTOOL TAG CONFIG: $tagname])
+    hpux11*)
+      if test "$GCC" = yes -a "$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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  _LT_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'
+	  ;;
+	*)
+	  _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)=:
 
-__EOF__
+	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'
 
-ifelse([$1],[], [
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
+	  # 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
+      ;;
 
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
-fi
-EOF
-    ;;
-  esac
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        AC_LINK_IFELSE(int foo(void) {},
+          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+        )
+        LDFLAGS="$save_LDFLAGS"
+      else
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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
+      ;;
 
-  # 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)
+    netbsd*)
+      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
+      ;;
 
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
-])
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-])# AC_LIBTOOL_CONFIG
+    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*)
+      ;;
 
-# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
-[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+    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
+      ;;
 
-_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+    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'
+      ;;
 
-if test "$GCC" = yes; then
-  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+    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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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)=:
+      ;;
 
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
-    lt_cv_prog_compiler_rtti_exceptions,
-    [-fno-rtti -fno-exceptions], [],
-    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+    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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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)=:
+      ;;
 
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
+    solaris*)
+      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${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 ${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
+      ;;
 
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
+    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
+      ;;
 
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+    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
+      ;;
 
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+    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'
+      ;;
 
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+    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
+      ;;
 
-# Define system-specific variables.
-case $host_os in
-aix*)
-  symcode='[[BCDT]]'
-  ;;
-cygwin* | mingw* | pw32*)
-  symcode='[[ABCDGISTW]]'
-  ;;
-hpux*) # Its linker distinguishes data from code symbols
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDEGRST]]'
+    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
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-linux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[[ABCDGIRSTW]]'
-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
+])
+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_MSG_CHECKING([whether -lc should be explicitly linked in])
+      $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_TAGVAR(archive_cmds_need_lc, $1)=no
+        else
+	  _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*
+      AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+      ;;
+    esac
   fi
   ;;
-irix* | nonstopux*)
-  symcode='[[BCDEGRST]]'
-  ;;
-osf*)
-  symcode='[[BCDEGQRST]]'
-  ;;
-solaris*)
-  symcode='[[BDRT]]'
-  ;;
-sco3.2v5*)
-  symcode='[[DT]]'
-  ;;
-sysv4.2uw2*)
-  symcode='[[DT]]'
-  ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
-  symcode='[[ABDT]]'
-  ;;
-sysv4)
-  symcode='[[DFNSTU]]'
-  ;;
 esac
 
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
-  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
-  ;;
-esac
+_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_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]])
+_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([], [fix_srcfile_path], [1],
+    [Fix the shell variable $srcfile for the compiler])
+_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([], [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)
 
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[[ABCDGIRSTW]]' ;;
-esac
+# Source file extension for C test sources.
+ac_ext=c
 
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
 
-  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
-  symxfrm="\\1 $ac_symprfx\\2 \\2"
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
 
-  # Write the raw and C identifiers.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
 
-  # Check to see that the pipe works correctly.
-  pipe_works=no
+_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
 
-  rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
 
-  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
+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
+    ;;
 
-      # Make sure that we snagged all the symbols we need.
-      if grep ' nm_test_var$' "$nlist" >/dev/null; then
-	if grep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
+  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])
 
-EOF
-	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+  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])
 
-	  cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
+  _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
 
-/* The mapping between symbol names and symbols. */
-const struct {
-  const char *name;
-  lt_ptr_t address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-	  cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
-};
 
-#ifdef __cplusplus
-}
-#endif
-EOF
-	  # Now try linking the two files.
-	  mv conftest.$ac_objext conftstm.$ac_objext
-	  lt_save_LIBS="$LIBS"
-	  lt_save_CFLAGS="$CFLAGS"
-	  LIBS="conftstm.$ac_objext"
-	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
-	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
-	    pipe_works=yes
-	  fi
-	  LIBS="$lt_save_LIBS"
-	  CFLAGS="$lt_save_CFLAGS"
-	else
-	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
-	fi
-      else
-	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
-      fi
-    else
-      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
-    fi
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  AC_PROG_CXXCPP
+else
+  _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _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],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+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_flag_spec_ld, $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(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_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
-    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
-    cat conftest.$ac_ext >&5
+    $as_unset lt_cv_prog_gnu_ld
   fi
-  rm -f conftest* conftst*
-
-  # Do not use the global_symbol_pipe unless it works.
-  if test "$pipe_works" = yes; then
-    break
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
   else
-    lt_cv_sys_global_symbol_pipe=
+    $as_unset lt_cv_path_LD
   fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
-  lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  AC_MSG_RESULT(failed)
-else
-  AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  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
 
-# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
-# ---------------------------------------
-AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
-[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
 
-AC_MSG_CHECKING([for $compiler option to produce PIC])
- ifelse([$1],[CXX],[
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+      LT_PATH_LD
 
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      # 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 -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+        _LT_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
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | os2* | pw32*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-      ;;
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	;;
-      *)
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	;;
-      esac
-      ;;
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
+
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
+
+    # PORTME: fill in a description of your system's C++ link characteristics
+    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+    _LT_TAGVAR(ld_shlibs, $1)=yes
     case $host_os in
-      aix4* | aix5*)
-	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
-	  # AIX 5 now supports IA64 processor
-	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+      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
+          _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; 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
+	    _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'
+	    # Exported symbols can be pulled into shared objects from archives
+	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+	    _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_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+	  _LT_TAGVAR(ld_shlibs, $1)=no
 	fi
 	;;
+
       chorus*)
-	case $cc_basename in
-	cxch68*)
-	  # Green Hills C++ Compiler
-	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  _LT_TAGVAR(ld_shlibs, $1)=no
 	  ;;
-	esac
+        esac
+        ;;
+
+      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(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
+        ;;
+      darwin* | rhapsody*)
+        _LT_DARWIN_LINKER_FEATURES($1)
 	;;
-       darwin*)
-         # PIC is the default on this platform
-         # Common symbols not allowed in MH_DYLIB files
-         case $cc_basename in
-           xlc*)
-           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
-           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-           ;;
-         esac
-       ;;
+
       dgux*)
-	case $cc_basename in
-	  ec++*)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
 	    ;;
-	  ghcx*)
+          ghcx*)
 	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    # 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
-	;;
-      freebsd* | kfreebsd*-gnu | dragonfly*)
-	# FreeBSD uses GNU C++
-	;;
-      hpux9* | hpux10* | hpux11*)
-	case $cc_basename in
-	  CC*)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	    fi
+        esac
+        ;;
+
+      freebsd[[12]]*)
+        # 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
+        ;;
+
+      gnu*)
+        ;;
+
+      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; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              _LT_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*)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+          aCC*)
 	    case $host_cpu in
-	    hppa*64*|ia64*)
-	      # +Z the default
-	      ;;
-	    *)
-	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	      ;;
+	      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; $ECHO "X$list" | $Xsed'
 	    ;;
-	  *)
+          *)
+	    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 -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
 	    ;;
-	esac
-	;;
-      interix*)
-	# This is c89, which is MS Visual C++ (no shared libs)
-	# Anyone wants to do a port?
+        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* | nonstopux*)
-	case $cc_basename in
-	  CC*)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-	    # CC pic flag -KPIC is the default.
+      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" && $ECHO "X-set_version $verstring" | $Xsed` -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 -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	      fi
+	    fi
+	    _LT_TAGVAR(link_all_deplibs, $1)=yes
 	    ;;
-	esac
-	;;
-      linux*)
-	case $cc_basename in
-	  KCC*)
-	    # KAI C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+        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)
+        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; $ECHO "X$list" | $Xsed'
+
+	    _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*)
+	  icpc* | ecpc* )
 	    # Intel C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-	    ;;
-	  pgCC*)
-	    # Portland Group C++ compiler.
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+	    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 | $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 | $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 | $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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 will 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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
 	  cxx*)
 	    # Compaq C++
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+	    _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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  xl*)
+	    # 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; $ECHO \"$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='echo'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      _LT_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*)
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+        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=echo
+	else
+	  _LT_TAGVAR(ld_shlibs, $1)=no
+	fi
+	;;
+
       osf3* | osf4* | osf5*)
-	case $cc_basename in
-	  KCC*)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+        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*)
+          RCC*)
 	    # Rational C++ 2.4.1
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
 	    ;;
-	  cxx*)
-	    # Digital/Compaq C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+          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" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -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" && $ECHO "X-set_version $verstring" | $Xsed` -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 "X-set_version $verstring" | $Xsed` -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=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
 	    ;;
 	  *)
+	    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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${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 "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      _LT_TAGVAR(ld_shlibs, $1)=no
+	    fi
 	    ;;
-	esac
-	;;
+        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*)
+        case $cc_basename in
+          CC*)
 	    # Sun C++ 4.2, 5.x and Centerline C++
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+            _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='echo'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
 	    ;;
-	  gcx*)
+          gcx*)
 	    # Green Hills C++ Compiler
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+	    _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 -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 -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        _LT_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 "\-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
-	;;
-      sunos4*)
+        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*)
-	    # Sun C++ 4.x
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-	    ;;
-	  lcc*)
-	    # Lucid
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+          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
-	;;
+      ;;
+
       tandem*)
-	case $cc_basename in
-	  NCC*)
+        case $cc_basename in
+          NCC*)
 	    # NonStop-UX NCC 3.20
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    ;;
-	  *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
 	    ;;
-	esac
-	;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-	case $cc_basename in
-	  CC*)
-	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+          *)
+	    # FIXME: insert proper C++ library support
+	    _LT_TAGVAR(ld_shlibs, $1)=no
 	    ;;
-	esac
-	;;
+        esac
+        ;;
+
       vxworks*)
-	;;
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
+
       *)
-	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-	;;
+        # FIXME: insert proper C++ library support
+        _LT_TAGVAR(ld_shlibs, $1)=no
+        ;;
     esac
-  fi
-],
+
+    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
+  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_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
+# 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
+])
+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 $p in
+
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
+
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$_LT_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
+       ;;
+
+    *.$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
+
+# 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*)
+    # 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_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
 [
-  if test "$GCC" = yes; then
-    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+  _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _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_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_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_flag_spec_ld, $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(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
+  CC=${F77-"f77"}
+  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"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _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_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_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_flag_spec_ld, $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(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
+  CC=${FC-"f95"}
+  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"
+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
 
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      fi
-      ;;
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
 
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
-      ;;
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
 
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
-      ;;
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
 
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
 
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      enable_shared=no
-      ;;
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
-      fi
-      ;;
+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)
 
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-	;;
-      esac
-      ;;
+  _LT_CONFIG($1)
+fi
 
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      else
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
-         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-         ;;
-       esac
-       ;;
+AC_LANG_RESTORE
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
-      ;;
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
 
-    hpux9* | hpux10* | hpux11*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
-	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # PIC (with -KPIC) is the default.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
+# _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
 
-    newsos6)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
+# Source file extension for RC test sources.
+ac_ext=rc
 
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-        ;;
-      ccc*)
-        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-        # All Alpha code is PIC.
-        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-        ;;
-      esac
-      ;;
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
 
-    osf3* | osf4* | osf5*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      # All OSF/1 code is PIC.
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
-      ;;
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
 
-    solaris*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
-      *)
-	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
-      esac
-      ;;
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
 
-    sunos4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
 
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
 
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
-	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+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"
+])# _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_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_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_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
 
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
+# 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"}, \
+      = c,a/b,, \
+    && 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_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
+
+# func_stripname 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).
+func_stripname ()
+{
+  # 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}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
 
-    unicos*)
-      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
 
-    uts4*)
-      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
-      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
-      ;;
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
 
-    *)
-      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
-      ;;
-    esac
-  fi
-])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $[*] ))
+}
 
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
-  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
-    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
-    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
-    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
-     "" | " "*) ;;
-     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
-     esac],
-    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
-    ;;
-  *)
-    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+_LT_EOF
     ;;
-esac
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
 
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
-AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
-  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
-  $lt_tmp_static_flag,
-  [],
-  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
-])
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+}
 
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
 
-# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
-# ------------------------------------
-# See if the linker supports building shared libraries.
-AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
-[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-ifelse([$1],[CXX],[
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix4* | aix5*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    else
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
-  ;;
-  cygwin* | mingw*)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  *)
-    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
-],[
-  runpath_var=
-  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-  _LT_AC_TAGVAR(archive_cmds, $1)=
-  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
-  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
-  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
-  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
-  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
-  _LT_AC_TAGVAR(module_cmds, $1)=
-  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
-  _LT_AC_TAGVAR(always_export_symbols, $1)=no
-  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  _LT_AC_TAGVAR(include_expsyms, $1)=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  _LT_CC_BASENAME([$compiler])
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname 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).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
   esac
+}
 
-  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
 
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
-    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
 
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
 
-EOF
-      fi
-      ;;
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$[@]"`
+}
 
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-
-      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
 
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	_LT_AC_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_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
+_LT_EOF
+esac
 
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
-      # as there is no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=no
-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
 
-    interix3*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]+=\$[2]"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
 
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	tmp_addflag=
-	case $cc_basename,$host_cpu in
-	pgcc*)				# Portland Group C compiler
-	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag'
-	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag -Mnomain' ;;
-	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
-	  tmp_addflag=' -i_dynamic' ;;
-	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
-	  tmp_addflag=' -i_dynamic -nofor_main' ;;
-	ifc* | ifort*)			# Intel Fortran compiler
-	  tmp_addflag=' -nofor_main' ;;
-	esac
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$[1]=\$$[1]\$[2]"
+}
 
-	if test $supports_anon_versioning = yes; then
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-	fi
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
+_LT_EOF
+    ;;
+  esac
+])
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
+# Helper functions for option handling.                    -*- 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.
 
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<EOF 1>&2
+# serial 6 ltoptions.m4
 
-*** 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.
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
 
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-	cat <<_LT_EOF 1>&2
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-_LT_EOF
-	;;
-	*)
-	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-	  else
-	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
-	  fi
-	;;
-      esac
-      ;;
+# _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
+])
 
-    sunos4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
 
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	_LT_AC_TAGVAR(ld_shlibs, $1)=no
-      fi
-      ;;
-    esac
+# _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
+])
 
-    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
-      runpath_var=
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-      fi
-      ;;
 
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-	else
-	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
-	fi
-	aix_use_runtimelinking=no
+# _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
 
-	# Test if we are trying to use run time linking or normal
-	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
-	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
-	  for ld_flag in $LDFLAGS; do
-  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-  	    aix_use_runtimelinking=yes
-  	    break
-  	  fi
-	  done
-	  ;;
-	esac
 
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
 
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
 
-      _LT_AC_TAGVAR(archive_cmds, $1)=''
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
 
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[[012]]|aix4.[[012]].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" && \
-  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	  then
-  	  # We have reworked collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	  else
-  	  # We have old collect2
-  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
-	  fi
-	  ;;
-	esac
-	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
-	fi
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-  	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
-	  else
-	    shared_flag='${wl}-bM:SRE'
-	  fi
-	fi
-      fi
+# 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
 
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       _LT_AC_SYS_LIBPATH_AIX
-       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-	if test "$host_cpu" = ia64; then
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # Determine the default libpath from the value encoded in an empty executable.
-	 _LT_AC_SYS_LIBPATH_AIX
-	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
-	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-	fi
-      fi
-      ;;
 
-    amigaos*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      # see comment about different semantics on the GNU ld section
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
 
-    bsdi[[45]]*)
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
-      ;;
+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.])
+])
 
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
-      # FIXME: Should let the user specify the lib program.
-      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
-      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-      ;;
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
 
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[[012]])
-         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[[012]])
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_direct, $1)=no
-      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-    if test "$GCC" = yes ; then
-    	output_verbose_link_cmd='echo'
-        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         _LT_AC_TAGVAR(ld_shlibs, $1)=no
-          ;;
-      esac
-    fi
-      ;;
 
-    dgux*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
 
-    freebsd1*)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
+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
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [0], [Assembler program])dnl
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu | dragonfly*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
 
-    hpux9*)
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+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.])
+])
 
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+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)
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+	[Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
 
-	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
 
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      fi
-      ;;
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
 
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      else
-	case $host_cpu in
-	hppa*64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      fi
-      if test "$with_gnu_ld" = no; then
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
-	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
 
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	  ;;
-	*)
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-	  ;;
-	esac
-      fi
-      ;;
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
 
-    newsos6)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+# _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)
 
-    openbsd*)
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-      else
-       case $host_os in
-	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-	   ;;
-	 *)
-	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
-	   ;;
-       esac
-      fi
-      ;;
+    _LT_DECL([build_old_libs], [enable_static], [0],
+	[Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
 
-    os2*)
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
-      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
 
-    osf3*)
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
-      ;;
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
 
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
-      else
-	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
 
-	# Both c and cxx compiler support -rpath directly
-	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+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)
 
-    solaris*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-	wlarc=''
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      case $host_os in
-      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
-      *)
- 	# The compiler driver will combine linker options so we
- 	# cannot just pass the convience library names through
- 	# without $wl, iff we do not link with $LD.
- 	# Luckily, gcc supports the same syntax we need for Sun Studio.
- 	# Supported since Solaris 2.6 (maybe 2.5.1?)
- 	case $wlarc in
- 	'')
- 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
- 	*)
- 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- 	esac ;;
-      esac
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      ;;
+_LT_DECL([fast_install], [enable_fast_install], [0],
+	 [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
 
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-	# Use $CC to link under sequent, because it throws in some extra .o
-	# files that make .init and .fini sections work.
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
-      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
+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])])
 
-    sysv4)
-      case $host_vendor in
-	sni)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
-	;;
-	siemens)
-	  ## LD is ld it makes a PLAMLIB
-	  ## CC just makes a GrossModule.
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
-        ;;
-	motorola)
-	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
-	;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
+# 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.])
+])
 
-    sysv4.3*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
-      ;;
+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.])
+])
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
-      fi
-      ;;
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
 
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
+# _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],
+	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
 
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
-      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
-      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
-      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
-      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
 
-      if test "$GCC" = yes; then
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
 
-    uts4*)
-      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
-      ;;
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
 
-    *)
-      _LT_AC_TAGVAR(ld_shlibs, $1)=no
-      ;;
-    esac
-  fi
+# 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.])
 ])
-AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
-test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
-  # Assume -lc should be added
-  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $_LT_AC_TAGVAR(archive_cmds, $1) in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
-	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
-        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
-        then
-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
-        else
-	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
-        fi
-        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
-      ;;
-    esac
-  fi
-  ;;
-esac
-])# AC_LIBTOOL_PROG_LD_SHLIBS
+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])])
 
-# _LT_AC_FILE_LTDLL_C
-# -------------------
-# Be careful that the start marker always follows a newline.
-AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# #  ifdef __CYGWIN32__
-# #    define __CYGWIN__ __CYGWIN32__
-# #  endif
-# #endif
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
 #
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
 #
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-#   __hDllInstance_base = hInst;
-#   return TRUE;
-# }
-# /* ltdll.c ends here */
-])# _LT_AC_FILE_LTDLL_C
+# 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
 
-# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
-# ---------------------------------
-AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
 
 
-# old names
-AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
-AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
-AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
-AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
-AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
+# 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])])
 
-# This is just to silence aclocal about the macro not being used
-ifelse([AC_DISABLE_FAST_INSTALL])
 
-AC_DEFUN([LT_AC_PROG_GCJ],
-[AC_CHECK_TOOL(GCJ, gcj, no)
-  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
-  AC_SUBST(GCJFLAGS)
-])
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
 
-AC_DEFUN([LT_AC_PROG_RC],
-[AC_CHECK_TOOL(RC, windres, no)
-])
 
-# NOTE: This macro has been submitted for inclusion into   #
-#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
-#  a released version of Autoconf we should remove this    #
-#  macro and use it instead.                               #
-# LT_AC_PROG_SED
-# --------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible.  Prefer GNU sed if found.
-AC_DEFUN([LT_AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
-        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
-      fi
-    done
-  done
-done
-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
+# 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
 ])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
+
+# 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.
+
+# Generated from ltversion.in.
+
+# serial 3017 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6b])
+m4_define([LT_PACKAGE_REVISION], [1.3017])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6b'
+macro_revision='1.3017'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
 ])
 
-# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+#   Copyright (C) 2004, 2005, 2007 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 4 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_RC],		[AC_DEFUN([AC_LIBTOOL_RC])])
+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])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -6420,14 +7978,31 @@ AC_MSG_RESULT([$SED])
 # ----------------------------
 # Automake X.Y traces this macro to ensure aclocal.m4 has been
 # generated from the m4 files accompanying Automake X.Y.
-AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
+# (This private macro should not be called outside this file.)
+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.
+m4_if([$1], [1.11.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
 
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
-# Call AM_AUTOMAKE_VERSION so it can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# 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],
-	 [AM_AUTOMAKE_VERSION([1.9.6])])
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+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 -*-
 
@@ -6484,14 +8059,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 7
+# serial 9
 
 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
 # -------------------------------------
@@ -6500,8 +8075,11 @@ AC_DEFUN([AM_CONDITIONAL],
 [AC_PREREQ(2.52)dnl
  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
 	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])
-AC_SUBST([$1_FALSE])
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
 if $2; then
   $1_TRUE=
   $1_FALSE='#'
@@ -6515,15 +8093,14 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 8
+# serial 10
 
 # 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,
@@ -6551,6 +8128,7 @@ AC_REQUIRE([AM_DEP_TRACK])dnl
 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
                    [depcc="$$1"   am_compiler_list=])
 
@@ -6579,6 +8157,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
   fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -6596,7 +8184,17 @@ AC_CACHE_CHECK([dependency style of $depcc],
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -6606,18 +8204,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # 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.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -6668,61 +8271,74 @@ if test "x$enable_dependency_tracking" != xno; then
   AMDEPBACKSLASH='\'
 fi
 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
 ])
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
@@ -6741,14 +8357,14 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 12
+# serial 16
 
 # This macro actually does too much.  Some checks are only needed if
 # your package does certain things.  But this isn't really a big deal.
@@ -6765,16 +8381,20 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 # arguments mandatory, and then we can depend on a new Autoconf
 # release and drop the old call support.
 AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.58])dnl
+[AC_PREREQ([2.62])dnl
 dnl Autoconf wants to disallow AM_ names.  We explicitly allow
 dnl the ones we care about.
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
 AC_REQUIRE([AC_PROG_INSTALL])dnl
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
 fi
 
 # test whether we have cygpath
@@ -6794,6 +8414,9 @@ m4_ifval([$2],
  AC_SUBST([PACKAGE], [$1])dnl
  AC_SUBST([VERSION], [$2])],
 [_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
 
@@ -6809,8 +8432,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -6818,20 +8441,37 @@ AC_REQUIRE([AC_PROG_AWK])dnl
 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
-              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
-	      		     [_AM_PROG_TAR([v7])])])
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
 _AM_IF_OPTION([no-dependencies],,
 [AC_PROVIDE_IFELSE([AC_PROG_CC],
-                  [_AM_DEPENDENCIES(CC)],
-                  [define([AC_PROG_CC],
-                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+		  [_AM_DEPENDENCIES(CC)],
+		  [define([AC_PROG_CC],
+			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
 AC_PROVIDE_IFELSE([AC_PROG_CXX],
-                  [_AM_DEPENDENCIES(CXX)],
-                  [define([AC_PROG_CXX],
-                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+		  [_AM_DEPENDENCIES(CXX)],
+		  [define([AC_PROG_CXX],
+			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES(OBJC)],
+		  [define([AC_PROG_OBJC],
+			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
 ])
 
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
 
 # When config.status generates a header, we must update the stamp-h file.
 # This file resides in the same directory as the config header
@@ -6842,18 +8482,19 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
 # our stamp files there.
 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
 [# Compute $1's index in $config_headers.
+_am_arg=$1
 _am_stamp_count=1
 for _am_header in $config_headers :; do
   case $_am_header in
-    $1 | $1:* )
+    $_am_arg | $_am_arg:* )
       break ;;
     * )
       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
   esac
 done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -6864,7 +8505,14 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 AC_SUBST(install_sh)])
 
 # Copyright (C) 2003, 2005  Free Software Foundation, Inc.
@@ -6890,13 +8538,13 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # AM_MAKE_INCLUDE()
 # -----------------
@@ -6905,7 +8553,7 @@ AC_DEFUN([AM_MAKE_INCLUDE],
 [am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-	@echo done
+	@echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
@@ -6915,24 +8563,24 @@ am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 AC_SUBST([am__include])
 AC_SUBST([am__quote])
@@ -6940,13 +8588,14 @@ AC_MSG_RESULT([$_am_result])
 rm -f confinc confmf
 ])
 
-# Copyright (C) 1999, 2000, 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 6
 
 # AM_PROG_CC_C_O
 # --------------
@@ -6954,11 +8603,13 @@ rm -f confinc confmf
 AC_DEFUN([AM_PROG_CC_C_O],
 [AC_REQUIRE([AC_PROG_CC_C_O])dnl
 AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
 # FIXME: we rely on the cache variable name because
 # there is no other way.
 set dummy $CC
-ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
    # Losing compiler, so override with the script.
    # FIXME: It is wrong to rewrite CC.
    # But if we don't then we get into trouble of one sort or another.
@@ -6966,18 +8617,22 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
    # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
    CC="$am_aux_dir/compile $CC"
 fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+          [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
 ])
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 6
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -6993,7 +8648,15 @@ AC_SUBST($1)])
 # If it does, set am_missing_run to use it, otherwise, to nothing.
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -7003,7 +8666,7 @@ else
 fi
 ])
 
-# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -7011,70 +8674,33 @@ fi
 
 # AM_PROG_MKDIR_P
 # ---------------
-# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
-#
-# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
-# created by `make install' are always world readable, even if the
-# installer happens to have an overly restrictive umask (e.g. 077).
-# This was a mistake.  There are at least two reasons why we must not
-# use `-m 0755':
-#   - it causes special bits like SGID to be ignored,
-#   - it may be too restrictive (some setups expect 775 directories).
-#
-# Do not use -m 0755 and let people choose whatever they expect by
-# setting umask.
-#
-# We cannot accept any implementation of `mkdir' that recognizes `-p'.
-# Some implementations (such as Solaris 8's) are not thread-safe: if a
-# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
-# concurrently, both version can detect that a/ is missing, but only
-# one can create it and the other will error out.  Consequently we
-# restrict ourselves to GNU make (using the --version option ensures
-# this.)
+# Check for `mkdir -p'.
 AC_DEFUN([AM_PROG_MKDIR_P],
-[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
-  else
-    mkdir_p='$(install_sh) -d'
-  fi
-fi
-AC_SUBST([mkdir_p])])
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+  [[\\/$]]* | ?:[[\\/]]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 3
+# serial 4
 
 # _AM_MANGLE_OPTION(NAME)
 # -----------------------
@@ -7091,7 +8717,7 @@ AC_DEFUN([_AM_SET_OPTION],
 # ----------------------------------
 # OPTIONS is a space-separated list of Automake options.
 AC_DEFUN([_AM_SET_OPTIONS],
-[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
 
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
 # -------------------------------------------
@@ -7101,14 +8727,14 @@ AC_DEFUN([_AM_IF_OPTION],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_SANITY_CHECK
 # ---------------
@@ -7117,16 +8743,29 @@ AC_DEFUN([AM_SANITY_CHECK],
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$[*]" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$[*]" != "X $srcdir/configure conftest.file" \
@@ -7176,9 +8815,28 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
 if test "$cross_compiling" != no; then
   AC_CHECK_TOOL([STRIP], [strip], :)
 fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
 # Check how to create a tarball.                            -*- Autoconf -*-
 
 # Copyright (C) 2004, 2005  Free Software Foundation, Inc.
@@ -7275,7 +8933,9 @@ AC_SUBST([am__tar])
 AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
-m4_include([config/ac_dart.m4])
+m4_include([config/ac_cray_pmi.m4])
+m4_include([config/ac_cray_ugni.m4])
+m4_include([config/ac_dataspaces.m4])
 m4_include([config/ac_datatap.m4])
 m4_include([config/ac_dimes.m4])
 m4_include([config/ac_dmalloc.m4])
diff --git a/config.h.in b/config.h.in
index 8aa08cc..488b232 100644
--- a/config.h.in
+++ b/config.h.in
@@ -23,14 +23,20 @@
 /* Define to 1 if you have the `clock_gettime' function. */
 #undef HAVE_CLOCK_GETTIME
 
+/* Define if you have CRAY_PMI. */
+#undef HAVE_CRAY_PMI
+
 /* Define if you have Cray Portals. */
 #undef HAVE_CRAY_PORTALS
 
-/* Define if you have the DART. */
-#undef HAVE_DART
+/* Define if you have CRAY_UGNI. */
+#undef HAVE_CRAY_UGNI
+
+/* Define if you have the DATASPACES. */
+#undef HAVE_DATASPACES
 
-/* Define to 1 if you have the <dart.h> header file. */
-#undef HAVE_DART_H
+/* Define to 1 if you have the <dataspaces.h> header file. */
+#undef HAVE_DATASPACES_H
 
 /* Define if you have the DIMES. */
 #undef HAVE_DIMES
@@ -86,6 +92,9 @@
 /* Define to 1 if you have the <mxml.h> header file. */
 #undef HAVE_MXML_H
 
+/* Define to 1 if you have the `nanosleep' function. */
+#undef HAVE_NANOSLEEP
+
 /* Define if you have NC4PAR. */
 #undef HAVE_NC4PAR
 
@@ -161,6 +170,9 @@
 /* Define to 1 if you have the <stdlib.h> header file. */
 #undef HAVE_STDLIB_H
 
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
 /* Define to 1 if cpp supports the ANSI # stringizing operator. */
 #undef HAVE_STRINGIZE
 
@@ -170,6 +182,9 @@
 /* Define to 1 if you have the <string.h> header file. */
 #undef HAVE_STRING_H
 
+/* Define to 1 if you have the `strncpy' function. */
+#undef HAVE_STRNCPY
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
@@ -179,6 +194,10 @@
 /* Define to 1 if you have the <unistd.h> header file. */
 #undef HAVE_UNISTD_H
 
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+   */
+#undef LT_OBJDIR
+
 /* Datatap is disabled */
 #undef NO_DATATAP
 
@@ -207,6 +226,9 @@
    your system. */
 #undef PTHREAD_CREATE_JOINABLE
 
+/* Skel timing is enabled */
+#undef SKEL_TIMING
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
@@ -215,3 +237,15 @@
 
 /* Version number of package */
 #undef VERSION
+
+/* Major version number */
+#undef VERSION_MAJOR
+
+/* Micro version number */
+#undef VERSION_MICRO
+
+/* Minor version number */
+#undef VERSION_MINOR
+
+/* svn revision number */
+#undef VERSION_SVNREV
diff --git a/config/ac_cray_pmi.m4 b/config/ac_cray_pmi.m4
new file mode 100644
index 0000000..d5725fb
--- /dev/null
+++ b/config/ac_cray_pmi.m4
@@ -0,0 +1,137 @@
+dnl ######################################################################
+dnl
+dnl Finds CRAY_PMI
+dnl
+dnl ######################################################################
+
+AC_DEFUN([AC_CRAY_PMI],
+[
+
+ac_cray_pmi_lib_ok=no
+
+AC_MSG_NOTICE([=== checking for CRAY PMI ===])
+
+AM_CONDITIONAL(HAVE_CRAY_PMI,true)
+
+dnl Automatic checking for CRAY_PMI is disabled now.
+AC_ARG_WITH(cray-pmi,
+            [  --with-cray-pmi=<location of CRAY_PMI installation>],
+            [CRAY_PMI_DIR=$withval], [with_cray_pmi=no])
+
+AC_ARG_WITH(cray-pmi-incdir,
+            [  --with-cray-pmi-incdir=<location of CRAY_PMI includes>],
+            [CRAY_PMI_INCDIR=$withval
+             with_cray_pmi=detailed])
+
+AC_ARG_WITH(cray-pmi-libdir,
+             [  --with-cray-pmi-libdir=<location of CRAY_PMI library>],
+             [CRAY_PMI_LIBDIR=$withval
+              with_cray_pmi=detailed])
+
+AC_ARG_WITH(cray-pmi-libs,
+             [  --with-cray-pmi-libs=<linker flags besides -L<cray-pmi-libdir>, e.g. -lpmi],
+             [CRAY_PMI_LIBS=$withval
+              with_cray_pmi=detailed])
+
+
+dnl If --without-cray-pmi was given set HAVE_CRAY_PMI to false and do nothing more
+dnl If nothing was given, then too, do nothing 
+if test "x$with_cray_pmi" == "xno"; then
+
+   AM_CONDITIONAL(HAVE_CRAY_PMI,false)
+
+else
+
+    dnl If we know CRAY_PMI_DIR, then we can know CRAY_PMI_INCDIR.
+    dnl We don't overwrite CRAY_PMI_INCDIR.
+    if test -z "${CRAY_PMI_INCDIR}"; then
+        if test -n "${CRAY_PMI_DIR}"; then
+            CRAY_PMI_INCDIR="${CRAY_PMI_DIR}/include";
+        fi
+    fi
+
+    dnl If we know CRAY_PMI_DIR, then we can know CRAY_PMI_LIBDIR.
+    dnl We don't overwrite CRAY_PMI_LIBDIR.
+    if test -z "${CRAY_PMI_LIBDIR}"; then
+        if test -n "${CRAY_PMI_DIR}"; then
+            CRAY_PMI_LIBDIR="${CRAY_PMI_DIR}/lib";
+        fi
+    fi
+
+    dnl Add "-I" to CRAY_PMI_INCDIR.
+    CRAY_PMI_CPPFLAGS="-I${CRAY_PMI_INCDIR}"
+
+    dnl Add "-L" to CRAY_PMI_LIBDIR.
+    CRAY_PMI_LDFLAGS="-L${CRAY_PMI_LIBDIR}"
+
+    dnl if hdf5 libs are not defined then guess and define it
+    if test -z "${CRAY_PMI_LIBS}"; then
+        dnl default CRAY_PMI lib is usually just -lpmi
+        CRAY_PMI_LIBS="-lpmi"
+    fi
+
+    save_CC="$CC"
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    LIBS="$LIBS $CRAY_PMI_LIBS"
+    LDFLAGS="$LDFLAGS $CRAY_PMI_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $CRAY_PMI_CPPFLAGS"
+    CC="$MPICC"
+
+    if test -z "${HAVE_CRAY_PMI_TRUE}"; then
+        dnl  AC_CHECK_HEADERS(pmi.h,
+        dnl      ,
+        dnl      [if test "x$with_cray_pmi" != xcheck; then
+        dnl          AC_MSG_FAILURE( [--with-cray-pmi was given, but test for pmi.h failed])
+        dnl       fi
+        dnl       AM_CONDITIONAL(HAVE_CRAY_PMI,false)])
+        AC_MSG_CHECKING([for Cray's pmi.h])
+        if test -f ${CRAY_PMI_INCDIR}/pmi.h; then
+            AC_MSG_RESULT(yes)
+        else
+            AM_CONDITIONAL(HAVE_CRAY_PMI,false)
+            AC_MSG_RESULT(no)
+            AC_MSG_FAILURE( [--with-cray-pmi was given, but test for ${CRAY_PMI_INCDIR}/pmi.h failed])
+        fi
+    fi
+
+    if test -z "${HAVE_CRAY_PMI_TRUE}"; then
+        AC_MSG_CHECKING([if pmi code can be compiled])
+        AC_TRY_COMPILE([#include "pmi.h"],
+            [int size;
+             int rank;
+             PMI_Get_size(&size);
+             PMI_Get_rank(&rank);
+            ],
+            [AC_MSG_RESULT(yes)
+             ac_cray_pmi_lib_ok=yes],
+            [AC_MSG_RESULT(no)
+             if test "x$with_cray_pmi" != xcheck; then
+                AC_MSG_FAILURE( [--with-cray-pmi was given, but compile test failed])
+             fi
+             AM_CONDITIONAL(HAVE_CRAY_PMI,false)
+            ])
+
+        AC_SUBST(CRAY_PMI_LIBS)
+        AC_SUBST(CRAY_PMI_LDFLAGS)
+        AC_SUBST(CRAY_PMI_CPPFLAGS)
+    fi
+
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
+    CC="$save_CC"
+
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_CRAY_PMI_TRUE}"; then
+            ifelse([$1],,[AC_DEFINE(HAVE_CRAY_PMI,1,[Define if you have CRAY_PMI.])],[$1])
+            :
+    else
+            $2
+            :
+    fi
+
+fi
+
+])
diff --git a/config/ac_cray_ugni.m4 b/config/ac_cray_ugni.m4
new file mode 100644
index 0000000..9e10200
--- /dev/null
+++ b/config/ac_cray_ugni.m4
@@ -0,0 +1,144 @@
+dnl ######################################################################
+dnl
+dnl Finds CRAY_UGNI
+dnl
+dnl ######################################################################
+
+AC_DEFUN([AC_CRAY_UGNI],
+[
+
+ac_cray_ugni_lib_ok=no
+
+AC_MSG_NOTICE([=== checking for CRAY UGNI ===])
+
+AM_CONDITIONAL(HAVE_CRAY_UGNI,true)
+
+dnl Automatic checking for CRAY_UGNI is disabled now.
+AC_ARG_WITH(cray-ugni,
+            [  --with-cray-ugni=<location of CRAY UGNI installation>],
+            [CRAY_UGNI_DIR=$withval], [with_cray_ugni=no])
+
+AC_ARG_WITH(cray-ugni-incdir,
+            [  --with-cray-ugni-incdir=<location of CRAY UGNI includes>],
+            [CRAY_UGNI_INCDIR=$withval
+             with_cray_ugni=detailed])
+
+AC_ARG_WITH(cray-ugni-libdir,
+             [  --with-cray-ugni-libdir=<location of CRAY UGNI library>],
+             [CRAY_UGNI_LIBDIR=$withval
+              with_cray_ugni=detailed])
+
+AC_ARG_WITH(cray-ugni-libs,
+             [  --with-cray-ugni-libs=<linker flags besides -L<cray-ugni-libdir>, e.g. -lugni],
+             [CRAY_UGNI_LIBS=$withval
+              with_cray_ugni=detailed])
+
+
+dnl If --without-cray-ugni was given set HAVE_CRAY_UGNI to false and do nothing more
+dnl If nothing was given, then too, do nothing 
+if test "x$with_cray_ugni" == "xno"; then
+
+   AM_CONDITIONAL(HAVE_CRAY_UGNI,false)
+
+else
+
+    dnl If we know CRAY_UGNI_DIR, then we can know CRAY_UGNI_INCDIR.
+    dnl We don't overwrite CRAY_UGNI_INCDIR.
+    if test -z "${CRAY_UGNI_INCDIR}"; then
+        if test -n "${CRAY_UGNI_DIR}"; then
+            CRAY_UGNI_INCDIR="${CRAY_UGNI_DIR}/include";
+        fi
+    fi
+
+    dnl If we know CRAY_UGNI_DIR, then we can know CRAY_UGNI_LIBDIR.
+    dnl We don't overwrite CRAY_UGNI_LIBDIR.
+    if test -z "${CRAY_UGNI_LIBDIR}"; then
+        if test -n "${CRAY_UGNI_DIR}"; then
+            CRAY_UGNI_LIBDIR="${CRAY_UGNI_DIR}/lib";
+        fi
+    fi
+
+    dnl Add "-I" to CRAY_UGNI_INCDIR.
+    CRAY_UGNI_CPPFLAGS="-I${CRAY_UGNI_INCDIR}"
+
+    dnl Add "-L" to CRAY_UGNI_LIBDIR.
+    CRAY_UGNI_LDFLAGS="-L${CRAY_UGNI_LIBDIR}"
+
+    dnl if hdf5 libs are not defined then guess and define it
+    if test -z "${CRAY_UGNI_LIBS}"; then
+        dnl default CRAY_UGNI lib is usually just -lugni
+        CRAY_UGNI_LIBS="-lugni"
+    fi
+
+    save_CC="$CC"
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    LIBS="$LIBS $CRAY_UGNI_LIBS"
+    LDFLAGS="$LDFLAGS $CRAY_UGNI_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $CRAY_UGNI_CPPFLAGS"
+    CC="$MPICC"
+
+    if test -z "${HAVE_CRAY_UGNI_TRUE}"; then
+        dnl  AC_CHECK_HEADERS(ugni.h,
+        dnl      ,
+        dnl      [if test "x$with_cray_ugni" != xcheck; then
+        dnl          AC_MSG_FAILURE( [--with-cray-ugni was given, but test for ugni.h failed])
+        dnl       fi
+        dnl       AM_CONDITIONAL(HAVE_CRAY_UGNI,false)])
+        AC_MSG_CHECKING([for Cray's ugni.h])
+        if test -f ${CRAY_UGNI_INCDIR}/gni_pub.h; then
+            AC_MSG_RESULT(yes)
+        else
+            AM_CONDITIONAL(HAVE_CRAY_UGNI,false)
+            AC_MSG_RESULT(no)
+            AC_MSG_FAILURE( [--with-cray-ugni was given, but test for ${CRAY_UGNI_INCDIR}/gni_pub.h failed])
+        fi
+    fi
+
+    if test -z "${HAVE_CRAY_UGNI_TRUE}"; then
+        AC_MSG_CHECKING([if ugni code can be compiled])
+        AC_TRY_COMPILE(
+            [#include <stdlib.h>
+             #include <stdint.h>
+             #include "gni_pub.h"
+            ],
+            [uint32_t inst_id;
+             uint8_t ptag;
+             uint32_t cookie;
+             uint32_t  modes;
+             gni_cdm_handle_t * cdm_hndl;
+             gni_return_t status;
+             status = GNI_CdmCreate(inst_id, ptag, cookie, modes, cdm_hndl);
+            ],
+            [AC_MSG_RESULT(yes)
+             ac_cray_ugni_lib_ok=yes],
+            [AC_MSG_RESULT(no)
+             if test "x$with_cray_ugni" != xcheck; then
+                AC_MSG_FAILURE( [--with-cray-ugni was given, but compile test failed])
+             fi
+             AM_CONDITIONAL(HAVE_CRAY_UGNI,false)
+            ])
+
+        AC_SUBST(CRAY_UGNI_LIBS)
+        AC_SUBST(CRAY_UGNI_LDFLAGS)
+        AC_SUBST(CRAY_UGNI_CPPFLAGS)
+    fi
+
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
+    CC="$save_CC"
+
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_CRAY_UGNI_TRUE}"; then
+            ifelse([$1],,[AC_DEFINE(HAVE_CRAY_UGNI,1,[Define if you have CRAY_UGNI.])],[$1])
+            :
+    else
+            $2
+            :
+    fi
+
+fi
+
+])
diff --git a/config/ac_dart.m4 b/config/ac_dart.m4
deleted file mode 100644
index 34ccd08..0000000
--- a/config/ac_dart.m4
+++ /dev/null
@@ -1,116 +0,0 @@
-#
-#
-# AC_PROG_DART
-#
-# Test for DART installation
-# and set $DART to the correct value.
-#
-#
-dnl @synopsis AC_PROG_DART
-dnl
-dnl This macro test if DART is installed. If DART
-dnl is installed, it set $DART to the right value
-dnl
-dnl @version 1.0
-dnl @author Norbert Podhorszki, pnorbert at ornl.gov
-dnl
-AC_DEFUN([AC_PROG_DART],[
-
-AM_CONDITIONAL(HAVE_DART,true)
-
-AC_ARG_WITH(dart,
-        [AS_HELP_STRING([--with-dart=DIR],
-           [Build the DART transport method. Point to the DART installation.])],
-        [DART_LDFLAGS="-L$withval/lib";
-         DART_CPPFLAGS="-I$withval/include";],
-        [with_dart=check])
-
-dnl If --without-dart was given set HAVE_DART to false and do nothing more
-if test "x$with_dart" == "xno"; then
-
-   AM_CONDITIONAL(HAVE_DART,false)
-
-else
-
-    dnl allow args --with-dart incdir and --with-dart-libdir
-    AC_ARG_WITH(dart-incdir,
-                [  --with-dart-incdir=<location of dart includes>],
-                [DART_INCDIR=$withval
-                 with_dart=detailed])
-    
-    AC_ARG_WITH(dart-libdir,
-                [  --with-dart-libdir=<location of dart library>],
-                [DART_LIBDIR=$withval
-                 with_dart=detailed])
-    
-    
-    dnl If we know DART_DIR, then we can know DART_INCDIR.
-    dnl We don't overwrite DART_INCDIR.
-    if test -n "${DART_DIR}" -a -z "${DART_INCDIR}"; then
-            DART_INCDIR="${DART_DIR}/include";
-    dnl We may have DART denoting the dir (e.g. on ewok BUT on franklin it contains all flags)
-    elif test -n "${DART}" -a -d "${DART}"; then
-            DART_INCDIR="${DART}/include"
-    fi
-
-    dnl If we know DART_DIR, then we can know DART_LIBDIR.
-    dnl We don't overwrite DART_LIBDIR.
-    if test -n "${DART_DIR}" -a -z "${DART_LIBDIR}"; then
-            DART_LIBDIR="${DART_DIR}/lib";
-    dnl We may have DART denoting the dir (e.g. on ewok BUT on franklin it contains all flags)
-    elif test -n "${DART}" -a -d "${DART}"; then
-            DART_LIBDIR="${DART}/lib"
-    fi
-
-    dnl Add "-I" to DART_INCDIR.
-    if test -n "${DART_INCDIR}"; then
-            DART_CPPFLAGS="-I${DART_INCDIR}"
-    else
-            ac_dart_ok=no
-    fi
-
-    dnl Add "-L" to DART_LIBDIR.
-    if test -n "${DART_LIBDIR}"; then
-            DART_LDFLAGS="-L${DART_LIBDIR}"
-    else
-            ac_dart_ok=no
-    fi
-
-    save_CPPFLAGS="$CPPFLAGS"
-    save_LIBS="$LIBS"
-    save_LDFLAGS="$LDFLAGS"
-    LIBS="$LIBS -ldart2 -lspaces"
-    LDFLAGS="$LDFLAGS $DART_LDFLAGS"
-    CPPFLAGS="$CPPFLAGS $DART_CPPFLAGS"
-    
-    if test -z "${HAVE_DART_TRUE}"; then
-            AC_CHECK_HEADERS(dart.h,
-                    ,
-                    [AM_CONDITIONAL(HAVE_DART,false)])
-    fi
-    
-    # Check for the Mini-XML library and headers
-    AC_TRY_COMPILE([#include "dart.h"],
-            [int err; err = dart_init(1,1);],
-            [DART_LIBS="-ldart2 -lspaces"],
-            [AM_CONDITIONAL(HAVE_DART,false)])
-    
-    LIBS="$save_LIBS"
-    LDFLAGS="$save_LDFLAGS"
-    CPPFLAGS="$save_CPPFLAGS"
-    
-    AC_SUBST(DART_LIBS)
-    AC_SUBST(DART_LDFLAGS)
-    AC_SUBST(DART_CPPFLAGS)
-    
-    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-    if test -z "${HAVE_DART_TRUE}"; then
-            ifelse([$1],,[AC_DEFINE(HAVE_DART,1,[Define if you have the DART.])],[$1])
-            :
-    else
-            $2
-            :
-    fi
-
-fi
-])dnl AC_DART
diff --git a/config/ac_dataspaces.m4 b/config/ac_dataspaces.m4
new file mode 100644
index 0000000..46f250b
--- /dev/null
+++ b/config/ac_dataspaces.m4
@@ -0,0 +1,145 @@
+#
+#
+# AC_PROG_DATASPACES
+#
+# Test for DATASPACES installation
+# and set $DATASPACES to the correct value.
+#
+#
+dnl @synopsis AC_PROG_DATASPACES
+dnl
+dnl This macro test if DATASPACES is installed. If DATASPACES
+dnl is installed, it set $DATASPACES to the right value
+dnl
+dnl @version 1.0
+dnl @author Norbert Podhorszki, pnorbert at ornl.gov
+dnl
+AC_DEFUN([AC_PROG_DATASPACES],[
+
+AC_REQUIRE([AC_INFINIBAND])
+dnl AC_REQUIRE([AC_PORTALS])
+dnl AC_REQUIRE([AC_GNI])
+
+
+AM_CONDITIONAL(HAVE_DATASPACES,true)
+
+AC_ARG_WITH(dataspaces,
+        [AS_HELP_STRING([--with-dataspaces=DIR],
+           [Build the DATASPACES transport method. Point to the DATASPACES installation.])],
+        [DATASPACES_LDFLAGS="-L$withval/lib";
+         DATASPACES_CPPFLAGS="-I$withval/include";],
+        [with_dataspaces=check])
+
+dnl If --without-dataspaces was given set HAVE_DATASPACES to false and do nothing more
+if test "x$with_dataspaces" == "xno"; then
+
+   AM_CONDITIONAL(HAVE_DATASPACES,false)
+
+else
+
+    dnl allow args --with-dataspaces incdir and --with-dataspaces-libdir
+    AC_ARG_WITH(dataspaces-incdir,
+                [  --with-dataspaces-incdir=<location of dataspaces includes>],
+                [DATASPACES_INCDIR=$withval
+                 with_dataspaces=detailed])
+    
+    AC_ARG_WITH(dataspaces-libdir,
+                [  --with-dataspaces-libdir=<location of dataspaces library>],
+                [DATASPACES_LIBDIR=$withval
+                 with_dataspaces=detailed])
+    
+    
+    dnl If we know DATASPACES_DIR, then we can know DATASPACES_INCDIR.
+    dnl We don't overwrite DATASPACES_INCDIR.
+    if test -n "${DATASPACES_DIR}" -a -z "${DATASPACES_INCDIR}"; then
+            DATASPACES_INCDIR="${DATASPACES_DIR}/include";
+    dnl We may have DATASPACES denoting the dir (e.g. on ewok BUT on franklin it contains all flags)
+    elif test -n "${DATASPACES}" -a -d "${DATASPACES}"; then
+            DATASPACES_INCDIR="${DATASPACES}/include"
+    fi
+
+    dnl If we know DATASPACES_DIR, then we can know DATASPACES_LIBDIR.
+    dnl We don't overwrite DATASPACES_LIBDIR.
+    if test -n "${DATASPACES_DIR}" -a -z "${DATASPACES_LIBDIR}"; then
+            DATASPACES_LIBDIR="${DATASPACES_DIR}/lib";
+    dnl We may have DATASPACES denoting the dir (e.g. on ewok BUT on franklin it contains all flags)
+    elif test -n "${DATASPACES}" -a -d "${DATASPACES}"; then
+            DATASPACES_LIBDIR="${DATASPACES}/lib"
+    fi
+
+    dnl Add "-I" to DATASPACES_INCDIR.
+    if test -n "${DATASPACES_INCDIR}"; then
+            DATASPACES_CPPFLAGS="-I${DATASPACES_INCDIR}"
+    else
+            ac_dataspaces_ok=no
+    fi
+
+    dnl Add "-L" to DATASPACES_LIBDIR.
+    if test -n "${DATASPACES_LIBDIR}"; then
+            DATASPACES_LDFLAGS="-L${DATASPACES_LIBDIR}"
+    else
+            ac_dataspaces_ok=no
+    fi
+
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    if test "x${ac_infiniband_lib_ok}" == "xyes"; then 
+        dnl LIBS="$LIBS -ldart -ldataspaces"
+        LIBS="$LIBS -ldspaces -ldscommon -ldart"
+    elif test "x${ac_portals_lib_ok}" == "xyes"; then 
+        LIBS="$LIBS -ldart2 -lspaces"
+    else
+        LIBS="$LIBS -ldspaces -ldscommon -ldart"
+    fi
+    dnl LIBS="$LIBS -ldspaces -ldscommon -ldart"
+    LDFLAGS="$LDFLAGS $DATASPACES_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $DATASPACES_CPPFLAGS"
+    
+    if test -z "${HAVE_DATASPACES_TRUE}"; then
+            AC_CHECK_HEADERS(dataspaces.h,
+                    ,
+                    [AM_CONDITIONAL(HAVE_DATASPACES,false)])
+    fi
+    
+    if test -z "${HAVE_DATASPACES_TRUE}"; then
+        # Check for the DataSpaces library and headers
+        if test "x${ac_portals_lib_ok}" == "xyes"; then 
+            AC_TRY_COMPILE([#include "dataspaces.h"],
+                    [int err; err = dspaces_init(1,1);],
+                    [DATASPACES_LIBS="-ldart2 -lspaces"],
+                    [AM_CONDITIONAL(HAVE_DATASPACES,false)])
+        elif test "x${ac_infiniband_lib_ok}" == "xyes"; then 
+            AC_TRY_COMPILE([#include "dataspaces.h"],
+                    [int err; err = dspaces_init(1,1);],
+                    [DATASPACES_LIBS="-ldspaces -ldscommon -ldart -lrdmacm"],
+                    [AM_CONDITIONAL(HAVE_DATASPACES,false)])
+        elif test -z "${HAVE_CRAY_PMI_TRUE}" -a -z "${HAVE_CRAY_UGNI_TRUE}"; then 
+            AC_TRY_COMPILE([#include "dataspaces.h"],
+                    [int err; err = dspaces_init(1,1);],
+                    [DATASPACES_LIBS="-ldspaces -ldscommon -ldart"],
+                    [AM_CONDITIONAL(HAVE_DATASPACES,false)])
+        else
+            AM_CONDITIONAL(HAVE_DATASPACES,false)
+        fi
+    fi
+
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
+    
+    AC_SUBST(DATASPACES_LIBS)
+    AC_SUBST(DATASPACES_LDFLAGS)
+    AC_SUBST(DATASPACES_CPPFLAGS)
+    
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_DATASPACES_TRUE}"; then
+            ifelse([$1],,[AC_DEFINE(HAVE_DATASPACES,1,[Define if you have the DATASPACES.])],[$1])
+            :
+    else
+            $2
+            :
+    fi
+
+fi
+])dnl AC_DATASPACES
diff --git a/config/ac_dmalloc.m4 b/config/ac_dmalloc.m4
index 2f5617f..71f0c9e 100644
--- a/config/ac_dmalloc.m4
+++ b/config/ac_dmalloc.m4
@@ -22,41 +22,51 @@ AM_CONDITIONAL(HAVE_DMALLOC,true)
 AC_ARG_WITH(dmalloc,
         [  --with-dmalloc=DIR      Location of dmalloc library],
         [DMALLOC_LDFLAGS="-L$withval/lib";
-         DMALLOC_CPPFLAGS="-I$withval/include";])
+         DMALLOC_CPPFLAGS="-I$withval/include";],
+        [with_dmalloc=no])
 
-save_CPPFLAGS="$CPPFLAGS"
-save_LIBS="$LIBS"
-save_LDFLAGS="$LDFLAGS"
-LIBS="$LIBS -ldmalloc"
-LDFLAGS="$LDFLAGS $DMALLOC_LDFLAGS"
-CPPFLAGS="$CPPFLAGS $DMALLOC_CPPFLAGS"
+dnl If --without-hdf5 was given set HAVE_HDF5 to false and do nothing more
+dnl If nothing was given, then too, do nothing 
+if test "x$with_dmalloc" == "xno"; then
 
-if test -z "${HAVE_DMALLOC_TRUE}"; then
+    AM_CONDITIONAL(HAVE_DMALLOC,false)
+
+else
+
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    LIBS="$LIBS -ldmalloc"
+    LDFLAGS="$LDFLAGS $DMALLOC_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $DMALLOC_CPPFLAGS"
+
+    if test -z "${HAVE_DMALLOC_TRUE}"; then
         AC_CHECK_HEADERS(dmalloc.h,
                 ,
                 [AM_CONDITIONAL(HAVE_DMALLOC,false)])
-fi
+    fi
 
-# Check for the dmalloc library and headers
-AC_TRY_COMPILE([#include "dmalloc.h"],
-        [char * s; s=malloc(sizeof(char)*10); free(s);],
-        [DMALLOC_LIBS="-ldmallocth"],
-        [AM_CONDITIONAL(HAVE_DMALLOC,false)])
+    # Check for the dmalloc library and headers
+    AC_TRY_COMPILE([#include "dmalloc.h"],
+            [char * s; s=malloc(sizeof(char)*10); free(s);],
+            [DMALLOC_LIBS="-ldmallocth"],
+            [AM_CONDITIONAL(HAVE_DMALLOC,false)])
 
-LIBS="$save_LIBS"
-LDFLAGS="$save_LDFLAGS"
-CPPFLAGS="$save_CPPFLAGS"
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
 
-AC_SUBST(DMALLOC_LIBS)
-AC_SUBST(DMALLOC_LDFLAGS)
-AC_SUBST(DMALLOC_CPPFLAGS)
+    AC_SUBST(DMALLOC_LIBS)
+    AC_SUBST(DMALLOC_LDFLAGS)
+    AC_SUBST(DMALLOC_CPPFLAGS)
 
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test -z "${HAVE_DMALLOC_TRUE}"; then
-        ifelse([$1],,[AC_DEFINE(HAVE_DMALLOC,1,[Define if you have DMALLOC.])],[$1])
-        :
-else
-        $2
-        :
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_DMALLOC_TRUE}"; then
+            ifelse([$1],,[AC_DEFINE(HAVE_DMALLOC,1,[Define if you have DMALLOC.])],[$1])
+            :
+    else
+            $2
+            :
+    fi
 fi
 ])dnl AC_DMALLOC
diff --git a/config/ac_infiniband.m4 b/config/ac_infiniband.m4
index 3a20d15..672d2c2 100644
--- a/config/ac_infiniband.m4
+++ b/config/ac_infiniband.m4
@@ -66,6 +66,7 @@ if test x"$ac_with_infiniband" = xyes; then
 
         dnl Look for Infiniband header files
         save_CPPFLAGS=$CPPFLAGS;
+        save_LDFLAGS=$LDFLAGS;
         CPPFLAGS="$CPPFLAGS $INFINIBAND_CPPFLAGS"
         LDFLAGS="$LDFLAGS $INFINIBAND_LDFLAGS"
 
@@ -109,12 +110,13 @@ if test x"$ac_with_infiniband" = xyes; then
             AM_CONDITIONAL(HAVE_INFINIBAND,true)
         fi
 
+        CPPFLAGS=$save_CPPFLAGS;
+        LDFLAGS=$save_LDFLAGS;
 
         AC_SUBST(INFINIBAND_CPPFLAGS)
         AC_SUBST(INFINIBAND_CFLAGS)
         AC_SUBST(INFINIBAND_LDFLAGS)
         AC_SUBST(INFINIBAND_LIBS)
-        AC_SUBST(INFINIBAND_HEADER)
 
 
         # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
diff --git a/config/ac_nc4par.m4 b/config/ac_nc4par.m4
index 17bf271..6d0232e 100644
--- a/config/ac_nc4par.m4
+++ b/config/ac_nc4par.m4
@@ -111,7 +111,10 @@ else
     
     if test -z "${HAVE_NC4PAR_TRUE}"; then
         AC_MSG_CHECKING([if nc4 parallel code can be compiled])
-        AC_TRY_COMPILE([#include "netcdf.h"],
+        AC_TRY_COMPILE(
+            [#include "mpi.h"
+             #include "netcdf.h"
+            ],
             [int ncid;
              MPI_Info info;
              MPI_Comm comm;
diff --git a/config/depcomp b/config/depcomp
new file mode 100755
index 0000000..04701da
--- /dev/null
+++ b/config/depcomp
@@ -0,0 +1,530 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2005-07-09.11
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by `PROGRAMS ARGS'.
+  object      Object file output by `PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputing dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+  stat=$?
+
+  if test -f "$tmpdepfile"; then :
+  else
+    stripped=`echo "$stripped" | sed 's,^.*/,,'`
+    tmpdepfile="$stripped.u"
+  fi
+
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    outname="$stripped.o"
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      # With Tru64 cc, shared objects can also be used to make a
+      # static library.  This mecanism is used in libtool 1.4 series to
+      # handle both shared and static libraries in a single compilation.
+      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
+      #
+      # With libtool 1.5 this exception was removed, and libtool now
+      # generates 2 separate objects for the 2 libraries.  These two
+      # compilations output dependencies in in $dir.libs/$base.o.d and
+      # in $dir$base.o.d.  We have to check for both files, because
+      # one of the two compilations can be disabled.  We should prefer
+      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+      # automatically cleaned when .libs/ is deleted, while ignoring
+      # the former would cause a distcleancheck panic.
+      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
+      tmpdepfile2=$dir$base.o.d          # libtool 1.5
+      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
+      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1=$dir$base.o.d
+      tmpdepfile2=$dir$base.d
+      tmpdepfile3=$dir$base.d
+      tmpdepfile4=$dir$base.d
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+      exit $stat
+   fi
+
+   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
+   do
+     test -f "$tmpdepfile" && break
+   done
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a tab and a space in the [].
+      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/config/ltmain.sh b/config/ltmain.sh
old mode 100644
new mode 100755
index 0223495..a72f2fd
--- a/config/ltmain.sh
+++ b/config/ltmain.sh
@@ -1,52 +1,83 @@
-# ltmain.sh - Provide generalized library-building support services.
-# NOTE: Changing this file will not affect anything until you rerun configure.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
-# Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6b
+# 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 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions.  There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# 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.
 #
-# This program is distributed in the hope that it will be useful, but
+# 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 this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-basename="s,^.*/,,g"
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-progname=`echo "$progpath" | $SED $basename`
-modename="$progname"
+# 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.
 
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+#     --config             show all configuration variables
+#     --debug              enable verbose shell tracing
+# -n, --dry-run            display commands without modifying any files
+#     --features           display basic configuration information and exit
+#     --mode=MODE          use operation mode MODE
+#     --preserve-dup-deps  don't remove duplicate dependency libraries
+#     --quiet, --silent    don't print informational messages
+#     --tag=TAG            use configuration variables from tag TAG
+# -v, --verbose            print informational messages (default)
+#     --version            print version information
+# -h, --help               print short or long help message
+#
+# MODE must be one of the following:
+#
+#       clean              remove files from the build directory
+#       compile            compile a source file into a libtool object
+#       execute            automatically set library path, then run a program
+#       finish             complete the installation of libtool libraries
+#       install            install libraries or executables
+#       link               create a library or an executable
+#       uninstall          remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+#       host-triplet:	$host
+#       shell:		$SHELL
+#       compiler:		$LTCC
+#       compiler flags:		$LTCFLAGS
+#       linker:		$LD (gnu? $with_gnu_ld)
+#       $progname:		(GNU libtool) 2.2.6b
+#       automake:		$automake_version
+#       autoconf:		$autoconf_version
+#
+# Report bugs to <bug-libtool at gnu.org>.
 
 PROGRAM=ltmain.sh
 PACKAGE=libtool
-VERSION=1.5.22
-TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
+VERSION=2.2.6b
+TIMESTAMP=""
+package_revision=1.3017
 
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
+# Be Bourne compatible
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
@@ -57,99 +88,264 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 else
   case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
 fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
-# Check that we have a working $echo.
-if test "X$1" = X--no-reexec; then
-  # Discard the --no-reexec flag, and continue.
-  shift
-elif test "X$1" = X--fallback-echo; then
-  # Avoid inline document here, it may be left over
-  :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
-  # Yippee, $echo works!
-  :
-else
-  # Restart under the correct shell, and then maybe $echo will work.
-  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
-  # used as fallback echo
-  shift
-  cat <<EOF
-$*
-EOF
-  exit $EXIT_SUCCESS
-fi
-
-default_mode=
-help="Try \`$progname --help' for more information."
-magic="%%%MAGIC variable%%%"
-mkdir="mkdir"
-mv="mv -f"
-rm="rm -f"
-
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
-sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
-    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
-  SP2NL='tr \040 \012'
-  NL2SP='tr \015\012 \040\040'
-  ;;
- *) # EBCDIC based system
-  SP2NL='tr \100 \n'
-  NL2SP='tr \r\n \100\100'
-  ;;
-esac
-
-# NLS nuisances.
+# NLS nuisances: We save the old values to restore during execute mode.
 # Only set LANG and LC_ALL to C if already set.
 # These must not be set unconditionally because not all systems understand
 # e.g. LANG=C (notably SCO).
-# We save the old values to restore during execute mode.
-for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
 do
   eval "if test \"\${$lt_var+set}\" = set; then
-         save_$lt_var=\$$lt_var
-         $lt_var=C
-         export $lt_var
-       fi"
+          save_$lt_var=\$$lt_var
+          $lt_var=C
+	  export $lt_var
+	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+	fi"
 done
 
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
 # Make sure IFS has a sensible default
 lt_nl='
 '
 IFS=" 	$lt_nl"
 
-if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
-  $echo "$modename: not configured to build any kind of library" 1>&2
-  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-  exit $EXIT_FAILURE
-fi
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
 
-# Global variables.
-mode=$default_mode
-nonopt=
-prev=
-prevopt=
-run=
-show="$echo"
-show_help=
-execute_dlfiles=
-duplicate_deps=no
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+  -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+  [\\/]*|[A-Za-z]:\\*) ;;
+  *[\\/]*)
+     progdir=$func_dirname_result
+     progdir=`cd "$progdir" && pwd`
+     progpath="$progdir/$progname"
+     ;;
+  *)
+     save_IFS="$IFS"
+     IFS=:
+     for progdir in $PATH; do
+       IFS="$save_IFS"
+       test -x "$progdir/$progname" && break
+     done
+     IFS="$save_IFS"
+     test -n "$progdir" || progdir=`pwd`
+     progpath="$progdir/$progname"
+     ;;
+esac
+
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+  s/$bs4/&\\
+/g
+  s/^$bs2$dollar/$bs&/
+  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+  s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+    $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+    $opt_verbose && func_echo ${1+"$@"}
+
+    # A bug in bash halts the script if the last line of a function
+    # fails when set -e is in force, so we need another command to
+    # work around that:
+    :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+    $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+    # bash bug again:
+    :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+    func_error ${1+"$@"}
+    exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+    func_error ${1+"$@"}
+    func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information."  ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+    $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+    my_directory_path="$1"
+    my_dir_list=
+
+    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+      # Protect directory names starting with `-'
+      case $my_directory_path in
+        -*) my_directory_path="./$my_directory_path" ;;
+      esac
+
+      # While some portion of DIR does not yet exist...
+      while test ! -d "$my_directory_path"; do
+        # ...make a list in topmost first order.  Use a colon delimited
+	# list incase some portion of path contains whitespace.
+        my_dir_list="$my_directory_path:$my_dir_list"
+
+        # If the last portion added has no slash in it, the list is done
+        case $my_directory_path in */*) ;; *) break ;; esac
+
+        # ...otherwise throw away the child directory and loop
+        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+      done
+      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+      save_mkdir_p_IFS="$IFS"; IFS=':'
+      for my_dir in $my_dir_list; do
+	IFS="$save_mkdir_p_IFS"
+        # mkdir can fail with a `File exist' error if two processes
+        # try to create one of the directories concurrently.  Don't
+        # stop in that case!
+        $MKDIR "$my_dir" 2>/dev/null || :
+      done
+      IFS="$save_mkdir_p_IFS"
+
+      # Bail out if we (or some other process) failed to create a directory.
+      test -d "$my_directory_path" || \
+        func_fatal_error "Failed to create \`$1'"
+    fi
+}
 
-#####################################
-# Shell function definitions:
-# This seems to be the best place for them
 
 # func_mktempdir [string]
 # Make a temporary directory that won't clash with other running
@@ -159,7 +355,7 @@ func_mktempdir ()
 {
     my_template="${TMPDIR-/tmp}/${1-$progname}"
 
-    if test "$run" = ":"; then
+    if test "$opt_dry_run" = ":"; then
       # Return a directory name, but don't create it in dry-run mode
       my_tmpdir="${my_template}-$$"
     else
@@ -168,524 +364,792 @@ func_mktempdir ()
       my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
 
       if test ! -d "$my_tmpdir"; then
-	# Failing that, at least try and use $RANDOM to avoid a race
-	my_tmpdir="${my_template}-${RANDOM-0}$$"
+        # Failing that, at least try and use $RANDOM to avoid a race
+        my_tmpdir="${my_template}-${RANDOM-0}$$"
 
-	save_mktempdir_umask=`umask`
-	umask 0077
-	$mkdir "$my_tmpdir"
-	umask $save_mktempdir_umask
+        save_mktempdir_umask=`umask`
+        umask 0077
+        $MKDIR "$my_tmpdir"
+        umask $save_mktempdir_umask
       fi
 
       # If we're not in dry-run mode, bomb out on failure
-      test -d "$my_tmpdir" || {
-        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
-	exit $EXIT_FAILURE
-      }
+      test -d "$my_tmpdir" || \
+        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
     fi
 
-    $echo "X$my_tmpdir" | $Xsed
+    $ECHO "X$my_tmpdir" | $Xsed
 }
 
 
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
 {
-  win32_libid_type="unknown"
-  win32_fileres=`file -L $1 2>/dev/null`
-  case $win32_fileres in
-  *ar\ archive\ import\ library*) # definitely import
-    win32_libid_type="x86 archive import"
-    ;;
-  *ar\ archive*) # could be an import, or static
-    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
-      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
-      win32_nmres=`eval $NM -f posix -A $1 | \
-	$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
-      case $win32_nmres in
-      import*)  win32_libid_type="x86 archive import";;
-      *)        win32_libid_type="x86 archive static";;
-      esac
-    fi
-    ;;
-  *DLL*)
-    win32_libid_type="x86 DLL"
-    ;;
-  *executable*) # but shell scripts are "executable" too...
-    case $win32_fileres in
-    *MS\ Windows\ PE\ Intel*)
-      win32_libid_type="x86 DLL"
-      ;;
+    case $1 in
+      *[\\\`\"\$]*)
+	func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+      *)
+        func_quote_for_eval_unquoted_result="$1" ;;
+    esac
+
+    case $func_quote_for_eval_unquoted_result in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting, command substitution and and variable
+      # expansion for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+        ;;
+      *)
+        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
     esac
-    ;;
-  esac
-  $echo $win32_libid_type
 }
 
 
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
 {
-    if test -n "$available_tags" && test -z "$tagname"; then
-      CC_quoted=
-      for arg in $CC; do
-	case $arg in
-	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-	CC_quoted="$CC_quoted $arg"
-      done
-      case $@ in
-      # Blanks in the command may have been stripped by the calling shell,
-      # but not from the CC environment variable when configure was run.
-      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
-      # Blanks at the start of $base_compile will cause this to fail
-      # if we don't check for them as well.
+    case $1 in
+      *[\\\`\"]*)
+	my_arg=`$ECHO "X$1" | $Xsed \
+	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
       *)
-	for z in $available_tags; do
-	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
-	    # Evaluate the configuration.
-	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
-	    CC_quoted=
-	    for arg in $CC; do
-	    # Double-quote args containing other shell metacharacters.
-	    case $arg in
-	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	      arg="\"$arg\""
-	      ;;
-	    esac
-	    CC_quoted="$CC_quoted $arg"
-	  done
-	    case "$@ " in
-	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
-	      # The compiler in the base compile command matches
-	      # the one in the tagged configuration.
-	      # Assume this is the tagged configuration we want.
-	      tagname=$z
-	      break
-	      ;;
-	    esac
-	  fi
-	done
-	# If $tagname still isn't set, then no tagged configuration
-	# was found and let the user know that the "--tag" command
-	# line option must be used.
-	if test -z "$tagname"; then
-	  $echo "$modename: unable to infer tagged configuration"
-	  $echo "$modename: specify a tag with \`--tag'" 1>&2
-	  exit $EXIT_FAILURE
-#        else
-#          $echo "$modename: using $tagname tagged configuration"
-	fi
-	;;
-      esac
-    fi
+        my_arg="$1" ;;
+    esac
+
+    case $my_arg in
+      # Double-quote args containing shell metacharacters to delay
+      # word splitting and command substitution for a subsequent eval.
+      # Many Bourne shells cannot handle close brackets correctly
+      # in scan sets, so we specify it separately.
+      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
+        my_arg="\"$my_arg\""
+        ;;
+    esac
+
+    func_quote_for_expand_result="$my_arg"
 }
 
 
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
 {
-    f_ex_an_ar_dir="$1"; shift
-    f_ex_an_ar_oldlib="$1"
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
 
-    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
-    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
-    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
-     :
-    else
-      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
-      exit $EXIT_FAILURE
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$my_cmd"
+      my_status=$?
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
     fi
 }
 
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
+# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.  Use the saved locale for evaluation.
+func_show_eval_locale ()
 {
-    my_gentop="$1"; shift
-    my_oldlibs=${1+"$@"}
-    my_oldobjs=""
-    my_xlib=""
-    my_xabs=""
-    my_xdir=""
-    my_status=""
-
-    $show "${rm}r $my_gentop"
-    $run ${rm}r "$my_gentop"
-    $show "$mkdir $my_gentop"
-    $run $mkdir "$my_gentop"
-    my_status=$?
-    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
-      exit $my_status
+    my_cmd="$1"
+    my_fail_exp="${2-:}"
+
+    ${opt_silent-false} || {
+      func_quote_for_expand "$my_cmd"
+      eval "func_echo $func_quote_for_expand_result"
+    }
+
+    if ${opt_dry_run-false}; then :; else
+      eval "$lt_user_locale
+	    $my_cmd"
+      my_status=$?
+      eval "$lt_safe_locale"
+      if test "$my_status" -eq 0; then :; else
+	eval "(exit $my_status); $my_fail_exp"
+      fi
     fi
+}
 
-    for my_xlib in $my_oldlibs; do
-      # Extract the objects.
-      case $my_xlib in
-	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
-	*) my_xabs=`pwd`"/$my_xlib" ;;
-      esac
-      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
-      my_xlib_u=$my_xlib
-      while :; do
-        case " $extracted_archives " in
-       *" $my_xlib_u "*)
-         extracted_serial=`expr $extracted_serial + 1`
-         my_xlib_u=lt$extracted_serial-$my_xlib ;;
-       *) break ;;
-       esac
-      done
-      extracted_archives="$extracted_archives $my_xlib_u"
-      my_xdir="$my_gentop/$my_xlib_u"
 
-      $show "${rm}r $my_xdir"
-      $run ${rm}r "$my_xdir"
-      $show "$mkdir $my_xdir"
-      $run $mkdir "$my_xdir"
-      exit_status=$?
-      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
-	exit $exit_status
-      fi
-      case $host in
-      *-darwin*)
-	$show "Extracting $my_xabs"
-	# Do not bother doing anything if just a dry run
-	if test -z "$run"; then
-	  darwin_orig_dir=`pwd`
-	  cd $my_xdir || exit $?
-	  darwin_archive=$my_xabs
-	  darwin_curdir=`pwd`
-	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
-	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
-	  if test -n "$darwin_arches"; then 
-	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
-	    darwin_arch=
-	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
-	    for darwin_arch in  $darwin_arches ; do
-	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
-	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
-	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
-	      cd "$darwin_curdir"
-	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
-	    done # $darwin_arches
-      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
-	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
-	    darwin_file=
-	    darwin_files=
-	    for darwin_file in $darwin_filelist; do
-	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
-	      lipo -create -output "$darwin_file" $darwin_files
-	    done # $darwin_filelist
-	    ${rm}r unfat-$$
-	    cd "$darwin_orig_dir"
-	  else
-	    cd "$darwin_orig_dir"
- 	    func_extract_an_archive "$my_xdir" "$my_xabs"
-	  fi # $darwin_arches
-	fi # $run
-	;;
-      *)
-        func_extract_an_archive "$my_xdir" "$my_xabs"
-        ;;
-      esac
-      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
-    done
-    func_extract_archives_result="$my_oldobjs"
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+        s/^# //
+	s/^# *$//
+        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+        p
+     }' < "$progpath"
+     exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+    $SED -n '/^# Usage:/,/# -h/ {
+        s/^# //
+	s/^# *$//
+	s/\$progname/'$progname'/
+	p
+    }' < "$progpath"
+    $ECHO
+    $ECHO "run \`$progname --help | more' for full usage"
+    exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+    $SED -n '/^# Usage:/,/# Report bugs to/ {
+        s/^# //
+	s/^# *$//
+	s*\$progname*'$progname'*
+	s*\$host*'"$host"'*
+	s*\$SHELL*'"$SHELL"'*
+	s*\$LTCC*'"$LTCC"'*
+	s*\$LTCFLAGS*'"$LTCFLAGS"'*
+	s*\$LD*'"$LD"'*
+	s/\$with_gnu_ld/'"$with_gnu_ld"'/
+	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+	p
+     }' < "$progpath"
+    exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+    func_error "missing argument for $1"
+    exit_cmd=exit
 }
-# End of Shell function definitions
-#####################################
 
-# Darwin sucks
-eval std_shrext=\"$shrext_cmds\"
+exit_cmd=:
 
-disable_libs=no
 
-# Parse our command line options once, thoroughly.
-while test "$#" -gt 0
-do
-  arg="$1"
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+  # Discard the --no-reexec flag, and continue.
+  shift
+elif test "X$1" = X--fallback-echo; then
+  # Avoid inline document here, it may be left over
+  :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+  # Yippee, $ECHO works!
+  :
+else
+  # Restart under the correct shell, and then maybe $ECHO will work.
+  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+  # used as fallback echo
   shift
+  cat <<EOF
+$*
+EOF
+  exit $EXIT_SUCCESS
+fi
 
-  case $arg in
-  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) optarg= ;;
-  esac
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
 
-  # If the previous option needs an argument, assign it.
-  if test -n "$prev"; then
-    case $prev in
-    execute_dlfiles)
-      execute_dlfiles="$execute_dlfiles $arg"
-      ;;
-    tag)
-      tagname="$arg"
-      preserve_args="${preserve_args}=$arg"
-
-      # Check whether tagname contains only valid characters
-      case $tagname in
-      *[!-_A-Za-z0-9,/]*)
-	$echo "$progname: invalid tag name: $tagname" 1>&2
-	exit $EXIT_FAILURE
-	;;
-      esac
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
 
-      case $tagname in
-      CC)
-	# Don't test for the "default" C tag, as we know, it's there, but
-	# not specially marked.
-	;;
-      *)
-	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
-	  taglist="$taglist $tagname"
-	  # Evaluate the configuration.
-	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
-	else
-	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
-	fi
-	;;
-      esac
-      ;;
-    *)
-      eval "$prev=\$arg"
-      ;;
-    esac
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
 
-    prev=
-    prevopt=
-    continue
-  fi
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end.  This prevents here-documents from being
+# left over by shells.
+exec_cmd=
 
-  # Have we seen a non-optional argument yet?
-  case $arg in
-  --help)
-    show_help=yes
-    ;;
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+    func_error ${1+"$@"}
+    func_error "See the $PACKAGE documentation for more information."
+    func_fatal_error "Fatal configuration error."
+}
 
-  --version)
-    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
-    $echo
-    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
-    $echo "This is free software; see the source for copying conditions.  There is NO"
-    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
-    exit $?
-    ;;
 
-  --config)
-    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+    re_begincf='^# ### BEGIN LIBTOOL'
+    re_endcf='^# ### END LIBTOOL'
+
+    # Default configuration.
+    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
     # Now print the configurations for the tags.
     for tagname in $taglist; do
-      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
     done
-    exit $?
-    ;;
-
-  --debug)
-    $echo "$progname: enabling shell trace mode"
-    set -x
-    preserve_args="$preserve_args $arg"
-    ;;
 
-  --dry-run | -n)
-    run=:
-    ;;
+    exit $?
+}
 
-  --features)
-    $echo "host: $host"
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+    $ECHO "host: $host"
     if test "$build_libtool_libs" = yes; then
-      $echo "enable shared libraries"
+      $ECHO "enable shared libraries"
     else
-      $echo "disable shared libraries"
+      $ECHO "disable shared libraries"
     fi
     if test "$build_old_libs" = yes; then
-      $echo "enable static libraries"
+      $ECHO "enable static libraries"
     else
-      $echo "disable static libraries"
+      $ECHO "disable static libraries"
     fi
+
     exit $?
-    ;;
+}
 
-  --finish) mode="finish" ;;
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+  # Global variable:
+  tagname="$1"
 
-  --mode) prevopt="--mode" prev=mode ;;
-  --mode=*) mode="$optarg" ;;
+  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+  sed_extractcf="/$re_begincf/,/$re_endcf/p"
 
-  --preserve-dup-deps) duplicate_deps="yes" ;;
+  # Validate tagname.
+  case $tagname in
+    *[!-_A-Za-z0-9,/]*)
+      func_fatal_error "invalid tag name: $tagname"
+      ;;
+  esac
 
-  --quiet | --silent)
-    show=:
-    preserve_args="$preserve_args $arg"
-    ;;
+  # Don't test for the "default" C tag, as we know it's
+  # there but not specially marked.
+  case $tagname in
+    CC) ;;
+    *)
+      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+	taglist="$taglist $tagname"
+
+	# Evaluate the configuration.  Be careful to quote the path
+	# and the sed script, to avoid splitting on whitespace, but
+	# also don't use non-portable quotes within backquotes within
+	# quotes we have to do it in 2 steps:
+	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+	eval "$extractedcf"
+      else
+	func_error "ignoring unknown tag $tagname"
+      fi
+      ;;
+  esac
+}
+
+# Parse options once, thoroughly.  This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
 
-  --tag)
-    prevopt="--tag"
-    prev=tag
-    preserve_args="$preserve_args --tag"
+  # Shorthand for --mode=foo, only valid as the first argument
+  case $1 in
+  clean|clea|cle|cl)
+    shift; set dummy --mode clean ${1+"$@"}; shift
     ;;
-  --tag=*)
-    set tag "$optarg" ${1+"$@"}
-    shift
-    prev=tag
-    preserve_args="$preserve_args --tag"
+  compile|compil|compi|comp|com|co|c)
+    shift; set dummy --mode compile ${1+"$@"}; shift
     ;;
-
-  -dlopen)
-    prevopt="-dlopen"
-    prev=execute_dlfiles
+  execute|execut|execu|exec|exe|ex|e)
+    shift; set dummy --mode execute ${1+"$@"}; shift
     ;;
-
-  -*)
-    $echo "$modename: unrecognized option \`$arg'" 1>&2
-    $echo "$help" 1>&2
-    exit $EXIT_FAILURE
+  finish|finis|fini|fin|fi|f)
+    shift; set dummy --mode finish ${1+"$@"}; shift
     ;;
-
-  *)
-    nonopt="$arg"
-    break
+  install|instal|insta|inst|ins|in|i)
+    shift; set dummy --mode install ${1+"$@"}; shift
+    ;;
+  link|lin|li|l)
+    shift; set dummy --mode link ${1+"$@"}; shift
+    ;;
+  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+    shift; set dummy --mode uninstall ${1+"$@"}; shift
     ;;
   esac
-done
 
-if test -n "$prevopt"; then
-  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-fi
+  # Parse non-mode specific arguments:
+  while test "$#" -gt 0; do
+    opt="$1"
+    shift
 
-case $disable_libs in
-no) 
-  ;;
-shared)
-  build_libtool_libs=no
-  build_old_libs=yes
-  ;;
-static)
-  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-  ;;
-esac
+    case $opt in
+      --config)		func_config					;;
 
-# If this variable is set in any of the actions, the command in it
-# will be execed at the end.  This prevents here-documents from being
-# left over by shells.
-exec_cmd=
+      --debug)		preserve_args="$preserve_args $opt"
+			func_echo "enabling shell trace mode"
+			opt_debug='set -x'
+			$opt_debug
+			;;
 
-if test -z "$show_help"; then
+      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			execute_dlfiles="$execute_dlfiles $1"
+			shift
+			;;
 
-  # Infer the operation mode.
-  if test -z "$mode"; then
-    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
-    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
-    case $nonopt in
-    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
-      mode=link
-      for arg
-      do
-	case $arg in
-	-c)
-	   mode=compile
-	   break
-	   ;;
-	esac
-      done
-      ;;
-    *db | *dbx | *strace | *truss)
-      mode=execute
-      ;;
-    *install*|cp|mv)
-      mode=install
-      ;;
-    *rm)
-      mode=uninstall
+      --dry-run | -n)	opt_dry_run=:					;;
+      --features)       func_features					;;
+      --finish)		mode="finish"					;;
+
+      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			case $1 in
+			  # Valid mode arguments:
+			  clean)	;;
+			  compile)	;;
+			  execute)	;;
+			  finish)	;;
+			  install)	;;
+			  link)		;;
+			  relink)	;;
+			  uninstall)	;;
+
+			  # Catch anything else as an error
+			  *) func_error "invalid argument for $opt"
+			     exit_cmd=exit
+			     break
+			     ;;
+		        esac
+
+			mode="$1"
+			shift
+			;;
+
+      --preserve-dup-deps)
+			opt_duplicate_deps=:				;;
+
+      --quiet|--silent)	preserve_args="$preserve_args $opt"
+			opt_silent=:
+			;;
+
+      --verbose| -v)	preserve_args="$preserve_args $opt"
+			opt_silent=false
+			;;
+
+      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
+			preserve_args="$preserve_args $opt $1"
+			func_enable_tag "$1"	# tagname is set here
+			shift
+			;;
+
+      # Separate optargs to long options:
+      -dlopen=*|--mode=*|--tag=*)
+			func_opt_split "$opt"
+			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+			shift
+			;;
+
+      -\?|-h)		func_usage					;;
+      --help)		opt_help=:					;;
+      --version)	func_version					;;
+
+      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
+
+      *)		nonopt="$opt"
+			break
+			;;
+    esac
+  done
+
+
+  case $host in
+    *cygwin* | *mingw* | *pw32* | *cegcc*)
+      # don't eliminate duplications in $postdeps and $predeps
+      opt_duplicate_compiler_generated_deps=:
       ;;
     *)
-      # If we have no mode, but dlfiles were specified, then do execute mode.
-      test -n "$execute_dlfiles" && mode=execute
+      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+      ;;
+  esac
 
-      # Just use the default operation mode.
-      if test -z "$mode"; then
-	if test -n "$nonopt"; then
-	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
-	else
-	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
-	fi
+  # Having warned about all mis-specified options, bail out if
+  # anything was wrong.
+  $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+  if test "$package_revision" != "$macro_revision"; then
+    if test "$VERSION" != "$macro_version"; then
+      if test -z "$macro_version"; then
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+      else
+        cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
       fi
-      ;;
-    esac
+    else
+      cat >&2 <<_LT_EOF
+$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+    fi
+
+    exit $EXIT_MISMATCH
+  fi
+}
+
+
+## ----------- ##
+##    Main.    ##
+## ----------- ##
+
+$opt_help || {
+  # Sanity checks first:
+  func_check_version_match
+
+  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+    func_fatal_configuration "not configured to build any kind of library"
   fi
 
+  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+  # Darwin sucks
+  eval std_shrext=\"$shrext_cmds\"
+
+
   # Only execute mode is allowed to have -dlopen flags.
   if test -n "$execute_dlfiles" && test "$mode" != execute; then
-    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
-    $echo "$help" 1>&2
+    func_error "unrecognized option \`-dlopen'"
+    $ECHO "$help" 1>&2
     exit $EXIT_FAILURE
   fi
 
   # Change the help message to a mode-specific one.
   generic_help="$help"
-  help="Try \`$modename --help --mode=$mode' for more information."
-
-  # These modes are in order of execution frequency so that they run quickly.
-  case $mode in
-  # libtool compile mode
-  compile)
-    modename="$modename: compile"
-    # Get the compilation command and the source file.
-    base_compile=
-    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
-    suppress_opt=yes
-    suppress_output=
-    arg_mode=normal
-    libobj=
-    later=
+  help="Try \`$progname --help --mode=$mode' for more information."
+}
 
-    for arg
-    do
-      case $arg_mode in
-      arg  )
-	# do not "continue".  Instead, add this to base_compile
-	lastarg="$arg"
-	arg_mode=normal
-	;;
 
-      target )
-	libobj="$arg"
-	arg_mode=normal
-	continue
-	;;
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+    test -f "$1" &&
+      $SED -e 4q "$1" 2>/dev/null \
+        | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
 
-      normal )
-	# Accept any command-line options.
-	case $arg in
-	-o)
-	  if test -n "$libobj" ; then
-	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-	  arg_mode=target
-	  continue
-	  ;;
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs.  To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway.  Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+    lalib_p=no
+    if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+	for lalib_p_l in 1 2 3 4
+	do
+	    read lalib_p_line
+	    case "$lalib_p_line" in
+		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+	    esac
+	done
+	exec 0<&5 5<&-
+    fi
+    test "$lalib_p" = yes
+}
 
-	-static | -prefer-pic | -prefer-non-pic)
-	  later="$later $arg"
-	  continue
-	  ;;
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+    func_lalib_p "$1"
+}
 
-	-no-suppress)
-	  suppress_opt=no
-	  continue
-	  ;;
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+    func_ltwrapper_exec_suffix=
+    case $1 in
+    *.exe) ;;
+    *) func_ltwrapper_exec_suffix=.exe ;;
+    esac
+    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+    func_ltwrapper_scriptname_result=""
+    if func_ltwrapper_executable_p "$1"; then
+	func_dirname_and_basename "$1" "" "."
+	func_stripname '' '.exe' "$func_basename_result"
+	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+    fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+    $opt_debug
+    save_ifs=$IFS; IFS='~'
+    for cmd in $1; do
+      IFS=$save_ifs
+      eval cmd=\"$cmd\"
+      func_show_eval "$cmd" "${2-:}"
+    done
+    IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)!  Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+    $opt_debug
+    case $1 in
+    */* | *\\*)	. "$1" ;;
+    *)		. "./$1" ;;
+    esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+    $opt_debug
+    if test -n "$available_tags" && test -z "$tagname"; then
+      CC_quoted=
+      for arg in $CC; do
+        func_quote_for_eval "$arg"
+	CC_quoted="$CC_quoted $func_quote_for_eval_result"
+      done
+      case $@ in
+      # Blanks in the command may have been stripped by the calling shell,
+      # but not from the CC environment variable when configure was run.
+      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+      # Blanks at the start of $base_compile will cause this to fail
+      # if we don't check for them as well.
+      *)
+	for z in $available_tags; do
+	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+	    # Evaluate the configuration.
+	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+	    CC_quoted=
+	    for arg in $CC; do
+	      # Double-quote args containing other shell metacharacters.
+	      func_quote_for_eval "$arg"
+	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
+	    done
+	    case "$@ " in
+	      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+	      # The compiler in the base compile command matches
+	      # the one in the tagged configuration.
+	      # Assume this is the tagged configuration we want.
+	      tagname=$z
+	      break
+	      ;;
+	    esac
+	  fi
+	done
+	# If $tagname still isn't set, then no tagged configuration
+	# was found and let the user know that the "--tag" command
+	# line option must be used.
+	if test -z "$tagname"; then
+	  func_echo "unable to infer tagged configuration"
+	  func_fatal_error "specify a tag with \`--tag'"
+#	else
+#	  func_verbose "using $tagname tagged configuration"
+	fi
+	;;
+      esac
+    fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+    write_libobj=${1}
+    if test "$build_libtool_libs" = yes; then
+      write_lobj=\'${2}\'
+    else
+      write_lobj=none
+    fi
+
+    if test "$build_old_libs" = yes; then
+      write_oldobj=\'${3}\'
+    else
+      write_oldobj=none
+    fi
+
+    $opt_dry_run || {
+      cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+      $MV "${write_libobj}T" "${write_libobj}"
+    }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+    $opt_debug
+    # Get the compilation command and the source file.
+    base_compile=
+    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
+    suppress_opt=yes
+    suppress_output=
+    arg_mode=normal
+    libobj=
+    later=
+    pie_flag=
+
+    for arg
+    do
+      case $arg_mode in
+      arg  )
+	# do not "continue".  Instead, add this to base_compile
+	lastarg="$arg"
+	arg_mode=normal
+	;;
+
+      target )
+	libobj="$arg"
+	arg_mode=normal
+	continue
+	;;
+
+      normal )
+	# Accept any command-line options.
+	case $arg in
+	-o)
+	  test -n "$libobj" && \
+	    func_fatal_error "you cannot specify \`-o' more than once"
+	  arg_mode=target
+	  continue
+	  ;;
+
+	-pie | -fpie | -fPIE)
+          pie_flag="$pie_flag $arg"
+	  continue
+	  ;;
+
+	-shared | -static | -prefer-pic | -prefer-non-pic)
+	  later="$later $arg"
+	  continue
+	  ;;
+
+	-no-suppress)
+	  suppress_opt=no
+	  continue
+	  ;;
 
 	-Xcompiler)
 	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
@@ -693,31 +1157,25 @@ if test -z "$show_help"; then
 	  ;;            #  replaced later.  I would guess that would be a bug.
 
 	-Wc,*)
-	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+	  func_stripname '-Wc,' '' "$arg"
+	  args=$func_stripname_result
 	  lastarg=
 	  save_ifs="$IFS"; IFS=','
- 	  for arg in $args; do
+	  for arg in $args; do
 	    IFS="$save_ifs"
-
-	    # Double-quote args containing other shell metacharacters.
-	    # Many Bourne shells cannot handle close brackets correctly
-	    # in scan sets, so we specify it separately.
-	    case $arg in
-	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	      arg="\"$arg\""
-	      ;;
-	    esac
-	    lastarg="$lastarg $arg"
+	    func_quote_for_eval "$arg"
+	    lastarg="$lastarg $func_quote_for_eval_result"
 	  done
 	  IFS="$save_ifs"
-	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+	  func_stripname ' ' '' "$lastarg"
+	  lastarg=$func_stripname_result
 
 	  # Add the arguments to base_compile.
 	  base_compile="$base_compile $lastarg"
 	  continue
 	  ;;
 
-	* )
+	*)
 	  # Accept the current argument as the source file.
 	  # The previous "srcfile" becomes the current argument.
 	  #
@@ -729,65 +1187,42 @@ if test -z "$show_help"; then
       esac    #  case $arg_mode
 
       # Aesthetically quote the previous argument.
-      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
-
-      case $lastarg in
-      # Double-quote args containing other shell metacharacters.
-      # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, and some SunOS ksh mistreat backslash-escaping
-      # in scan sets (worked around with variable expansion),
-      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
-      # at all, so we specify them separately.
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	lastarg="\"$lastarg\""
-	;;
-      esac
-
-      base_compile="$base_compile $lastarg"
+      func_quote_for_eval "$lastarg"
+      base_compile="$base_compile $func_quote_for_eval_result"
     done # for arg
 
     case $arg_mode in
     arg)
-      $echo "$modename: you must specify an argument for -Xcompile"
-      exit $EXIT_FAILURE
+      func_fatal_error "you must specify an argument for -Xcompile"
       ;;
     target)
-      $echo "$modename: you must specify a target with \`-o'" 1>&2
-      exit $EXIT_FAILURE
+      func_fatal_error "you must specify a target with \`-o'"
       ;;
     *)
       # Get the name of the library object.
-      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+      test -z "$libobj" && {
+	func_basename "$srcfile"
+	libobj="$func_basename_result"
+      }
       ;;
     esac
 
     # Recognize several different file suffixes.
     # If the user specifies -o file.o, it is replaced with file.lo
-    xform='[cCFSifmso]'
     case $libobj in
-    *.ada) xform=ada ;;
-    *.adb) xform=adb ;;
-    *.ads) xform=ads ;;
-    *.asm) xform=asm ;;
-    *.c++) xform=c++ ;;
-    *.cc) xform=cc ;;
-    *.ii) xform=ii ;;
-    *.class) xform=class ;;
-    *.cpp) xform=cpp ;;
-    *.cxx) xform=cxx ;;
-    *.f90) xform=f90 ;;
-    *.for) xform=for ;;
-    *.java) xform=java ;;
-    *.obj) xform=obj ;;
+    *.[cCFSifmso] | \
+    *.ada | *.adb | *.ads | *.asm | \
+    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+      func_xform "$libobj"
+      libobj=$func_xform_result
+      ;;
     esac
 
-    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
-
     case $libobj in
-    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
     *)
-      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
-      exit $EXIT_FAILURE
+      func_fatal_error "cannot determine name of library object from \`$libobj'"
       ;;
     esac
 
@@ -795,7 +1230,15 @@ if test -z "$show_help"; then
 
     for arg in $later; do
       case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	continue
+	;;
+
       -static)
+	build_libtool_libs=no
 	build_old_libs=yes
 	continue
 	;;
@@ -812,28 +1255,17 @@ if test -z "$show_help"; then
       esac
     done
 
-    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
-    case $qlibobj in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	qlibobj="\"$qlibobj\"" ;;
-    esac
-    test "X$libobj" != "X$qlibobj" \
-	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
-	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
-    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$xdir" = "X$obj"; then
-      xdir=
-    else
-      xdir=$xdir/
-    fi
+    func_quote_for_eval "$libobj"
+    test "X$libobj" != "X$func_quote_for_eval_result" \
+      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
+    func_dirname_and_basename "$obj" "/" ""
+    objname="$func_basename_result"
+    xdir="$func_dirname_result"
     lobj=${xdir}$objdir/$objname
 
-    if test -z "$base_compile"; then
-      $echo "$modename: you must specify a compilation command" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+    test -z "$base_compile" && \
+      func_fatal_help "you must specify a compilation command"
 
     # Delete any leftover library objects.
     if test "$build_old_libs" = yes; then
@@ -842,12 +1274,9 @@ if test -z "$show_help"; then
       removelist="$lobj $libobj ${libobj}T"
     fi
 
-    $run $rm $removelist
-    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
-
     # On Cygwin there's no "real" PIC flag so we must build both object types
     case $host_os in
-    cygwin* | mingw* | pw32* | os2*)
+    cygwin* | mingw* | pw32* | os2* | cegcc*)
       pic_mode=default
       ;;
     esac
@@ -859,10 +1288,8 @@ if test -z "$show_help"; then
     # Calculate the filename of the output object if compiler does
     # not support -o with -c
     if test "$compiler_c_o" = no; then
-      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
       lockfile="$output_obj.lock"
-      removelist="$removelist $output_obj $lockfile"
-      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
     else
       output_obj=
       need_locks=no
@@ -872,13 +1299,13 @@ if test -z "$show_help"; then
     # Lock this critical section if it is needed
     # We use this script file to make the link, it avoids creating a new file
     if test "$need_locks" = yes; then
-      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
-	$show "Waiting for $lockfile to be removed"
+      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+	func_echo "Waiting for $lockfile to be removed"
 	sleep 2
       done
     elif test "$need_locks" = warn; then
       if test -f "$lockfile"; then
-	$echo "\
+	$ECHO "\
 *** ERROR, $lockfile exists and contains:
 `cat $lockfile 2>/dev/null`
 
@@ -889,34 +1316,22 @@ repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
 
-	$run $rm $removelist
+	$opt_dry_run || $RM $removelist
 	exit $EXIT_FAILURE
       fi
-      $echo "$srcfile" > "$lockfile"
+      removelist="$removelist $output_obj"
+      $ECHO "$srcfile" > "$lockfile"
     fi
 
+    $opt_dry_run || $RM $removelist
+    removelist="$removelist $lockfile"
+    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
     if test -n "$fix_srcfile_path"; then
       eval srcfile=\"$fix_srcfile_path\"
     fi
-    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
-    case $qsrcfile in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-      qsrcfile="\"$qsrcfile\"" ;;
-    esac
-
-    $run $rm "$libobj" "${libobj}T"
-
-    # Create a libtool object file (analogous to a ".la" file),
-    # but don't create it if we're doing a dry run.
-    test -z "$run" && cat > ${libobj}T <<EOF
-# $libobj - a libtool object file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-EOF
+    func_quote_for_eval "$srcfile"
+    qsrcfile=$func_quote_for_eval_result
 
     # Only build a PIC object if we are building libtool libraries.
     if test "$build_libtool_libs" = yes; then
@@ -930,32 +1345,19 @@ EOF
 	command="$base_compile $qsrcfile"
       fi
 
-      if test ! -d "${xdir}$objdir"; then
-	$show "$mkdir ${xdir}$objdir"
-	$run $mkdir ${xdir}$objdir
-	exit_status=$?
-	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
-	  exit $exit_status
-	fi
-      fi
+      func_mkdir_p "$xdir$objdir"
 
       if test -z "$output_obj"; then
 	# Place PIC objects in $objdir
 	command="$command -o $lobj"
       fi
 
-      $run $rm "$lobj" "$output_obj"
-
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	test -n "$output_obj" && $run $rm $removelist
-	exit $EXIT_FAILURE
-      fi
+      func_show_eval_locale "$command"	\
+          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
 
       if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	$echo "\
+	$ECHO "\
 *** ERROR, $lockfile contains:
 `cat $lockfile 2>/dev/null`
 
@@ -969,45 +1371,27 @@ repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
 
-	$run $rm $removelist
+	$opt_dry_run || $RM $removelist
 	exit $EXIT_FAILURE
       fi
 
       # Just move the object if needed, then go on to compile the next one
       if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
-	$show "$mv $output_obj $lobj"
-	if $run $mv $output_obj $lobj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
+	func_show_eval '$MV "$output_obj" "$lobj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
       fi
 
-      # Append the name of the PIC object to the libtool object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object='$objdir/$objname'
-
-EOF
-
       # Allow error messages only from the first compilation.
       if test "$suppress_opt" = yes; then
-        suppress_output=' >/dev/null 2>&1'
+	suppress_output=' >/dev/null 2>&1'
       fi
-    else
-      # No PIC object so indicate it doesn't exist in the libtool
-      # object file.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-pic_object=none
-
-EOF
     fi
 
     # Only build a position-dependent object if we build old libraries.
     if test "$build_old_libs" = yes; then
       if test "$pic_mode" != yes; then
 	# Don't build PIC code
-	command="$base_compile $qsrcfile"
+	command="$base_compile $qsrcfile$pie_flag"
       else
 	command="$base_compile $qsrcfile $pic_flag"
       fi
@@ -1017,17 +1401,12 @@ EOF
 
       # Suppress compiler output if we already did a PIC compilation.
       command="$command$suppress_output"
-      $run $rm "$obj" "$output_obj"
-      $show "$command"
-      if $run eval "$command"; then :
-      else
-	$run $rm $removelist
-	exit $EXIT_FAILURE
-      fi
+      func_show_eval_locale "$command" \
+        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
 
       if test "$need_locks" = warn &&
 	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
-	$echo "\
+	$ECHO "\
 *** ERROR, $lockfile contains:
 `cat $lockfile 2>/dev/null`
 
@@ -1041,5448 +1420,6777 @@ repeat this compilation, it may succeed, by chance, but you had better
 avoid parallel builds (make -j) in this platform, or get a better
 compiler."
 
-	$run $rm $removelist
+	$opt_dry_run || $RM $removelist
 	exit $EXIT_FAILURE
       fi
 
       # Just move the object if needed
       if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
-	$show "$mv $output_obj $obj"
-	if $run $mv $output_obj $obj; then :
-	else
-	  error=$?
-	  $run $rm $removelist
-	  exit $error
-	fi
+	func_show_eval '$MV "$output_obj" "$obj"' \
+	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
       fi
+    fi
 
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object='$objname'
+    $opt_dry_run || {
+      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
 
-EOF
-    else
-      # Append the name of the non-PIC object the libtool object file.
-      # Only append if the libtool object file exists.
-      test -z "$run" && cat >> ${libobj}T <<EOF
-# Name of the non-PIC object.
-non_pic_object=none
+      # Unlock the critical section if it was locked
+      if test "$need_locks" != no; then
+	removelist=$lockfile
+        $RM "$lockfile"
+      fi
+    }
 
-EOF
-    fi
+    exit $EXIT_SUCCESS
+}
 
-    $run $mv "${libobj}T" "${libobj}"
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
 
-    # Unlock the critical section if it was locked
-    if test "$need_locks" != no; then
-      $run $rm "$lockfile"
-    fi
+func_mode_help ()
+{
+    # We need to display help for each of the modes.
+    case $mode in
+      "")
+        # Generic help is extracted from the usage comments
+        # at the start of this file.
+        func_help
+        ;;
 
-    exit $EXIT_SUCCESS
-    ;;
+      clean)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
 
-  # libtool link mode
-  link | relink)
-    modename="$modename: link"
-    case $host in
-    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-      # It is impossible to link a dll without this setting, and
-      # we shouldn't force the makefile maintainer to figure out
-      # which system we are compiling for in order to pass an extra
-      # flag for every libtool invocation.
-      # allow_undefined=no
+Remove files from the build directory.
 
-      # FIXME: Unfortunately, there are problems with the above when trying
-      # to make a dll which has undefined symbols, in which case not
-      # even a static library is built.  For now, we need to specify
-      # -no-undefined on the libtool link line when we can be certain
-      # that all symbols are satisfied, otherwise we get a static library.
-      allow_undefined=yes
-      ;;
-    *)
-      allow_undefined=yes
-      ;;
-    esac
-    libtool_args="$nonopt"
-    base_compile="$nonopt $@"
-    compile_command="$nonopt"
-    finalize_command="$nonopt"
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
 
-    compile_rpath=
-    finalize_rpath=
-    compile_shlibpath=
-    finalize_shlibpath=
-    convenience=
-    old_convenience=
-    deplibs=
-    old_deplibs=
-    compiler_flags=
-    linker_flags=
-    dllsearchpath=
-    lib_search_path=`pwd`
-    inst_prefix_dir=
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+        ;;
 
-    avoid_version=no
-    dlfiles=
-    dlprefiles=
-    dlself=no
-    export_dynamic=no
-    export_symbols=
-    export_symbols_regex=
-    generated=
-    libobjs=
-    ltlibs=
-    module=no
-    no_install=no
-    objs=
-    non_pic_objects=
-    notinst_path= # paths that contain not-installed libtool libraries
-    precious_files_regex=
-    prefer_static_libs=no
-    preload=no
-    prev=
-    prevarg=
-    release=
-    rpath=
-    xrpath=
-    perm_rpath=
-    temp_rpath=
-    thread_safe=no
-    vinfo=
-    vinfo_number=no
+      compile)
+      $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
 
-    func_infer_tag $base_compile
+Compile a source file into a libtool library object.
 
-    # We need to know -static, to get the right output filenames.
-    for arg
-    do
-      case $arg in
-      -all-static | -static | -static-libtool-libs)
-    case $arg in
-    -all-static)
-	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
-	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
-	  fi
-	  if test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	  prefer_static_libs=yes
-	  ;;
-    -static)
-	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
-	    dlopen_self=$dlopen_self_static
-	  fi
-	  prefer_static_libs=built
-	  ;;
-    -static-libtool-libs)
-      if test -z "$pic_flag" && test -n "$link_static_flag"; then
-        dlopen_self=$dlopen_self_static
-      fi
-      prefer_static_libs=yes
-      ;;
-    esac
-	build_libtool_libs=no
-	build_old_libs=yes
-	break
-	;;
-      esac
-    done
+This mode accepts the following additional options:
 
-    # See if our shared archives depend on static archives.
-    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
+  -no-suppress      do not suppress compiler output for multiple passes
+  -prefer-pic       try to building PIC objects only
+  -prefer-non-pic   try to building non-PIC objects only
+  -shared           do not build a \`.o' file suitable for static linking
+  -static           only build a \`.o' file suitable for static linking
 
-    # Go through the arguments, transforming them on the way.
-    while test "$#" -gt 0; do
-      arg="$1"
-      shift
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
-	;;
-      *) qarg=$arg ;;
-      esac
-      libtool_args="$libtool_args $qarg"
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
 
-      # If the previous option needs an argument, assign it.
-      if test -n "$prev"; then
-	case $prev in
-	output)
-	  compile_command="$compile_command @OUTPUT@"
-	  finalize_command="$finalize_command @OUTPUT@"
-	  ;;
-	esac
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+        ;;
 
-	case $prev in
-	dlfiles|dlprefiles)
-	  if test "$preload" = no; then
-	    # Add the symbol object into the linking commands.
-	    compile_command="$compile_command @SYMFILE@"
-	    finalize_command="$finalize_command @SYMFILE@"
-	    preload=yes
-	  fi
-	  case $arg in
-	  *.la | *.lo) ;;  # We handle these cases below.
-	  force)
-	    if test "$dlself" = no; then
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  self)
-	    if test "$prev" = dlprefiles; then
-	      dlself=yes
-	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
-	      dlself=yes
-	    else
-	      dlself=needless
-	      export_dynamic=yes
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  *)
-	    if test "$prev" = dlfiles; then
-	      dlfiles="$dlfiles $arg"
-	    else
-	      dlprefiles="$dlprefiles $arg"
-	    fi
-	    prev=
-	    continue
-	    ;;
-	  esac
-	  ;;
-	expsyms)
-	  export_symbols="$arg"
-	  if test ! -f "$arg"; then
-	    $echo "$modename: symbol file \`$arg' does not exist"
-	    exit $EXIT_FAILURE
-	  fi
-	  prev=
-	  continue
-	  ;;
-	expsyms_regex)
-	  export_symbols_regex="$arg"
-	  prev=
-	  continue
-	  ;;
-	inst_prefix)
-	  inst_prefix_dir="$arg"
-	  prev=
-	  continue
-	  ;;
-	precious_regex)
-	  precious_files_regex="$arg"
-	  prev=
-	  continue
-	  ;;
-	release)
-	  release="-$arg"
-	  prev=
-	  continue
-	  ;;
-	objectlist)
-	  if test -f "$arg"; then
-	    save_arg=$arg
-	    moreargs=
-	    for fil in `cat $save_arg`
-	    do
-#	      moreargs="$moreargs $fil"
-	      arg=$fil
-	      # A libtool-controlled object.
+      execute)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
 
-	      # Check to see that this really is a libtool object.
-	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-		pic_object=
-		non_pic_object=
+Automatically set library path, then run a program.
 
-		# Read the .lo file
-		# If there is no directory component, then add one.
-		case $arg in
-		*/* | *\\*) . $arg ;;
-		*) . ./$arg ;;
-		esac
+This mode accepts the following additional options:
 
-		if test -z "$pic_object" || \
-		   test -z "$non_pic_object" ||
-		   test "$pic_object" = none && \
-		   test "$non_pic_object" = none; then
-		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-		  exit $EXIT_FAILURE
-		fi
+  -dlopen FILE      add the directory containing FILE to the library path
 
-		# Extract subdirectory from the argument.
-		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-		if test "X$xdir" = "X$arg"; then
-		  xdir=
-		else
-		  xdir="$xdir/"
-		fi
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
 
-		if test "$pic_object" != none; then
-		  # Prepend the subdirectory the object is found in.
-		  pic_object="$xdir$pic_object"
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
 
-		  if test "$prev" = dlfiles; then
-		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		      dlfiles="$dlfiles $pic_object"
-		      prev=
-		      continue
-		    else
-		      # If libtool objects are unsupported, then we need to preload.
-		      prev=dlprefiles
-		    fi
-		  fi
+Then, COMMAND is executed, with ARGS as arguments."
+        ;;
 
-		  # CHECK ME:  I think I busted this.  -Ossama
-		  if test "$prev" = dlprefiles; then
-		    # Preload the old-style object.
-		    dlprefiles="$dlprefiles $pic_object"
-		    prev=
-		  fi
+      finish)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
 
-		  # A PIC object.
-		  libobjs="$libobjs $pic_object"
-		  arg="$pic_object"
-		fi
+Complete the installation of libtool libraries.
 
-		# Non-PIC object.
-		if test "$non_pic_object" != none; then
-		  # Prepend the subdirectory the object is found in.
-		  non_pic_object="$xdir$non_pic_object"
+Each LIBDIR is a directory that contains libtool libraries.
 
-		  # A standard non-PIC object
-		  non_pic_objects="$non_pic_objects $non_pic_object"
-		  if test -z "$pic_object" || test "$pic_object" = none ; then
-		    arg="$non_pic_object"
-		  fi
-		else
-		  # If the PIC object exists, use it instead.
-		  # $xdir was prepended to $pic_object above.
-		  non_pic_object="$pic_object"
-		  non_pic_objects="$non_pic_objects $non_pic_object"
-		fi
-	      else
-		# Only an error if not doing a dry-run.
-		if test -z "$run"; then
-		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-		  exit $EXIT_FAILURE
-		else
-		  # Dry-run case.
+The commands that this mode executes may require superuser privileges.  Use
+the \`--dry-run' option if you just want to see what would be executed."
+        ;;
 
-		  # Extract subdirectory from the argument.
-		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-		  if test "X$xdir" = "X$arg"; then
-		    xdir=
-		  else
-		    xdir="$xdir/"
-		  fi
+      install)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
 
-		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-		  libobjs="$libobjs $pic_object"
-		  non_pic_objects="$non_pic_objects $non_pic_object"
-		fi
-	      fi
-	    done
-	  else
-	    $echo "$modename: link input file \`$save_arg' does not exist"
-	    exit $EXIT_FAILURE
-	  fi
-	  arg=$save_arg
-	  prev=
-	  continue
-	  ;;
-	rpath | xrpath)
-	  # We need an absolute path.
-	  case $arg in
-	  [\\/]* | [A-Za-z]:[\\/]*) ;;
-	  *)
-	    $echo "$modename: only absolute run-paths are allowed" 1>&2
-	    exit $EXIT_FAILURE
-	    ;;
-	  esac
-	  if test "$prev" = rpath; then
-	    case "$rpath " in
-	    *" $arg "*) ;;
-	    *) rpath="$rpath $arg" ;;
-	    esac
-	  else
-	    case "$xrpath " in
-	    *" $arg "*) ;;
-	    *) xrpath="$xrpath $arg" ;;
-	    esac
-	  fi
-	  prev=
-	  continue
-	  ;;
-	xcompiler)
-	  compiler_flags="$compiler_flags $qarg"
-	  prev=
-	  compile_command="$compile_command $qarg"
-	  finalize_command="$finalize_command $qarg"
-	  continue
-	  ;;
-	xlinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $wl$qarg"
-	  prev=
-	  compile_command="$compile_command $wl$qarg"
-	  finalize_command="$finalize_command $wl$qarg"
-	  continue
-	  ;;
-	xcclinker)
-	  linker_flags="$linker_flags $qarg"
-	  compiler_flags="$compiler_flags $qarg"
-	  prev=
-	  compile_command="$compile_command $qarg"
-	  finalize_command="$finalize_command $qarg"
-	  continue
-	  ;;
-	shrext)
-  	  shrext_cmds="$arg"
-	  prev=
-	  continue
-	  ;;
-	darwin_framework|darwin_framework_skip)
-	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
-	  compile_command="$compile_command $arg"
-	  finalize_command="$finalize_command $arg"
-	  prev=
-	  continue
-	  ;;
-	*)
-	  eval "$prev=\"\$arg\""
-	  prev=
-	  continue
-	  ;;
-	esac
-      fi # test -n "$prev"
+Install executables or libraries.
 
-      prevarg="$arg"
+INSTALL-COMMAND is the installation command.  The first component should be
+either the \`install' or \`cp' program.
 
-      case $arg in
-      -all-static)
-	if test -n "$link_static_flag"; then
-	  compile_command="$compile_command $link_static_flag"
-	  finalize_command="$finalize_command $link_static_flag"
-	fi
-	continue
-	;;
+The following components of INSTALL-COMMAND are treated specially:
 
-      -allow-undefined)
-	# FIXME: remove this flag sometime in the future.
-	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
-	continue
-	;;
+  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
 
-      -avoid-version)
-	avoid_version=yes
-	continue
-	;;
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+        ;;
 
-      -dlopen)
-	prev=dlfiles
-	continue
-	;;
+      link)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
 
-      -dlpreopen)
-	prev=dlprefiles
-	continue
-	;;
+Link object files or libraries together to form another library, or to
+create an executable program.
 
-      -export-dynamic)
-	export_dynamic=yes
-	continue
-	;;
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
 
-      -export-symbols | -export-symbols-regex)
-	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	  $echo "$modename: more than one -exported-symbols argument is not allowed"
-	  exit $EXIT_FAILURE
-	fi
-	if test "X$arg" = "X-export-symbols"; then
-	  prev=expsyms
-	else
-	  prev=expsyms_regex
-	fi
-	continue
-	;;
+The following components of LINK-COMMAND are treated specially:
 
-      -framework|-arch|-isysroot)
-	case " $CC " in
-	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
-		prev=darwin_framework_skip ;;
-	  *) compiler_flags="$compiler_flags $arg"
-	     prev=darwin_framework ;;
-	esac
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-	continue
-	;;
+  -all-static       do not do any dynamic linking at all
+  -avoid-version    do not add a version suffix if possible
+  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
+  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
+  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+  -export-symbols SYMFILE
+                    try to export only the symbols listed in SYMFILE
+  -export-symbols-regex REGEX
+                    try to export only the symbols matching REGEX
+  -LLIBDIR          search LIBDIR for required installed libraries
+  -lNAME            OUTPUT-FILE requires the installed library libNAME
+  -module           build a library that can dlopened
+  -no-fast-install  disable the fast-install mode
+  -no-install       link a not-installable executable
+  -no-undefined     declare that a library does not refer to external symbols
+  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
+  -objectlist FILE  Use a list of object files found in FILE to specify objects
+  -precious-files-regex REGEX
+                    don't remove output files matching REGEX
+  -release RELEASE  specify package release information
+  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
+  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
+  -shared           only do dynamic linking of libtool libraries
+  -shrext SUFFIX    override the standard shared library file extension
+  -static           do not do any dynamic linking of uninstalled libtool libraries
+  -static-libtool-libs
+                    do not do any dynamic linking of libtool libraries
+  -version-info CURRENT[:REVISION[:AGE]]
+                    specify library version info [each variable defaults to 0]
+  -weak LIBNAME     declare that the target provides the LIBNAME interface
 
-      -inst-prefix-dir)
-	prev=inst_prefix
-	continue
-	;;
+All other options (arguments beginning with \`-') are ignored.
 
-      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
-      # so, if we see these flags be careful not to treat them like -L
-      -L[A-Z][A-Z]*:*)
-	case $with_gcc/$host in
-	no/*-*-irix* | /*-*-irix*)
-	  compile_command="$compile_command $arg"
-	  finalize_command="$finalize_command $arg"
-	  ;;
-	esac
-	continue
-	;;
+Every other argument is treated as a filename.  Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
 
-      -L*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
-	# We need an absolute path.
-	case $dir in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  absdir=`cd "$dir" && pwd`
-	  if test -z "$absdir"; then
-	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
-	    absdir="$dir"
-	    notinst_path="$notinst_path $dir"
-	  fi
-	  dir="$absdir"
-	  ;;
-	esac
-	case "$deplibs " in
-	*" -L$dir "*) ;;
-	*)
-	  deplibs="$deplibs -L$dir"
-	  lib_search_path="$lib_search_path $dir"
-	  ;;
-	esac
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
-	  case :$dllsearchpath: in
-	  *":$dir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$dir";;
-	  esac
-	  case :$dllsearchpath: in
-	  *":$testbindir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
-	  esac
-	  ;;
-	esac
-	continue
-	;;
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
 
-      -l*)
-	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
-	  case $host in
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
-	    # These systems don't actually have a C or math library (as such)
-	    continue
-	    ;;
-	  *-*-os2*)
-	    # These systems don't actually have a C library (as such)
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-	    # Do not include libc due to us having libc/libc_r.
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody C and math libraries are in the System framework
-	    deplibs="$deplibs -framework System"
-	    continue
-	    ;;
-	  *-*-sco3.2v5* | *-*-sco5v6*)
-	    # Causes problems with __ctype
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-	    # Compiler inserts libc in the correct place for threads to work
-	    test "X$arg" = "X-lc" && continue
-	    ;;
-	  esac
-	elif test "X$arg" = "X-lc_r"; then
-	 case $host in
-	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-	   # Do not include libc_r directly, use -pthread flag.
-	   continue
-	   ;;
-	 esac
-	fi
-	deplibs="$deplibs $arg"
-	continue
-	;;
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
 
-      # Tru64 UNIX uses -model [arg] to determine the layout of C++
-      # classes, name mangling, and exception handling.
-      -model)
-	compile_command="$compile_command $arg"
-	compiler_flags="$compiler_flags $arg"
-	finalize_command="$finalize_command $arg"
-	prev=xcompiler
-	continue
-	;;
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+        ;;
 
-     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-	compiler_flags="$compiler_flags $arg"
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-	continue
-	;;
+      uninstall)
+        $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
 
-      -module)
-	module=yes
-	continue
-	;;
+Remove libraries from an installation directory.
 
-      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
-      # -r[0-9][0-9]* specifies the processor on the SGI compiler
-      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
-      # +DA*, +DD* enable 64-bit mode on the HP compiler
-      # -q* pass through compiler args for the IBM compiler
-      # -m* pass through architecture-specific compiler args for GCC
-      # -m*, -t[45]*, -txscale* pass through architecture-specific
-      # compiler args for GCC
-      # -pg pass through profiling flag for GCC
-      # @file GCC response files
-      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
-      -t[45]*|-txscale*|@*)
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
 
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-        compile_command="$compile_command $arg"
-        finalize_command="$finalize_command $arg"
-        compiler_flags="$compiler_flags $arg"
-        continue
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
         ;;
 
-      -shrext)
-	prev=shrext
-	continue
-	;;
+      *)
+        func_fatal_help "invalid operation mode \`$mode'"
+        ;;
+    esac
 
-      -no-fast-install)
-	fast_install=no
-	continue
-	;;
+    $ECHO
+    $ECHO "Try \`$progname --help' for more information about other modes."
 
-      -no-install)
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  # The PATH hackery in wrapper scripts is required on Windows
-	  # in order for the loader to find any dlls it needs.
-	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
-	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
-	  fast_install=no
-	  ;;
-	*) no_install=yes ;;
-	esac
-	continue
-	;;
+    exit $?
+}
 
-      -no-undefined)
-	allow_undefined=no
-	continue
-	;;
+  # Now that we've collected a possible --mode arg, show help if necessary
+  $opt_help && func_mode_help
 
-      -objectlist)
-	prev=objectlist
-	continue
-	;;
 
-      -o) prev=output ;;
+# func_mode_execute arg...
+func_mode_execute ()
+{
+    $opt_debug
+    # The first argument is the command name.
+    cmd="$nonopt"
+    test -z "$cmd" && \
+      func_fatal_help "you must specify a COMMAND"
 
-      -precious-files-regex)
-	prev=precious_regex
-	continue
-	;;
+    # Handle -dlopen flags immediately.
+    for file in $execute_dlfiles; do
+      test -f "$file" \
+	|| func_fatal_help "\`$file' is not a file"
 
-      -release)
-	prev=release
-	continue
-	;;
+      dir=
+      case $file in
+      *.la)
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$lib' is not a valid libtool archive"
 
-      -rpath)
-	prev=rpath
-	continue
-	;;
+	# Read the libtool library.
+	dlname=
+	library_names=
+	func_source "$file"
 
-      -R)
-	prev=xrpath
-	continue
-	;;
+	# Skip this library if it cannot be dlopened.
+	if test -z "$dlname"; then
+	  # Warn if it was a shared library.
+	  test -n "$library_names" && \
+	    func_warning "\`$file' was not linked with \`-export-dynamic'"
+	  continue
+	fi
 
-      -R*)
-	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
-	# We need an absolute path.
-	case $dir in
-	[\\/]* | [A-Za-z]:[\\/]*) ;;
-	*)
-	  $echo "$modename: only absolute run-paths are allowed" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-	case "$xrpath " in
-	*" $dir "*) ;;
-	*) xrpath="$xrpath $dir" ;;
-	esac
-	continue
-	;;
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
 
-      -static | -static-libtool-libs)
-	# The effects of -static are defined in a previous loop.
-	# We used to do the same as -all-static on platforms that
-	# didn't have a PIC flag, but the assumption that the effects
-	# would be equivalent was wrong.  It would break on at least
-	# Digital Unix and AIX.
-	continue
+	if test -f "$dir/$objdir/$dlname"; then
+	  dir="$dir/$objdir"
+	else
+	  if test ! -f "$dir/$dlname"; then
+	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+	  fi
+	fi
 	;;
 
-      -thread-safe)
-	thread_safe=yes
-	continue
+      *.lo)
+	# Just add the directory containing the .lo file.
+	func_dirname "$file" "" "."
+	dir="$func_dirname_result"
 	;;
 
-      -version-info)
-	prev=vinfo
-	continue
-	;;
-      -version-number)
-	prev=vinfo
-	vinfo_number=yes
+      *)
+	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
 	continue
 	;;
+      esac
 
-      -Wc,*)
-	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
-	arg=
-	save_ifs="$IFS"; IFS=','
-	for flag in $args; do
-	  IFS="$save_ifs"
-	  case $flag in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	    flag="\"$flag\""
-	    ;;
-	  esac
-	  arg="$arg $wl$flag"
-	  compiler_flags="$compiler_flags $flag"
-	done
-	IFS="$save_ifs"
-	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-	;;
+      # Get the absolute pathname.
+      absdir=`cd "$dir" && pwd`
+      test -n "$absdir" && dir="$absdir"
 
-      -Wl,*)
-	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
-	arg=
-	save_ifs="$IFS"; IFS=','
-	for flag in $args; do
-	  IFS="$save_ifs"
-	  case $flag in
-	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	    flag="\"$flag\""
-	    ;;
-	  esac
-	  arg="$arg $wl$flag"
-	  compiler_flags="$compiler_flags $wl$flag"
-	  linker_flags="$linker_flags $flag"
-	done
-	IFS="$save_ifs"
-	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
-	;;
+      # Now add the directory to shlibpath_var.
+      if eval "test -z \"\$$shlibpath_var\""; then
+	eval "$shlibpath_var=\"\$dir\""
+      else
+	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+      fi
+    done
 
-      -Xcompiler)
-	prev=xcompiler
-	continue
-	;;
+    # This variable tells wrapper scripts just to set shlibpath_var
+    # rather than running their programs.
+    libtool_execute_magic="$magic"
 
-      -Xlinker)
-	prev=xlinker
-	continue
+    # Check if any of the arguments is a wrapper script.
+    args=
+    for file
+    do
+      case $file in
+      -*) ;;
+      *)
+	# Do a test to see if this is really a libtool program.
+	if func_ltwrapper_script_p "$file"; then
+	  func_source "$file"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	elif func_ltwrapper_executable_p "$file"; then
+	  func_ltwrapper_scriptname "$file"
+	  func_source "$func_ltwrapper_scriptname_result"
+	  # Transform arg to wrapped name.
+	  file="$progdir/$program"
+	fi
 	;;
+      esac
+      # Quote arguments (to preserve shell metacharacters).
+      func_quote_for_eval "$file"
+      args="$args $func_quote_for_eval_result"
+    done
 
-      -XCClinker)
-	prev=xcclinker
-	continue
-	;;
+    if test "X$opt_dry_run" = Xfalse; then
+      if test -n "$shlibpath_var"; then
+	# Export the shlibpath_var.
+	eval "export $shlibpath_var"
+      fi
 
-      # Some other compiler flag.
-      -* | +*)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
+      # Restore saved environment variables
+      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+      do
+	eval "if test \"\${save_$lt_var+set}\" = set; then
+                $lt_var=\$save_$lt_var; export $lt_var
+	      else
+		$lt_unset $lt_var
+	      fi"
+      done
 
-      *.$objext)
-	# A standard object.
-	objs="$objs $arg"
-	;;
+      # Now prepare to actually exec the command.
+      exec_cmd="\$cmd$args"
+    else
+      # Display what would be done.
+      if test -n "$shlibpath_var"; then
+	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+	$ECHO "export $shlibpath_var"
+      fi
+      $ECHO "$cmd$args"
+      exit $EXIT_SUCCESS
+    fi
+}
 
-      *.lo)
-	# A libtool-controlled object.
+test "$mode" = execute && func_mode_execute ${1+"$@"}
 
-	# Check to see that this really is a libtool object.
-	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  pic_object=
-	  non_pic_object=
 
-	  # Read the .lo file
-	  # If there is no directory component, then add one.
-	  case $arg in
-	  */* | *\\*) . $arg ;;
-	  *) . ./$arg ;;
-	  esac
+# func_mode_finish arg...
+func_mode_finish ()
+{
+    $opt_debug
+    libdirs="$nonopt"
+    admincmds=
 
-	  if test -z "$pic_object" || \
-	     test -z "$non_pic_object" ||
-	     test "$pic_object" = none && \
-	     test "$non_pic_object" = none; then
-	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
+    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+      for dir
+      do
+	libdirs="$libdirs $dir"
+      done
 
-	  # Extract subdirectory from the argument.
-	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	  if test "X$xdir" = "X$arg"; then
-	    xdir=
- 	  else
-	    xdir="$xdir/"
-	  fi
+      for libdir in $libdirs; do
+	if test -n "$finish_cmds"; then
+	  # Do each command in the finish commands.
+	  func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+	fi
+	if test -n "$finish_eval"; then
+	  # Do the single finish_eval.
+	  eval cmds=\"$finish_eval\"
+	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+       $cmds"
+	fi
+      done
+    fi
 
-	  if test "$pic_object" != none; then
-	    # Prepend the subdirectory the object is found in.
-	    pic_object="$xdir$pic_object"
+    # Exit here if they wanted silent mode.
+    $opt_silent && exit $EXIT_SUCCESS
 
-	    if test "$prev" = dlfiles; then
-	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
-		dlfiles="$dlfiles $pic_object"
-		prev=
-		continue
-	      else
-		# If libtool objects are unsupported, then we need to preload.
-		prev=dlprefiles
-	      fi
-	    fi
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    $ECHO "Libraries have been installed in:"
+    for libdir in $libdirs; do
+      $ECHO "   $libdir"
+    done
+    $ECHO
+    $ECHO "If you ever happen to want to link against installed libraries"
+    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+    $ECHO "flag during linking and do at least one of the following:"
+    if test -n "$shlibpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
+      $ECHO "     during execution"
+    fi
+    if test -n "$runpath_var"; then
+      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
+      $ECHO "     during linking"
+    fi
+    if test -n "$hardcode_libdir_flag_spec"; then
+      libdir=LIBDIR
+      eval flag=\"$hardcode_libdir_flag_spec\"
 
-	    # CHECK ME:  I think I busted this.  -Ossama
-	    if test "$prev" = dlprefiles; then
-	      # Preload the old-style object.
-	      dlprefiles="$dlprefiles $pic_object"
-	      prev=
-	    fi
+      $ECHO "   - use the \`$flag' linker flag"
+    fi
+    if test -n "$admincmds"; then
+      $ECHO "   - have your system administrator run these commands:$admincmds"
+    fi
+    if test -f /etc/ld.so.conf; then
+      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+    fi
+    $ECHO
 
-	    # A PIC object.
-	    libobjs="$libobjs $pic_object"
-	    arg="$pic_object"
-	  fi
+    $ECHO "See any operating system documentation about shared libraries for"
+    case $host in
+      solaris2.[6789]|solaris2.1[0-9])
+        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+	$ECHO "pages."
+	;;
+      *)
+        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+        ;;
+    esac
+    $ECHO "X----------------------------------------------------------------------" | $Xsed
+    exit $EXIT_SUCCESS
+}
 
-	  # Non-PIC object.
-	  if test "$non_pic_object" != none; then
-	    # Prepend the subdirectory the object is found in.
-	    non_pic_object="$xdir$non_pic_object"
+test "$mode" = finish && func_mode_finish ${1+"$@"}
 
-	    # A standard non-PIC object
-	    non_pic_objects="$non_pic_objects $non_pic_object"
-	    if test -z "$pic_object" || test "$pic_object" = none ; then
-	      arg="$non_pic_object"
-	    fi
-	  else
-	    # If the PIC object exists, use it instead.
-	    # $xdir was prepended to $pic_object above.
-	    non_pic_object="$pic_object"
-	    non_pic_objects="$non_pic_objects $non_pic_object"
-	  fi
-	else
-	  # Only an error if not doing a dry-run.
-	  if test -z "$run"; then
-	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
-	    exit $EXIT_FAILURE
-	  else
-	    # Dry-run case.
 
-	    # Extract subdirectory from the argument.
-	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
-	    if test "X$xdir" = "X$arg"; then
-	      xdir=
-	    else
-	      xdir="$xdir/"
-	    fi
+# func_mode_install arg...
+func_mode_install ()
+{
+    $opt_debug
+    # There may be an optional sh(1) argument at the beginning of
+    # install_prog (especially on Windows NT).
+    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+       # Allow the use of GNU shtool's install command.
+       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+      # Aesthetically quote it.
+      func_quote_for_eval "$nonopt"
+      install_prog="$func_quote_for_eval_result "
+      arg=$1
+      shift
+    else
+      install_prog=
+      arg=$nonopt
+    fi
 
-	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
-	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
-	    libobjs="$libobjs $pic_object"
-	    non_pic_objects="$non_pic_objects $non_pic_object"
-	  fi
-	fi
-	;;
+    # The real first argument should be the name of the installation program.
+    # Aesthetically quote it.
+    func_quote_for_eval "$arg"
+    install_prog="$install_prog$func_quote_for_eval_result"
 
-      *.$libext)
-	# An archive.
-	deplibs="$deplibs $arg"
-	old_deplibs="$old_deplibs $arg"
+    # We need to accept at least all the BSD install flags.
+    dest=
+    files=
+    opts=
+    prev=
+    install_type=
+    isdir=no
+    stripme=
+    for arg
+    do
+      if test -n "$dest"; then
+	files="$files $dest"
+	dest=$arg
 	continue
-	;;
-
-      *.la)
-	# A libtool-controlled library.
+      fi
 
-	if test "$prev" = dlfiles; then
-	  # This library was specified with -dlopen.
-	  dlfiles="$dlfiles $arg"
-	  prev=
-	elif test "$prev" = dlprefiles; then
-	  # The library was specified with -dlpreopen.
-	  dlprefiles="$dlprefiles $arg"
+      case $arg in
+      -d) isdir=yes ;;
+      -f)
+	case " $install_prog " in
+	*[\\\ /]cp\ *) ;;
+	*) prev=$arg ;;
+	esac
+	;;
+      -g | -m | -o)
+	prev=$arg
+	;;
+      -s)
+	stripme=" -s"
+	continue
+	;;
+      -*)
+	;;
+      *)
+	# If the previous option needed an argument, then skip it.
+	if test -n "$prev"; then
 	  prev=
 	else
-	  deplibs="$deplibs $arg"
+	  dest=$arg
+	  continue
 	fi
-	continue
 	;;
+      esac
 
-      # Some other compiler argument.
-      *)
-	# Unknown arguments in both finalize_command and compile_command need
-	# to be aesthetically quoted because they are evaled later.
-	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-	case $arg in
-	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	  arg="\"$arg\""
-	  ;;
-	esac
-	;;
-      esac # arg
+      # Aesthetically quote the argument.
+      func_quote_for_eval "$arg"
+      install_prog="$install_prog $func_quote_for_eval_result"
+    done
 
-      # Now actually substitute the argument into the commands.
-      if test -n "$arg"; then
-	compile_command="$compile_command $arg"
-	finalize_command="$finalize_command $arg"
-      fi
-    done # argument parsing loop
+    test -z "$install_prog" && \
+      func_fatal_help "you must specify an install program"
 
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+    test -n "$prev" && \
+      func_fatal_help "the \`$prev' option requires an argument"
 
-    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
-      eval arg=\"$export_dynamic_flag_spec\"
-      compile_command="$compile_command $arg"
-      finalize_command="$finalize_command $arg"
+    if test -z "$files"; then
+      if test -z "$dest"; then
+	func_fatal_help "no file or destination specified"
+      else
+	func_fatal_help "you must specify a destination"
+      fi
     fi
 
-    oldlibs=
-    # calculate the name of the file, without its directory
-    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
-    libobjs_save="$libobjs"
+    # Strip any trailing slash from the destination.
+    func_stripname '' '/' "$dest"
+    dest=$func_stripname_result
 
-    if test -n "$shlibpath_var"; then
-      # get the directories listed in $shlibpath_var
-      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    # Check to see that the destination is a directory.
+    test -d "$dest" && isdir=yes
+    if test "$isdir" = yes; then
+      destdir="$dest"
+      destname=
     else
-      shlib_search_path=
-    fi
-    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
-    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+      func_dirname_and_basename "$dest" "" "."
+      destdir="$func_dirname_result"
+      destname="$func_basename_result"
 
-    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
-    if test "X$output_objdir" = "X$output"; then
-      output_objdir="$objdir"
-    else
-      output_objdir="$output_objdir/$objdir"
-    fi
-    # Create the object directory.
-    if test ! -d "$output_objdir"; then
-      $show "$mkdir $output_objdir"
-      $run $mkdir $output_objdir
-      exit_status=$?
-      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
-	exit $exit_status
-      fi
+      # Not a directory, so check to see that there is only one file specified.
+      set dummy $files; shift
+      test "$#" -gt 1 && \
+	func_fatal_help "\`$dest' is not a directory"
     fi
-
-    # Determine the type of output
-    case $output in
-    "")
-      $echo "$modename: you must specify an output file" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-      ;;
-    *.$libext) linkmode=oldlib ;;
-    *.lo | *.$objext) linkmode=obj ;;
-    *.la) linkmode=lib ;;
-    *) linkmode=prog ;; # Anything else should be a program.
-    esac
-
-    case $host in
-    *cygwin* | *mingw* | *pw32*)
-      # don't eliminate duplications in $postdeps and $predeps
-      duplicate_compiler_generated_deps=yes
-      ;;
+    case $destdir in
+    [\\/]* | [A-Za-z]:[\\/]*) ;;
     *)
-      duplicate_compiler_generated_deps=$duplicate_deps
+      for file in $files; do
+	case $file in
+	*.lo) ;;
+	*)
+	  func_fatal_help "\`$destdir' must be an absolute directory name"
+	  ;;
+	esac
+      done
       ;;
     esac
-    specialdeplibs=
 
-    libs=
-    # Find all interdependent deplibs by searching for libraries
-    # that are linked more than once (e.g. -la -lb -la)
-    for deplib in $deplibs; do
-      if test "X$duplicate_deps" = "Xyes" ; then
-	case "$libs " in
-	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	esac
-      fi
-      libs="$libs $deplib"
-    done
+    # This variable tells wrapper scripts just to set variables rather
+    # than running their programs.
+    libtool_install_magic="$magic"
 
-    if test "$linkmode" = lib; then
-      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+    staticlibs=
+    future_libdirs=
+    current_libdirs=
+    for file in $files; do
 
-      # Compute libraries that are listed more than once in $predeps
-      # $postdeps and mark them as special (i.e., whose duplicates are
-      # not to be eliminated).
-      pre_post_deps=
-      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
-	for pre_post_dep in $predeps $postdeps; do
-	  case "$pre_post_deps " in
-	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+      # Do each installation.
+      case $file in
+      *.$libext)
+	# Do the static libraries later.
+	staticlibs="$staticlibs $file"
+	;;
+
+      *.la)
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$file" \
+	  || func_fatal_help "\`$file' is not a valid libtool archive"
+
+	library_names=
+	old_library=
+	relink_command=
+	func_source "$file"
+
+	# Add the libdir to current_libdirs if it is the destination.
+	if test "X$destdir" = "X$libdir"; then
+	  case "$current_libdirs " in
+	  *" $libdir "*) ;;
+	  *) current_libdirs="$current_libdirs $libdir" ;;
 	  esac
-	  pre_post_deps="$pre_post_deps $pre_post_dep"
-	done
-      fi
-      pre_post_deps=
-    fi
+	else
+	  # Note the libdir as a future libdir.
+	  case "$future_libdirs " in
+	  *" $libdir "*) ;;
+	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  esac
+	fi
 
-    deplibs=
-    newdependency_libs=
-    newlib_search_path=
-    need_relink=no # whether we're linking any uninstalled libtool libraries
-    notinst_deplibs= # not-installed libtool libraries
-    case $linkmode in
-    lib)
-	passes="conv link"
-	for file in $dlfiles $dlprefiles; do
-	  case $file in
-	  *.la) ;;
-	  *)
-	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
-	    exit $EXIT_FAILURE
+	func_dirname "$file" "/" ""
+	dir="$func_dirname_result"
+	dir="$dir$objdir"
+
+	if test -n "$relink_command"; then
+	  # Determine the prefix the user has applied to our future dir.
+	  inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+	  # Don't allow the user to place us outside of our expected
+	  # location b/c this prevents finding dependent libraries that
+	  # are installed to the same prefix.
+	  # At present, this check doesn't affect windows .dll's that
+	  # are installed into $libdir/../bin (currently, that works fine)
+	  # but it's something to keep an eye on.
+	  test "$inst_prefix_dir" = "$destdir" && \
+	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+	  if test -n "$inst_prefix_dir"; then
+	    # Stick the inst_prefix_dir data into the link command.
+	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+	  else
+	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+	  fi
+
+	  func_warning "relinking \`$file'"
+	  func_show_eval "$relink_command" \
+	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+	fi
+
+	# See the names of the shared library.
+	set dummy $library_names; shift
+	if test -n "$1"; then
+	  realname="$1"
+	  shift
+
+	  srcname="$realname"
+	  test -n "$relink_command" && srcname="$realname"T
+
+	  # Install the shared library and build the symlinks.
+	  func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+	      'exit $?'
+	  tstripme="$stripme"
+	  case $host_os in
+	  cygwin* | mingw* | pw32* | cegcc*)
+	    case $realname in
+	    *.dll.a)
+	      tstripme=""
+	      ;;
+	    esac
 	    ;;
 	  esac
-	done
-	;;
-    prog)
-	compile_deplibs=
-	finalize_deplibs=
-	alldeplibs=no
-	newdlfiles=
-	newdlprefiles=
-	passes="conv scan dlopen dlpreopen link"
-	;;
-    *)  passes="conv"
+	  if test -n "$tstripme" && test -n "$striplib"; then
+	    func_show_eval "$striplib $destdir/$realname" 'exit $?'
+	  fi
+
+	  if test "$#" -gt 0; then
+	    # Delete the old symlinks, and create new ones.
+	    # Try `ln -sf' first, because the `ln' binary might depend on
+	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
+	    # so we also need to try rm && ln -s.
+	    for linkname
+	    do
+	      test "$linkname" != "$realname" \
+		&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+	    done
+	  fi
+
+	  # Do each command in the postinstall commands.
+	  lib="$destdir/$realname"
+	  func_execute_cmds "$postinstall_cmds" 'exit $?'
+	fi
+
+	# Install the pseudo-library for information purposes.
+	func_basename "$file"
+	name="$func_basename_result"
+	instname="$dir/$name"i
+	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+	# Maybe install the static library, too.
+	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
 	;;
-    esac
-    for pass in $passes; do
-      if test "$linkmode,$pass" = "lib,link" ||
-	 test "$linkmode,$pass" = "prog,scan"; then
-	libs="$deplibs"
-	deplibs=
-      fi
-      if test "$linkmode" = prog; then
-	case $pass in
-	dlopen) libs="$dlfiles" ;;
-	dlpreopen) libs="$dlprefiles" ;;
-	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
-	esac
-      fi
-      if test "$pass" = dlopen; then
-	# Collect dlpreopened libraries
-	save_deplibs="$deplibs"
-	deplibs=
-      fi
-      for deplib in $libs; do
-	lib=
-	found=no
-	case $deplib in
-	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
-	  if test "$linkmode,$pass" = "prog,link"; then
-	    compile_deplibs="$deplib $compile_deplibs"
-	    finalize_deplibs="$deplib $finalize_deplibs"
-	  else
-	    compiler_flags="$compiler_flags $deplib"
-	  fi
-	  continue
-	  ;;
-	-l*)
-	  if test "$linkmode" != lib && test "$linkmode" != prog; then
-	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
-	    continue
-	  fi
-	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
-	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
-	    for search_ext in .la $std_shrext .so .a; do
-	      # Search the libtool library
-	      lib="$searchdir/lib${name}${search_ext}"
-	      if test -f "$lib"; then
-		if test "$search_ext" = ".la"; then
-		  found=yes
-		else
-		  found=no
-		fi
-		break 2
-	      fi
-	    done
-	  done
-	  if test "$found" != yes; then
-	    # deplib doesn't seem to be a libtool library
-	    if test "$linkmode,$pass" = "prog,link"; then
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      deplibs="$deplib $deplibs"
-	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-	    fi
-	    continue
-	  else # deplib is a libtool library
-	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
-	    # We need to do some special things here, and not later.
-	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-	      case " $predeps $postdeps " in
-	      *" $deplib "*)
-		if (${SED} -e '2q' $lib |
-                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-		  library_names=
-		  old_library=
-		  case $lib in
-		  */* | *\\*) . $lib ;;
-		  *) . ./$lib ;;
-		  esac
-		  for l in $old_library $library_names; do
-		    ll="$l"
-		  done
-		  if test "X$ll" = "X$old_library" ; then # only static version available
-		    found=no
-		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-		    test "X$ladir" = "X$lib" && ladir="."
-		    lib=$ladir/$old_library
-		    if test "$linkmode,$pass" = "prog,link"; then
-		      compile_deplibs="$deplib $compile_deplibs"
-		      finalize_deplibs="$deplib $finalize_deplibs"
-		    else
-		      deplibs="$deplib $deplibs"
-		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
-		    fi
-		    continue
-		  fi
-		fi
-	        ;;
-	      *) ;;
-	      esac
-	    fi
-	  fi
-	  ;; # -l
-	-L*)
-	  case $linkmode in
-	  lib)
-	    deplibs="$deplib $deplibs"
-	    test "$pass" = conv && continue
-	    newdependency_libs="$deplib $newdependency_libs"
-	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-	    ;;
-	  prog)
-	    if test "$pass" = conv; then
-	      deplibs="$deplib $deplibs"
-	      continue
-	    fi
-	    if test "$pass" = scan; then
-	      deplibs="$deplib $deplibs"
-	    else
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    fi
-	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
-	    ;;
-	  *)
-	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
-	    ;;
-	  esac # linkmode
-	  continue
-	  ;; # -L
-	-R*)
-	  if test "$pass" = link; then
-	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
-	    # Make sure the xrpath contains only unique directories.
-	    case "$xrpath " in
-	    *" $dir "*) ;;
-	    *) xrpath="$xrpath $dir" ;;
-	    esac
-	  fi
-	  deplibs="$deplib $deplibs"
-	  continue
+
+      *.lo)
+	# Install (i.e. copy) a libtool object.
+
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
+	else
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
+	fi
+
+	# Deduce the name of the destination old-style object file.
+	case $destfile in
+	*.lo)
+	  func_lo2o "$destfile"
+	  staticdest=$func_lo2o_result
 	  ;;
-	*.la) lib="$deplib" ;;
-	*.$libext)
-	  if test "$pass" = conv; then
-	    deplibs="$deplib $deplibs"
-	    continue
-	  fi
-	  case $linkmode in
-	  lib)
-	    valid_a_lib=no
-	    case $deplibs_check_method in
-	      match_pattern*)
-		set dummy $deplibs_check_method
-	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-		if eval $echo \"$deplib\" 2>/dev/null \
-		    | $SED 10q \
-		    | $EGREP "$match_pattern_regex" > /dev/null; then
-		  valid_a_lib=yes
-		fi
-		;;
-	      pass_all)
-		valid_a_lib=yes
-		;;
-            esac
-	    if test "$valid_a_lib" != yes; then
-	      $echo
-	      $echo "*** Warning: Trying to link with static lib archive $deplib."
-	      $echo "*** I have the capability to make that library automatically link in when"
-	      $echo "*** you link to this library.  But I can only do this if you have a"
-	      $echo "*** shared version of the library, which you do not appear to have"
-	      $echo "*** because the file extensions .$libext of this argument makes me believe"
-	      $echo "*** that it is just a static archive that I should not used here."
-	    else
-	      $echo
-	      $echo "*** Warning: Linking the shared library $output against the"
-	      $echo "*** static library $deplib is not portable!"
-	      deplibs="$deplib $deplibs"
-	    fi
-	    continue
-	    ;;
-	  prog)
-	    if test "$pass" != link; then
-	      deplibs="$deplib $deplibs"
-	    else
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    fi
-	    continue
-	    ;;
-	  esac # linkmode
-	  ;; # *.$libext
-	*.lo | *.$objext)
-	  if test "$pass" = conv; then
-	    deplibs="$deplib $deplibs"
-	  elif test "$linkmode" = prog; then
-	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
-	      # If there is no dlopen support or we're linking statically,
-	      # we need to preload.
-	      newdlprefiles="$newdlprefiles $deplib"
-	      compile_deplibs="$deplib $compile_deplibs"
-	      finalize_deplibs="$deplib $finalize_deplibs"
-	    else
-	      newdlfiles="$newdlfiles $deplib"
-	    fi
-	  fi
-	  continue
+	*.$objext)
+	  staticdest="$destfile"
+	  destfile=
 	  ;;
-	%DEPLIBS%)
-	  alldeplibs=yes
-	  continue
+	*)
+	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
 	  ;;
-	esac # case $deplib
-	if test "$found" = yes || test -f "$lib"; then :
-	else
-	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
-	  exit $EXIT_FAILURE
+	esac
+
+	# Install the libtool object if requested.
+	test -n "$destfile" && \
+	  func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+	# Install the old object if enabled.
+	if test "$build_old_libs" = yes; then
+	  # Deduce the name of the old-style object file.
+	  func_lo2o "$file"
+	  staticobj=$func_lo2o_result
+	  func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
 	fi
+	exit $EXIT_SUCCESS
+	;;
 
-	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+      *)
+	# Figure out destination file name, if it wasn't already specified.
+	if test -n "$destname"; then
+	  destfile="$destdir/$destname"
 	else
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  exit $EXIT_FAILURE
+	  func_basename "$file"
+	  destfile="$func_basename_result"
+	  destfile="$destdir/$destfile"
 	fi
 
-	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$ladir" = "X$lib" && ladir="."
-
-	dlname=
-	dlopen=
-	dlpreopen=
-	libdir=
-	library_names=
-	old_library=
-	# If the library was installed with an old release of libtool,
-	# it will not redefine variables installed, or shouldnotlink
-	installed=yes
-	shouldnotlink=no
-	avoidtemprpath=
-
+	# If the file is missing, and there is a .exe on the end, strip it
+	# because it is most likely a libtool script we actually want to
+	# install
+	stripped_ext=""
+	case $file in
+	  *.exe)
+	    if test ! -f "$file"; then
+	      func_stripname '' '.exe' "$file"
+	      file=$func_stripname_result
+	      stripped_ext=".exe"
+	    fi
+	    ;;
+	esac
 
-	# Read the .la file
-	case $lib in
-	*/* | *\\*) . $lib ;;
-	*) . ./$lib ;;
+	# Do a test to see if this is really a libtool program.
+	case $host in
+	*cygwin* | *mingw*)
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      wrapper=$func_ltwrapper_scriptname_result
+	    else
+	      func_stripname '' '.exe' "$file"
+	      wrapper=$func_stripname_result
+	    fi
+	    ;;
+	*)
+	    wrapper=$file
+	    ;;
 	esac
+	if func_ltwrapper_script_p "$wrapper"; then
+	  notinst_deplibs=
+	  relink_command=
 
-	if test "$linkmode,$pass" = "lib,link" ||
-	   test "$linkmode,$pass" = "prog,scan" ||
-	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
-	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
-	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
-	fi
+	  func_source "$wrapper"
 
-	if test "$pass" = conv; then
-	  # Only check for convenience libraries
-	  deplibs="$lib $deplibs"
-	  if test -z "$libdir"; then
-	    if test -z "$old_library"; then
-	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	      exit $EXIT_FAILURE
+	  # Check the variables that should have been set.
+	  test -z "$generated_by_libtool_version" && \
+	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+	  finalize=yes
+	  for lib in $notinst_deplibs; do
+	    # Check to see that each library is installed.
+	    libdir=
+	    if test -f "$lib"; then
+	      func_source "$lib"
 	    fi
-	    # It is a libtool convenience library, so add in its objects.
-	    convenience="$convenience $ladir/$objdir/$old_library"
-	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
-	    tmp_libs=
-	    for deplib in $dependency_libs; do
-	      deplibs="$deplib $deplibs"
-              if test "X$duplicate_deps" = "Xyes" ; then
-	        case "$tmp_libs " in
-	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	        esac
-              fi
-	      tmp_libs="$tmp_libs $deplib"
-	    done
-	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
-	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-	  continue
-	fi # $pass = conv
-
+	    libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+	    if test -n "$libdir" && test ! -f "$libfile"; then
+	      func_warning "\`$lib' has not been installed in \`$libdir'"
+	      finalize=no
+	    fi
+	  done
 
-	# Get the name of the library we link against.
-	linklib=
-	for l in $old_library $library_names; do
-	  linklib="$l"
-	done
-	if test -z "$linklib"; then
-	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
-	  exit $EXIT_FAILURE
-	fi
+	  relink_command=
+	  func_source "$wrapper"
 
-	# This library was specified with -dlopen.
-	if test "$pass" = dlopen; then
-	  if test -z "$libdir"; then
-	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
-	  if test -z "$dlname" ||
-	     test "$dlopen_support" != yes ||
-	     test "$build_libtool_libs" = no; then
-	    # If there is no dlname, no dlopen support or we're linking
-	    # statically, we need to preload.  We also need to preload any
-	    # dependent libraries so libltdl's deplib preloader doesn't
-	    # bomb out in the load deplibs phase.
-	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  outputname=
+	  if test "$fast_install" = no && test -n "$relink_command"; then
+	    $opt_dry_run || {
+	      if test "$finalize" = yes; then
+	        tmpdir=`func_mktempdir`
+		func_basename "$file$stripped_ext"
+		file="$func_basename_result"
+	        outputname="$tmpdir/$file"
+	        # Replace the output file specification.
+	        relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+	        $opt_silent || {
+	          func_quote_for_expand "$relink_command"
+		  eval "func_echo $func_quote_for_expand_result"
+	        }
+	        if eval "$relink_command"; then :
+	          else
+		  func_error "error: relink \`$file' with the above command before installing it"
+		  $opt_dry_run || ${RM}r "$tmpdir"
+		  continue
+	        fi
+	        file="$outputname"
+	      else
+	        func_warning "cannot relink \`$file'"
+	      fi
+	    }
 	  else
-	    newdlfiles="$newdlfiles $lib"
+	    # Install the binary that we compiled earlier.
+	    file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
 	  fi
-	  continue
-	fi # $pass = dlopen
+	fi
 
-	# We need an absolute path.
-	case $ladir in
-	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
-	*)
-	  abs_ladir=`cd "$ladir" && pwd`
-	  if test -z "$abs_ladir"; then
-	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
-	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
-	    abs_ladir="$ladir"
-	  fi
+	# remove .exe since cygwin /usr/bin/install will append another
+	# one anyway
+	case $install_prog,$host in
+	*/usr/bin/install*,*cygwin*)
+	  case $file:$destfile in
+	  *.exe:*.exe)
+	    # this is ok
+	    ;;
+	  *.exe:*)
+	    destfile=$destfile.exe
+	    ;;
+	  *:*.exe)
+	    func_stripname '' '.exe' "$destfile"
+	    destfile=$func_stripname_result
+	    ;;
+	  esac
 	  ;;
 	esac
-	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+	$opt_dry_run || if test -n "$outputname"; then
+	  ${RM}r "$tmpdir"
+	fi
+	;;
+      esac
+    done
 
-	# Find the relevant object directory and library name.
-	if test "X$installed" = Xyes; then
-	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
-	    dir="$ladir"
-	    absdir="$abs_ladir"
-	    libdir="$abs_ladir"
-	  else
-	    dir="$libdir"
-	    absdir="$libdir"
-	  fi
-	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
-	else
-	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
-	    dir="$ladir"
-	    absdir="$abs_ladir"
-	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
-	  else
-	    dir="$ladir/$objdir"
-	    absdir="$abs_ladir/$objdir"
-	    # Remove this search path later
-	    notinst_path="$notinst_path $abs_ladir"
-	  fi
-	fi # $installed = yes
-	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+    for file in $staticlibs; do
+      func_basename "$file"
+      name="$func_basename_result"
 
-	# This library was specified with -dlpreopen.
-	if test "$pass" = dlpreopen; then
-	  if test -z "$libdir"; then
-	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
-	    exit $EXIT_FAILURE
+      # Set up the ranlib parameters.
+      oldlib="$destdir/$name"
+
+      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+      if test -n "$stripme" && test -n "$old_striplib"; then
+	func_show_eval "$old_striplib $oldlib" 'exit $?'
+      fi
+
+      # Do each command in the postinstall commands.
+      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+    done
+
+    test -n "$future_libdirs" && \
+      func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+    if test -n "$current_libdirs"; then
+      # Maybe just do a dry run.
+      $opt_dry_run && current_libdirs=" -n$current_libdirs"
+      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+    else
+      exit $EXIT_SUCCESS
+    fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+    $opt_debug
+    my_outputname="$1"
+    my_originator="$2"
+    my_pic_p="${3-no}"
+    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+    my_dlsyms=
+
+    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+      if test -n "$NM" && test -n "$global_symbol_pipe"; then
+	my_dlsyms="${my_outputname}S.c"
+      else
+	func_error "not configured to extract global symbols from dlpreopened files"
+      fi
+    fi
+
+    if test -n "$my_dlsyms"; then
+      case $my_dlsyms in
+      "") ;;
+      *.c)
+	# Discover the nlist of each of the dlfiles.
+	nlist="$output_objdir/${my_outputname}.nm"
+
+	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+	# Parse the name list into a source file.
+	func_verbose "creating $output_objdir/$my_dlsyms"
+
+	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+	if test "$dlself" = yes; then
+	  func_verbose "generating symbol list for \`$output'"
+
+	  $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+	  # Add our own program objects to the symbol list.
+	  progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	  for progfile in $progfiles; do
+	    func_verbose "extracting global C symbols from \`$progfile'"
+	    $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+	  done
+
+	  if test -n "$exclude_expsyms"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
 	  fi
-	  # Prefer using a static library (so that no silly _DYNAMIC symbols
-	  # are required to link).
-	  if test -n "$old_library"; then
-	    newdlprefiles="$newdlprefiles $dir/$old_library"
-	  # Otherwise, use the dlname, so that lt_dlopen finds it.
-	  elif test -n "$dlname"; then
-	    newdlprefiles="$newdlprefiles $dir/$dlname"
-	  else
-	    newdlprefiles="$newdlprefiles $dir/$linklib"
+
+	  if test -n "$export_symbols_regex"; then
+	    $opt_dry_run || {
+	      eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	    }
 	  fi
-	fi # $pass = dlpreopen
 
-	if test -z "$libdir"; then
-	  # Link the convenience library
-	  if test "$linkmode" = lib; then
-	    deplibs="$dir/$old_library $deplibs"
-	  elif test "$linkmode,$pass" = "prog,link"; then
-	    compile_deplibs="$dir/$old_library $compile_deplibs"
-	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  # Prepare the list of exported symbols
+	  if test -z "$export_symbols"; then
+	    export_symbols="$output_objdir/$outputname.exp"
+	    $opt_dry_run || {
+	      $RM $export_symbols
+	      eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+	      case $host in
+	      *cygwin* | *mingw* | *cegcc* )
+                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+	        ;;
+	      esac
+	    }
 	  else
-	    deplibs="$lib $deplibs" # used for prog,scan pass
+	    $opt_dry_run || {
+	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+	      eval '$MV "$nlist"T "$nlist"'
+	      case $host in
+	        *cygwin | *mingw* | *cegcc* )
+	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+	          ;;
+	      esac
+	    }
 	  fi
-	  continue
 	fi
 
+	for dlprefile in $dlprefiles; do
+	  func_verbose "extracting global C symbols from \`$dlprefile'"
+	  func_basename "$dlprefile"
+	  name="$func_basename_result"
+	  $opt_dry_run || {
+	    eval '$ECHO ": $name " >> "$nlist"'
+	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+	  }
+	done
 
-	if test "$linkmode" = prog && test "$pass" != link; then
-	  newlib_search_path="$newlib_search_path $ladir"
-	  deplibs="$lib $deplibs"
+	$opt_dry_run || {
+	  # Make sure we have at least an empty file.
+	  test -f "$nlist" || : > "$nlist"
 
-	  linkalldeplibs=no
-	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
-	     test "$build_libtool_libs" = no; then
-	    linkalldeplibs=yes
+	  if test -n "$exclude_expsyms"; then
+	    $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+	    $MV "$nlist"T "$nlist"
 	  fi
 
-	  tmp_libs=
-	  for deplib in $dependency_libs; do
-	    case $deplib in
-	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
-	    esac
-	    # Need to link against all dependency_libs?
-	    if test "$linkalldeplibs" = yes; then
-	      deplibs="$deplib $deplibs"
-	    else
-	      # Need to hardcode shared library paths
-	      # or/and link against static libraries
-	      newdependency_libs="$deplib $newdependency_libs"
-	    fi
-	    if test "X$duplicate_deps" = "Xyes" ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-	    fi
-	    tmp_libs="$tmp_libs $deplib"
-	  done # for deplib
-	  continue
-	fi # $linkmode = prog...
+	  # Try sorting and uniquifying the output.
+	  if $GREP -v "^: " < "$nlist" |
+	      if sort -k 3 </dev/null >/dev/null 2>&1; then
+		sort -k 3
+	      else
+		sort +2
+	      fi |
+	      uniq > "$nlist"S; then
+	    :
+	  else
+	    $GREP -v "^: " < "$nlist" > "$nlist"S
+	  fi
 
-	if test "$linkmode,$pass" = "prog,link"; then
-	  if test -n "$library_names" &&
-         { { test "$prefer_static_libs" = no ||
-             test "$prefer_static_libs,$installed" = "built,yes"; } ||
-           test -z "$old_library"; }; then
-	    # We need to hardcode the library path
-	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
-	      # Make sure the rpath contains only unique directories.
-	      case "$temp_rpath " in
-	      *" $dir "*) ;;
-	      *" $absdir "*) ;;
-	      *) temp_rpath="$temp_rpath $absdir" ;;
-	      esac
-	    fi
+	  if test -f "$nlist"S; then
+	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+	  else
+	    $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+	  fi
 
-	    # Hardcode the library path.
-	    # Skip directories that are in the system default run-time
-	    # search path.
-	    case " $sys_lib_dlsearch_path " in
-	    *" $absdir "*) ;;
-	    *)
-	      case "$compile_rpath " in
-	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
-	      esac
-	      ;;
-	    esac
-	    case " $sys_lib_dlsearch_path " in
-	    *" $libdir "*) ;;
-	    *)
-	      case "$finalize_rpath " in
-	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
-	      esac
-	      ;;
-	    esac
-	  fi # $linkmode,$pass = prog,link...
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
 
-	  if test "$alldeplibs" = yes &&
-	     { test "$deplibs_check_method" = pass_all ||
-	       { test "$build_libtool_libs" = yes &&
-		 test -n "$library_names"; }; }; then
-	    # We only need to search for static libraries
-	    continue
-	  fi
-	fi
+/* The mapping between symbol names and symbols.  */
+typedef struct {
+  const char *name;
+  void *address;
+} lt_dlsymlist;
+"
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc* )
+	    $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+   runtime relocations are performed -- see ld's documentation
+   on pseudo-relocs.  */"
+	    lt_dlsym_const= ;;
+	  *osf5*)
+	    echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+	    lt_dlsym_const= ;;
+	  *)
+	    lt_dlsym_const=const ;;
+	  esac
 
-	link_static=no # Whether the deplib will be linked statically
-	use_static_libs=$prefer_static_libs
-	if test "$use_static_libs" = built && test "$installed" = yes ; then
-	  use_static_libs=no
-	fi
-	if test -n "$library_names" &&
-	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
-	  if test "$installed" = no; then
-	    notinst_deplibs="$notinst_deplibs $lib"
-	    need_relink=yes
-	  fi
-	  # This is a shared library
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+  { \"$my_originator\", (void *) 0 },"
 
-	  # Warn about portability, can't link against -module's on
-	  # some systems (darwin)
-	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
-	    $echo
-	    if test "$linkmode" = prog; then
-	      $echo "*** Warning: Linking the executable $output against the loadable module"
-	    else
-	      $echo "*** Warning: Linking the shared library $output against the loadable module"
-	    fi
-	    $echo "*** $linklib is not portable!"
-	  fi
-	  if test "$linkmode" = lib &&
-	     test "$hardcode_into_libs" = yes; then
-	    # Hardcode the library path.
-	    # Skip directories that are in the system default run-time
-	    # search path.
-	    case " $sys_lib_dlsearch_path " in
-	    *" $absdir "*) ;;
-	    *)
-	      case "$compile_rpath " in
-	      *" $absdir "*) ;;
-	      *) compile_rpath="$compile_rpath $absdir"
-	      esac
-	      ;;
-	    esac
-	    case " $sys_lib_dlsearch_path " in
-	    *" $libdir "*) ;;
-	    *)
-	      case "$finalize_rpath " in
-	      *" $libdir "*) ;;
-	      *) finalize_rpath="$finalize_rpath $libdir"
-	      esac
-	      ;;
-	    esac
-	  fi
-
-	  if test -n "$old_archive_from_expsyms_cmds"; then
-	    # figure out the soname
-	    set dummy $library_names
-	    realname="$2"
-	    shift; shift
-	    libname=`eval \\$echo \"$libname_spec\"`
-	    # use dlname if we got it. it's perfectly good, no?
-	    if test -n "$dlname"; then
-	      soname="$dlname"
-	    elif test -n "$soname_spec"; then
-	      # bleh windows
-	      case $host in
-	      *cygwin* | mingw*)
-		major=`expr $current - $age`
-		versuffix="-$major"
-		;;
-	      esac
-	      eval soname=\"$soname_spec\"
-	    else
-	      soname="$realname"
-	    fi
-
-	    # Make a new name for the extract_expsyms_cmds to use
-	    soroot="$soname"
-	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
-	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
-
-	    # If the library has no export list, then create one now
-	    if test -f "$output_objdir/$soname-def"; then :
-	    else
-	      $show "extracting exported symbol list from \`$soname'"
-	      save_ifs="$IFS"; IFS='~'
-	      cmds=$extract_expsyms_cmds
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd" || exit $?
-	      done
-	      IFS="$save_ifs"
-	    fi
+	  case $need_lib_prefix in
+	  no)
+	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  *)
+	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+	    ;;
+	  esac
+	  $ECHO >> "$output_objdir/$my_dlsyms" "\
+  {0, (void *) 0}
+};
 
-	    # Create $newlib
-	    if test -f "$output_objdir/$newlib"; then :; else
-	      $show "generating import library for \`$soname'"
-	      save_ifs="$IFS"; IFS='~'
-	      cmds=$old_archive_from_expsyms_cmds
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd" || exit $?
-	      done
-	      IFS="$save_ifs"
-	    fi
-	    # make sure the library variables are pointing to the new library
-	    dir=$output_objdir
-	    linklib=$newlib
-	  fi # test -n "$old_archive_from_expsyms_cmds"
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+  return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
 
-	  if test "$linkmode" = prog || test "$mode" != relink; then
-	    add_shlibpath=
-	    add_dir=
-	    add=
-	    lib_linked=yes
-	    case $hardcode_action in
-	    immediate | unsupported)
-	      if test "$hardcode_direct" = no; then
-		add="$dir/$linklib"
-		case $host in
-		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
-		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
-		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
-		    *-*-unixware7*) add_dir="-L$dir" ;;
-		  *-*-darwin* )
-		    # if the lib is a module then we can not link against
-		    # it, someone is ignoring the new warnings I added
-		    if /usr/bin/file -L $add 2> /dev/null |
-                      $EGREP ": [^:]* bundle" >/dev/null ; then
-		      $echo "** Warning, lib $linklib is a module, not a shared library"
-		      if test -z "$old_library" ; then
-		        $echo
-		        $echo "** And there doesn't seem to be a static archive available"
-		        $echo "** The link will probably fail, sorry"
-		      else
-		        add="$dir/$old_library"
-		      fi
-		    fi
-		esac
-	      elif test "$hardcode_minus_L" = no; then
-		case $host in
-		*-*-sunos*) add_shlibpath="$dir" ;;
-		esac
-		add_dir="-L$dir"
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = no; then
-		add_shlibpath="$dir"
-		add="-l$name"
-	      else
-		lib_linked=no
-	      fi
-	      ;;
-	    relink)
-	      if test "$hardcode_direct" = yes; then
-		add="$dir/$linklib"
-	      elif test "$hardcode_minus_L" = yes; then
-		add_dir="-L$dir"
-		# Try looking first in the location we're being installed to.
-		if test -n "$inst_prefix_dir"; then
-		  case $libdir in
-		    [\\/]*)
-		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
-		      ;;
-		  esac
-		fi
-		add="-l$name"
-	      elif test "$hardcode_shlibpath_var" = yes; then
-		add_shlibpath="$dir"
-		add="-l$name"
-	      else
-		lib_linked=no
-	      fi
-	      ;;
-	    *) lib_linked=no ;;
-	    esac
+#ifdef __cplusplus
+}
+#endif\
+"
+	} # !$opt_dry_run
 
-	    if test "$lib_linked" != yes; then
-	      $echo "$modename: configuration error: unsupported hardcode properties"
-	      exit $EXIT_FAILURE
+	pic_flag_for_symtable=
+	case "$compile_command " in
+	*" -static "*) ;;
+	*)
+	  case $host in
+	  # compiling the symbol table file with pic_flag works around
+	  # a FreeBSD bug that causes programs to crash when -lm is
+	  # linked before any other PIC object.  But we must not use
+	  # pic_flag when linking with -static.  The problem exists in
+	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+	  *-*-hpux*)
+	    pic_flag_for_symtable=" $pic_flag"  ;;
+	  *)
+	    if test "X$my_pic_p" != Xno; then
+	      pic_flag_for_symtable=" $pic_flag"
 	    fi
+	    ;;
+	  esac
+	  ;;
+	esac
+	symtab_cflags=
+	for arg in $LTCFLAGS; do
+	  case $arg in
+	  -pie | -fpie | -fPIE) ;;
+	  *) symtab_cflags="$symtab_cflags $arg" ;;
+	  esac
+	done
 
-	    if test -n "$add_shlibpath"; then
-	      case :$compile_shlibpath: in
-	      *":$add_shlibpath:"*) ;;
-	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
-	      esac
-	    fi
-	    if test "$linkmode" = prog; then
-	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
-	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
-	    else
-	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
-	      test -n "$add" && deplibs="$add $deplibs"
-	      if test "$hardcode_direct" != yes && \
-		 test "$hardcode_minus_L" != yes && \
-		 test "$hardcode_shlibpath_var" = yes; then
-		case :$finalize_shlibpath: in
-		*":$libdir:"*) ;;
-		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-		esac
-	      fi
-	    fi
-	  fi
+	# Now compile the dynamic symbol file.
+	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
 
-	  if test "$linkmode" = prog || test "$mode" = relink; then
-	    add_shlibpath=
-	    add_dir=
-	    add=
-	    # Finalize command for both is simple: just hardcode it.
-	    if test "$hardcode_direct" = yes; then
-	      add="$libdir/$linklib"
-	    elif test "$hardcode_minus_L" = yes; then
-	      add_dir="-L$libdir"
-	      add="-l$name"
-	    elif test "$hardcode_shlibpath_var" = yes; then
-	      case :$finalize_shlibpath: in
-	      *":$libdir:"*) ;;
-	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
-	      esac
-	      add="-l$name"
-	    elif test "$hardcode_automatic" = yes; then
-	      if test -n "$inst_prefix_dir" &&
-		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
-	        add="$inst_prefix_dir$libdir/$linklib"
-	      else
-	        add="$libdir/$linklib"
-	      fi
-	    else
-	      # We cannot seem to hardcode it, guess we'll fake it.
-	      add_dir="-L$libdir"
-	      # Try looking first in the location we're being installed to.
-	      if test -n "$inst_prefix_dir"; then
-		case $libdir in
-		  [\\/]*)
-		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
-		    ;;
-		esac
-	      fi
-	      add="-l$name"
-	    fi
+	# Clean up the generated files.
+	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
 
-	    if test "$linkmode" = prog; then
-	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
-	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
-	    else
-	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
-	      test -n "$add" && deplibs="$add $deplibs"
-	    fi
-	  fi
-	elif test "$linkmode" = prog; then
-	  # Here we assume that one of hardcode_direct or hardcode_minus_L
-	  # is not unsupported.  This is valid on all known static and
-	  # shared platforms.
-	  if test "$hardcode_direct" != unsupported; then
-	    test -n "$old_library" && linklib="$old_library"
-	    compile_deplibs="$dir/$linklib $compile_deplibs"
-	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	# Transform the symbol file into the correct name.
+	symfileobj="$output_objdir/${my_outputname}S.$objext"
+	case $host in
+	*cygwin* | *mingw* | *cegcc* )
+	  if test -f "$output_objdir/$my_outputname.def"; then
+	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
 	  else
-	    compile_deplibs="-l$name -L$dir $compile_deplibs"
-	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
 	  fi
-	elif test "$build_libtool_libs" = yes; then
-	  # Not a shared library
-	  if test "$deplibs_check_method" != pass_all; then
-	    # We're trying link a shared library against a static one
-	    # but the system doesn't support it.
+	  ;;
+	*)
+	  compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+	  ;;
+	esac
+	;;
+      *)
+	func_fatal_error "unknown suffix for \`$my_dlsyms'"
+	;;
+      esac
+    else
+      # We keep going just in case the user didn't refer to
+      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
+      # really was required.
 
-	    # Just print a warning and add the library to dependency_libs so
-	    # that the program can be linked against the static library.
-	    $echo
-	    $echo "*** Warning: This system can not link to static lib archive $lib."
-	    $echo "*** I have the capability to make that library automatically link in when"
-	    $echo "*** you link to this library.  But I can only do this if you have a"
-	    $echo "*** shared version of the library, which you do not appear to have."
-	    if test "$module" = yes; then
-	      $echo "*** But as you try to build a module library, libtool will still create "
-	      $echo "*** a static module, that should work as long as the dlopening application"
-	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
-	      if test -z "$global_symbol_pipe"; then
-		$echo
-		$echo "*** However, this would only work if libtool was able to extract symbol"
-		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-		$echo "*** not find such a program.  So, this module is probably useless."
-		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
-	      fi
-	      if test "$build_old_libs" = no; then
-		build_libtool_libs=module
-		build_old_libs=yes
-	      else
-		build_libtool_libs=no
-	      fi
-	    fi
-	  else
-	    deplibs="$dir/$old_library $deplibs"
-	    link_static=yes
-	  fi
-	fi # link shared/static library?
+      # Nullify the symbol file.
+      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+    fi
+}
 
-	if test "$linkmode" = lib; then
-	  if test -n "$dependency_libs" &&
-	     { test "$hardcode_into_libs" != yes ||
-	       test "$build_old_libs" = yes ||
-	       test "$link_static" = yes; }; then
-	    # Extract -R from dependency_libs
-	    temp_deplibs=
-	    for libdir in $dependency_libs; do
-	      case $libdir in
-	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
-		   case " $xrpath " in
-		   *" $temp_xrpath "*) ;;
-		   *) xrpath="$xrpath $temp_xrpath";;
-		   esac;;
-	      *) temp_deplibs="$temp_deplibs $libdir";;
-	      esac
-	    done
-	    dependency_libs="$temp_deplibs"
-	  fi
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+  $opt_debug
+  win32_libid_type="unknown"
+  win32_fileres=`file -L $1 2>/dev/null`
+  case $win32_fileres in
+  *ar\ archive\ import\ library*) # definitely import
+    win32_libid_type="x86 archive import"
+    ;;
+  *ar\ archive*) # could be an import, or static
+    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+      win32_nmres=`eval $NM -f posix -A $1 |
+	$SED -n -e '
+	    1,100{
+		/ I /{
+		    s,.*,import,
+		    p
+		    q
+		}
+	    }'`
+      case $win32_nmres in
+      import*)  win32_libid_type="x86 archive import";;
+      *)        win32_libid_type="x86 archive static";;
+      esac
+    fi
+    ;;
+  *DLL*)
+    win32_libid_type="x86 DLL"
+    ;;
+  *executable*) # but shell scripts are "executable" too...
+    case $win32_fileres in
+    *MS\ Windows\ PE\ Intel*)
+      win32_libid_type="x86 DLL"
+      ;;
+    esac
+    ;;
+  esac
+  $ECHO "$win32_libid_type"
+}
 
-	  newlib_search_path="$newlib_search_path $absdir"
-	  # Link against this library
-	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
-	  # ... and its dependency_libs
-	  tmp_libs=
-	  for deplib in $dependency_libs; do
-	    newdependency_libs="$deplib $newdependency_libs"
-	    if test "X$duplicate_deps" = "Xyes" ; then
-	      case "$tmp_libs " in
-	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
-	      esac
-	    fi
-	    tmp_libs="$tmp_libs $deplib"
-	  done
 
-	  if test "$link_all_deplibs" != no; then
-	    # Add the search paths of all dependency libraries
-	    for deplib in $dependency_libs; do
-	      case $deplib in
-	      -L*) path="$deplib" ;;
-	      *.la)
-		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
-		test "X$dir" = "X$deplib" && dir="."
-		# We need an absolute path.
-		case $dir in
-		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
-		*)
-		  absdir=`cd "$dir" && pwd`
-		  if test -z "$absdir"; then
-		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
-		    absdir="$dir"
-		  fi
-		  ;;
-		esac
-		if grep "^installed=no" $deplib > /dev/null; then
-		  path="$absdir/$objdir"
-		else
-		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-		  if test -z "$libdir"; then
-		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		    exit $EXIT_FAILURE
-		  fi
-		  if test "$absdir" != "$libdir"; then
-		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
-		  fi
-		  path="$absdir"
-		fi
-		depdepl=
-		case $host in
-		*-*-darwin*)
-		  # we do not want to link against static libs,
-		  # but need to link against shared
-		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
-		  if test -n "$deplibrary_names" ; then
-		    for tmp in $deplibrary_names ; do
-		      depdepl=$tmp
-		    done
-		    if test -f "$path/$depdepl" ; then
-		      depdepl="$path/$depdepl"
-		    fi
-		    # do not add paths which are already there
-		    case " $newlib_search_path " in
-		    *" $path "*) ;;
-		    *) newlib_search_path="$newlib_search_path $path";;
-		    esac
-		  fi
-		  path=""
-		  ;;
-		*)
-		  path="-L$path"
-		  ;;
-		esac
-		;;
-	      -l*)
-		case $host in
-		*-*-darwin*)
-		  # Again, we only want to link against shared libraries
-		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
-		  for tmp in $newlib_search_path ; do
-		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
-		      eval depdepl="$tmp/lib$tmp_libs.dylib"
-		      break
-		    fi
-		  done
-		  path=""
-		  ;;
-		*) continue ;;
-		esac
-		;;
-	      *) continue ;;
-	      esac
-	      case " $deplibs " in
-	      *" $path "*) ;;
-	      *) deplibs="$path $deplibs" ;;
-	      esac
-	      case " $deplibs " in
-	      *" $depdepl "*) ;;
-	      *) deplibs="$depdepl $deplibs" ;;
-	      esac
-	    done
-	  fi # link_all_deplibs != no
-	fi # linkmode = lib
-      done # for deplib in $libs
-      dependency_libs="$newdependency_libs"
-      if test "$pass" = dlpreopen; then
-	# Link the dlpreopened libraries before other libraries
-	for deplib in $save_deplibs; do
-	  deplibs="$deplib $deplibs"
-	done
-      fi
-      if test "$pass" != dlopen; then
-	if test "$pass" != conv; then
-	  # Make sure lib_search_path contains only unique directories.
-	  lib_search_path=
-	  for dir in $newlib_search_path; do
-	    case "$lib_search_path " in
-	    *" $dir "*) ;;
-	    *) lib_search_path="$lib_search_path $dir" ;;
-	    esac
-	  done
-	  newlib_search_path=
-	fi
 
-	if test "$linkmode,$pass" != "prog,link"; then
-	  vars="deplibs"
-	else
-	  vars="compile_deplibs finalize_deplibs"
-	fi
-	for var in $vars dependency_libs; do
-	  # Add libraries to $var in reverse order
-	  eval tmp_libs=\"\$$var\"
-	  new_libs=
-	  for deplib in $tmp_libs; do
-	    # FIXME: Pedantically, this is the right thing to do, so
-	    #        that some nasty dependency loop isn't accidentally
-	    #        broken:
-	    #new_libs="$deplib $new_libs"
-	    # Pragmatically, this seems to cause very few problems in
-	    # practice:
-	    case $deplib in
-	    -L*) new_libs="$deplib $new_libs" ;;
-	    -R*) ;;
-	    *)
-	      # And here is the reason: when a library appears more
-	      # than once as an explicit dependence of a library, or
-	      # is implicitly linked in more than once by the
-	      # compiler, it is considered special, and multiple
-	      # occurrences thereof are not removed.  Compare this
-	      # with having the same library being listed as a
-	      # dependency of multiple other libraries: in this case,
-	      # we know (pedantically, we assume) the library does not
-	      # need to be listed more than once, so we keep only the
-	      # last copy.  This is not always right, but it is rare
-	      # enough that we require users that really mean to play
-	      # such unportable linking tricks to link the library
-	      # using -Wl,-lname, so that libtool does not consider it
-	      # for duplicate removal.
-	      case " $specialdeplibs " in
-	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
-	      *)
-		case " $new_libs " in
-		*" $deplib "*) ;;
-		*) new_libs="$deplib $new_libs" ;;
-		esac
-		;;
-	      esac
-	      ;;
-	    esac
-	  done
-	  tmp_libs=
-	  for deplib in $new_libs; do
-	    case $deplib in
-	    -L*)
-	      case " $tmp_libs " in
-	      *" $deplib "*) ;;
-	      *) tmp_libs="$tmp_libs $deplib" ;;
-	      esac
-	      ;;
-	    *) tmp_libs="$tmp_libs $deplib" ;;
-	    esac
-	  done
-	  eval $var=\"$tmp_libs\"
-	done # for var
-      fi
-      # Last step: remove runtime libs from dependency_libs
-      # (they stay in deplibs)
-      tmp_libs=
-      for i in $dependency_libs ; do
-	case " $predeps $postdeps $compiler_lib_search_path " in
-	*" $i "*)
-	  i=""
-	  ;;
-	esac
-	if test -n "$i" ; then
-	  tmp_libs="$tmp_libs $i"
-	fi
-      done
-      dependency_libs=$tmp_libs
-    done # for pass
-    if test "$linkmode" = prog; then
-      dlfiles="$newdlfiles"
-      dlprefiles="$newdlprefiles"
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+    $opt_debug
+    f_ex_an_ar_dir="$1"; shift
+    f_ex_an_ar_oldlib="$1"
+    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+     :
+    else
+      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
     fi
+}
 
-    case $linkmode in
-    oldlib)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
-      fi
-
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
-      fi
-
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
-      fi
 
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
-      fi
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+    $opt_debug
+    my_gentop="$1"; shift
+    my_oldlibs=${1+"$@"}
+    my_oldobjs=""
+    my_xlib=""
+    my_xabs=""
+    my_xdir=""
 
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
-      fi
+    for my_xlib in $my_oldlibs; do
+      # Extract the objects.
+      case $my_xlib in
+	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+	*) my_xabs=`pwd`"/$my_xlib" ;;
+      esac
+      func_basename "$my_xlib"
+      my_xlib="$func_basename_result"
+      my_xlib_u=$my_xlib
+      while :; do
+        case " $extracted_archives " in
+	*" $my_xlib_u "*)
+	  func_arith $extracted_serial + 1
+	  extracted_serial=$func_arith_result
+	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
+	*) break ;;
+	esac
+      done
+      extracted_archives="$extracted_archives $my_xlib_u"
+      my_xdir="$my_gentop/$my_xlib_u"
 
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
-      fi
+      func_mkdir_p "$my_xdir"
 
-      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
-	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
-      fi
-
-      # Now set the variables for building old libraries.
-      build_libtool_libs=no
-      oldlibs="$output"
-      objs="$objs$old_deplibs"
-      ;;
-
-    lib)
-      # Make sure we only generate libraries of the form `libNAME.la'.
-      case $outputname in
-      lib*)
-	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
-	eval shared_ext=\"$shrext_cmds\"
-	eval libname=\"$libname_spec\"
+      case $host in
+      *-darwin*)
+	func_verbose "Extracting $my_xabs"
+	# Do not bother doing anything if just a dry run
+	$opt_dry_run || {
+	  darwin_orig_dir=`pwd`
+	  cd $my_xdir || exit $?
+	  darwin_archive=$my_xabs
+	  darwin_curdir=`pwd`
+	  darwin_base_archive=`basename "$darwin_archive"`
+	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+	  if test -n "$darwin_arches"; then
+	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+	    darwin_arch=
+	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+	    for darwin_arch in  $darwin_arches ; do
+	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+	      cd "$darwin_curdir"
+	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+	    done # $darwin_arches
+            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+	    darwin_file=
+	    darwin_files=
+	    for darwin_file in $darwin_filelist; do
+	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+	      $LIPO -create -output "$darwin_file" $darwin_files
+	    done # $darwin_filelist
+	    $RM -rf unfat-$$
+	    cd "$darwin_orig_dir"
+	  else
+	    cd $darwin_orig_dir
+	    func_extract_an_archive "$my_xdir" "$my_xabs"
+	  fi # $darwin_arches
+	} # !$opt_dry_run
 	;;
       *)
-	if test "$module" = no; then
-	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-	if test "$need_lib_prefix" != no; then
-	  # Add the "lib" prefix for modules if required
-	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	  eval shared_ext=\"$shrext_cmds\"
-	  eval libname=\"$libname_spec\"
-	else
-	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
-	fi
+        func_extract_an_archive "$my_xdir" "$my_xabs"
 	;;
       esac
+      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+    done
 
-      if test -n "$objs"; then
-	if test "$deplibs_check_method" != pass_all; then
-	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
-	  exit $EXIT_FAILURE
-	else
-	  $echo
-	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
-	  $echo "*** objects $objs is not portable!"
-	  libobjs="$libobjs $objs"
-	fi
-      fi
+    func_extract_archives_result="$my_oldobjs"
+}
 
-      if test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
-      fi
 
-      set dummy $rpath
-      if test "$#" -gt 2; then
-	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
-      fi
-      install_libdir="$2"
 
-      oldlibs=
-      if test -z "$rpath"; then
-	if test "$build_libtool_libs" = yes; then
-	  # Building a libtool convenience library.
-	  # Some compilers have problems with a `.al' extension so
-	  # convenience libraries should have the same extension an
-	  # archive normally would.
-	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
-	  build_libtool_libs=convenience
-	  build_old_libs=yes
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+	func_emit_wrapper_part1_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_part1_arg1=$1
 	fi
 
-	if test -n "$vinfo"; then
-	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
-	fi
+	$ECHO "\
+#! $SHELL
 
-	if test -n "$release"; then
-	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
-	fi
-      else
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
 
-	# Parse the version information argument.
-	save_ifs="$IFS"; IFS=':'
-	set dummy $vinfo 0 0 0
-	IFS="$save_ifs"
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
 
-	if test -n "$8"; then
-	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	fi
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
 
-	# convert absolute version numbers to libtool ages
-	# this retains compatibility with .la files and attempts
-	# to make the code below a bit more comprehensible
+# 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
 
-	case $vinfo_number in
-	yes)
-	  number_major="$2"
-	  number_minor="$3"
-	  number_revision="$4"
-	  #
-	  # There are really only two kinds -- those that
-	  # use the current revision as the major version
-	  # and those that subtract age and use age as
-	  # a minor version.  But, then there is irix
-	  # which has an extra 1 added just for fun
-	  #
-	  case $version_type in
-	  darwin|linux|osf|windows|none)
-	    current=`expr $number_major + $number_minor`
-	    age="$number_minor"
-	    revision="$number_revision"
-	    ;;
-	  freebsd-aout|freebsd-elf|sunos)
-	    current="$number_major"
-	    revision="$number_minor"
-	    age="0"
-	    ;;
-	  irix|nonstopux)
-	    current=`expr $number_major + $number_minor - 1`
-	    age="$number_minor"
-	    revision="$number_minor"
-	    ;;
-	  esac
-	  ;;
-	no)
-	  current="$2"
-	  revision="$3"
-	  age="$4"
-	  ;;
-	esac
+relink_command=\"$relink_command\"
 
-	# Check that each of the things are valid numbers.
-	case $current in
-	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-	*)
-	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+  # install mode needs the following variables:
+  generated_by_libtool_version='$macro_version'
+  notinst_deplibs='$notinst_deplibs'
+else
+  # When we are sourced in execute mode, \$file and \$ECHO are already set.
+  if test \"\$libtool_execute_magic\" != \"$magic\"; then
+    ECHO=\"$qecho\"
+    file=\"\$0\"
+    # Make sure echo works.
+    if test \"X\$1\" = X--no-reexec; then
+      # Discard the --no-reexec flag, and continue.
+      shift
+    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+      # Yippee, \$ECHO works!
+      :
+    else
+      # Restart under the correct shell, and then maybe \$ECHO will work.
+      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+    fi
+  fi\
+"
+	$ECHO "\
 
-	case $revision in
-	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-	*)
-	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
+  # Find the directory that this script lives in.
+  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
 
-	case $age in
-	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
-	*)
-	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
+  # Follow symbolic links until we get to the real thisdir.
+  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+  while test -n \"\$file\"; do
+    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
 
-	if test "$age" -gt "$current"; then
-	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
-	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
-	  exit $EXIT_FAILURE
-	fi
+    # If there was a directory component, then change thisdir.
+    if test \"x\$destdir\" != \"x\$file\"; then
+      case \"\$destdir\" in
+      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+      *) thisdir=\"\$thisdir/\$destdir\" ;;
+      esac
+    fi
 
-	# Calculate the version variables.
-	major=
-	versuffix=
-	verstring=
-	case $version_type in
-	none) ;;
+    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+  done
+"
+}
+# end: func_emit_wrapper_part1
 
-	darwin)
-	  # Like Linux, but with the current version available in
-	  # verstring for coding it into the library header
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  # Darwin ld doesn't like 0 for these options...
-	  minor_current=`expr $current + 1`
-	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
-	  ;;
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+	func_emit_wrapper_part2_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_part2_arg1=$1
+	fi
 
-	freebsd-aout)
-	  major=".$current"
-	  versuffix=".$current.$revision";
-	  ;;
+	$ECHO "\
 
-	freebsd-elf)
-	  major=".$current"
-	  versuffix=".$current";
-	  ;;
+  # Usually 'no', except on cygwin/mingw when embedded into
+  # the cwrapper.
+  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+    # special case for '.'
+    if test \"\$thisdir\" = \".\"; then
+      thisdir=\`pwd\`
+    fi
+    # remove .libs from thisdir
+    case \"\$thisdir\" in
+    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+    $objdir )   thisdir=. ;;
+    esac
+  fi
 
-	irix | nonstopux)
-	  major=`expr $current - $age + 1`
+  # Try to get the absolute directory name.
+  absdir=\`cd \"\$thisdir\" && pwd\`
+  test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
 
-	  case $version_type in
-	    nonstopux) verstring_prefix=nonstopux ;;
-	    *)         verstring_prefix=sgi ;;
-	  esac
-	  verstring="$verstring_prefix$major.$revision"
+	if test "$fast_install" = yes; then
+	  $ECHO "\
+  program=lt-'$outputname'$exeext
+  progdir=\"\$thisdir/$objdir\"
 
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$revision
-	  while test "$loop" -ne 0; do
-	    iface=`expr $revision - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="$verstring_prefix$major.$iface:$verstring"
-	  done
+  if test ! -f \"\$progdir/\$program\" ||
+     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
 
-	  # Before this point, $major must not contain `.'.
-	  major=.$major
-	  versuffix="$major.$revision"
-	  ;;
+    file=\"\$\$-\$program\"
 
-	linux)
-	  major=.`expr $current - $age`
-	  versuffix="$major.$age.$revision"
-	  ;;
+    if test ! -d \"\$progdir\"; then
+      $MKDIR \"\$progdir\"
+    else
+      $RM \"\$progdir/\$file\"
+    fi"
 
-	osf)
-	  major=.`expr $current - $age`
-	  versuffix=".$current.$age.$revision"
-	  verstring="$current.$age.$revision"
+	  $ECHO "\
 
-	  # Add in all the interfaces that we are compatible with.
-	  loop=$age
-	  while test "$loop" -ne 0; do
-	    iface=`expr $current - $loop`
-	    loop=`expr $loop - 1`
-	    verstring="$verstring:${iface}.0"
-	  done
+    # relink executable if necessary
+    if test -n \"\$relink_command\"; then
+      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+      else
+	$ECHO \"\$relink_command_output\" >&2
+	$RM \"\$progdir/\$file\"
+	exit 1
+      fi
+    fi
 
-	  # Make executables depend on our current version.
-	  verstring="$verstring:${current}.0"
-	  ;;
+    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+    { $RM \"\$progdir/\$program\";
+      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+    $RM \"\$progdir/\$file\"
+  fi"
+	else
+	  $ECHO "\
+  program='$outputname'
+  progdir=\"\$thisdir/$objdir\"
+"
+	fi
 
-	sunos)
-	  major=".$current"
-	  versuffix=".$current.$revision"
-	  ;;
+	$ECHO "\
 
-	windows)
-	  # Use '-' rather than '.', since we only want one
-	  # extension on DOS 8.3 filesystems.
-	  major=`expr $current - $age`
-	  versuffix="-$major"
+  if test -f \"\$progdir/\$program\"; then"
+
+	# Export our shlibpath_var if we have one.
+	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+	  $ECHO "\
+    # Add our own library path to $shlibpath_var
+    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+    # Some systems cannot cope with colon-terminated $shlibpath_var
+    # The second colon is a workaround for a bug in BeOS R4 sed
+    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+    export $shlibpath_var
+"
+	fi
+
+	# fixup the dll searchpath if we need to.
+	if test -n "$dllsearchpath"; then
+	  $ECHO "\
+    # Add the dll search path components to the executable PATH
+    PATH=$dllsearchpath:\$PATH
+"
+	fi
+
+	$ECHO "\
+    if test \"\$libtool_execute_magic\" != \"$magic\"; then
+      # Run the actual program with our arguments.
+"
+	case $host in
+	# Backslashes separate directories on plain windows
+	*-*-mingw | *-*-os2* | *-cegcc*)
+	  $ECHO "\
+      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
 	  ;;
 
 	*)
-	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
-	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
-	  exit $EXIT_FAILURE
+	  $ECHO "\
+      exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
 	  ;;
 	esac
+	$ECHO "\
+      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+      exit 1
+    fi
+  else
+    # The program doesn't exist.
+    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+    exit 1
+  fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
 
-	# Clear the version info if we defaulted, and they specified a release.
-	if test -z "$vinfo" && test -n "$release"; then
-	  major=
-	  case $version_type in
-	  darwin)
-	    # we can't check for "0.0" in archive_cmds due to quoting
-	    # problems, so we reset it completely
-	    verstring=
-	    ;;
-	  *)
-	    verstring="0.0"
-	    ;;
-	  esac
-	  if test "$need_version" = no; then
-	    versuffix=
-	  else
-	    versuffix=".0.0"
-	  fi
-	fi
-
-	# Remove version info from name if versioning should be avoided
-	if test "$avoid_version" = yes && test "$need_version" = no; then
-	  major=
-	  versuffix=
-	  verstring=""
-	fi
 
-	# Check to see if the archive will have undefined symbols.
-	if test "$allow_undefined" = yes; then
-	  if test "$allow_undefined_flag" = unsupported; then
-	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
-	    build_libtool_libs=no
-	    build_old_libs=yes
-	  fi
-	else
-	  # Don't allow undefined symbols.
-	  allow_undefined_flag="$no_undefined_flag"
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable.  Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take.  If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory.  This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+	func_emit_wrapper_arg1=no
+	if test -n "$1" ; then
+	  func_emit_wrapper_arg1=$1
 	fi
-      fi
 
-      if test "$mode" != relink; then
-	# Remove our outputs, but don't remove object files since they
-	# may have been created when compiling PIC objects.
-	removelist=
-	tempremovelist=`$echo "$output_objdir/*"`
-	for p in $tempremovelist; do
-	  case $p in
-	    *.$objext)
-	       ;;
-	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
-	       if test "X$precious_files_regex" != "X"; then
-	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
-	         then
-		   continue
-		 fi
-	       fi
-	       removelist="$removelist $p"
-	       ;;
-	    *) ;;
-	  esac
-	done
-	if test -n "$removelist"; then
-	  $show "${rm}r $removelist"
-	  $run ${rm}r $removelist
-	fi
-      fi
+	# split this up so that func_emit_cwrapperexe_src
+	# can call each part independently.
+	func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+	func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
 
-      # Now set the variables for building old libraries.
-      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
-	oldlibs="$oldlibs $output_objdir/$libname.$libext"
 
-	# Transform .lo files to .o files.
-	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
-      fi
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin.  Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+  func_to_host_path_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        case $build in
+          *mingw* ) # actually, msys
+            # awkward: cmd appends spaces to result
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_path_tmp1=`cygpath -w "$1"`
+            func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # Unfortunately, winepath does not exit with a non-zero
+            # error code, so we are forced to check the contents of
+            # stdout. On the other hand, if the command is not
+            # found, the shell will set an exit code of 127 and print
+            # *an error message* to stdout. So we must check for both
+            # error code of zero AND non-empty stdout, which explains
+            # the odd construction:
+            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+              func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+                $SED -e "$lt_sed_naive_backslashify"`
+            else
+              # Allow warning below.
+              func_to_host_path_result=""
+            fi
+            ;;
+        esac
+        if test -z "$func_to_host_path_result" ; then
+          func_error "Could not determine host path corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback:
+          func_to_host_path_result="$1"
+        fi
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_path
 
-      # Eliminate all temporary directories.
-#      for path in $notinst_path; do
-#	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
-#	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
-#	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
-#      done
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+#    $build          $host
+#    mingw (msys)    mingw  [e.g. native]
+#    cygwin          mingw
+#    *nix + wine     mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+  func_to_host_pathlist_result="$1"
+  if test -n "$1" ; then
+    case $host in
+      *mingw* )
+        lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+        # Remove leading and trailing path separator characters from
+        # ARG. msys behavior is inconsistent here, cygpath turns them
+        # into '.;' and ';.', and winepath ignores them completely.
+        func_to_host_pathlist_tmp2="$1"
+        # Once set for this call, this variable should not be
+        # reassigned. It is used in tha fallback case.
+        func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+          $SED -e 's|^:*||' -e 's|:*$||'`
+        case $build in
+          *mingw* ) # Actually, msys.
+            # Awkward: cmd appends spaces to result.
+            lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+            func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+              $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          *cygwin* )
+            func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+            func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+              $SED -e "$lt_sed_naive_backslashify"`
+            ;;
+          * )
+            # unfortunately, winepath doesn't convert pathlists
+            func_to_host_pathlist_result=""
+            func_to_host_pathlist_oldIFS=$IFS
+            IFS=:
+            for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+              IFS=$func_to_host_pathlist_oldIFS
+              if test -n "$func_to_host_pathlist_f" ; then
+                func_to_host_path "$func_to_host_pathlist_f"
+                if test -n "$func_to_host_path_result" ; then
+                  if test -z "$func_to_host_pathlist_result" ; then
+                    func_to_host_pathlist_result="$func_to_host_path_result"
+                  else
+                    func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+                  fi
+                fi
+              fi
+              IFS=:
+            done
+            IFS=$func_to_host_pathlist_oldIFS
+            ;;
+        esac
+        if test -z "$func_to_host_pathlist_result" ; then
+          func_error "Could not determine the host path(s) corresponding to"
+          func_error "  '$1'"
+          func_error "Continuing, but uninstalled executables may not work."
+          # Fallback. This may break if $1 contains DOS-style drive
+          # specifications. The fix is not to complicate the expression
+          # below, but for the user to provide a working wine installation
+          # with winepath so that path translation in the cross-to-mingw
+          # case works properly.
+          lt_replace_pathsep_nix_to_dos="s|:|;|g"
+          func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+            $SED -e "$lt_replace_pathsep_nix_to_dos"`
+        fi
+        # Now, add the leading and trailing path separators back
+        case "$1" in
+          :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+            ;;
+        esac
+        case "$1" in
+          *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+            ;;
+        esac
+        ;;
+    esac
+  fi
+}
+# end: func_to_host_pathlist
 
-      if test -n "$xrpath"; then
-	# If the user specified any rpath flags, then add them.
-	temp_xrpath=
-	for libdir in $xrpath; do
-	  temp_xrpath="$temp_xrpath -R$libdir"
-	  case "$finalize_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
-	  esac
-	done
-	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
-	  dependency_libs="$temp_xrpath $dependency_libs"
-	fi
-      fi
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+	cat <<EOF
 
-      # Make sure dlfiles contains only unique files that won't be dlpreopened
-      old_dlfiles="$dlfiles"
-      dlfiles=
-      for lib in $old_dlfiles; do
-	case " $dlprefiles $dlfiles " in
-	*" $lib "*) ;;
-	*) dlfiles="$dlfiles $lib" ;;
-	esac
-      done
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
 
-      # Make sure dlprefiles contains only unique files
-      old_dlprefiles="$dlprefiles"
-      dlprefiles=
-      for lib in $old_dlprefiles; do
-	case "$dlprefiles " in
-	*" $lib "*) ;;
-	*) dlprefiles="$dlprefiles $lib" ;;
-	esac
-      done
+   The $output program cannot be directly executed until all the libtool
+   libraries that it depends on are installed.
 
-      if test "$build_libtool_libs" = yes; then
-	if test -n "$rpath"; then
-	  case $host in
-	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
-	    # these systems don't actually have a c library (as such)!
-	    ;;
-	  *-*-rhapsody* | *-*-darwin1.[012])
-	    # Rhapsody C library is in the System framework
-	    deplibs="$deplibs -framework System"
-	    ;;
-	  *-*-netbsd*)
-	    # Don't link with libc until the a.out ld.so is fixed.
-	    ;;
-	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
-	    # Do not include libc due to us having libc/libc_r.
-	    ;;
-	  *-*-sco3.2v5* | *-*-sco5v6*)
-	    # Causes problems with __ctype
-	    ;;
-	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
-	    # Compiler inserts libc in the correct place for threads to work
-	    ;;
- 	  *)
-	    # Add libc to deplibs on all other systems if necessary.
-	    if test "$build_libtool_need_lc" = "yes"; then
-	      deplibs="$deplibs -lc"
-	    fi
-	    ;;
-	  esac
-	fi
+   This wrapper executable should never be moved out of the build directory.
+   If it is, it will not operate correctly.
 
-	# Transform deplibs into only deplibs that can be linked in shared.
-	name_save=$name
-	libname_save=$libname
-	release_save=$release
-	versuffix_save=$versuffix
-	major_save=$major
-	# I'm not sure if I'm treating the release correctly.  I think
-	# release should show up in the -l (ie -lgmp5) so we don't want to
-	# add it in twice.  Is that correct?
-	release=""
-	versuffix=""
-	major=""
-	newdeplibs=
-	droppeddeps=no
-	case $deplibs_check_method in
-	pass_all)
-	  # Don't check for shared/static.  Everything works.
-	  # This might be a little naive.  We might want to check
-	  # whether the library exists or not.  But this is on
-	  # osf3 & osf4 and I'm not really sure... Just
-	  # implementing what was already the behavior.
-	  newdeplibs=$deplibs
-	  ;;
-	test_compile)
-	  # This code stresses the "libraries are programs" paradigm to its
-	  # limits. Maybe even breaks it.  We compile a program, linking it
-	  # against the deplibs as a proxy for the library.  Then we can check
-	  # whether they linked in statically or dynamically with ldd.
-	  $rm conftest.c
-	  cat > conftest.c <<EOF
-	  int main() { return 0; }
+   Currently, it simply execs the wrapper *script* "$SHELL $output",
+   but could eventually absorb all of the scripts functionality and
+   exec $objdir/$outputname directly.
+*/
+EOF
+	    cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+#  include <io.h>
+#  define HAVE_SETENV
+#  ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+#  endif
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+#  define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+  defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+#  define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+#  define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+	(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+  if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+    va_list args;
+    va_start (args, fmt);
+    (void) vfprintf (stderr, fmt, args);
+    va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+	    func_emit_wrapper_part1 yes |
+	        $SED -e 's/\([\\"]\)/\\\1/g' \
+	             -e 's/^/  "/' -e 's/$/\\n"/'
+	    echo ";"
+	    cat <<EOF
+
+static const char *script_text_part2 =
+EOF
+	    func_emit_wrapper_part2 yes |
+	        $SED -e 's/\([\\"]\)/\\\1/g' \
+	             -e 's/^/  "/' -e 's/$/\\n"/'
+	    echo ";"
+
+	    cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+	    if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+              func_to_host_pathlist "$temp_rpath"
+	      cat <<EOF
+const char * LIB_PATH_VALUE   = "$func_to_host_pathlist_result";
 EOF
-	  $rm conftest
-      if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
-	    ldd_output=`ldd conftest`
-	    for i in $deplibs; do
-	      name=`expr $i : '-l\(.*\)'`
-	      # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" != "0"; then
-		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		  case " $predeps $postdeps " in
-		  *" $i "*)
-		    newdeplibs="$newdeplibs $i"
-		    i=""
-		    ;;
-		  esac
-	        fi
-		if test -n "$i" ; then
-		  libname=`eval \\$echo \"$libname_spec\"`
-		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		  set dummy $deplib_matches
-		  deplib_match=$2
-		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		    newdeplibs="$newdeplibs $i"
-		  else
-		    droppeddeps=yes
-		    $echo
-		    $echo "*** Warning: dynamic linker does not accept needed library $i."
-		    $echo "*** I have the capability to make that library automatically link in when"
-		    $echo "*** you link to this library.  But I can only do this if you have a"
-		    $echo "*** shared version of the library, which I believe you do not have"
-		    $echo "*** because a test_compile did reveal that the linker did not use it for"
-		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
-		  fi
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  else
-	    # Error occurred in the first compile.  Let's try to salvage
-	    # the situation: Compile a separate program for each library.
-	    for i in $deplibs; do
-	      name=`expr $i : '-l\(.*\)'`
-	      # If $name is empty we are operating on a -L argument.
-              if test "$name" != "" && test "$name" != "0"; then
-		$rm conftest
-		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
-		  ldd_output=`ldd conftest`
-		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		    case " $predeps $postdeps " in
-		    *" $i "*)
-		      newdeplibs="$newdeplibs $i"
-		      i=""
-		      ;;
-		    esac
-		  fi
-		  if test -n "$i" ; then
-		    libname=`eval \\$echo \"$libname_spec\"`
-		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
-		    set dummy $deplib_matches
-		    deplib_match=$2
-		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
-		      newdeplibs="$newdeplibs $i"
-		    else
-		      droppeddeps=yes
-		      $echo
-		      $echo "*** Warning: dynamic linker does not accept needed library $i."
-		      $echo "*** I have the capability to make that library automatically link in when"
-		      $echo "*** you link to this library.  But I can only do this if you have a"
-		      $echo "*** shared version of the library, which you do not appear to have"
-		      $echo "*** because a test_compile did reveal that the linker did not use this one"
-		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
-		    fi
-		  fi
-		else
-		  droppeddeps=yes
-		  $echo
-		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
-		  $echo "*** make it link in!  You will probably need to install it or some"
-		  $echo "*** library that it depends on before this library will be fully"
-		  $echo "*** functional.  Installing it before continuing would be even better."
-		fi
-	      else
-		newdeplibs="$newdeplibs $i"
-	      fi
-	    done
-	  fi
-	  ;;
-	file_magic*)
-	  set dummy $deplibs_check_method
-	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-	  for a_deplib in $deplibs; do
-	    name=`expr $a_deplib : '-l\(.*\)'`
-	    # If $name is empty we are operating on a -L argument.
-            if test "$name" != "" && test  "$name" != "0"; then
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		case " $predeps $postdeps " in
-		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
-		  a_deplib=""
-		  ;;
-		esac
-	      fi
-	      if test -n "$a_deplib" ; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		  for potent_lib in $potential_libs; do
-		      # Follow soft links.
-		      if ls -lLd "$potent_lib" 2>/dev/null \
-			 | grep " -> " >/dev/null; then
-			continue
-		      fi
-		      # The statement above tries to avoid entering an
-		      # endless loop below, in case of cyclic links.
-		      # We might still enter an endless loop, since a link
-		      # loop can be closed while we follow links,
-		      # but so what?
-		      potlib="$potent_lib"
-		      while test -h "$potlib" 2>/dev/null; do
-			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
-			case $potliblink in
-			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
-			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
-			esac
-		      done
-		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
-			 | ${SED} 10q \
-			 | $EGREP "$file_magic_regex" > /dev/null; then
-			newdeplibs="$newdeplibs $a_deplib"
-			a_deplib=""
-			break 2
-		      fi
-		  done
-		done
-	      fi
-	      if test -n "$a_deplib" ; then
-		droppeddeps=yes
-		$echo
-		$echo "*** Warning: linker path does not have real file for library $a_deplib."
-		$echo "*** I have the capability to make that library automatically link in when"
-		$echo "*** you link to this library.  But I can only do this if you have a"
-		$echo "*** shared version of the library, which you do not appear to have"
-		$echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
-		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
-		else
-		  $echo "*** with $libname and none of the candidates passed a file format test"
-		  $echo "*** using a file magic. Last file checked: $potlib"
-		fi
-	      fi
 	    else
-	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
+	      cat <<"EOF"
+const char * LIB_PATH_VALUE   = "";
+EOF
 	    fi
-	  done # Gone through all deplibs.
-	  ;;
-	match_pattern*)
-	  set dummy $deplibs_check_method
-	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
-	  for a_deplib in $deplibs; do
-	    name=`expr $a_deplib : '-l\(.*\)'`
-	    # If $name is empty we are operating on a -L argument.
-	    if test -n "$name" && test "$name" != "0"; then
-	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-		case " $predeps $postdeps " in
-		*" $a_deplib "*)
-		  newdeplibs="$newdeplibs $a_deplib"
-		  a_deplib=""
-		  ;;
-		esac
-	      fi
-	      if test -n "$a_deplib" ; then
-		libname=`eval \\$echo \"$libname_spec\"`
-		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
-		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
-		  for potent_lib in $potential_libs; do
-		    potlib="$potent_lib" # see symlink-check above in file_magic test
-		    if eval $echo \"$potent_lib\" 2>/dev/null \
-		        | ${SED} 10q \
-		        | $EGREP "$match_pattern_regex" > /dev/null; then
-		      newdeplibs="$newdeplibs $a_deplib"
-		      a_deplib=""
-		      break 2
-		    fi
-		  done
-		done
-	      fi
-	      if test -n "$a_deplib" ; then
-		droppeddeps=yes
-		$echo
-		$echo "*** Warning: linker path does not have real file for library $a_deplib."
-		$echo "*** I have the capability to make that library automatically link in when"
-		$echo "*** you link to this library.  But I can only do this if you have a"
-		$echo "*** shared version of the library, which you do not appear to have"
-		$echo "*** because I did check the linker path looking for a file starting"
-		if test -z "$potlib" ; then
-		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
-		else
-		  $echo "*** with $libname and none of the candidates passed a file format test"
-		  $echo "*** using a regex pattern. Last file checked: $potlib"
-		fi
-	      fi
+
+	    if test -n "$dllsearchpath"; then
+              func_to_host_pathlist "$dllsearchpath:"
+	      cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE   = "$func_to_host_pathlist_result";
+EOF
 	    else
-	      # Add a -L argument.
-	      newdeplibs="$newdeplibs $a_deplib"
+	      cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE   = "";
+EOF
 	    fi
-	  done # Gone through all deplibs.
-	  ;;
-	none | unknown | *)
-	  newdeplibs=""
-	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
-	    -e 's/ -[LR][^ ]*//g'`
-	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
-	    for i in $predeps $postdeps ; do
-	      # can't use Xsed below, because $i might contain '/'
-	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
-	    done
-	  fi
-	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
-	    | grep . >/dev/null; then
-	    $echo
-	    if test "X$deplibs_check_method" = "Xnone"; then
-	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
+
+	    if test "$fast_install" = yes; then
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
 	    else
-	      $echo "*** Warning: inter-library dependencies are not known to be supported."
+	      cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
 	    fi
-	    $echo "*** All declared inter-library dependencies are being dropped."
-	    droppeddeps=yes
-	  fi
-	  ;;
-	esac
-	versuffix=$versuffix_save
-	major=$major_save
-	release=$release_save
-	libname=$libname_save
-	name=$name_save
 
-	case $host in
-	*-*-rhapsody* | *-*-darwin1.[012])
-	  # On Rhapsody replace the C library is the System framework
-	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
-	  ;;
-	esac
 
-	if test "$droppeddeps" = yes; then
-	  if test "$module" = yes; then
-	    $echo
-	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
-	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
-	    $echo "*** a static module, that should work as long as the dlopening"
-	    $echo "*** application is linked with the -dlopen flag."
-	    if test -z "$global_symbol_pipe"; then
-	      $echo
-	      $echo "*** However, this would only work if libtool was able to extract symbol"
-	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
-	      $echo "*** not find such a program.  So, this module is probably useless."
-	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
-	    fi
-	    if test "$build_old_libs" = no; then
-	      oldlibs="$output_objdir/$libname.$libext"
-	      build_libtool_libs=module
-	      build_old_libs=yes
-	    else
-	      build_libtool_libs=no
-	    fi
-	  else
-	    $echo "*** The inter-library dependencies that have been dropped here will be"
-	    $echo "*** automatically added whenever a program is linked with this library"
-	    $echo "*** or is declared to -dlopen it."
+	    cat <<"EOF"
 
-	    if test "$allow_undefined" = no; then
-	      $echo
-	      $echo "*** Since this library must not contain undefined symbols,"
-	      $echo "*** because either the platform does not support them or"
-	      $echo "*** it was explicitly requested with -no-undefined,"
-	      $echo "*** libtool will only create a static version of it."
-	      if test "$build_old_libs" = no; then
-		oldlibs="$output_objdir/$libname.$libext"
-		build_libtool_libs=module
-		build_old_libs=yes
-	      else
-		build_libtool_libs=no
-	      fi
-	    fi
-	  fi
-	fi
-	# Done checking deplibs!
-	deplibs=$newdeplibs
-      fi
+#define LTWRAPPER_OPTION_PREFIX         "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH  5
 
+static const size_t opt_prefix_len         = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
 
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-	case " $new_libs " in
-	*" -L$path/$objdir "*) ;;
-	*)
-	  case " $deplibs " in
-	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
-	  esac
-	  ;;
-	esac
-      done
-      for deplib in $deplibs; do
-	case $deplib in
-	-L*)
-	  case " $new_libs " in
-	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
-	  esac
-	  ;;
-	*) new_libs="$new_libs $deplib" ;;
-	esac
-      done
-      deplibs="$new_libs"
+static const char *dumpscript_opt       = LTWRAPPER_OPTION_PREFIX "dump-script";
 
+static const size_t env_set_opt_len     = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt          = LTWRAPPER_OPTION_PREFIX "env-set";
+  /* argument is putenv-style "foo=bar", value of foo is set to bar */
 
-      # All the library-specific variables (install_libdir is set above).
-      library_names=
-      old_library=
-      dlname=
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt      = LTWRAPPER_OPTION_PREFIX "env-prepend";
+  /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
 
-      # Test again, we may have decided not to build it any more
-      if test "$build_libtool_libs" = yes; then
-	if test "$hardcode_into_libs" = yes; then
-	  # Hardcode the library paths
-	  hardcode_libdirs=
-	  dep_rpath=
-	  rpath="$finalize_rpath"
-	  test "$mode" != relink && rpath="$compile_rpath$rpath"
-	  for libdir in $rpath; do
-	    if test -n "$hardcode_libdir_flag_spec"; then
-	      if test -n "$hardcode_libdir_separator"; then
-		if test -z "$hardcode_libdirs"; then
-		  hardcode_libdirs="$libdir"
-		else
-		  # Just accumulate the unique libdirs.
-		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		    ;;
-		  *)
-		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		    ;;
-		  esac
-		fi
-	      else
-		eval flag=\"$hardcode_libdir_flag_spec\"
-		dep_rpath="$dep_rpath $flag"
-	      fi
-	    elif test -n "$runpath_var"; then
-	      case "$perm_rpath " in
-	      *" $libdir "*) ;;
-	      *) perm_rpath="$perm_rpath $libdir" ;;
-	      esac
-	    fi
-	  done
-	  # Substitute the hardcoded libdirs into the rpath.
-	  if test -n "$hardcode_libdir_separator" &&
-	     test -n "$hardcode_libdirs"; then
-	    libdir="$hardcode_libdirs"
-	    if test -n "$hardcode_libdir_flag_spec_ld"; then
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
-	    else
-	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
-	    fi
-	  fi
-	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
-	    # We should set the runpath_var.
-	    rpath=
-	    for dir in $perm_rpath; do
-	      rpath="$rpath$dir:"
-	    done
-	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
-	  fi
-	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
-	fi
+static const size_t env_append_opt_len  = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt       = LTWRAPPER_OPTION_PREFIX "env-append";
+  /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
 
-	shlibpath="$finalize_shlibpath"
-	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
-	if test -n "$shlibpath"; then
-	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
-	fi
+int
+main (int argc, char *argv[])
+{
+  char **newargz;
+  int  newargc;
+  char *tmp_pathspec;
+  char *actual_cwrapper_path;
+  char *actual_cwrapper_name;
+  char *target_name;
+  char *lt_argv_zero;
+  intptr_t rval = 127;
 
-	# Get the real and link names of the library.
-	eval shared_ext=\"$shrext_cmds\"
-	eval library_names=\"$library_names_spec\"
-	set dummy $library_names
-	realname="$2"
-	shift; shift
+  int i;
 
-	if test -n "$soname_spec"; then
-	  eval soname=\"$soname_spec\"
-	else
-	  soname="$realname"
-	fi
-	if test -z "$dlname"; then
-	  dlname=$soname
-	fi
+  program_name = (char *) xstrdup (base_name (argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
+  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
 
-	lib="$output_objdir/$realname"
-	linknames=
-	for link
-	do
-	  linknames="$linknames $link"
-	done
+  /* very simple arg parsing; don't want to rely on getopt */
+  for (i = 1; i < argc; i++)
+    {
+      if (strcmp (argv[i], dumpscript_opt) == 0)
+	{
+EOF
+	    case "$host" in
+	      *mingw* | *cygwin* )
+		# make stdout use "unix" line endings
+		echo "          setmode(1,_O_BINARY);"
+		;;
+	      esac
 
-	# Use standard objects if they are pic
-	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	    cat <<"EOF"
+	  printf ("%s", script_text_part1);
+	  printf ("%s", script_text_part2);
+	  return 0;
+	}
+    }
 
-	# Prepare the list of exported symbols
-	if test -z "$export_symbols"; then
-	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
-	    $show "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
-	    $run $rm $export_symbols
-	    cmds=$export_symbols_cmds
-	    save_ifs="$IFS"; IFS='~'
-	    for cmd in $cmds; do
-	      IFS="$save_ifs"
-	      eval cmd=\"$cmd\"
-	      if len=`expr "X$cmd" : ".*"` &&
-	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	        $show "$cmd"
-	        $run eval "$cmd" || exit $?
-	        skipped_export=false
-	      else
-	        # The command line is too long to execute in one step.
-	        $show "using reloadable object file for export list..."
-	        skipped_export=:
-		# Break out early, otherwise skipped_export may be
-		# set to false by a later but shorter cmd.
-		break
-	      fi
-	    done
-	    IFS="$save_ifs"
-	    if test -n "$export_symbols_regex"; then
-	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
-	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
-	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
-	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
-	    fi
-	  fi
-	fi
+  newargz = XMALLOC (char *, argc + 1);
+  tmp_pathspec = find_executable (argv[0]);
+  if (tmp_pathspec == NULL)
+    lt_fatal ("Couldn't find %s", argv[0]);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+			  tmp_pathspec));
+
+  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+			  actual_cwrapper_path));
+  XFREE (tmp_pathspec);
+
+  actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+  strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+  /* wrapper name transforms */
+  strendzap (actual_cwrapper_name, ".exe");
+  tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+  XFREE (actual_cwrapper_name);
+  actual_cwrapper_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  /* target_name transforms -- use actual target program name; might have lt- prefix */
+  target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+  strendzap (target_name, ".exe");
+  tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+  XFREE (target_name);
+  target_name = tmp_pathspec;
+  tmp_pathspec = 0;
+
+  LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+			  target_name));
+EOF
 
-	if test -n "$export_symbols" && test -n "$include_expsyms"; then
-	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
-	fi
+	    cat <<EOF
+  newargz[0] =
+    XMALLOC (char, (strlen (actual_cwrapper_path) +
+		    strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+  strcpy (newargz[0], actual_cwrapper_path);
+  strcat (newargz[0], "$objdir");
+  strcat (newargz[0], "/");
+EOF
 
-	tmp_deplibs=
-	for test_deplib in $deplibs; do
-		case " $convenience " in
-		*" $test_deplib "*) ;;
-		*)
-			tmp_deplibs="$tmp_deplibs $test_deplib"
-			;;
-		esac
-	done
-	deplibs="$tmp_deplibs"
+	    cat <<"EOF"
+  /* stop here, and copy so we don't have to do this twice */
+  tmp_pathspec = xstrdup (newargz[0]);
 
-	if test -n "$convenience"; then
-	  if test -n "$whole_archive_flag_spec"; then
-	    save_libobjs=$libobjs
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-	  else
-	    gentop="$output_objdir/${outputname}x"
-	    generated="$generated $gentop"
+  /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+  strcat (newargz[0], actual_cwrapper_name);
 
-	    func_extract_archives $gentop $convenience
-	    libobjs="$libobjs $func_extract_archives_result"
-	  fi
-	fi
-	
-	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
-	  eval flag=\"$thread_safe_flag_spec\"
-	  linker_flags="$linker_flags $flag"
-	fi
+  /* DO want the lt- prefix here if it exists, so use target_name */
+  lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+  XFREE (tmp_pathspec);
+  tmp_pathspec = NULL;
+EOF
 
-	# Make a backup of the uninstalled library when relinking
-	if test "$mode" = relink; then
-	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
-	fi
+	    case $host_os in
+	      mingw*)
+	    cat <<"EOF"
+  {
+    char* p;
+    while ((p = strchr (newargz[0], '\\')) != NULL)
+      {
+	*p = '/';
+      }
+    while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+      {
+	*p = '/';
+      }
+  }
+EOF
+	    ;;
+	    esac
 
-	# Do each of the archive commands.
-	if test "$module" = yes && test -n "$module_cmds" ; then
-	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-	    eval test_cmds=\"$module_expsym_cmds\"
-	    cmds=$module_expsym_cmds
-	  else
-	    eval test_cmds=\"$module_cmds\"
-	    cmds=$module_cmds
-	  fi
-	else
-	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	  eval test_cmds=\"$archive_expsym_cmds\"
-	  cmds=$archive_expsym_cmds
-	else
-	  eval test_cmds=\"$archive_cmds\"
-	  cmds=$archive_cmds
-	  fi
-	fi
+	    cat <<"EOF"
+  XFREE (target_name);
+  XFREE (actual_cwrapper_path);
+  XFREE (actual_cwrapper_name);
 
-	if test "X$skipped_export" != "X:" &&
-	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	  :
-	else
-	  # The command line is too long to link in one step, link piecewise.
-	  $echo "creating reloadable object files..."
+  lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+  lt_setenv ("DUALCASE", "1");  /* for MSK sh */
+  lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+  lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
 
-	  # Save the value of $output and $libobjs because we want to
-	  # use them later.  If we have whole_archive_flag_spec, we
-	  # want to use save_libobjs as it was before
-	  # whole_archive_flag_spec was expanded, because we can't
-	  # assume the linker understands whole_archive_flag_spec.
-	  # This may have to be revisited, in case too many
-	  # convenience libraries get linked in and end up exceeding
-	  # the spec.
-	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
-	    save_libobjs=$libobjs
-	  fi
-	  save_output=$output
-	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
+  newargc=0;
+  for (i = 1; i < argc; i++)
+    {
+      if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+        {
+          if (argv[i][env_set_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_set_opt_len + 1;
+              lt_opt_process_env_set (p);
+            }
+          else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_set (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_set_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+        {
+          if (argv[i][env_prepend_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_prepend_opt_len + 1;
+              lt_opt_process_env_prepend (p);
+            }
+          else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_prepend_opt);
+          continue;
+        }
+      if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+        {
+          if (argv[i][env_append_opt_len] == '=')
+            {
+              const char *p = argv[i] + env_append_opt_len + 1;
+              lt_opt_process_env_append (p);
+            }
+          else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+            {
+              lt_opt_process_env_append (argv[++i]); /* don't copy */
+            }
+          else
+            lt_fatal ("%s missing required argument", env_append_opt);
+          continue;
+        }
+      if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+        {
+          /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+             namespace, but it is not one of the ones we know about and
+             have already dealt with, above (inluding dump-script), then
+             report an error. Otherwise, targets might begin to believe
+             they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+             namespace. The first time any user complains about this, we'll
+             need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+             or a configure.ac-settable value.
+           */
+          lt_fatal ("Unrecognized option in %s namespace: '%s'",
+                    ltwrapper_option_prefix, argv[i]);
+        }
+      /* otherwise ... */
+      newargz[++newargc] = xstrdup (argv[i]);
+    }
+  newargz[++newargc] = NULL;
 
-	  # Clear the reloadable object creation command queue and
-	  # initialize k to one.
-	  test_cmds=
-	  concat_cmds=
-	  objlist=
-	  delfiles=
-	  last_robj=
-	  k=1
-	  output=$output_objdir/$output_la-${k}.$objext
-	  # Loop over the list of objects to be linked.
-	  for obj in $save_libobjs
-	  do
-	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
-	    if test "X$objlist" = X ||
-	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-		 test "$len" -le "$max_cmd_len"; }; then
-	      objlist="$objlist $obj"
-	    else
-	      # The command $test_cmds is almost too long, add a
-	      # command to the queue.
-	      if test "$k" -eq 1 ; then
-		# The first file doesn't have a previous command to add.
-		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
-	      else
-		# All subsequent reloadable object files will link in
-		# the last one created.
-		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
-	      fi
-	      last_robj=$output_objdir/$output_la-${k}.$objext
-	      k=`expr $k + 1`
-	      output=$output_objdir/$output_la-${k}.$objext
-	      objlist=$obj
-	      len=1
-	    fi
-	  done
-	  # Handle the remaining objects by creating one last
-	  # reloadable object file.  All subsequent reloadable object
-	  # files will link in the last one created.
-	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
-
-	  if ${skipped_export-false}; then
-	    $show "generating symbol list for \`$libname.la'"
-	    export_symbols="$output_objdir/$libname.exp"
-	    $run $rm $export_symbols
-	    libobjs=$output
-	    # Append the command to create the export file.
-	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
-          fi
-
-	  # Set up a command to remove the reloadable object files
-	  # after they are used.
-	  i=0
-	  while test "$i" -lt "$k"
-	  do
-	    i=`expr $i + 1`
-	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
-	  done
+  LTWRAPPER_DEBUGPRINTF     (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+  for (i = 0; i < newargc; i++)
+    {
+      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+    }
 
-	  $echo "creating a temporary reloadable object file: $output"
+EOF
 
-	  # Loop through the commands generated above and execute them.
-	  save_ifs="$IFS"; IFS='~'
-	  for cmd in $concat_cmds; do
-	    IFS="$save_ifs"
-	    $show "$cmd"
-	    $run eval "$cmd" || exit $?
-	  done
-	  IFS="$save_ifs"
+	    case $host_os in
+	      mingw*)
+		cat <<"EOF"
+  /* execv doesn't actually work on mingw as expected on unix */
+  rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+  if (rval == -1)
+    {
+      /* failed to start process */
+      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+      return 127;
+    }
+  return rval;
+EOF
+		;;
+	      *)
+		cat <<"EOF"
+  execv (lt_argv_zero, newargz);
+  return rval; /* =127, but avoids unused variable warning */
+EOF
+		;;
+	    esac
 
-	  libobjs=$output
-	  # Restore the value of output.
-	  output=$save_output
+	    cat <<"EOF"
+}
 
-	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
-	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
-	  fi
-	  # Expand the library linking commands again to reset the
-	  # value of $libobjs for piecewise linking.
-
-	  # Do each of the archive commands.
-	  if test "$module" = yes && test -n "$module_cmds" ; then
-	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
-	      cmds=$module_expsym_cmds
-	    else
-	      cmds=$module_cmds
-	    fi
-	  else
-	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
-	    cmds=$archive_expsym_cmds
-	  else
-	    cmds=$archive_cmds
-	    fi
-	  fi
-
-	  # Append the command to remove the reloadable object files
-	  # to the just-reset $cmds.
-	  eval cmds=\"\$cmds~\$rm $delfiles\"
-	fi
-	save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  eval cmd=\"$cmd\"
-	  $show "$cmd"
-	  $run eval "$cmd" || {
-	    lt_exit=$?
+void *
+xmalloc (size_t num)
+{
+  void *p = (void *) malloc (num);
+  if (!p)
+    lt_fatal ("Memory exhausted");
 
-	    # Restore the uninstalled library and exit
-	    if test "$mode" = relink; then
-	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
-	    fi
+  return p;
+}
 
-	    exit $lt_exit
-	  }
-	done
-	IFS="$save_ifs"
+char *
+xstrdup (const char *string)
+{
+  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+			  string) : NULL;
+}
 
-	# Restore the uninstalled library and exit
-	if test "$mode" = relink; then
-	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+const char *
+base_name (const char *name)
+{
+  const char *base;
 
-	  if test -n "$convenience"; then
-	    if test -z "$whole_archive_flag_spec"; then
-	      $show "${rm}r $gentop"
-	      $run ${rm}r "$gentop"
-	    fi
-	  fi
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  /* Skip over the disk name in MSDOS pathnames. */
+  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+    name += 2;
+#endif
 
-	  exit $EXIT_SUCCESS
-	fi
+  for (base = name; *name; name++)
+    if (IS_DIR_SEPARATOR (*name))
+      base = name + 1;
+  return base;
+}
 
-	# Create links to the real library.
-	for linkname in $linknames; do
-	  if test "$realname" != "$linkname"; then
-	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
-	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
-	  fi
-	done
+int
+check_executable (const char *path)
+{
+  struct stat st;
 
-	# If -module or -export-dynamic was specified, set the dlname.
-	if test "$module" = yes || test "$export_dynamic" = yes; then
-	  # On all known operating systems, these are identical.
-	  dlname="$soname"
-	fi
-      fi
-      ;;
+  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
 
-    obj)
-      if test -n "$deplibs"; then
-	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
-      fi
+  if ((stat (path, &st) >= 0)
+      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+    return 1;
+  else
+    return 0;
+}
 
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
-      fi
+int
+make_executable (const char *path)
+{
+  int rval = 0;
+  struct stat st;
 
-      if test -n "$rpath"; then
-	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
-      fi
+  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
+			  path ? (*path ? path : "EMPTY!") : "NULL!"));
+  if ((!path) || (!*path))
+    return 0;
 
-      if test -n "$xrpath"; then
-	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
-      fi
+  if (stat (path, &st) >= 0)
+    {
+      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+    }
+  return rval;
+}
 
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
-      fi
+/* Searches for the full path of the wrapper.  Returns
+   newly allocated full path name if found, NULL otherwise
+   Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+  int has_slash = 0;
+  const char *p;
+  const char *p_next;
+  /* static buffer for getcwd */
+  char tmp[LT_PATHMAX + 1];
+  int tmp_len;
+  char *concat_name;
 
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
-      fi
+  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
+			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
 
-      case $output in
-      *.lo)
-	if test -n "$objs$old_deplibs"; then
-	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-	libobj="$output"
-	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
-	;;
-      *)
-	libobj=
-	obj="$output"
-	;;
-      esac
+  if ((wrapper == NULL) || (*wrapper == '\0'))
+    return NULL;
 
-      # Delete the old objects.
-      $run $rm $obj $libobj
+  /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+    {
+      concat_name = xstrdup (wrapper);
+      if (check_executable (concat_name))
+	return concat_name;
+      XFREE (concat_name);
+    }
+  else
+    {
+#endif
+      if (IS_DIR_SEPARATOR (wrapper[0]))
+	{
+	  concat_name = xstrdup (wrapper);
+	  if (check_executable (concat_name))
+	    return concat_name;
+	  XFREE (concat_name);
+	}
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+    }
+#endif
 
-      # Objects from convenience libraries.  This assumes
-      # single-version convenience libraries.  Whenever we create
-      # different ones for PIC/non-PIC, this we'll have to duplicate
-      # the extraction.
-      reload_conv_objs=
-      gentop=
-      # reload_cmds runs $LD directly, so let us get rid of
-      # -Wl from whole_archive_flag_spec and hope we can get by with
-      # turning comma into space..
-      wl=
+  for (p = wrapper; *p; p++)
+    if (*p == '/')
+      {
+	has_slash = 1;
+	break;
+      }
+  if (!has_slash)
+    {
+      /* no slashes; search PATH */
+      const char *path = getenv ("PATH");
+      if (path != NULL)
+	{
+	  for (p = path; *p; p = p_next)
+	    {
+	      const char *q;
+	      size_t p_len;
+	      for (q = p; *q; q++)
+		if (IS_PATH_SEPARATOR (*q))
+		  break;
+	      p_len = q - p;
+	      p_next = (*q == '\0' ? q : q + 1);
+	      if (p_len == 0)
+		{
+		  /* empty path: current directory */
+		  if (getcwd (tmp, LT_PATHMAX) == NULL)
+		    lt_fatal ("getcwd failed");
+		  tmp_len = strlen (tmp);
+		  concat_name =
+		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, tmp, tmp_len);
+		  concat_name[tmp_len] = '/';
+		  strcpy (concat_name + tmp_len + 1, wrapper);
+		}
+	      else
+		{
+		  concat_name =
+		    XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+		  memcpy (concat_name, p, p_len);
+		  concat_name[p_len] = '/';
+		  strcpy (concat_name + p_len + 1, wrapper);
+		}
+	      if (check_executable (concat_name))
+		return concat_name;
+	      XFREE (concat_name);
+	    }
+	}
+      /* not found in PATH; assume curdir */
+    }
+  /* Relative path | not found in path: prepend cwd */
+  if (getcwd (tmp, LT_PATHMAX) == NULL)
+    lt_fatal ("getcwd failed");
+  tmp_len = strlen (tmp);
+  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+  memcpy (concat_name, tmp, tmp_len);
+  concat_name[tmp_len] = '/';
+  strcpy (concat_name + tmp_len + 1, wrapper);
 
-      if test -n "$convenience"; then
-	if test -n "$whole_archive_flag_spec"; then
-	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
-      reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
-	else
-	  gentop="$output_objdir/${obj}x"
-	  generated="$generated $gentop"
+  if (check_executable (concat_name))
+    return concat_name;
+  XFREE (concat_name);
+  return NULL;
+}
 
-	  func_extract_archives $gentop $convenience
-	  reload_conv_objs="$reload_objs $func_extract_archives_result"
-	fi
-      fi
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+  return xstrdup (pathspec);
+#else
+  char buf[LT_PATHMAX];
+  struct stat s;
+  char *tmp_pathspec = xstrdup (pathspec);
+  char *p;
+  int has_symlinks = 0;
+  while (strlen (tmp_pathspec) && !has_symlinks)
+    {
+      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+			      tmp_pathspec));
+      if (lstat (tmp_pathspec, &s) == 0)
+	{
+	  if (S_ISLNK (s.st_mode) != 0)
+	    {
+	      has_symlinks = 1;
+	      break;
+	    }
 
-      # Create the old-style object.
-      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+	  /* search backwards for last DIR_SEPARATOR */
+	  p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+	  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    p--;
+	  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+	    {
+	      /* no more DIR_SEPARATORS left */
+	      break;
+	    }
+	  *p = '\0';
+	}
+      else
+	{
+	  char *errstr = strerror (errno);
+	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+	}
+    }
+  XFREE (tmp_pathspec);
 
-      output="$obj"
-      cmds=$reload_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	eval cmd=\"$cmd\"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
+  if (!has_symlinks)
+    {
+      return xstrdup (pathspec);
+    }
 
-      # Exit if we aren't doing a library object file.
-      if test -z "$libobj"; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
+  tmp_pathspec = realpath (pathspec, buf);
+  if (tmp_pathspec == 0)
+    {
+      lt_fatal ("Could not follow symlinks for %s", pathspec);
+    }
+  return xstrdup (tmp_pathspec);
+#endif
+}
 
-	exit $EXIT_SUCCESS
-      fi
+char *
+strendzap (char *str, const char *pat)
+{
+  size_t len, patlen;
 
-      if test "$build_libtool_libs" != yes; then
-	if test -n "$gentop"; then
-	  $show "${rm}r $gentop"
-	  $run ${rm}r $gentop
-	fi
+  assert (str != NULL);
+  assert (pat != NULL);
 
-	# Create an invalid libtool object if no PIC, so that we don't
-	# accidentally link it into a program.
-	# $show "echo timestamp > $libobj"
-	# $run eval "echo timestamp > $libobj" || exit $?
-	exit $EXIT_SUCCESS
-      fi
+  len = strlen (str);
+  patlen = strlen (pat);
 
-      if test -n "$pic_flag" || test "$pic_mode" != default; then
-	# Only do commands if we really have different PIC objects.
-	reload_objs="$libobjs $reload_conv_objs"
-	output="$libobj"
-	cmds=$reload_cmds
-	save_ifs="$IFS"; IFS='~'
-	for cmd in $cmds; do
-	  IFS="$save_ifs"
-	  eval cmd=\"$cmd\"
-	  $show "$cmd"
-	  $run eval "$cmd" || exit $?
-	done
-	IFS="$save_ifs"
-      fi
+  if (patlen <= len)
+    {
+      str += len - patlen;
+      if (strcmp (str, pat) == 0)
+	*str = '\0';
+    }
+  return str;
+}
 
-      if test -n "$gentop"; then
-	$show "${rm}r $gentop"
-	$run ${rm}r $gentop
-      fi
+static void
+lt_error_core (int exit_status, const char *mode,
+	       const char *message, va_list ap)
+{
+  fprintf (stderr, "%s: %s: ", program_name, mode);
+  vfprintf (stderr, message, ap);
+  fprintf (stderr, ".\n");
 
-      exit $EXIT_SUCCESS
-      ;;
+  if (exit_status >= 0)
+    exit (exit_status);
+}
 
-    prog)
-      case $host in
-	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
-      esac
-      if test -n "$vinfo"; then
-	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
-      fi
+void
+lt_fatal (const char *message, ...)
+{
+  va_list ap;
+  va_start (ap, message);
+  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+  va_end (ap);
+}
 
-      if test -n "$release"; then
-	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
-      fi
+void
+lt_setenv (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
+  {
+#ifdef HAVE_SETENV
+    /* always make a copy, for consistency with !HAVE_SETENV */
+    char *str = xstrdup (value);
+    setenv (name, str, 1);
+#else
+    int len = strlen (name) + 1 + strlen (value) + 1;
+    char *str = XMALLOC (char, len);
+    sprintf (str, "%s=%s", name, value);
+    if (putenv (str) != EXIT_SUCCESS)
+      {
+        XFREE (str);
+      }
+#endif
+  }
+}
 
-      if test "$preload" = yes; then
-	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
-	   test "$dlopen_self_static" = unknown; then
-	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
-	fi
-      fi
-
-      case $host in
-      *-*-rhapsody* | *-*-darwin1.[012])
-	# On Rhapsody replace the C library is the System framework
-	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
-	;;
-      esac
-
-      case $host in
-      *darwin*)
-        # Don't allow lazy linking, it breaks C++ global constructors
-        if test "$tagname" = CXX ; then
-        compile_command="$compile_command ${wl}-bind_at_load"
-        finalize_command="$finalize_command ${wl}-bind_at_load"
-        fi
-        ;;
-      esac
-
-
-      # move library search paths that coincide with paths to not yet
-      # installed libraries to the beginning of the library search list
-      new_libs=
-      for path in $notinst_path; do
-	case " $new_libs " in
-	*" -L$path/$objdir "*) ;;
-	*)
-	  case " $compile_deplibs " in
-	  *" -L$path/$objdir "*)
-	    new_libs="$new_libs -L$path/$objdir" ;;
-	  esac
-	  ;;
-	esac
-      done
-      for deplib in $compile_deplibs; do
-	case $deplib in
-	-L*)
-	  case " $new_libs " in
-	  *" $deplib "*) ;;
-	  *) new_libs="$new_libs $deplib" ;;
-	  esac
-	  ;;
-	*) new_libs="$new_libs $deplib" ;;
-	esac
-      done
-      compile_deplibs="$new_libs"
-
-
-      compile_command="$compile_command $compile_deplibs"
-      finalize_command="$finalize_command $finalize_deplibs"
-
-      if test -n "$rpath$xrpath"; then
-	# If the user specified any rpath flags, then add them.
-	for libdir in $rpath $xrpath; do
-	  # This is the magic to use -rpath.
-	  case "$finalize_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_rpath="$finalize_rpath $libdir" ;;
-	  esac
-	done
-      fi
-
-      # Now hardcode the library paths
-      rpath=
-      hardcode_libdirs=
-      for libdir in $compile_rpath $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) perm_rpath="$perm_rpath $libdir" ;;
-	  esac
-	fi
-	case $host in
-	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
-	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
-	  case :$dllsearchpath: in
-	  *":$libdir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$libdir";;
-	  esac
-	  case :$dllsearchpath: in
-	  *":$testbindir:"*) ;;
-	  *) dllsearchpath="$dllsearchpath:$testbindir";;
-	  esac
-	  ;;
-	esac
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      compile_rpath="$rpath"
-
-      rpath=
-      hardcode_libdirs=
-      for libdir in $finalize_rpath; do
-	if test -n "$hardcode_libdir_flag_spec"; then
-	  if test -n "$hardcode_libdir_separator"; then
-	    if test -z "$hardcode_libdirs"; then
-	      hardcode_libdirs="$libdir"
-	    else
-	      # Just accumulate the unique libdirs.
-	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
-	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
-		;;
-	      *)
-		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
-		;;
-	      esac
-	    fi
-	  else
-	    eval flag=\"$hardcode_libdir_flag_spec\"
-	    rpath="$rpath $flag"
-	  fi
-	elif test -n "$runpath_var"; then
-	  case "$finalize_perm_rpath " in
-	  *" $libdir "*) ;;
-	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
-	  esac
-	fi
-      done
-      # Substitute the hardcoded libdirs into the rpath.
-      if test -n "$hardcode_libdir_separator" &&
-	 test -n "$hardcode_libdirs"; then
-	libdir="$hardcode_libdirs"
-	eval rpath=\" $hardcode_libdir_flag_spec\"
-      fi
-      finalize_rpath="$rpath"
-
-      if test -n "$libobjs" && test "$build_old_libs" = yes; then
-	# Transform all the library objects into standard objects.
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-      fi
-
-      dlsyms=
-      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
-	if test -n "$NM" && test -n "$global_symbol_pipe"; then
-	  dlsyms="${outputname}S.c"
-	else
-	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
-	fi
-      fi
-
-      if test -n "$dlsyms"; then
-	case $dlsyms in
-	"") ;;
-	*.c)
-	  # Discover the nlist of each of the dlfiles.
-	  nlist="$output_objdir/${outputname}.nm"
-
-	  $show "$rm $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
-
-	  # Parse the name list into a source file.
-	  $show "creating $output_objdir/$dlsyms"
-
-	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
-/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
-/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* Prevent the only kind of declaration conflicts we can make. */
-#define lt_preloaded_symbols some_other_symbol
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+  char *new_value;
+  if (orig_value && *orig_value)
+    {
+      int orig_value_len = strlen (orig_value);
+      int add_len = strlen (add);
+      new_value = XMALLOC (char, add_len + orig_value_len + 1);
+      if (to_end)
+        {
+          strcpy (new_value, orig_value);
+          strcpy (new_value + orig_value_len, add);
+        }
+      else
+        {
+          strcpy (new_value, add);
+          strcpy (new_value + add_len, orig_value);
+        }
+    }
+  else
+    {
+      new_value = xstrdup (add);
+    }
+  return new_value;
+}
 
-/* External symbol declarations for the compiler. */\
-"
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+  const char *p;
+  int len;
+  if (!arg || !*arg)
+    return 1;
 
-	  if test "$dlself" = yes; then
-	    $show "generating symbol list for \`$output'"
+  p = strchr (arg, (int)'=');
 
-	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+  if (!p)
+    return 1;
 
-	    # Add our own program objects to the symbol list.
-	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
-	    for arg in $progfiles; do
-	      $show "extracting global C symbols from \`$arg'"
-	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	    done
+  *value = xstrdup (++p);
 
-	    if test -n "$exclude_expsyms"; then
-	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
+  len = strlen (arg) - strlen (*value);
+  *name = XMALLOC (char, len);
+  strncpy (*name, arg, len-1);
+  (*name)[len - 1] = '\0';
 
-	    if test -n "$export_symbols_regex"; then
-	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
-	      $run eval '$mv "$nlist"T "$nlist"'
-	    fi
+  return 0;
+}
 
-	    # Prepare the list of exported symbols
-	    if test -z "$export_symbols"; then
-	      export_symbols="$output_objdir/$outputname.exp"
-	      $run $rm $export_symbols
-	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
-              case $host in
-              *cygwin* | *mingw* )
-	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
-                ;;
-              esac
-	    else
-	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
-	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
-	      $run eval 'mv "$nlist"T "$nlist"'
-              case $host in
-              *cygwin* | *mingw* )
-	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
-		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
-                ;;
-              esac
-	    fi
-	  fi
+void
+lt_opt_process_env_set (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
 
-	  for arg in $dlprefiles; do
-	    $show "extracting global C symbols from \`$arg'"
-	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
-	    $run eval '$echo ": $name " >> "$nlist"'
-	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
-	  done
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+    }
 
-	  if test -z "$run"; then
-	    # Make sure we have at least an empty file.
-	    test -f "$nlist" || : > "$nlist"
+  lt_setenv (name, value);
+  XFREE (name);
+  XFREE (value);
+}
 
-	    if test -n "$exclude_expsyms"; then
-	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
-	      $mv "$nlist"T "$nlist"
-	    fi
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
 
-	    # Try sorting and uniquifying the output.
-	    if grep -v "^: " < "$nlist" |
-		if sort -k 3 </dev/null >/dev/null 2>&1; then
-		  sort -k 3
-		else
-		  sort +2
-		fi |
-		uniq > "$nlist"S; then
-	      :
-	    else
-	      grep -v "^: " < "$nlist" > "$nlist"S
-	    fi
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+    }
 
-	    if test -f "$nlist"S; then
-	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
-	    else
-	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
-	    fi
+  new_value = lt_extend_str (getenv (name), value, 0);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
 
-	    $echo >> "$output_objdir/$dlsyms" "\
+void
+lt_opt_process_env_append (const char *arg)
+{
+  char *name = NULL;
+  char *value = NULL;
+  char *new_value = NULL;
 
-#undef lt_preloaded_symbols
+  if (lt_split_name_value (arg, &name, &value) != 0)
+    {
+      XFREE (name);
+      XFREE (value);
+      lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+    }
 
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
+  new_value = lt_extend_str (getenv (name), value, 1);
+  lt_setenv (name, new_value);
+  XFREE (new_value);
+  XFREE (name);
+  XFREE (value);
+}
 
-/* The mapping between symbol names and symbols. */
-"
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
 
-	    case $host in
-	    *cygwin* | *mingw* )
-	  $echo >> "$output_objdir/$dlsyms" "\
-/* DATA imports from DLLs on WIN32 can't be const, because
-   runtime relocations are performed -- see ld's documentation
-   on pseudo-relocs */
-struct {
-"
-	      ;;
-	    * )
-	  $echo >> "$output_objdir/$dlsyms" "\
-const struct {
-"
-	      ;;
-	    esac
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      /* some systems can't cope with a ':'-terminated path #' */
+      int len = strlen (new_value);
+      while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+        {
+          new_value[len-1] = '\0';
+        }
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
+}
 
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+  LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+                          (name ? name : "<NULL>"),
+                          (value ? value : "<NULL>")));
 
-	  $echo >> "$output_objdir/$dlsyms" "\
-  const char *name;
-  lt_ptr address;
+  if (name && *name && value && *value)
+    {
+      char *new_value = lt_extend_str (getenv (name), value, 0);
+      lt_setenv (name, new_value);
+      XFREE (new_value);
+    }
 }
-lt_preloaded_symbols[] =
-{\
-"
 
-	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
-
-	    $echo >> "$output_objdir/$dlsyms" "\
-  {0, (lt_ptr) 0}
-};
 
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
-  return lt_preloaded_symbols;
+EOF
 }
-#endif
+# end: func_emit_cwrapperexe_src
 
-#ifdef __cplusplus
-}
-#endif\
-"
-	  fi
+# func_mode_link arg...
+func_mode_link ()
+{
+    $opt_debug
+    case $host in
+    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+      # It is impossible to link a dll without this setting, and
+      # we shouldn't force the makefile maintainer to figure out
+      # which system we are compiling for in order to pass an extra
+      # flag for every libtool invocation.
+      # allow_undefined=no
 
-	  pic_flag_for_symtable=
-	  case $host in
-	  # compiling the symbol table file with pic_flag works around
-	  # a FreeBSD bug that causes programs to crash when -lm is
-	  # linked before any other PIC object.  But we must not use
-	  # pic_flag when linking with -static.  The problem exists in
-	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
-	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
-	    esac;;
-	  *-*-hpux*)
-	    case "$compile_command " in
-	    *" -static "*) ;;
-	    *) pic_flag_for_symtable=" $pic_flag";;
-	    esac
-	  esac
+      # FIXME: Unfortunately, there are problems with the above when trying
+      # to make a dll which has undefined symbols, in which case not
+      # even a static library is built.  For now, we need to specify
+      # -no-undefined on the libtool link line when we can be certain
+      # that all symbols are satisfied, otherwise we get a static library.
+      allow_undefined=yes
+      ;;
+    *)
+      allow_undefined=yes
+      ;;
+    esac
+    libtool_args=$nonopt
+    base_compile="$nonopt $@"
+    compile_command=$nonopt
+    finalize_command=$nonopt
 
-	  # Now compile the dynamic symbol file.
-	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
-	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+    compile_rpath=
+    finalize_rpath=
+    compile_shlibpath=
+    finalize_shlibpath=
+    convenience=
+    old_convenience=
+    deplibs=
+    old_deplibs=
+    compiler_flags=
+    linker_flags=
+    dllsearchpath=
+    lib_search_path=`pwd`
+    inst_prefix_dir=
+    new_inherited_linker_flags=
 
-	  # Clean up the generated files.
-	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
-	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+    avoid_version=no
+    dlfiles=
+    dlprefiles=
+    dlself=no
+    export_dynamic=no
+    export_symbols=
+    export_symbols_regex=
+    generated=
+    libobjs=
+    ltlibs=
+    module=no
+    no_install=no
+    objs=
+    non_pic_objects=
+    precious_files_regex=
+    prefer_static_libs=no
+    preload=no
+    prev=
+    prevarg=
+    release=
+    rpath=
+    xrpath=
+    perm_rpath=
+    temp_rpath=
+    thread_safe=no
+    vinfo=
+    vinfo_number=no
+    weak_libs=
+    single_module="${wl}-single_module"
+    func_infer_tag $base_compile
 
-	  # Transform the symbol file into the correct name.
-          case $host in
-          *cygwin* | *mingw* )
-            if test -f "$output_objdir/${outputname}.def" ; then
-              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
-              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
-            else
-              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-             fi
-            ;;
-          * )
-            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
-            ;;
-          esac
+    # We need to know -static, to get the right output filenames.
+    for arg
+    do
+      case $arg in
+      -shared)
+	test "$build_libtool_libs" != yes && \
+	  func_fatal_configuration "can not build a shared library"
+	build_old_libs=no
+	break
+	;;
+      -all-static | -static | -static-libtool-libs)
+	case $arg in
+	-all-static)
+	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+	    func_warning "complete static linking is impossible in this configuration"
+	  fi
+	  if test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
 	  ;;
-	*)
-	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
-	  exit $EXIT_FAILURE
+	-static)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=built
+	  ;;
+	-static-libtool-libs)
+	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
+	    dlopen_self=$dlopen_self_static
+	  fi
+	  prefer_static_libs=yes
 	  ;;
 	esac
-      else
-	# We keep going just in case the user didn't refer to
-	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
-	# really was required.
-
-	# Nullify the symbol file.
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
-	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
-      fi
-
-      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
-	# Replace the output file specification.
-	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
-	link_command="$compile_command$compile_rpath"
+	build_libtool_libs=no
+	build_old_libs=yes
+	break
+	;;
+      esac
+    done
 
-	# We have no uninstalled library dependencies, so finalize right now.
-	$show "$link_command"
-	$run eval "$link_command"
-	exit_status=$?
+    # See if our shared archives depend on static archives.
+    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
 
-	# Delete the generated files.
-	if test -n "$dlsyms"; then
-	  $show "$rm $output_objdir/${outputname}S.${objext}"
-	  $run $rm "$output_objdir/${outputname}S.${objext}"
-	fi
+    # Go through the arguments, transforming them on the way.
+    while test "$#" -gt 0; do
+      arg="$1"
+      shift
+      func_quote_for_eval "$arg"
+      qarg=$func_quote_for_eval_unquoted_result
+      func_append libtool_args " $func_quote_for_eval_result"
 
-	exit $exit_status
-      fi
+      # If the previous option needs an argument, assign it.
+      if test -n "$prev"; then
+	case $prev in
+	output)
+	  func_append compile_command " @OUTPUT@"
+	  func_append finalize_command " @OUTPUT@"
+	  ;;
+	esac
 
-      if test -n "$shlibpath_var"; then
-	# We should set the shlibpath_var
-	rpath=
-	for dir in $temp_rpath; do
-	  case $dir in
-	  [\\/]* | [A-Za-z]:[\\/]*)
-	    # Absolute path.
-	    rpath="$rpath$dir:"
+	case $prev in
+	dlfiles|dlprefiles)
+	  if test "$preload" = no; then
+	    # Add the symbol object into the linking commands.
+	    func_append compile_command " @SYMFILE@"
+	    func_append finalize_command " @SYMFILE@"
+	    preload=yes
+	  fi
+	  case $arg in
+	  *.la | *.lo) ;;  # We handle these cases below.
+	  force)
+	    if test "$dlself" = no; then
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
+	    ;;
+	  self)
+	    if test "$prev" = dlprefiles; then
+	      dlself=yes
+	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+	      dlself=yes
+	    else
+	      dlself=needless
+	      export_dynamic=yes
+	    fi
+	    prev=
+	    continue
 	    ;;
 	  *)
-	    # Relative path: add a thisdir entry.
-	    rpath="$rpath\$thisdir/$dir:"
+	    if test "$prev" = dlfiles; then
+	      dlfiles="$dlfiles $arg"
+	    else
+	      dlprefiles="$dlprefiles $arg"
+	    fi
+	    prev=
+	    continue
 	    ;;
 	  esac
-	done
-	temp_rpath="$rpath"
-      fi
+	  ;;
+	expsyms)
+	  export_symbols="$arg"
+	  test -f "$arg" \
+	    || func_fatal_error "symbol file \`$arg' does not exist"
+	  prev=
+	  continue
+	  ;;
+	expsyms_regex)
+	  export_symbols_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	framework)
+	  case $host in
+	    *-*-darwin*)
+	      case "$deplibs " in
+		*" $qarg.ltframework "*) ;;
+		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+		   ;;
+	      esac
+	      ;;
+	  esac
+	  prev=
+	  continue
+	  ;;
+	inst_prefix)
+	  inst_prefix_dir="$arg"
+	  prev=
+	  continue
+	  ;;
+	objectlist)
+	  if test -f "$arg"; then
+	    save_arg=$arg
+	    moreargs=
+	    for fil in `cat "$save_arg"`
+	    do
+#	      moreargs="$moreargs $fil"
+	      arg=$fil
+	      # A libtool-controlled object.
 
-      if test -n "$compile_shlibpath$finalize_shlibpath"; then
-	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
-      fi
-      if test -n "$finalize_shlibpath"; then
-	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
-      fi
+	      # Check to see that this really is a libtool object.
+	      if func_lalib_unsafe_p "$arg"; then
+		pic_object=
+		non_pic_object=
 
-      compile_var=
-      finalize_var=
-      if test -n "$runpath_var"; then
-	if test -n "$perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-	if test -n "$finalize_perm_rpath"; then
-	  # We should set the runpath_var.
-	  rpath=
-	  for dir in $finalize_perm_rpath; do
-	    rpath="$rpath$dir:"
-	  done
-	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
-	fi
-      fi
+		# Read the .lo file
+		func_source "$arg"
 
-      if test "$no_install" = yes; then
-	# We don't need to create a wrapper script.
-	link_command="$compile_var$compile_command$compile_rpath"
-	# Replace the output file specification.
-	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
-	# Delete the old output file.
-	$run $rm $output
-	# Link the executable and exit
-	$show "$link_command"
-	$run eval "$link_command" || exit $?
-	exit $EXIT_SUCCESS
-      fi
+		if test -z "$pic_object" ||
+		   test -z "$non_pic_object" ||
+		   test "$pic_object" = none &&
+		   test "$non_pic_object" = none; then
+		  func_fatal_error "cannot find name of object for \`$arg'"
+		fi
 
-      if test "$hardcode_action" = relink; then
-	# Fast installation is not supported
-	link_command="$compile_var$compile_command$compile_rpath"
-	relink_command="$finalize_var$finalize_command$finalize_rpath"
+		# Extract subdirectory from the argument.
+		func_dirname "$arg" "/" ""
+		xdir="$func_dirname_result"
 
-	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
-	$echo "$modename: \`$output' will be relinked during installation" 1>&2
-      else
-	if test "$fast_install" != no; then
-	  link_command="$finalize_var$compile_command$finalize_rpath"
-	  if test "$fast_install" = yes; then
-	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
-	  else
-	    # fast_install is set to needless
-	    relink_command=
-	  fi
-	else
-	  link_command="$compile_var$compile_command$compile_rpath"
-	  relink_command="$finalize_var$finalize_command$finalize_rpath"
-	fi
-      fi
+		if test "$pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  pic_object="$xdir$pic_object"
 
-      # Replace the output file specification.
-      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+		  if test "$prev" = dlfiles; then
+		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		      dlfiles="$dlfiles $pic_object"
+		      prev=
+		      continue
+		    else
+		      # If libtool objects are unsupported, then we need to preload.
+		      prev=dlprefiles
+		    fi
+		  fi
 
-      # Delete the old output files.
-      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+		  # CHECK ME:  I think I busted this.  -Ossama
+		  if test "$prev" = dlprefiles; then
+		    # Preload the old-style object.
+		    dlprefiles="$dlprefiles $pic_object"
+		    prev=
+		  fi
 
-      $show "$link_command"
-      $run eval "$link_command" || exit $?
+		  # A PIC object.
+		  func_append libobjs " $pic_object"
+		  arg="$pic_object"
+		fi
 
-      # Now create the wrapper script.
-      $show "creating $output"
+		# Non-PIC object.
+		if test "$non_pic_object" != none; then
+		  # Prepend the subdirectory the object is found in.
+		  non_pic_object="$xdir$non_pic_object"
 
-      # Quote the relink command for shipping.
-      if test -n "$relink_command"; then
-	# Preserve any variables that may affect compiler behavior
-	for var in $variables_saved_for_relink; do
-	  if eval test -z \"\${$var+set}\"; then
-	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-	  elif eval var_value=\$$var; test -z "$var_value"; then
-	    relink_command="$var=; export $var; $relink_command"
+		  # A standard non-PIC object
+		  func_append non_pic_objects " $non_pic_object"
+		  if test -z "$pic_object" || test "$pic_object" = none ; then
+		    arg="$non_pic_object"
+		  fi
+		else
+		  # If the PIC object exists, use it instead.
+		  # $xdir was prepended to $pic_object above.
+		  non_pic_object="$pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+		fi
+	      else
+		# Only an error if not doing a dry-run.
+		if $opt_dry_run; then
+		  # Extract subdirectory from the argument.
+		  func_dirname "$arg" "/" ""
+		  xdir="$func_dirname_result"
+
+		  func_lo2o "$arg"
+		  pic_object=$xdir$objdir/$func_lo2o_result
+		  non_pic_object=$xdir$func_lo2o_result
+		  func_append libobjs " $pic_object"
+		  func_append non_pic_objects " $non_pic_object"
+	        else
+		  func_fatal_error "\`$arg' is not a valid libtool object"
+		fi
+	      fi
+	    done
 	  else
-	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	    func_fatal_error "link input file \`$arg' does not exist"
 	  fi
-	done
-	relink_command="(cd `pwd`; $relink_command)"
-	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
-      fi
-
-      # Quote $echo for shipping.
-      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
-	case $progpath in
-	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
-	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
-	esac
-	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
-      else
-	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
-      fi
-
-      # Only actually do things if our run command is non-null.
-      if test -z "$run"; then
-	# win32 will think the script is a binary if it has
-	# a .exe suffix, so we strip it off here.
-	case $output in
-	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
-	esac
-	# test for cygwin because mv fails w/o .exe extensions
-	case $host in
-	  *cygwin*)
-	    exeext=.exe
-	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
-	  *) exeext= ;;
+	  arg=$save_arg
+	  prev=
+	  continue
+	  ;;
+	precious_regex)
+	  precious_files_regex="$arg"
+	  prev=
+	  continue
+	  ;;
+	release)
+	  release="-$arg"
+	  prev=
+	  continue
+	  ;;
+	rpath | xrpath)
+	  # We need an absolute path.
+	  case $arg in
+	  [\\/]* | [A-Za-z]:[\\/]*) ;;
+	  *)
+	    func_fatal_error "only absolute run-paths are allowed"
+	    ;;
+	  esac
+	  if test "$prev" = rpath; then
+	    case "$rpath " in
+	    *" $arg "*) ;;
+	    *) rpath="$rpath $arg" ;;
+	    esac
+	  else
+	    case "$xrpath " in
+	    *" $arg "*) ;;
+	    *) xrpath="$xrpath $arg" ;;
+	    esac
+	  fi
+	  prev=
+	  continue
+	  ;;
+	shrext)
+	  shrext_cmds="$arg"
+	  prev=
+	  continue
+	  ;;
+	weak)
+	  weak_libs="$weak_libs $arg"
+	  prev=
+	  continue
+	  ;;
+	xcclinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xcompiler)
+	  compiler_flags="$compiler_flags $qarg"
+	  prev=
+	  func_append compile_command " $qarg"
+	  func_append finalize_command " $qarg"
+	  continue
+	  ;;
+	xlinker)
+	  linker_flags="$linker_flags $qarg"
+	  compiler_flags="$compiler_flags $wl$qarg"
+	  prev=
+	  func_append compile_command " $wl$qarg"
+	  func_append finalize_command " $wl$qarg"
+	  continue
+	  ;;
+	*)
+	  eval "$prev=\"\$arg\""
+	  prev=
+	  continue
+	  ;;
 	esac
-	case $host in
-	  *cygwin* | *mingw* )
-            output_name=`basename $output`
-            output_path=`dirname $output`
-            cwrappersource="$output_path/$objdir/lt-$output_name.c"
-            cwrapper="$output_path/$output_name.exe"
-            $rm $cwrappersource $cwrapper
-            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
-	    cat > $cwrappersource <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
-   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-
-   The $output program cannot be directly executed until all the libtool
-   libraries that it depends on are installed.
-
-   This wrapper executable should never be moved out of the build directory.
-   If it is, it will not operate correctly.
-
-   Currently, it simply execs the wrapper *script* "/bin/sh $output",
-   but could eventually absorb all of the scripts functionality and
-   exec $objdir/$outputname directly.
-*/
-EOF
-	    cat >> $cwrappersource<<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
-  defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# ifndef DIR_SEPARATOR_2
-#  define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-#  define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
-        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
+      fi # test -n "$prev"
 
-#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
-  if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
+      prevarg="$arg"
 
-/* -DDEBUG is fairly common in CFLAGS.  */
-#undef DEBUG
-#if defined DEBUGWRAPPER
-# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
-#else
-# define DEBUG(format, ...)
-#endif
+      case $arg in
+      -all-static)
+	if test -n "$link_static_flag"; then
+	  # See comment for -static flag below, for more details.
+	  func_append compile_command " $link_static_flag"
+	  func_append finalize_command " $link_static_flag"
+	fi
+	continue
+	;;
 
-const char *program_name = NULL;
+      -allow-undefined)
+	# FIXME: remove this flag sometime in the future.
+	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+	;;
 
-void * xmalloc (size_t num);
-char * xstrdup (const char *string);
-const char * base_name (const char *name);
-char * find_executable(const char *wrapper);
-int    check_executable(const char *path);
-char * strendzap(char *str, const char *pat);
-void lt_fatal (const char *message, ...);
+      -avoid-version)
+	avoid_version=yes
+	continue
+	;;
 
-int
-main (int argc, char *argv[])
-{
-  char **newargz;
-  int i;
+      -dlopen)
+	prev=dlfiles
+	continue
+	;;
 
-  program_name = (char *) xstrdup (base_name (argv[0]));
-  DEBUG("(main) argv[0]      : %s\n",argv[0]);
-  DEBUG("(main) program_name : %s\n",program_name);
-  newargz = XMALLOC(char *, argc+2);
-EOF
+      -dlpreopen)
+	prev=dlprefiles
+	continue
+	;;
 
-            cat >> $cwrappersource <<EOF
-  newargz[0] = (char *) xstrdup("$SHELL");
-EOF
+      -export-dynamic)
+	export_dynamic=yes
+	continue
+	;;
 
-            cat >> $cwrappersource <<"EOF"
-  newargz[1] = find_executable(argv[0]);
-  if (newargz[1] == NULL)
-    lt_fatal("Couldn't find %s", argv[0]);
-  DEBUG("(main) found exe at : %s\n",newargz[1]);
-  /* we know the script has the same name, without the .exe */
-  /* so make sure newargz[1] doesn't end in .exe */
-  strendzap(newargz[1],".exe");
-  for (i = 1; i < argc; i++)
-    newargz[i+1] = xstrdup(argv[i]);
-  newargz[argc+1] = NULL;
+      -export-symbols | -export-symbols-regex)
+	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+	  func_fatal_error "more than one -exported-symbols argument is not allowed"
+	fi
+	if test "X$arg" = "X-export-symbols"; then
+	  prev=expsyms
+	else
+	  prev=expsyms_regex
+	fi
+	continue
+	;;
 
-  for (i=0; i<argc+1; i++)
-  {
-    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
-    ;
-  }
+      -framework)
+	prev=framework
+	continue
+	;;
 
-EOF
+      -inst-prefix-dir)
+	prev=inst_prefix
+	continue
+	;;
 
-            case $host_os in
-              mingw*)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",(char const **)newargz);
-EOF
-              ;;
-              *)
-                cat >> $cwrappersource <<EOF
-  execv("$SHELL",newargz);
-EOF
-              ;;
-            esac
+      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+      # so, if we see these flags be careful not to treat them like -L
+      -L[A-Z][A-Z]*:*)
+	case $with_gcc/$host in
+	no/*-*-irix* | /*-*-irix*)
+	  func_append compile_command " $arg"
+	  func_append finalize_command " $arg"
+	  ;;
+	esac
+	continue
+	;;
 
-            cat >> $cwrappersource <<"EOF"
-  return 127;
-}
+      -L*)
+	func_stripname '-L' '' "$arg"
+	dir=$func_stripname_result
+	if test -z "$dir"; then
+	  if test "$#" -gt 0; then
+	    func_fatal_error "require no space between \`-L' and \`$1'"
+	  else
+	    func_fatal_error "need path for \`-L' option"
+	  fi
+	fi
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  absdir=`cd "$dir" && pwd`
+	  test -z "$absdir" && \
+	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
+	  dir="$absdir"
+	  ;;
+	esac
+	case "$deplibs " in
+	*" -L$dir "*) ;;
+	*)
+	  deplibs="$deplibs -L$dir"
+	  lib_search_path="$lib_search_path $dir"
+	  ;;
+	esac
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$dir:"*) ;;
+	  ::) dllsearchpath=$dir;;
+	  *) dllsearchpath="$dllsearchpath:$dir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+	continue
+	;;
 
-void *
-xmalloc (size_t num)
-{
-  void * p = (void *) malloc (num);
-  if (!p)
-    lt_fatal ("Memory exhausted");
+      -l*)
+	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+	    # These systems don't actually have a C or math library (as such)
+	    continue
+	    ;;
+	  *-*-os2*)
+	    # These systems don't actually have a C library (as such)
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C and math libraries are in the System framework
+	    deplibs="$deplibs System.ltframework"
+	    continue
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    test "X$arg" = "X-lc" && continue
+	    ;;
+	  esac
+	elif test "X$arg" = "X-lc_r"; then
+	 case $host in
+	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	   # Do not include libc_r directly, use -pthread flag.
+	   continue
+	   ;;
+	 esac
+	fi
+	deplibs="$deplibs $arg"
+	continue
+	;;
 
-  return p;
-}
+      -module)
+	module=yes
+	continue
+	;;
 
-char *
-xstrdup (const char *string)
-{
-  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
-;
-}
+      # Tru64 UNIX uses -model [arg] to determine the layout of C++
+      # classes, name mangling, and exception handling.
+      # Darwin uses the -arch flag to determine output architecture.
+      -model|-arch|-isysroot)
+	compiler_flags="$compiler_flags $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	prev=xcompiler
+	continue
+	;;
 
-const char *
-base_name (const char *name)
-{
-  const char *base;
+      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	compiler_flags="$compiler_flags $arg"
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+	case "$new_inherited_linker_flags " in
+	    *" $arg "*) ;;
+	    * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+	esac
+	continue
+	;;
 
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  /* Skip over the disk name in MSDOS pathnames. */
-  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
-    name += 2;
-#endif
+      -multi_module)
+	single_module="${wl}-multi_module"
+	continue
+	;;
 
-  for (base = name; *name; name++)
-    if (IS_DIR_SEPARATOR (*name))
-      base = name + 1;
-  return base;
-}
+      -no-fast-install)
+	fast_install=no
+	continue
+	;;
 
-int
-check_executable(const char * path)
-{
-  struct stat st;
+      -no-install)
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+	  # The PATH hackery in wrapper scripts is required on Windows
+	  # and Darwin in order for the loader to find any dlls it needs.
+	  func_warning "\`-no-install' is ignored for $host"
+	  func_warning "assuming \`-no-fast-install' instead"
+	  fast_install=no
+	  ;;
+	*) no_install=yes ;;
+	esac
+	continue
+	;;
 
-  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
-  if ((!path) || (!*path))
-    return 0;
+      -no-undefined)
+	allow_undefined=no
+	continue
+	;;
 
-  if ((stat (path, &st) >= 0) &&
-      (
-        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
-#if defined (S_IXOTH)
-       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
-#endif
-#if defined (S_IXGRP)
-       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
-#endif
-       ((st.st_mode & S_IXUSR) == S_IXUSR))
-      )
-    return 1;
-  else
-    return 0;
-}
+      -objectlist)
+	prev=objectlist
+	continue
+	;;
 
-/* Searches for the full path of the wrapper.  Returns
-   newly allocated full path name if found, NULL otherwise */
-char *
-find_executable (const char* wrapper)
-{
-  int has_slash = 0;
-  const char* p;
-  const char* p_next;
-  /* static buffer for getcwd */
-  char tmp[LT_PATHMAX + 1];
-  int tmp_len;
-  char* concat_name;
+      -o) prev=output ;;
 
-  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
+      -precious-files-regex)
+	prev=precious_regex
+	continue
+	;;
 
-  if ((wrapper == NULL) || (*wrapper == '\0'))
-    return NULL;
+      -release)
+	prev=release
+	continue
+	;;
 
-  /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
-  {
-    concat_name = xstrdup (wrapper);
-    if (check_executable(concat_name))
-      return concat_name;
-    XFREE(concat_name);
-  }
-  else
-  {
-#endif
-    if (IS_DIR_SEPARATOR (wrapper[0]))
-    {
-      concat_name = xstrdup (wrapper);
-      if (check_executable(concat_name))
-        return concat_name;
-      XFREE(concat_name);
-    }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
-  }
-#endif
+      -rpath)
+	prev=rpath
+	continue
+	;;
 
-  for (p = wrapper; *p; p++)
-    if (*p == '/')
-    {
-      has_slash = 1;
-      break;
-    }
-  if (!has_slash)
-  {
-    /* no slashes; search PATH */
-    const char* path = getenv ("PATH");
-    if (path != NULL)
-    {
-      for (p = path; *p; p = p_next)
-      {
-        const char* q;
-        size_t p_len;
-        for (q = p; *q; q++)
-          if (IS_PATH_SEPARATOR(*q))
-            break;
-        p_len = q - p;
-        p_next = (*q == '\0' ? q : q + 1);
-        if (p_len == 0)
-        {
-          /* empty path: current directory */
-          if (getcwd (tmp, LT_PATHMAX) == NULL)
-            lt_fatal ("getcwd failed");
-          tmp_len = strlen(tmp);
-          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
-          memcpy (concat_name, tmp, tmp_len);
-          concat_name[tmp_len] = '/';
-          strcpy (concat_name + tmp_len + 1, wrapper);
-        }
-        else
-        {
-          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
-          memcpy (concat_name, p, p_len);
-          concat_name[p_len] = '/';
-          strcpy (concat_name + p_len + 1, wrapper);
-        }
-        if (check_executable(concat_name))
-          return concat_name;
-        XFREE(concat_name);
-      }
-    }
-    /* not found in PATH; assume curdir */
-  }
-  /* Relative path | not found in path: prepend cwd */
-  if (getcwd (tmp, LT_PATHMAX) == NULL)
-    lt_fatal ("getcwd failed");
-  tmp_len = strlen(tmp);
-  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
-  memcpy (concat_name, tmp, tmp_len);
-  concat_name[tmp_len] = '/';
-  strcpy (concat_name + tmp_len + 1, wrapper);
+      -R)
+	prev=xrpath
+	continue
+	;;
 
-  if (check_executable(concat_name))
-    return concat_name;
-  XFREE(concat_name);
-  return NULL;
-}
+      -R*)
+	func_stripname '-R' '' "$arg"
+	dir=$func_stripname_result
+	# We need an absolute path.
+	case $dir in
+	[\\/]* | [A-Za-z]:[\\/]*) ;;
+	*)
+	  func_fatal_error "only absolute run-paths are allowed"
+	  ;;
+	esac
+	case "$xrpath " in
+	*" $dir "*) ;;
+	*) xrpath="$xrpath $dir" ;;
+	esac
+	continue
+	;;
 
-char *
-strendzap(char *str, const char *pat)
-{
-  size_t len, patlen;
+      -shared)
+	# The effects of -shared are defined in a previous loop.
+	continue
+	;;
 
-  assert(str != NULL);
-  assert(pat != NULL);
+      -shrext)
+	prev=shrext
+	continue
+	;;
 
-  len = strlen(str);
-  patlen = strlen(pat);
+      -static | -static-libtool-libs)
+	# The effects of -static are defined in a previous loop.
+	# We used to do the same as -all-static on platforms that
+	# didn't have a PIC flag, but the assumption that the effects
+	# would be equivalent was wrong.  It would break on at least
+	# Digital Unix and AIX.
+	continue
+	;;
 
-  if (patlen <= len)
-  {
-    str += len - patlen;
-    if (strcmp(str, pat) == 0)
-      *str = '\0';
-  }
-  return str;
-}
+      -thread-safe)
+	thread_safe=yes
+	continue
+	;;
 
-static void
-lt_error_core (int exit_status, const char * mode,
-          const char * message, va_list ap)
-{
-  fprintf (stderr, "%s: %s: ", program_name, mode);
-  vfprintf (stderr, message, ap);
-  fprintf (stderr, ".\n");
+      -version-info)
+	prev=vinfo
+	continue
+	;;
 
-  if (exit_status >= 0)
-    exit (exit_status);
-}
+      -version-number)
+	prev=vinfo
+	vinfo_number=yes
+	continue
+	;;
 
-void
-lt_fatal (const char *message, ...)
-{
-  va_list ap;
-  va_start (ap, message);
-  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
-  va_end (ap);
-}
-EOF
-          # we should really use a build-platform specific compiler
-          # here, but OTOH, the wrappers (shell script and this C one)
-          # are only useful if you want to execute the "real" binary.
-          # Since the "real" binary is built for $host, then this
-          # wrapper might as well be built for $host, too.
-          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
-          ;;
-        esac
-        $rm $output
-        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
+      -weak)
+        prev=weak
+	continue
+	;;
 
-	$echo > $output "\
-#! $SHELL
+      -Wc,*)
+	func_stripname '-Wc,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  arg="$arg $wl$func_quote_for_eval_result"
+	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
 
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# The $output program cannot be directly executed until all the libtool
-# libraries that it depends on are installed.
-#
-# This wrapper script should never be moved out of the build directory.
-# If it is, it will not operate correctly.
+      -Wl,*)
+	func_stripname '-Wl,' '' "$arg"
+	args=$func_stripname_result
+	arg=
+	save_ifs="$IFS"; IFS=','
+	for flag in $args; do
+	  IFS="$save_ifs"
+          func_quote_for_eval "$flag"
+	  arg="$arg $wl$func_quote_for_eval_result"
+	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+	  linker_flags="$linker_flags $func_quote_for_eval_result"
+	done
+	IFS="$save_ifs"
+	func_stripname ' ' '' "$arg"
+	arg=$func_stripname_result
+	;;
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='${SED} -e 1s/^X//'
-sed_quote_subst='$sed_quote_subst'
+      -Xcompiler)
+	prev=xcompiler
+	continue
+	;;
 
-# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '\${1+\"\$@\"}'='\"\$@\"'
-  setopt NO_GLOB_SUBST
-else
-  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
-fi
+      -Xlinker)
+	prev=xlinker
+	continue
+	;;
 
-# 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
+      -XCClinker)
+	prev=xcclinker
+	continue
+	;;
 
-relink_command=\"$relink_command\"
+      # -msg_* for osf cc
+      -msg_*)
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
 
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
-  # install mode needs the following variable:
-  notinst_deplibs='$notinst_deplibs'
-else
-  # When we are sourced in execute mode, \$file and \$echo are already set.
-  if test \"\$libtool_execute_magic\" != \"$magic\"; then
-    echo=\"$qecho\"
-    file=\"\$0\"
-    # Make sure echo works.
-    if test \"X\$1\" = X--no-reexec; then
-      # Discard the --no-reexec flag, and continue.
-      shift
-    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
-      # Yippee, \$echo works!
-      :
-    else
-      # Restart under the correct shell, and then maybe \$echo will work.
-      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
-    fi
-  fi\
-"
-	$echo >> $output "\
+      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+      # -r[0-9][0-9]* specifies the processor on the SGI compiler
+      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+      # +DA*, +DD* enable 64-bit mode on the HP compiler
+      # -q* pass through compiler args for the IBM compiler
+      # -m*, -t[45]*, -txscale* pass through architecture-specific
+      # compiler args for GCC
+      # -F/path gives path to uninstalled frameworks, gcc on darwin
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+      # @file GCC response files
+      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+        func_append compile_command " $arg"
+        func_append finalize_command " $arg"
+        compiler_flags="$compiler_flags $arg"
+        continue
+        ;;
 
-  # Find the directory that this script lives in.
-  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
-  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+      # Some other compiler flag.
+      -* | +*)
+        func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
 
-  # Follow symbolic links until we get to the real thisdir.
-  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
-  while test -n \"\$file\"; do
-    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+      *.$objext)
+	# A standard object.
+	objs="$objs $arg"
+	;;
 
-    # If there was a directory component, then change thisdir.
-    if test \"x\$destdir\" != \"x\$file\"; then
-      case \"\$destdir\" in
-      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
-      *) thisdir=\"\$thisdir/\$destdir\" ;;
-      esac
-    fi
+      *.lo)
+	# A libtool-controlled object.
 
-    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
-    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
-  done
+	# Check to see that this really is a libtool object.
+	if func_lalib_unsafe_p "$arg"; then
+	  pic_object=
+	  non_pic_object=
 
-  # Try to get the absolute directory name.
-  absdir=\`cd \"\$thisdir\" && pwd\`
-  test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
+	  # Read the .lo file
+	  func_source "$arg"
 
-	if test "$fast_install" = yes; then
-	  $echo >> $output "\
-  program=lt-'$outputname'$exeext
-  progdir=\"\$thisdir/$objdir\"
+	  if test -z "$pic_object" ||
+	     test -z "$non_pic_object" ||
+	     test "$pic_object" = none &&
+	     test "$non_pic_object" = none; then
+	    func_fatal_error "cannot find name of object for \`$arg'"
+	  fi
 
-  if test ! -f \"\$progdir/\$program\" || \\
-     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
-       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+	  # Extract subdirectory from the argument.
+	  func_dirname "$arg" "/" ""
+	  xdir="$func_dirname_result"
 
-    file=\"\$\$-\$program\"
+	  if test "$pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    pic_object="$xdir$pic_object"
 
-    if test ! -d \"\$progdir\"; then
-      $mkdir \"\$progdir\"
-    else
-      $rm \"\$progdir/\$file\"
-    fi"
+	    if test "$prev" = dlfiles; then
+	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+		dlfiles="$dlfiles $pic_object"
+		prev=
+		continue
+	      else
+		# If libtool objects are unsupported, then we need to preload.
+		prev=dlprefiles
+	      fi
+	    fi
+
+	    # CHECK ME:  I think I busted this.  -Ossama
+	    if test "$prev" = dlprefiles; then
+	      # Preload the old-style object.
+	      dlprefiles="$dlprefiles $pic_object"
+	      prev=
+	    fi
 
-	  $echo >> $output "\
+	    # A PIC object.
+	    func_append libobjs " $pic_object"
+	    arg="$pic_object"
+	  fi
 
-    # relink executable if necessary
-    if test -n \"\$relink_command\"; then
-      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
-      else
-	$echo \"\$relink_command_output\" >&2
-	$rm \"\$progdir/\$file\"
-	exit $EXIT_FAILURE
-      fi
-    fi
+	  # Non-PIC object.
+	  if test "$non_pic_object" != none; then
+	    # Prepend the subdirectory the object is found in.
+	    non_pic_object="$xdir$non_pic_object"
 
-    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
-    { $rm \"\$progdir/\$program\";
-      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
-    $rm \"\$progdir/\$file\"
-  fi"
+	    # A standard non-PIC object
+	    func_append non_pic_objects " $non_pic_object"
+	    if test -z "$pic_object" || test "$pic_object" = none ; then
+	      arg="$non_pic_object"
+	    fi
+	  else
+	    # If the PIC object exists, use it instead.
+	    # $xdir was prepended to $pic_object above.
+	    non_pic_object="$pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  fi
 	else
-	  $echo >> $output "\
-  program='$outputname'
-  progdir=\"\$thisdir/$objdir\"
-"
+	  # Only an error if not doing a dry-run.
+	  if $opt_dry_run; then
+	    # Extract subdirectory from the argument.
+	    func_dirname "$arg" "/" ""
+	    xdir="$func_dirname_result"
+
+	    func_lo2o "$arg"
+	    pic_object=$xdir$objdir/$func_lo2o_result
+	    non_pic_object=$xdir$func_lo2o_result
+	    func_append libobjs " $pic_object"
+	    func_append non_pic_objects " $non_pic_object"
+	  else
+	    func_fatal_error "\`$arg' is not a valid libtool object"
+	  fi
 	fi
+	;;
 
-	$echo >> $output "\
+      *.$libext)
+	# An archive.
+	deplibs="$deplibs $arg"
+	old_deplibs="$old_deplibs $arg"
+	continue
+	;;
 
-  if test -f \"\$progdir/\$program\"; then"
+      *.la)
+	# A libtool-controlled library.
 
-	# Export our shlibpath_var if we have one.
-	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
-	  $echo >> $output "\
-    # Add our own library path to $shlibpath_var
-    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+	if test "$prev" = dlfiles; then
+	  # This library was specified with -dlopen.
+	  dlfiles="$dlfiles $arg"
+	  prev=
+	elif test "$prev" = dlprefiles; then
+	  # The library was specified with -dlpreopen.
+	  dlprefiles="$dlprefiles $arg"
+	  prev=
+	else
+	  deplibs="$deplibs $arg"
+	fi
+	continue
+	;;
 
-    # Some systems cannot cope with colon-terminated $shlibpath_var
-    # The second colon is a workaround for a bug in BeOS R4 sed
-    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+      # Some other compiler argument.
+      *)
+	# Unknown arguments in both finalize_command and compile_command need
+	# to be aesthetically quoted because they are evaled later.
+	func_quote_for_eval "$arg"
+	arg="$func_quote_for_eval_result"
+	;;
+      esac # arg
 
-    export $shlibpath_var
-"
-	fi
+      # Now actually substitute the argument into the commands.
+      if test -n "$arg"; then
+	func_append compile_command " $arg"
+	func_append finalize_command " $arg"
+      fi
+    done # argument parsing loop
 
-	# fixup the dll searchpath if we need to.
-	if test -n "$dllsearchpath"; then
-	  $echo >> $output "\
-    # Add the dll search path components to the executable PATH
-    PATH=$dllsearchpath:\$PATH
-"
+    test -n "$prev" && \
+      func_fatal_help "the \`$prevarg' option requires an argument"
+
+    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+      eval arg=\"$export_dynamic_flag_spec\"
+      func_append compile_command " $arg"
+      func_append finalize_command " $arg"
+    fi
+
+    oldlibs=
+    # calculate the name of the file, without its directory
+    func_basename "$output"
+    outputname="$func_basename_result"
+    libobjs_save="$libobjs"
+
+    if test -n "$shlibpath_var"; then
+      # get the directories listed in $shlibpath_var
+      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+    else
+      shlib_search_path=
+    fi
+    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+    func_dirname "$output" "/" ""
+    output_objdir="$func_dirname_result$objdir"
+    # Create the object directory.
+    func_mkdir_p "$output_objdir"
+
+    # Determine the type of output
+    case $output in
+    "")
+      func_fatal_help "you must specify an output file"
+      ;;
+    *.$libext) linkmode=oldlib ;;
+    *.lo | *.$objext) linkmode=obj ;;
+    *.la) linkmode=lib ;;
+    *) linkmode=prog ;; # Anything else should be a program.
+    esac
+
+    specialdeplibs=
+
+    libs=
+    # Find all interdependent deplibs by searching for libraries
+    # that are linked more than once (e.g. -la -lb -la)
+    for deplib in $deplibs; do
+      if $opt_duplicate_deps ; then
+	case "$libs " in
+	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	esac
+      fi
+      libs="$libs $deplib"
+    done
+
+    if test "$linkmode" = lib; then
+      libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+      # Compute libraries that are listed more than once in $predeps
+      # $postdeps and mark them as special (i.e., whose duplicates are
+      # not to be eliminated).
+      pre_post_deps=
+      if $opt_duplicate_compiler_generated_deps; then
+	for pre_post_dep in $predeps $postdeps; do
+	  case "$pre_post_deps " in
+	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+	  esac
+	  pre_post_deps="$pre_post_deps $pre_post_dep"
+	done
+      fi
+      pre_post_deps=
+    fi
+
+    deplibs=
+    newdependency_libs=
+    newlib_search_path=
+    need_relink=no # whether we're linking any uninstalled libtool libraries
+    notinst_deplibs= # not-installed libtool libraries
+    notinst_path= # paths that contain not-installed libtool libraries
+
+    case $linkmode in
+    lib)
+	passes="conv dlpreopen link"
+	for file in $dlfiles $dlprefiles; do
+	  case $file in
+	  *.la) ;;
+	  *)
+	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+	    ;;
+	  esac
+	done
+	;;
+    prog)
+	compile_deplibs=
+	finalize_deplibs=
+	alldeplibs=no
+	newdlfiles=
+	newdlprefiles=
+	passes="conv scan dlopen dlpreopen link"
+	;;
+    *)  passes="conv"
+	;;
+    esac
+
+    for pass in $passes; do
+      # The preopen pass in lib mode reverses $deplibs; put it back here
+      # so that -L comes before libs that need it for instance...
+      if test "$linkmode,$pass" = "lib,link"; then
+	## FIXME: Find the place where the list is rebuilt in the wrong
+	##        order, and fix it there properly
+        tmp_deplibs=
+	for deplib in $deplibs; do
+	  tmp_deplibs="$deplib $tmp_deplibs"
+	done
+	deplibs="$tmp_deplibs"
+      fi
+
+      if test "$linkmode,$pass" = "lib,link" ||
+	 test "$linkmode,$pass" = "prog,scan"; then
+	libs="$deplibs"
+	deplibs=
+      fi
+      if test "$linkmode" = prog; then
+	case $pass in
+	dlopen) libs="$dlfiles" ;;
+	dlpreopen) libs="$dlprefiles" ;;
+	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+	esac
+      fi
+      if test "$linkmode,$pass" = "lib,dlpreopen"; then
+	# Collect and forward deplibs of preopened libtool libs
+	for lib in $dlprefiles; do
+	  # Ignore non-libtool-libs
+	  dependency_libs=
+	  case $lib in
+	  *.la)	func_source "$lib" ;;
+	  esac
+
+	  # Collect preopened libtool deplibs, except any this library
+	  # has declared as weak libs
+	  for deplib in $dependency_libs; do
+            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+	    case " $weak_libs " in
+	    *" $deplib_base "*) ;;
+	    *) deplibs="$deplibs $deplib" ;;
+	    esac
+	  done
+	done
+	libs="$dlprefiles"
+      fi
+      if test "$pass" = dlopen; then
+	# Collect dlpreopened libraries
+	save_deplibs="$deplibs"
+	deplibs=
+      fi
+
+      for deplib in $libs; do
+	lib=
+	found=no
+	case $deplib in
+	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    compiler_flags="$compiler_flags $deplib"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-l*)
+	  if test "$linkmode" != lib && test "$linkmode" != prog; then
+	    func_warning "\`-l' is ignored for archives/objects"
+	    continue
+	  fi
+	  func_stripname '-l' '' "$deplib"
+	  name=$func_stripname_result
+	  if test "$linkmode" = lib; then
+	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+	  else
+	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+	  fi
+	  for searchdir in $searchdirs; do
+	    for search_ext in .la $std_shrext .so .a; do
+	      # Search the libtool library
+	      lib="$searchdir/lib${name}${search_ext}"
+	      if test -f "$lib"; then
+		if test "$search_ext" = ".la"; then
+		  found=yes
+		else
+		  found=no
+		fi
+		break 2
+	      fi
+	    done
+	  done
+	  if test "$found" != yes; then
+	    # deplib doesn't seem to be a libtool library
+	    if test "$linkmode,$pass" = "prog,link"; then
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      deplibs="$deplib $deplibs"
+	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    continue
+	  else # deplib is a libtool library
+	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+	    # We need to do some special things here, and not later.
+	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	      case " $predeps $postdeps " in
+	      *" $deplib "*)
+		if func_lalib_p "$lib"; then
+		  library_names=
+		  old_library=
+		  func_source "$lib"
+		  for l in $old_library $library_names; do
+		    ll="$l"
+		  done
+		  if test "X$ll" = "X$old_library" ; then # only static version available
+		    found=no
+		    func_dirname "$lib" "" "."
+		    ladir="$func_dirname_result"
+		    lib=$ladir/$old_library
+		    if test "$linkmode,$pass" = "prog,link"; then
+		      compile_deplibs="$deplib $compile_deplibs"
+		      finalize_deplibs="$deplib $finalize_deplibs"
+		    else
+		      deplibs="$deplib $deplibs"
+		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+		    fi
+		    continue
+		  fi
+		fi
+		;;
+	      *) ;;
+	      esac
+	    fi
+	  fi
+	  ;; # -l
+	*.ltframework)
+	  if test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$deplib $compile_deplibs"
+	    finalize_deplibs="$deplib $finalize_deplibs"
+	  else
+	    deplibs="$deplib $deplibs"
+	    if test "$linkmode" = lib ; then
+		case "$new_inherited_linker_flags " in
+		    *" $deplib "*) ;;
+		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+		esac
+	    fi
+	  fi
+	  continue
+	  ;;
+	-L*)
+	  case $linkmode in
+	  lib)
+	    deplibs="$deplib $deplibs"
+	    test "$pass" = conv && continue
+	    newdependency_libs="$deplib $newdependency_libs"
+	    func_stripname '-L' '' "$deplib"
+	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    ;;
+	  prog)
+	    if test "$pass" = conv; then
+	      deplibs="$deplib $deplibs"
+	      continue
+	    fi
+	    if test "$pass" = scan; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    func_stripname '-L' '' "$deplib"
+	    newlib_search_path="$newlib_search_path $func_stripname_result"
+	    ;;
+	  *)
+	    func_warning "\`-L' is ignored for archives/objects"
+	    ;;
+	  esac # linkmode
+	  continue
+	  ;; # -L
+	-R*)
+	  if test "$pass" = link; then
+	    func_stripname '-R' '' "$deplib"
+	    dir=$func_stripname_result
+	    # Make sure the xrpath contains only unique directories.
+	    case "$xrpath " in
+	    *" $dir "*) ;;
+	    *) xrpath="$xrpath $dir" ;;
+	    esac
+	  fi
+	  deplibs="$deplib $deplibs"
+	  continue
+	  ;;
+	*.la) lib="$deplib" ;;
+	*.$libext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	    continue
+	  fi
+	  case $linkmode in
+	  lib)
+	    # Linking convenience modules into shared libraries is allowed,
+	    # but linking other static libraries is non-portable.
+	    case " $dlpreconveniencelibs " in
+	    *" $deplib "*) ;;
+	    *)
+	      valid_a_lib=no
+	      case $deplibs_check_method in
+		match_pattern*)
+		  set dummy $deplibs_check_method; shift
+		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+		  if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+		    | $EGREP "$match_pattern_regex" > /dev/null; then
+		    valid_a_lib=yes
+		  fi
+		;;
+		pass_all)
+		  valid_a_lib=yes
+		;;
+	      esac
+	      if test "$valid_a_lib" != yes; then
+		$ECHO
+		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
+		$ECHO "*** I have the capability to make that library automatically link in when"
+		$ECHO "*** you link to this library.  But I can only do this if you have a"
+		$ECHO "*** shared version of the library, which you do not appear to have"
+		$ECHO "*** because the file extensions .$libext of this argument makes me believe"
+		$ECHO "*** that it is just a static archive that I should not use here."
+	      else
+		$ECHO
+		$ECHO "*** Warning: Linking the shared library $output against the"
+		$ECHO "*** static library $deplib is not portable!"
+		deplibs="$deplib $deplibs"
+	      fi
+	      ;;
+	    esac
+	    continue
+	    ;;
+	  prog)
+	    if test "$pass" != link; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    fi
+	    continue
+	    ;;
+	  esac # linkmode
+	  ;; # *.$libext
+	*.lo | *.$objext)
+	  if test "$pass" = conv; then
+	    deplibs="$deplib $deplibs"
+	  elif test "$linkmode" = prog; then
+	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+	      # If there is no dlopen support or we're linking statically,
+	      # we need to preload.
+	      newdlprefiles="$newdlprefiles $deplib"
+	      compile_deplibs="$deplib $compile_deplibs"
+	      finalize_deplibs="$deplib $finalize_deplibs"
+	    else
+	      newdlfiles="$newdlfiles $deplib"
+	    fi
+	  fi
+	  continue
+	  ;;
+	%DEPLIBS%)
+	  alldeplibs=yes
+	  continue
+	  ;;
+	esac # case $deplib
+
+	if test "$found" = yes || test -f "$lib"; then :
+	else
+	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+	fi
+
+	# Check to see that this really is a libtool archive.
+	func_lalib_unsafe_p "$lib" \
+	  || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+	func_dirname "$lib" "" "."
+	ladir="$func_dirname_result"
+
+	dlname=
+	dlopen=
+	dlpreopen=
+	libdir=
+	library_names=
+	old_library=
+	inherited_linker_flags=
+	# If the library was installed with an old release of libtool,
+	# it will not redefine variables installed, or shouldnotlink
+	installed=yes
+	shouldnotlink=no
+	avoidtemprpath=
+
+
+	# Read the .la file
+	func_source "$lib"
+
+	# Convert "-framework foo" to "foo.ltframework"
+	if test -n "$inherited_linker_flags"; then
+	  tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+	    case " $new_inherited_linker_flags " in
+	      *" $tmp_inherited_linker_flag "*) ;;
+	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+	    esac
+	  done
+	fi
+	dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	if test "$linkmode,$pass" = "lib,link" ||
+	   test "$linkmode,$pass" = "prog,scan" ||
+	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+	fi
+
+	if test "$pass" = conv; then
+	  # Only check for convenience libraries
+	  deplibs="$lib $deplibs"
+	  if test -z "$libdir"; then
+	    if test -z "$old_library"; then
+	      func_fatal_error "cannot find name of link library for \`$lib'"
+	    fi
+	    # It is a libtool convenience library, so add in its objects.
+	    convenience="$convenience $ladir/$objdir/$old_library"
+	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
+	  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_duplicate_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+	  continue
+	fi # $pass = conv
+
+
+	# Get the name of the library we link against.
+	linklib=
+	for l in $old_library $library_names; do
+	  linklib="$l"
+	done
+	if test -z "$linklib"; then
+	  func_fatal_error "cannot find name of link library for \`$lib'"
+	fi
+
+	# This library was specified with -dlopen.
+	if test "$pass" = dlopen; then
+	  if test -z "$libdir"; then
+	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+	  fi
+	  if test -z "$dlname" ||
+	     test "$dlopen_support" != yes ||
+	     test "$build_libtool_libs" = no; then
+	    # If there is no dlname, no dlopen support or we're linking
+	    # statically, we need to preload.  We also need to preload any
+	    # dependent libraries so libltdl's deplib preloader doesn't
+	    # bomb out in the load deplibs phase.
+	    dlprefiles="$dlprefiles $lib $dependency_libs"
+	  else
+	    newdlfiles="$newdlfiles $lib"
+	  fi
+	  continue
+	fi # $pass = dlopen
+
+	# We need an absolute path.
+	case $ladir in
+	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+	*)
+	  abs_ladir=`cd "$ladir" && pwd`
+	  if test -z "$abs_ladir"; then
+	    func_warning "cannot determine absolute directory name of \`$ladir'"
+	    func_warning "passing it literally to the linker, although it might fail"
+	    abs_ladir="$ladir"
+	  fi
+	  ;;
+	esac
+	func_basename "$lib"
+	laname="$func_basename_result"
+
+	# Find the relevant object directory and library name.
+	if test "X$installed" = Xyes; then
+	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    func_warning "library \`$lib' was moved."
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    libdir="$abs_ladir"
+	  else
+	    dir="$libdir"
+	    absdir="$libdir"
+	  fi
+	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+	else
+	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+	    dir="$ladir"
+	    absdir="$abs_ladir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  else
+	    dir="$ladir/$objdir"
+	    absdir="$abs_ladir/$objdir"
+	    # Remove this search path later
+	    notinst_path="$notinst_path $abs_ladir"
+	  fi
+	fi # $installed = yes
+	func_stripname 'lib' '.la' "$laname"
+	name=$func_stripname_result
+
+	# This library was specified with -dlpreopen.
+	if test "$pass" = dlpreopen; then
+	  if test -z "$libdir" && test "$linkmode" = prog; then
+	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+	  fi
+	  # Prefer using a static library (so that no silly _DYNAMIC symbols
+	  # are required to link).
+	  if test -n "$old_library"; then
+	    newdlprefiles="$newdlprefiles $dir/$old_library"
+	    # Keep a list of preopened convenience libraries to check
+	    # that they are being used correctly in the link pass.
+	    test -z "$libdir" && \
+		dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+	  # Otherwise, use the dlname, so that lt_dlopen finds it.
+	  elif test -n "$dlname"; then
+	    newdlprefiles="$newdlprefiles $dir/$dlname"
+	  else
+	    newdlprefiles="$newdlprefiles $dir/$linklib"
+	  fi
+	fi # $pass = dlpreopen
+
+	if test -z "$libdir"; then
+	  # Link the convenience library
+	  if test "$linkmode" = lib; then
+	    deplibs="$dir/$old_library $deplibs"
+	  elif test "$linkmode,$pass" = "prog,link"; then
+	    compile_deplibs="$dir/$old_library $compile_deplibs"
+	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
+	  else
+	    deplibs="$lib $deplibs" # used for prog,scan pass
+	  fi
+	  continue
+	fi
+
+
+	if test "$linkmode" = prog && test "$pass" != link; then
+	  newlib_search_path="$newlib_search_path $ladir"
+	  deplibs="$lib $deplibs"
+
+	  linkalldeplibs=no
+	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
+	     test "$build_libtool_libs" = no; then
+	    linkalldeplibs=yes
+	  fi
+
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    case $deplib in
+	    -L*) func_stripname '-L' '' "$deplib"
+	         newlib_search_path="$newlib_search_path $func_stripname_result"
+		 ;;
+	    esac
+	    # Need to link against all dependency_libs?
+	    if test "$linkalldeplibs" = yes; then
+	      deplibs="$deplib $deplibs"
+	    else
+	      # Need to hardcode shared library paths
+	      # or/and link against static libraries
+	      newdependency_libs="$deplib $newdependency_libs"
+	    fi
+	    if $opt_duplicate_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done # for deplib
+	  continue
+	fi # $linkmode = prog...
+
+	if test "$linkmode,$pass" = "prog,link"; then
+	  if test -n "$library_names" &&
+	     { { test "$prefer_static_libs" = no ||
+	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
+	       test -z "$old_library"; }; then
+	    # We need to hardcode the library path
+	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+	      # Make sure the rpath contains only unique directories.
+	      case "$temp_rpath:" in
+	      *"$absdir:"*) ;;
+	      *) temp_rpath="$temp_rpath$absdir:" ;;
+	      esac
+	    fi
+
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi # $linkmode,$pass = prog,link...
+
+	  if test "$alldeplibs" = yes &&
+	     { test "$deplibs_check_method" = pass_all ||
+	       { test "$build_libtool_libs" = yes &&
+		 test -n "$library_names"; }; }; then
+	    # We only need to search for static libraries
+	    continue
+	  fi
+	fi
+
+	link_static=no # Whether the deplib will be linked statically
+	use_static_libs=$prefer_static_libs
+	if test "$use_static_libs" = built && test "$installed" = yes; then
+	  use_static_libs=no
+	fi
+	if test -n "$library_names" &&
+	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
+	  case $host in
+	  *cygwin* | *mingw* | *cegcc*)
+	      # No point in relinking DLLs because paths are not encoded
+	      notinst_deplibs="$notinst_deplibs $lib"
+	      need_relink=no
+	    ;;
+	  *)
+	    if test "$installed" = no; then
+	      notinst_deplibs="$notinst_deplibs $lib"
+	      need_relink=yes
+	    fi
+	    ;;
+	  esac
+	  # This is a shared library
+
+	  # Warn about portability, can't link against -module's on some
+	  # systems (darwin).  Don't bleat about dlopened modules though!
+	  dlopenmodule=""
+	  for dlpremoduletest in $dlprefiles; do
+	    if test "X$dlpremoduletest" = "X$lib"; then
+	      dlopenmodule="$dlpremoduletest"
+	      break
+	    fi
+	  done
+	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+	    $ECHO
+	    if test "$linkmode" = prog; then
+	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
+	    else
+	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+	    fi
+	    $ECHO "*** $linklib is not portable!"
+	  fi
+	  if test "$linkmode" = lib &&
+	     test "$hardcode_into_libs" = yes; then
+	    # Hardcode the library path.
+	    # Skip directories that are in the system default run-time
+	    # search path.
+	    case " $sys_lib_dlsearch_path " in
+	    *" $absdir "*) ;;
+	    *)
+	      case "$compile_rpath " in
+	      *" $absdir "*) ;;
+	      *) compile_rpath="$compile_rpath $absdir"
+	      esac
+	      ;;
+	    esac
+	    case " $sys_lib_dlsearch_path " in
+	    *" $libdir "*) ;;
+	    *)
+	      case "$finalize_rpath " in
+	      *" $libdir "*) ;;
+	      *) finalize_rpath="$finalize_rpath $libdir"
+	      esac
+	      ;;
+	    esac
+	  fi
+
+	  if test -n "$old_archive_from_expsyms_cmds"; then
+	    # figure out the soname
+	    set dummy $library_names
+	    shift
+	    realname="$1"
+	    shift
+	    libname=`eval "\\$ECHO \"$libname_spec\""`
+	    # use dlname if we got it. it's perfectly good, no?
+	    if test -n "$dlname"; then
+	      soname="$dlname"
+	    elif test -n "$soname_spec"; then
+	      # bleh windows
+	      case $host in
+	      *cygwin* | mingw* | *cegcc*)
+	        func_arith $current - $age
+		major=$func_arith_result
+		versuffix="-$major"
+		;;
+	      esac
+	      eval soname=\"$soname_spec\"
+	    else
+	      soname="$realname"
+	    fi
+
+	    # Make a new name for the extract_expsyms_cmds to use
+	    soroot="$soname"
+	    func_basename "$soroot"
+	    soname="$func_basename_result"
+	    func_stripname 'lib' '.dll' "$soname"
+	    newlib=libimp-$func_stripname_result.a
+
+	    # If the library has no export list, then create one now
+	    if test -f "$output_objdir/$soname-def"; then :
+	    else
+	      func_verbose "extracting exported symbol list from \`$soname'"
+	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+	    fi
+
+	    # Create $newlib
+	    if test -f "$output_objdir/$newlib"; then :; else
+	      func_verbose "generating import library for \`$soname'"
+	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+	    fi
+	    # make sure the library variables are pointing to the new library
+	    dir=$output_objdir
+	    linklib=$newlib
+	  fi # test -n "$old_archive_from_expsyms_cmds"
+
+	  if test "$linkmode" = prog || test "$mode" != relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    lib_linked=yes
+	    case $hardcode_action in
+	    immediate | unsupported)
+	      if test "$hardcode_direct" = no; then
+		add="$dir/$linklib"
+		case $host in
+		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+		    *-*-unixware7*) add_dir="-L$dir" ;;
+		  *-*-darwin* )
+		    # if the lib is a (non-dlopened) module then we can not
+		    # link against it, someone is ignoring the earlier warnings
+		    if /usr/bin/file -L $add 2> /dev/null |
+			 $GREP ": [^:]* bundle" >/dev/null ; then
+		      if test "X$dlopenmodule" != "X$lib"; then
+			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
+			if test -z "$old_library" ; then
+			  $ECHO
+			  $ECHO "*** And there doesn't seem to be a static archive available"
+			  $ECHO "*** The link will probably fail, sorry"
+			else
+			  add="$dir/$old_library"
+			fi
+		      elif test -n "$old_library"; then
+			add="$dir/$old_library"
+		      fi
+		    fi
+		esac
+	      elif test "$hardcode_minus_L" = no; then
+		case $host in
+		*-*-sunos*) add_shlibpath="$dir" ;;
+		esac
+		add_dir="-L$dir"
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = no; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    relink)
+	      if test "$hardcode_direct" = yes &&
+	         test "$hardcode_direct_absolute" = no; then
+		add="$dir/$linklib"
+	      elif test "$hardcode_minus_L" = yes; then
+		add_dir="-L$dir"
+		# Try looking first in the location we're being installed to.
+		if test -n "$inst_prefix_dir"; then
+		  case $libdir in
+		    [\\/]*)
+		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		      ;;
+		  esac
+		fi
+		add="-l$name"
+	      elif test "$hardcode_shlibpath_var" = yes; then
+		add_shlibpath="$dir"
+		add="-l$name"
+	      else
+		lib_linked=no
+	      fi
+	      ;;
+	    *) lib_linked=no ;;
+	    esac
+
+	    if test "$lib_linked" != yes; then
+	      func_fatal_configuration "unsupported hardcode properties"
+	    fi
+
+	    if test -n "$add_shlibpath"; then
+	      case :$compile_shlibpath: in
+	      *":$add_shlibpath:"*) ;;
+	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+	      esac
+	    fi
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	      if test "$hardcode_direct" != yes &&
+		 test "$hardcode_minus_L" != yes &&
+		 test "$hardcode_shlibpath_var" = yes; then
+		case :$finalize_shlibpath: in
+		*":$libdir:"*) ;;
+		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+		esac
+	      fi
+	    fi
+	  fi
+
+	  if test "$linkmode" = prog || test "$mode" = relink; then
+	    add_shlibpath=
+	    add_dir=
+	    add=
+	    # Finalize command for both is simple: just hardcode it.
+	    if test "$hardcode_direct" = yes &&
+	       test "$hardcode_direct_absolute" = no; then
+	      add="$libdir/$linklib"
+	    elif test "$hardcode_minus_L" = yes; then
+	      add_dir="-L$libdir"
+	      add="-l$name"
+	    elif test "$hardcode_shlibpath_var" = yes; then
+	      case :$finalize_shlibpath: in
+	      *":$libdir:"*) ;;
+	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+	      esac
+	      add="-l$name"
+	    elif test "$hardcode_automatic" = yes; then
+	      if test -n "$inst_prefix_dir" &&
+		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
+		add="$inst_prefix_dir$libdir/$linklib"
+	      else
+		add="$libdir/$linklib"
+	      fi
+	    else
+	      # We cannot seem to hardcode it, guess we'll fake it.
+	      add_dir="-L$libdir"
+	      # Try looking first in the location we're being installed to.
+	      if test -n "$inst_prefix_dir"; then
+		case $libdir in
+		  [\\/]*)
+		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
+		    ;;
+		esac
+	      fi
+	      add="-l$name"
+	    fi
+
+	    if test "$linkmode" = prog; then
+	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+	    else
+	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
+	      test -n "$add" && deplibs="$add $deplibs"
+	    fi
+	  fi
+	elif test "$linkmode" = prog; then
+	  # Here we assume that one of hardcode_direct or hardcode_minus_L
+	  # is not unsupported.  This is valid on all known static and
+	  # shared platforms.
+	  if test "$hardcode_direct" != unsupported; then
+	    test -n "$old_library" && linklib="$old_library"
+	    compile_deplibs="$dir/$linklib $compile_deplibs"
+	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
+	  else
+	    compile_deplibs="-l$name -L$dir $compile_deplibs"
+	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+	  fi
+	elif test "$build_libtool_libs" = yes; then
+	  # Not a shared library
+	  if test "$deplibs_check_method" != pass_all; then
+	    # We're trying link a shared library against a static one
+	    # but the system doesn't support it.
+
+	    # Just print a warning and add the library to dependency_libs so
+	    # that the program can be linked against the static library.
+	    $ECHO
+	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
+	    $ECHO "*** I have the capability to make that library automatically link in when"
+	    $ECHO "*** you link to this library.  But I can only do this if you have a"
+	    $ECHO "*** shared version of the library, which you do not appear to have."
+	    if test "$module" = yes; then
+	      $ECHO "*** But as you try to build a module library, libtool will still create "
+	      $ECHO "*** a static module, that should work as long as the dlopening application"
+	      $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+	      if test -z "$global_symbol_pipe"; then
+		$ECHO
+		$ECHO "*** However, this would only work if libtool was able to extract symbol"
+		$ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+		$ECHO "*** not find such a program.  So, this module is probably useless."
+		$ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+	      fi
+	      if test "$build_old_libs" = no; then
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  else
+	    deplibs="$dir/$old_library $deplibs"
+	    link_static=yes
+	  fi
+	fi # link shared/static library?
+
+	if test "$linkmode" = lib; then
+	  if test -n "$dependency_libs" &&
+	     { test "$hardcode_into_libs" != yes ||
+	       test "$build_old_libs" = yes ||
+	       test "$link_static" = yes; }; then
+	    # Extract -R from dependency_libs
+	    temp_deplibs=
+	    for libdir in $dependency_libs; do
+	      case $libdir in
+	      -R*) func_stripname '-R' '' "$libdir"
+	           temp_xrpath=$func_stripname_result
+		   case " $xrpath " in
+		   *" $temp_xrpath "*) ;;
+		   *) xrpath="$xrpath $temp_xrpath";;
+		   esac;;
+	      *) temp_deplibs="$temp_deplibs $libdir";;
+	      esac
+	    done
+	    dependency_libs="$temp_deplibs"
+	  fi
+
+	  newlib_search_path="$newlib_search_path $absdir"
+	  # Link against this library
+	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+	  # ... and its dependency_libs
+	  tmp_libs=
+	  for deplib in $dependency_libs; do
+	    newdependency_libs="$deplib $newdependency_libs"
+	    if $opt_duplicate_deps ; then
+	      case "$tmp_libs " in
+	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+	      esac
+	    fi
+	    tmp_libs="$tmp_libs $deplib"
+	  done
+
+	  if test "$link_all_deplibs" != no; then
+	    # Add the search paths of all dependency libraries
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      -L*) path="$deplib" ;;
+	      *.la)
+	        func_dirname "$deplib" "" "."
+		dir="$func_dirname_result"
+		# We need an absolute path.
+		case $dir in
+		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+		*)
+		  absdir=`cd "$dir" && pwd`
+		  if test -z "$absdir"; then
+		    func_warning "cannot determine absolute directory name of \`$dir'"
+		    absdir="$dir"
+		  fi
+		  ;;
+		esac
+		if $GREP "^installed=no" $deplib > /dev/null; then
+		case $host in
+		*-*-darwin*)
+		  depdepl=
+		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+		  if test -n "$deplibrary_names" ; then
+		    for tmp in $deplibrary_names ; do
+		      depdepl=$tmp
+		    done
+		    if test -f "$absdir/$objdir/$depdepl" ; then
+		      depdepl="$absdir/$objdir/$depdepl"
+		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+                      if test -z "$darwin_install_name"; then
+                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
+                      fi
+		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+		      linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+		      path=
+		    fi
+		  fi
+		  ;;
+		*)
+		  path="-L$absdir/$objdir"
+		  ;;
+		esac
+		else
+		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		  test -z "$libdir" && \
+		    func_fatal_error "\`$deplib' is not a valid libtool archive"
+		  test "$absdir" != "$libdir" && \
+		    func_warning "\`$deplib' seems to be moved"
+
+		  path="-L$absdir"
+		fi
+		;;
+	      esac
+	      case " $deplibs " in
+	      *" $path "*) ;;
+	      *) deplibs="$path $deplibs" ;;
+	      esac
+	    done
+	  fi # link_all_deplibs != no
+	fi # linkmode = lib
+      done # for deplib in $libs
+      if test "$pass" = link; then
+	if test "$linkmode" = "prog"; then
+	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+	else
+	  compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	fi
+      fi
+      dependency_libs="$newdependency_libs"
+      if test "$pass" = dlpreopen; then
+	# Link the dlpreopened libraries before other libraries
+	for deplib in $save_deplibs; do
+	  deplibs="$deplib $deplibs"
+	done
+      fi
+      if test "$pass" != dlopen; then
+	if test "$pass" != conv; then
+	  # Make sure lib_search_path contains only unique directories.
+	  lib_search_path=
+	  for dir in $newlib_search_path; do
+	    case "$lib_search_path " in
+	    *" $dir "*) ;;
+	    *) lib_search_path="$lib_search_path $dir" ;;
+	    esac
+	  done
+	  newlib_search_path=
+	fi
+
+	if test "$linkmode,$pass" != "prog,link"; then
+	  vars="deplibs"
+	else
+	  vars="compile_deplibs finalize_deplibs"
+	fi
+	for var in $vars dependency_libs; do
+	  # Add libraries to $var in reverse order
+	  eval tmp_libs=\"\$$var\"
+	  new_libs=
+	  for deplib in $tmp_libs; do
+	    # FIXME: Pedantically, this is the right thing to do, so
+	    #        that some nasty dependency loop isn't accidentally
+	    #        broken:
+	    #new_libs="$deplib $new_libs"
+	    # Pragmatically, this seems to cause very few problems in
+	    # practice:
+	    case $deplib in
+	    -L*) new_libs="$deplib $new_libs" ;;
+	    -R*) ;;
+	    *)
+	      # And here is the reason: when a library appears more
+	      # than once as an explicit dependence of a library, or
+	      # is implicitly linked in more than once by the
+	      # compiler, it is considered special, and multiple
+	      # occurrences thereof are not removed.  Compare this
+	      # with having the same library being listed as a
+	      # dependency of multiple other libraries: in this case,
+	      # we know (pedantically, we assume) the library does not
+	      # need to be listed more than once, so we keep only the
+	      # last copy.  This is not always right, but it is rare
+	      # enough that we require users that really mean to play
+	      # such unportable linking tricks to link the library
+	      # using -Wl,-lname, so that libtool does not consider it
+	      # for duplicate removal.
+	      case " $specialdeplibs " in
+	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
+	      *)
+		case " $new_libs " in
+		*" $deplib "*) ;;
+		*) new_libs="$deplib $new_libs" ;;
+		esac
+		;;
+	      esac
+	      ;;
+	    esac
+	  done
+	  tmp_libs=
+	  for deplib in $new_libs; do
+	    case $deplib in
+	    -L*)
+	      case " $tmp_libs " in
+	      *" $deplib "*) ;;
+	      *) tmp_libs="$tmp_libs $deplib" ;;
+	      esac
+	      ;;
+	    *) tmp_libs="$tmp_libs $deplib" ;;
+	    esac
+	  done
+	  eval $var=\"$tmp_libs\"
+	done # for var
+      fi
+      # Last step: remove runtime libs from dependency_libs
+      # (they stay in deplibs)
+      tmp_libs=
+      for i in $dependency_libs ; do
+	case " $predeps $postdeps $compiler_lib_search_path " in
+	*" $i "*)
+	  i=""
+	  ;;
+	esac
+	if test -n "$i" ; then
+	  tmp_libs="$tmp_libs $i"
+	fi
+      done
+      dependency_libs=$tmp_libs
+    done # for pass
+    if test "$linkmode" = prog; then
+      dlfiles="$newdlfiles"
+    fi
+    if test "$linkmode" = prog || test "$linkmode" = lib; then
+      dlprefiles="$newdlprefiles"
+    fi
+
+    case $linkmode in
+    oldlib)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for archives"
+      fi
+
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for archives" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for archives"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for archives"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info/-version-number' is ignored for archives"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for archives"
+
+      test -n "$export_symbols$export_symbols_regex" && \
+	func_warning "\`-export-symbols' is ignored for archives"
+
+      # Now set the variables for building old libraries.
+      build_libtool_libs=no
+      oldlibs="$output"
+      objs="$objs$old_deplibs"
+      ;;
+
+    lib)
+      # Make sure we only generate libraries of the form `libNAME.la'.
+      case $outputname in
+      lib*)
+	func_stripname 'lib' '.la' "$outputname"
+	name=$func_stripname_result
+	eval shared_ext=\"$shrext_cmds\"
+	eval libname=\"$libname_spec\"
+	;;
+      *)
+	test "$module" = no && \
+	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+	if test "$need_lib_prefix" != no; then
+	  # Add the "lib" prefix for modules if required
+	  func_stripname '' '.la' "$outputname"
+	  name=$func_stripname_result
+	  eval shared_ext=\"$shrext_cmds\"
+	  eval libname=\"$libname_spec\"
+	else
+	  func_stripname '' '.la' "$outputname"
+	  libname=$func_stripname_result
+	fi
+	;;
+      esac
+
+      if test -n "$objs"; then
+	if test "$deplibs_check_method" != pass_all; then
+	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+	else
+	  $ECHO
+	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+	  $ECHO "*** objects $objs is not portable!"
+	  libobjs="$libobjs $objs"
+	fi
+      fi
+
+      test "$dlself" != no && \
+	func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+      set dummy $rpath
+      shift
+      test "$#" -gt 1 && \
+	func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+      install_libdir="$1"
+
+      oldlibs=
+      if test -z "$rpath"; then
+	if test "$build_libtool_libs" = yes; then
+	  # Building a libtool convenience library.
+	  # Some compilers have problems with a `.al' extension so
+	  # convenience libraries should have the same extension an
+	  # archive normally would.
+	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
+	  build_libtool_libs=convenience
+	  build_old_libs=yes
+	fi
+
+	test -n "$vinfo" && \
+	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+	test -n "$release" && \
+	  func_warning "\`-release' is ignored for convenience libraries"
+      else
+
+	# Parse the version information argument.
+	save_ifs="$IFS"; IFS=':'
+	set dummy $vinfo 0 0 0
+	shift
+	IFS="$save_ifs"
+
+	test -n "$7" && \
+	  func_fatal_help "too many parameters to \`-version-info'"
+
+	# convert absolute version numbers to libtool ages
+	# this retains compatibility with .la files and attempts
+	# to make the code below a bit more comprehensible
+
+	case $vinfo_number in
+	yes)
+	  number_major="$1"
+	  number_minor="$2"
+	  number_revision="$3"
+	  #
+	  # There are really only two kinds -- those that
+	  # use the current revision as the major version
+	  # and those that subtract age and use age as
+	  # a minor version.  But, then there is irix
+	  # which has an extra 1 added just for fun
+	  #
+	  case $version_type in
+	  darwin|linux|osf|windows|none)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_revision"
+	    ;;
+	  freebsd-aout|freebsd-elf|sunos)
+	    current="$number_major"
+	    revision="$number_minor"
+	    age="0"
+	    ;;
+	  irix|nonstopux)
+	    func_arith $number_major + $number_minor
+	    current=$func_arith_result
+	    age="$number_minor"
+	    revision="$number_minor"
+	    lt_irix_increment=no
+	    ;;
+	  esac
+	  ;;
+	no)
+	  current="$1"
+	  revision="$2"
+	  age="$3"
+	  ;;
+	esac
+
+	# Check that each of the things are valid numbers.
+	case $current in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "CURRENT \`$current' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	case $revision in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "REVISION \`$revision' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	case $age in
+	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+	*)
+	  func_error "AGE \`$age' must be a nonnegative integer"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	  ;;
+	esac
+
+	if test "$age" -gt "$current"; then
+	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
+	  func_fatal_error "\`$vinfo' is not valid version information"
+	fi
+
+	# Calculate the version variables.
+	major=
+	versuffix=
+	verstring=
+	case $version_type in
+	none) ;;
+
+	darwin)
+	  # Like Linux, but with the current version available in
+	  # verstring for coding it into the library header
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  # Darwin ld doesn't like 0 for these options...
+	  func_arith $current + 1
+	  minor_current=$func_arith_result
+	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+	  ;;
+
+	freebsd-aout)
+	  major=".$current"
+	  versuffix=".$current.$revision";
+	  ;;
+
+	freebsd-elf)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	irix | nonstopux)
+	  if test "X$lt_irix_increment" = "Xno"; then
+	    func_arith $current - $age
+	  else
+	    func_arith $current - $age + 1
+	  fi
+	  major=$func_arith_result
+
+	  case $version_type in
+	    nonstopux) verstring_prefix=nonstopux ;;
+	    *)         verstring_prefix=sgi ;;
+	  esac
+	  verstring="$verstring_prefix$major.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$revision
+	  while test "$loop" -ne 0; do
+	    func_arith $revision - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring_prefix$major.$iface:$verstring"
+	  done
+
+	  # Before this point, $major must not contain `.'.
+	  major=.$major
+	  versuffix="$major.$revision"
+	  ;;
+
+	linux)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix="$major.$age.$revision"
+	  ;;
+
+	osf)
+	  func_arith $current - $age
+	  major=.$func_arith_result
+	  versuffix=".$current.$age.$revision"
+	  verstring="$current.$age.$revision"
+
+	  # Add in all the interfaces that we are compatible with.
+	  loop=$age
+	  while test "$loop" -ne 0; do
+	    func_arith $current - $loop
+	    iface=$func_arith_result
+	    func_arith $loop - 1
+	    loop=$func_arith_result
+	    verstring="$verstring:${iface}.0"
+	  done
+
+	  # Make executables depend on our current version.
+	  verstring="$verstring:${current}.0"
+	  ;;
+
+	qnx)
+	  major=".$current"
+	  versuffix=".$current"
+	  ;;
+
+	sunos)
+	  major=".$current"
+	  versuffix=".$current.$revision"
+	  ;;
+
+	windows)
+	  # Use '-' rather than '.', since we only want one
+	  # extension on DOS 8.3 filesystems.
+	  func_arith $current - $age
+	  major=$func_arith_result
+	  versuffix="-$major"
+	  ;;
+
+	*)
+	  func_fatal_configuration "unknown library version type \`$version_type'"
+	  ;;
+	esac
+
+	# Clear the version info if we defaulted, and they specified a release.
+	if test -z "$vinfo" && test -n "$release"; then
+	  major=
+	  case $version_type in
+	  darwin)
+	    # we can't check for "0.0" in archive_cmds due to quoting
+	    # problems, so we reset it completely
+	    verstring=
+	    ;;
+	  *)
+	    verstring="0.0"
+	    ;;
+	  esac
+	  if test "$need_version" = no; then
+	    versuffix=
+	  else
+	    versuffix=".0.0"
+	  fi
+	fi
+
+	# Remove version info from name if versioning should be avoided
+	if test "$avoid_version" = yes && test "$need_version" = no; then
+	  major=
+	  versuffix=
+	  verstring=""
+	fi
+
+	# Check to see if the archive will have undefined symbols.
+	if test "$allow_undefined" = yes; then
+	  if test "$allow_undefined_flag" = unsupported; then
+	    func_warning "undefined symbols not allowed in $host shared libraries"
+	    build_libtool_libs=no
+	    build_old_libs=yes
+	  fi
+	else
+	  # Don't allow undefined symbols.
+	  allow_undefined_flag="$no_undefined_flag"
+	fi
+
+      fi
+
+      func_generate_dlsyms "$libname" "$libname" "yes"
+      libobjs="$libobjs $symfileobj"
+      test "X$libobjs" = "X " && libobjs=
+
+      if test "$mode" != relink; then
+	# Remove our outputs, but don't remove object files since they
+	# may have been created when compiling PIC objects.
+	removelist=
+	tempremovelist=`$ECHO "$output_objdir/*"`
+	for p in $tempremovelist; do
+	  case $p in
+	    *.$objext | *.gcno)
+	       ;;
+	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+	       if test "X$precious_files_regex" != "X"; then
+		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+		 then
+		   continue
+		 fi
+	       fi
+	       removelist="$removelist $p"
+	       ;;
+	    *) ;;
+	  esac
+	done
+	test -n "$removelist" && \
+	  func_show_eval "${RM}r \$removelist"
+      fi
+
+      # Now set the variables for building old libraries.
+      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+	oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+	# Transform .lo files to .o files.
+	oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+      fi
+
+      # Eliminate all temporary directories.
+      #for path in $notinst_path; do
+      #	lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+      #	deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+      #	dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+      #done
+
+      if test -n "$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	temp_xrpath=
+	for libdir in $xrpath; do
+	  temp_xrpath="$temp_xrpath -R$libdir"
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+	  dependency_libs="$temp_xrpath $dependency_libs"
+	fi
+      fi
+
+      # Make sure dlfiles contains only unique files that won't be dlpreopened
+      old_dlfiles="$dlfiles"
+      dlfiles=
+      for lib in $old_dlfiles; do
+	case " $dlprefiles $dlfiles " in
+	*" $lib "*) ;;
+	*) dlfiles="$dlfiles $lib" ;;
+	esac
+      done
+
+      # Make sure dlprefiles contains only unique files
+      old_dlprefiles="$dlprefiles"
+      dlprefiles=
+      for lib in $old_dlprefiles; do
+	case "$dlprefiles " in
+	*" $lib "*) ;;
+	*) dlprefiles="$dlprefiles $lib" ;;
+	esac
+      done
+
+      if test "$build_libtool_libs" = yes; then
+	if test -n "$rpath"; then
+	  case $host in
+	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+	    # these systems don't actually have a c library (as such)!
+	    ;;
+	  *-*-rhapsody* | *-*-darwin1.[012])
+	    # Rhapsody C library is in the System framework
+	    deplibs="$deplibs System.ltframework"
+	    ;;
+	  *-*-netbsd*)
+	    # Don't link with libc until the a.out ld.so is fixed.
+	    ;;
+	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+	    # Do not include libc due to us having libc/libc_r.
+	    ;;
+	  *-*-sco3.2v5* | *-*-sco5v6*)
+	    # Causes problems with __ctype
+	    ;;
+	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+	    # Compiler inserts libc in the correct place for threads to work
+	    ;;
+	  *)
+	    # Add libc to deplibs on all other systems if necessary.
+	    if test "$build_libtool_need_lc" = "yes"; then
+	      deplibs="$deplibs -lc"
+	    fi
+	    ;;
+	  esac
+	fi
+
+	# Transform deplibs into only deplibs that can be linked in shared.
+	name_save=$name
+	libname_save=$libname
+	release_save=$release
+	versuffix_save=$versuffix
+	major_save=$major
+	# I'm not sure if I'm treating the release correctly.  I think
+	# release should show up in the -l (ie -lgmp5) so we don't want to
+	# add it in twice.  Is that correct?
+	release=""
+	versuffix=""
+	major=""
+	newdeplibs=
+	droppeddeps=no
+	case $deplibs_check_method in
+	pass_all)
+	  # Don't check for shared/static.  Everything works.
+	  # This might be a little naive.  We might want to check
+	  # whether the library exists or not.  But this is on
+	  # osf3 & osf4 and I'm not really sure... Just
+	  # implementing what was already the behavior.
+	  newdeplibs=$deplibs
+	  ;;
+	test_compile)
+	  # This code stresses the "libraries are programs" paradigm to its
+	  # limits. Maybe even breaks it.  We compile a program, linking it
+	  # against the deplibs as a proxy for the library.  Then we can check
+	  # whether they linked in statically or dynamically with ldd.
+	  $opt_dry_run || $RM conftest.c
+	  cat > conftest.c <<EOF
+	  int main() { return 0; }
+EOF
+	  $opt_dry_run || $RM conftest
+	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+	    ldd_output=`ldd conftest`
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		  case " $predeps $postdeps " in
+		  *" $i "*)
+		    newdeplibs="$newdeplibs $i"
+		    i=""
+		    ;;
+		  esac
+		fi
+		if test -n "$i" ; then
+		  libname=`eval "\\$ECHO \"$libname_spec\""`
+		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		  set dummy $deplib_matches; shift
+		  deplib_match=$1
+		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		    newdeplibs="$newdeplibs $i"
+		  else
+		    droppeddeps=yes
+		    $ECHO
+		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		    $ECHO "*** I have the capability to make that library automatically link in when"
+		    $ECHO "*** you link to this library.  But I can only do this if you have a"
+		    $ECHO "*** shared version of the library, which I believe you do not have"
+		    $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+		    $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+		  fi
+		fi
+		;;
+	      *)
+		newdeplibs="$newdeplibs $i"
+		;;
+	      esac
+	    done
+	  else
+	    # Error occurred in the first compile.  Let's try to salvage
+	    # the situation: Compile a separate program for each library.
+	    for i in $deplibs; do
+	      case $i in
+	      -l*)
+		func_stripname -l '' "$i"
+		name=$func_stripname_result
+		$opt_dry_run || $RM conftest
+		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+		  ldd_output=`ldd conftest`
+		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		    case " $predeps $postdeps " in
+		    *" $i "*)
+		      newdeplibs="$newdeplibs $i"
+		      i=""
+		      ;;
+		    esac
+		  fi
+		  if test -n "$i" ; then
+		    libname=`eval "\\$ECHO \"$libname_spec\""`
+		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+		    set dummy $deplib_matches; shift
+		    deplib_match=$1
+		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+		      newdeplibs="$newdeplibs $i"
+		    else
+		      droppeddeps=yes
+		      $ECHO
+		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+		      $ECHO "*** I have the capability to make that library automatically link in when"
+		      $ECHO "*** you link to this library.  But I can only do this if you have a"
+		      $ECHO "*** shared version of the library, which you do not appear to have"
+		      $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+		      $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+		    fi
+		  fi
+		else
+		  droppeddeps=yes
+		  $ECHO
+		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
+		  $ECHO "*** make it link in!  You will probably need to install it or some"
+		  $ECHO "*** library that it depends on before this library will be fully"
+		  $ECHO "*** functional.  Installing it before continuing would be even better."
+		fi
+		;;
+	      *)
+		newdeplibs="$newdeplibs $i"
+		;;
+	      esac
+	    done
+	  fi
+	  ;;
+	file_magic*)
+	  set dummy $deplibs_check_method; shift
+	  file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		      # Follow soft links.
+		      if ls -lLd "$potent_lib" 2>/dev/null |
+			 $GREP " -> " >/dev/null; then
+			continue
+		      fi
+		      # The statement above tries to avoid entering an
+		      # endless loop below, in case of cyclic links.
+		      # We might still enter an endless loop, since a link
+		      # loop can be closed while we follow links,
+		      # but so what?
+		      potlib="$potent_lib"
+		      while test -h "$potlib" 2>/dev/null; do
+			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+			case $potliblink in
+			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+			*) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+			esac
+		      done
+		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+			 $SED -e 10q |
+			 $EGREP "$file_magic_regex" > /dev/null; then
+			newdeplibs="$newdeplibs $a_deplib"
+			a_deplib=""
+			break 2
+		      fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$ECHO
+		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+		$ECHO "*** I have the capability to make that library automatically link in when"
+		$ECHO "*** you link to this library.  But I can only do this if you have a"
+		$ECHO "*** shared version of the library, which you do not appear to have"
+		$ECHO "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+		else
+		  $ECHO "*** with $libname and none of the candidates passed a file format test"
+		  $ECHO "*** using a file magic. Last file checked: $potlib"
+		fi
+	      fi
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	match_pattern*)
+	  set dummy $deplibs_check_method; shift
+	  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+	  for a_deplib in $deplibs; do
+	    case $a_deplib in
+	    -l*)
+	      func_stripname -l '' "$a_deplib"
+	      name=$func_stripname_result
+	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+		case " $predeps $postdeps " in
+		*" $a_deplib "*)
+		  newdeplibs="$newdeplibs $a_deplib"
+		  a_deplib=""
+		  ;;
+		esac
+	      fi
+	      if test -n "$a_deplib" ; then
+		libname=`eval "\\$ECHO \"$libname_spec\""`
+		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+		  for potent_lib in $potential_libs; do
+		    potlib="$potent_lib" # see symlink-check above in file_magic test
+		    if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+		       $EGREP "$match_pattern_regex" > /dev/null; then
+		      newdeplibs="$newdeplibs $a_deplib"
+		      a_deplib=""
+		      break 2
+		    fi
+		  done
+		done
+	      fi
+	      if test -n "$a_deplib" ; then
+		droppeddeps=yes
+		$ECHO
+		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+		$ECHO "*** I have the capability to make that library automatically link in when"
+		$ECHO "*** you link to this library.  But I can only do this if you have a"
+		$ECHO "*** shared version of the library, which you do not appear to have"
+		$ECHO "*** because I did check the linker path looking for a file starting"
+		if test -z "$potlib" ; then
+		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+		else
+		  $ECHO "*** with $libname and none of the candidates passed a file format test"
+		  $ECHO "*** using a regex pattern. Last file checked: $potlib"
+		fi
+	      fi
+	      ;;
+	    *)
+	      # Add a -L argument.
+	      newdeplibs="$newdeplibs $a_deplib"
+	      ;;
+	    esac
+	  done # Gone through all deplibs.
+	  ;;
+	none | unknown | *)
+	  newdeplibs=""
+	  tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+	      -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+	    for i in $predeps $postdeps ; do
+	      # can't use Xsed below, because $i might contain '/'
+	      tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+	    done
+	  fi
+	  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[	 ]//g' |
+	     $GREP . >/dev/null; then
+	    $ECHO
+	    if test "X$deplibs_check_method" = "Xnone"; then
+	      $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+	    else
+	      $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+	    fi
+	    $ECHO "*** All declared inter-library dependencies are being dropped."
+	    droppeddeps=yes
+	  fi
+	  ;;
+	esac
+	versuffix=$versuffix_save
+	major=$major_save
+	release=$release_save
+	libname=$libname_save
+	name=$name_save
+
+	case $host in
+	*-*-rhapsody* | *-*-darwin1.[012])
+	  # On Rhapsody replace the C library with the System framework
+	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	  ;;
+	esac
+
+	if test "$droppeddeps" = yes; then
+	  if test "$module" = yes; then
+	    $ECHO
+	    $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
+	    $ECHO "*** a static module, that should work as long as the dlopening"
+	    $ECHO "*** application is linked with the -dlopen flag."
+	    if test -z "$global_symbol_pipe"; then
+	      $ECHO
+	      $ECHO "*** However, this would only work if libtool was able to extract symbol"
+	      $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+	      $ECHO "*** not find such a program.  So, this module is probably useless."
+	      $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+	    fi
+	    if test "$build_old_libs" = no; then
+	      oldlibs="$output_objdir/$libname.$libext"
+	      build_libtool_libs=module
+	      build_old_libs=yes
+	    else
+	      build_libtool_libs=no
+	    fi
+	  else
+	    $ECHO "*** The inter-library dependencies that have been dropped here will be"
+	    $ECHO "*** automatically added whenever a program is linked with this library"
+	    $ECHO "*** or is declared to -dlopen it."
+
+	    if test "$allow_undefined" = no; then
+	      $ECHO
+	      $ECHO "*** Since this library must not contain undefined symbols,"
+	      $ECHO "*** because either the platform does not support them or"
+	      $ECHO "*** it was explicitly requested with -no-undefined,"
+	      $ECHO "*** libtool will only create a static version of it."
+	      if test "$build_old_libs" = no; then
+		oldlibs="$output_objdir/$libname.$libext"
+		build_libtool_libs=module
+		build_old_libs=yes
+	      else
+		build_libtool_libs=no
+	      fi
+	    fi
+	  fi
 	fi
-
-	$echo >> $output "\
-    if test \"\$libtool_execute_magic\" != \"$magic\"; then
-      # Run the actual program with our arguments.
-"
-	case $host in
-	# Backslashes separate directories on plain windows
-	*-*-mingw | *-*-os2*)
-	  $echo >> $output "\
-      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
+	# Done checking deplibs!
+	deplibs=$newdeplibs
+      fi
+      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+      case $host in
+	*-*-darwin*)
+	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	  deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
 	  ;;
+      esac
 
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
 	*)
-	  $echo >> $output "\
-      exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
+	  case " $deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
+	  esac
 	  ;;
 	esac
-	$echo >> $output "\
-      \$echo \"\$0: cannot exec \$program \$*\"
-      exit $EXIT_FAILURE
-    fi
-  else
-    # The program doesn't exist.
-    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
-    \$echo \"This script is just a wrapper for \$program.\" 1>&2
-    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi\
-"
-	chmod +x $output
-      fi
-      exit $EXIT_SUCCESS
-      ;;
-    esac
+      done
+      for deplib in $deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
+	  esac
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      deplibs="$new_libs"
 
-    # See if we need to build an old-fashioned archive.
-    for oldlib in $oldlibs; do
+      # All the library-specific variables (install_libdir is set above).
+      library_names=
+      old_library=
+      dlname=
 
-      if test "$build_libtool_libs" = convenience; then
-	oldobjs="$libobjs_save"
-	addlibs="$convenience"
-	build_libtool_libs=no
-      else
-	if test "$build_libtool_libs" = module; then
-	  oldobjs="$libobjs_save"
-	  build_libtool_libs=no
-	else
-	  oldobjs="$old_deplibs $non_pic_objects"
+      # Test again, we may have decided not to build it any more
+      if test "$build_libtool_libs" = yes; then
+	if test "$hardcode_into_libs" = yes; then
+	  # Hardcode the library paths
+	  hardcode_libdirs=
+	  dep_rpath=
+	  rpath="$finalize_rpath"
+	  test "$mode" != relink && rpath="$compile_rpath$rpath"
+	  for libdir in $rpath; do
+	    if test -n "$hardcode_libdir_flag_spec"; then
+	      if test -n "$hardcode_libdir_separator"; then
+		if test -z "$hardcode_libdirs"; then
+		  hardcode_libdirs="$libdir"
+		else
+		  # Just accumulate the unique libdirs.
+		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		    ;;
+		  *)
+		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		    ;;
+		  esac
+		fi
+	      else
+		eval flag=\"$hardcode_libdir_flag_spec\"
+		dep_rpath="$dep_rpath $flag"
+	      fi
+	    elif test -n "$runpath_var"; then
+	      case "$perm_rpath " in
+	      *" $libdir "*) ;;
+	      *) perm_rpath="$perm_rpath $libdir" ;;
+	      esac
+	    fi
+	  done
+	  # Substitute the hardcoded libdirs into the rpath.
+	  if test -n "$hardcode_libdir_separator" &&
+	     test -n "$hardcode_libdirs"; then
+	    libdir="$hardcode_libdirs"
+	    if test -n "$hardcode_libdir_flag_spec_ld"; then
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+	    else
+	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+	    fi
+	  fi
+	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
+	    # We should set the runpath_var.
+	    rpath=
+	    for dir in $perm_rpath; do
+	      rpath="$rpath$dir:"
+	    done
+	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+	  fi
+	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
 	fi
-	addlibs="$old_convenience"
-      fi
 
-      if test -n "$addlibs"; then
-	gentop="$output_objdir/${outputname}x"
-	generated="$generated $gentop"
+	shlibpath="$finalize_shlibpath"
+	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+	if test -n "$shlibpath"; then
+	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+	fi
 
-	func_extract_archives $gentop $addlibs
-	oldobjs="$oldobjs $func_extract_archives_result"
-      fi
+	# Get the real and link names of the library.
+	eval shared_ext=\"$shrext_cmds\"
+	eval library_names=\"$library_names_spec\"
+	set dummy $library_names
+	shift
+	realname="$1"
+	shift
 
-      # Do each command in the archive commands.
-      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
-       cmds=$old_archive_from_new_cmds
-      else
-	# POSIX demands no paths to be encoded in archives.  We have
-	# to avoid creating archives with duplicate basenames if we
-	# might have to extract them afterwards, e.g., when creating a
-	# static archive out of a convenience library, or when linking
-	# the entirety of a libtool archive into another (currently
-	# not supported by libtool).
-	if (for obj in $oldobjs
-	    do
-	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
-	    done | sort | sort -uc >/dev/null 2>&1); then
-	  :
+	if test -n "$soname_spec"; then
+	  eval soname=\"$soname_spec\"
 	else
-	  $echo "copying selected object files to avoid basename conflicts..."
+	  soname="$realname"
+	fi
+	if test -z "$dlname"; then
+	  dlname=$soname
+	fi
 
-	  if test -z "$gentop"; then
-	    gentop="$output_objdir/${outputname}x"
-	    generated="$generated $gentop"
+	lib="$output_objdir/$realname"
+	linknames=
+	for link
+	do
+	  linknames="$linknames $link"
+	done
+
+	# Use standard objects if they are pic
+	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	test "X$libobjs" = "X " && libobjs=
+
+	delfiles=
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+	  export_symbols="$output_objdir/$libname.uexp"
+	  delfiles="$delfiles $export_symbols"
+	fi
 
-	    $show "${rm}r $gentop"
-	    $run ${rm}r "$gentop"
-	    $show "$mkdir $gentop"
-	    $run $mkdir "$gentop"
-	    exit_status=$?
-	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
-	      exit $exit_status
+	orig_export_symbols=
+	case $host_os in
+	cygwin* | mingw* | cegcc*)
+	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+	    # exporting using user supplied symfile
+	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+	      # and it's NOT already a .def file. Must figure out
+	      # which of the given symbols are data symbols and tag
+	      # them as such. So, trigger use of export_symbols_cmds.
+	      # export_symbols gets reassigned inside the "prepare
+	      # the list of exported symbols" if statement, so the
+	      # include_expsyms logic still works.
+	      orig_export_symbols="$export_symbols"
+	      export_symbols=
+	      always_export_symbols=yes
 	    fi
 	  fi
+	  ;;
+	esac
 
-	  save_oldobjs=$oldobjs
-	  oldobjs=
-	  counter=1
-	  for obj in $save_oldobjs
-	  do
-	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
-	    case " $oldobjs " in
-	    " ") oldobjs=$obj ;;
-	    *[\ /]"$objbase "*)
-	      while :; do
-		# Make sure we don't pick an alternate name that also
-		# overlaps.
-		newobj=lt$counter-$objbase
-		counter=`expr $counter + 1`
-		case " $oldobjs " in
-		*[\ /]"$newobj "*) ;;
-		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
-		esac
-	      done
-	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
-	      $run ln "$obj" "$gentop/$newobj" ||
-	      $run cp "$obj" "$gentop/$newobj"
-	      oldobjs="$oldobjs $gentop/$newobj"
-	      ;;
-	    *) oldobjs="$oldobjs $obj" ;;
-	    esac
-	  done
+	# Prepare the list of exported symbols
+	if test -z "$export_symbols"; then
+	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+	    func_verbose "generating symbol list for \`$libname.la'"
+	    export_symbols="$output_objdir/$libname.exp"
+	    $opt_dry_run || $RM $export_symbols
+	    cmds=$export_symbols_cmds
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $cmds; do
+	      IFS="$save_ifs"
+	      eval cmd=\"$cmd\"
+	      func_len " $cmd"
+	      len=$func_len_result
+	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+		func_show_eval "$cmd" 'exit $?'
+		skipped_export=false
+	      else
+		# The command line is too long to execute in one step.
+		func_verbose "using reloadable object file for export list..."
+		skipped_export=:
+		# Break out early, otherwise skipped_export may be
+		# set to false by a later but shorter cmd.
+		break
+	      fi
+	    done
+	    IFS="$save_ifs"
+	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
+	  fi
 	fi
 
-	eval cmds=\"$old_archive_cmds\"
+	if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	  tmp_export_symbols="$export_symbols"
+	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	  $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	fi
 
-	if len=`expr "X$cmds" : ".*"` &&
-	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
-	  cmds=$old_archive_cmds
-	else
-	  # the command line is too long to link in one step, link in parts
-	  $echo "using piecewise archive linking..."
-	  save_RANLIB=$RANLIB
-	  RANLIB=:
-	  objlist=
-	  concat_cmds=
-	  save_oldobjs=$oldobjs
+	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+	  # The given exports_symbols file has to be filtered, so filter it.
+	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	  # 's' commands which not all seds can handle. GNU sed should be fine
+	  # though. Also, the filter scales superlinearly with the number of
+	  # global variables. join(1) would be nice here, but unfortunately
+	  # isn't a blessed tool.
+	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	  delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	  export_symbols=$output_objdir/$libname.def
+	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	fi
 
-	  # Is there a better way of finding the last object in the list?
-	  for obj in $save_oldobjs
-	  do
-	    last_oldobj=$obj
-	  done
-	  for obj in $save_oldobjs
-	  do
-	    oldobjs="$objlist $obj"
-	    objlist="$objlist $obj"
-	    eval test_cmds=\"$old_archive_cmds\"
-	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
-	       test "$len" -le "$max_cmd_len"; then
-	      :
-	    else
-	      # the above command should be used before it gets too long
-	      oldobjs=$objlist
-	      if test "$obj" = "$last_oldobj" ; then
-	        RANLIB=$save_RANLIB
-	      fi
-	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
-	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
-	      objlist=
-	    fi
-	  done
-	  RANLIB=$save_RANLIB
-	  oldobjs=$objlist
-	  if test "X$oldobjs" = "X" ; then
-	    eval cmds=\"\$concat_cmds\"
+	tmp_deplibs=
+	for test_deplib in $deplibs; do
+	  case " $convenience " in
+	  *" $test_deplib "*) ;;
+	  *)
+	    tmp_deplibs="$tmp_deplibs $test_deplib"
+	    ;;
+	  esac
+	done
+	deplibs="$tmp_deplibs"
+
+	if test -n "$convenience"; then
+	  if test -n "$whole_archive_flag_spec" &&
+	    test "$compiler_needs_object" = yes &&
+	    test -z "$libobjs"; then
+	    # extract the archives, so we have objects to list.
+	    # TODO: could optimize this to just extract one archive.
+	    whole_archive_flag_spec=
+	  fi
+	  if test -n "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
 	  else
-	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	    gentop="$output_objdir/${outputname}x"
+	    generated="$generated $gentop"
+
+	    func_extract_archives $gentop $convenience
+	    libobjs="$libobjs $func_extract_archives_result"
+	    test "X$libobjs" = "X " && libobjs=
 	  fi
 	fi
-      fi
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-        eval cmd=\"$cmd\"
-	IFS="$save_ifs"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
 
-    if test -n "$generated"; then
-      $show "${rm}r$generated"
-      $run ${rm}r$generated
-    fi
+	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+	  eval flag=\"$thread_safe_flag_spec\"
+	  linker_flags="$linker_flags $flag"
+	fi
 
-    # Now create the libtool archive.
-    case $output in
-    *.la)
-      old_library=
-      test "$build_old_libs" = yes && old_library="$libname.$libext"
-      $show "creating $output"
+	# Make a backup of the uninstalled library when relinking
+	if test "$mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+	fi
 
-      # Preserve any variables that may affect compiler behavior
-      for var in $variables_saved_for_relink; do
-	if eval test -z \"\${$var+set}\"; then
-	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
-	elif eval var_value=\$$var; test -z "$var_value"; then
-	  relink_command="$var=; export $var; $relink_command"
+	# Do each of the archive commands.
+	if test "$module" = yes && test -n "$module_cmds" ; then
+	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	    eval test_cmds=\"$module_expsym_cmds\"
+	    cmds=$module_expsym_cmds
+	  else
+	    eval test_cmds=\"$module_cmds\"
+	    cmds=$module_cmds
+	  fi
 	else
-	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
-	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
+	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	    eval test_cmds=\"$archive_expsym_cmds\"
+	    cmds=$archive_expsym_cmds
+	  else
+	    eval test_cmds=\"$archive_cmds\"
+	    cmds=$archive_cmds
+	  fi
 	fi
-      done
-      # Quote the link command for shipping.
-      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
-      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
-      if test "$hardcode_automatic" = yes ; then
-	relink_command=
-      fi
 
+	if test "X$skipped_export" != "X:" &&
+	   func_len " $test_cmds" &&
+	   len=$func_len_result &&
+	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  :
+	else
+	  # The command line is too long to link in one step, link piecewise
+	  # or, if using GNU ld and skipped_export is not :, use a linker
+	  # script.
 
-      # Only create the output if not a dry run.
-      if test -z "$run"; then
-	for installed in no yes; do
-	  if test "$installed" = yes; then
-	    if test -z "$install_libdir"; then
-	      break
+	  # Save the value of $output and $libobjs because we want to
+	  # use them later.  If we have whole_archive_flag_spec, we
+	  # want to use save_libobjs as it was before
+	  # whole_archive_flag_spec was expanded, because we can't
+	  # assume the linker understands whole_archive_flag_spec.
+	  # This may have to be revisited, in case too many
+	  # convenience libraries get linked in and end up exceeding
+	  # the spec.
+	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+	    save_libobjs=$libobjs
+	  fi
+	  save_output=$output
+	  output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+	  # Clear the reloadable object creation command queue and
+	  # initialize k to one.
+	  test_cmds=
+	  concat_cmds=
+	  objlist=
+	  last_robj=
+	  k=1
+
+	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+	    output=${output_objdir}/${output_la}.lnkscript
+	    func_verbose "creating GNU ld script: $output"
+	    $ECHO 'INPUT (' > $output
+	    for obj in $save_libobjs
+	    do
+	      $ECHO "$obj" >> $output
+	    done
+	    $ECHO ')' >> $output
+	    delfiles="$delfiles $output"
+	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+	    output=${output_objdir}/${output_la}.lnk
+	    func_verbose "creating linker input file list: $output"
+	    : > $output
+	    set x $save_libobjs
+	    shift
+	    firstobj=
+	    if test "$compiler_needs_object" = yes; then
+	      firstobj="$1 "
+	      shift
 	    fi
-	    output="$output_objdir/$outputname"i
-	    # Replace all uninstalled libtool libraries with the installed ones
-	    newdependency_libs=
-	    for deplib in $dependency_libs; do
-	      case $deplib in
-	      *.la)
-		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
-		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
-		if test -z "$libdir"; then
-		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
-		  exit $EXIT_FAILURE
-		fi
-		newdependency_libs="$newdependency_libs $libdir/$name"
-		;;
-	      *) newdependency_libs="$newdependency_libs $deplib" ;;
-	      esac
+	    for obj
+	    do
+	      $ECHO "$obj" >> $output
 	    done
-	    dependency_libs="$newdependency_libs"
-	    newdlfiles=
-	    for lib in $dlfiles; do
-	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-	      if test -z "$libdir"; then
-		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit $EXIT_FAILURE
+	    delfiles="$delfiles $output"
+	    output=$firstobj\"$file_list_spec$output\"
+	  else
+	    if test -n "$save_libobjs"; then
+	      func_verbose "creating reloadable object files..."
+	      output=$output_objdir/$output_la-${k}.$objext
+	      eval test_cmds=\"$reload_cmds\"
+	      func_len " $test_cmds"
+	      len0=$func_len_result
+	      len=$len0
+
+	      # Loop over the list of objects to be linked.
+	      for obj in $save_libobjs
+	      do
+		func_len " $obj"
+		func_arith $len + $func_len_result
+		len=$func_arith_result
+		if test "X$objlist" = X ||
+		   test "$len" -lt "$max_cmd_len"; then
+		  func_append objlist " $obj"
+		else
+		  # The command $test_cmds is almost too long, add a
+		  # command to the queue.
+		  if test "$k" -eq 1 ; then
+		    # The first file doesn't have a previous command to add.
+		    eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+		  else
+		    # All subsequent reloadable object files will link in
+		    # the last one created.
+		    eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+		  fi
+		  last_robj=$output_objdir/$output_la-${k}.$objext
+		  func_arith $k + 1
+		  k=$func_arith_result
+		  output=$output_objdir/$output_la-${k}.$objext
+		  objlist=$obj
+		  func_len " $last_robj"
+		  func_arith $len0 + $func_len_result
+		  len=$func_arith_result
+		fi
+	      done
+	      # Handle the remaining objects by creating one last
+	      # reloadable object file.  All subsequent reloadable object
+	      # files will link in the last one created.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+	      if test -n "$last_robj"; then
+	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
 	      fi
-	      newdlfiles="$newdlfiles $libdir/$name"
-	    done
-	    dlfiles="$newdlfiles"
-	    newdlprefiles=
-	    for lib in $dlprefiles; do
-	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
-	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
-	      if test -z "$libdir"; then
-		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-		exit $EXIT_FAILURE
+	      delfiles="$delfiles $output"
+
+	    else
+	      output=
+	    fi
+
+	    if ${skipped_export-false}; then
+	      func_verbose "generating symbol list for \`$libname.la'"
+	      export_symbols="$output_objdir/$libname.exp"
+	      $opt_dry_run || $RM $export_symbols
+	      libobjs=$output
+	      # Append the command to create the export file.
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+	      if test -n "$last_robj"; then
+		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
 	      fi
-	      newdlprefiles="$newdlprefiles $libdir/$name"
-	    done
-	    dlprefiles="$newdlprefiles"
-	  else
-	    newdlfiles=
-	    for lib in $dlfiles; do
-	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-		*) abs=`pwd`"/$lib" ;;
-	      esac
-	      newdlfiles="$newdlfiles $abs"
-	    done
-	    dlfiles="$newdlfiles"
-	    newdlprefiles=
-	    for lib in $dlprefiles; do
-	      case $lib in
-		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
-		*) abs=`pwd`"/$lib" ;;
-	      esac
-	      newdlprefiles="$newdlprefiles $abs"
+	    fi
+
+	    test -n "$save_libobjs" &&
+	      func_verbose "creating a temporary reloadable object file: $output"
+
+	    # Loop through the commands generated above and execute them.
+	    save_ifs="$IFS"; IFS='~'
+	    for cmd in $concat_cmds; do
+	      IFS="$save_ifs"
+	      $opt_silent || {
+		  func_quote_for_expand "$cmd"
+		  eval "func_echo $func_quote_for_expand_result"
+	      }
+	      $opt_dry_run || eval "$cmd" || {
+		lt_exit=$?
+
+		# Restore the uninstalled library and exit
+		if test "$mode" = relink; then
+		  ( cd "$output_objdir" && \
+		    $RM "${realname}T" && \
+		    $MV "${realname}U" "$realname" )
+		fi
+
+		exit $lt_exit
+	      }
 	    done
-	    dlprefiles="$newdlprefiles"
+	    IFS="$save_ifs"
+
+	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+	    fi
 	  fi
-	  $rm $output
-	  # place dlname in correct position for cygwin
-	  tdlname=$dlname
-	  case $host,$output,$installed,$module,$dlname in
-	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
-	  esac
-	  $echo > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
 
-# The name that we can dlopen(3).
-dlname='$tdlname'
+          if ${skipped_export-false}; then
+	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
+	      tmp_export_symbols="$export_symbols"
+	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+	      $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+	    fi
 
-# Names of this library.
-library_names='$library_names'
+	    if test -n "$orig_export_symbols"; then
+	      # The given exports_symbols file has to be filtered, so filter it.
+	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
+	      # 's' commands which not all seds can handle. GNU sed should be fine
+	      # though. Also, the filter scales superlinearly with the number of
+	      # global variables. join(1) would be nice here, but unfortunately
+	      # isn't a blessed tool.
+	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+	      delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+	      export_symbols=$output_objdir/$libname.def
+	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+	    fi
+	  fi
 
-# The name of the static archive.
-old_library='$old_library'
+	  libobjs=$output
+	  # Restore the value of output.
+	  output=$save_output
 
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
+	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+	    test "X$libobjs" = "X " && libobjs=
+	  fi
+	  # Expand the library linking commands again to reset the
+	  # value of $libobjs for piecewise linking.
 
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
+	  # Do each of the archive commands.
+	  if test "$module" = yes && test -n "$module_cmds" ; then
+	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+	      cmds=$module_expsym_cmds
+	    else
+	      cmds=$module_cmds
+	    fi
+	  else
+	    if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+	      cmds=$archive_expsym_cmds
+	    else
+	      cmds=$archive_cmds
+	    fi
+	  fi
+	fi
 
-# Is this an already installed library?
-installed=$installed
+	if test -n "$delfiles"; then
+	  # Append the command to remove temporary files to $cmds.
+	  eval cmds=\"\$cmds~\$RM $delfiles\"
+	fi
 
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
 
-# Files to dlopen/dlpreopen
-dlopen='$dlfiles'
-dlpreopen='$dlprefiles'
+	  func_extract_archives $gentop $dlprefiles
+	  libobjs="$libobjs $func_extract_archives_result"
+	  test "X$libobjs" = "X " && libobjs=
+	fi
 
-# Directory that this library needs to be installed in:
-libdir='$install_libdir'"
-	  if test "$installed" = no && test "$need_relink" = yes; then
-	    $echo >> $output "\
-relink_command=\"$relink_command\""
-	  fi
+	save_ifs="$IFS"; IFS='~'
+	for cmd in $cmds; do
+	  IFS="$save_ifs"
+	  eval cmd=\"$cmd\"
+	  $opt_silent || {
+	    func_quote_for_expand "$cmd"
+	    eval "func_echo $func_quote_for_expand_result"
+	  }
+	  $opt_dry_run || eval "$cmd" || {
+	    lt_exit=$?
+
+	    # Restore the uninstalled library and exit
+	    if test "$mode" = relink; then
+	      ( cd "$output_objdir" && \
+	        $RM "${realname}T" && \
+		$MV "${realname}U" "$realname" )
+	    fi
+
+	    exit $lt_exit
+	  }
 	done
-      fi
+	IFS="$save_ifs"
 
-      # Do a symbolic link so that the libtool archive can be found in
-      # LD_LIBRARY_PATH before the program is installed.
-      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
-      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
-      ;;
-    esac
-    exit $EXIT_SUCCESS
-    ;;
+	# Restore the uninstalled library and exit
+	if test "$mode" = relink; then
+	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
 
-  # libtool install mode
-  install)
-    modename="$modename: install"
+	  if test -n "$convenience"; then
+	    if test -z "$whole_archive_flag_spec"; then
+	      func_show_eval '${RM}r "$gentop"'
+	    fi
+	  fi
 
-    # There may be an optional sh(1) argument at the beginning of
-    # install_prog (especially on Windows NT).
-    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
-       # Allow the use of GNU shtool's install command.
-       $echo "X$nonopt" | grep shtool > /dev/null; then
-      # Aesthetically quote it.
-      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$arg "
-      arg="$1"
-      shift
-    else
-      install_prog=
-      arg=$nonopt
-    fi
+	  exit $EXIT_SUCCESS
+	fi
 
-    # The real first argument should be the name of the installation program.
-    # Aesthetically quote it.
-    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-    case $arg in
-    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-      arg="\"$arg\""
+	# Create links to the real library.
+	for linkname in $linknames; do
+	  if test "$realname" != "$linkname"; then
+	    func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+	  fi
+	done
+
+	# If -module or -export-dynamic was specified, set the dlname.
+	if test "$module" = yes || test "$export_dynamic" = yes; then
+	  # On all known operating systems, these are identical.
+	  dlname="$soname"
+	fi
+      fi
       ;;
-    esac
-    install_prog="$install_prog$arg"
 
-    # We need to accept at least all the BSD install flags.
-    dest=
-    files=
-    opts=
-    prev=
-    install_type=
-    isdir=no
-    stripme=
-    for arg
-    do
-      if test -n "$dest"; then
-	files="$files $dest"
-	dest=$arg
-	continue
+    obj)
+      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+	func_warning "\`-dlopen' is ignored for objects"
       fi
 
-      case $arg in
-      -d) isdir=yes ;;
-      -f) 
-      	case " $install_prog " in
-	*[\\\ /]cp\ *) ;;
-	*) prev=$arg ;;
-	esac
-	;;
-      -g | -m | -o) prev=$arg ;;
-      -s)
-	stripme=" -s"
-	continue
-	;;
-      -*)
+      case " $deplibs" in
+      *\ -l* | *\ -L*)
+	func_warning "\`-l' and \`-L' are ignored for objects" ;;
+      esac
+
+      test -n "$rpath" && \
+	func_warning "\`-rpath' is ignored for objects"
+
+      test -n "$xrpath" && \
+	func_warning "\`-R' is ignored for objects"
+
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for objects"
+
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for objects"
+
+      case $output in
+      *.lo)
+	test -n "$objs$old_deplibs" && \
+	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+	libobj=$output
+	func_lo2o "$libobj"
+	obj=$func_lo2o_result
 	;;
       *)
-	# If the previous option needed an argument, then skip it.
-	if test -n "$prev"; then
-	  prev=
-	else
-	  dest=$arg
-	  continue
-	fi
+	libobj=
+	obj="$output"
 	;;
       esac
 
-      # Aesthetically quote the argument.
-      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-      case $arg in
-      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
-	arg="\"$arg\""
-	;;
-      esac
-      install_prog="$install_prog $arg"
-    done
+      # Delete the old objects.
+      $opt_dry_run || $RM $obj $libobj
 
-    if test -z "$install_prog"; then
-      $echo "$modename: you must specify an install program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+      # Objects from convenience libraries.  This assumes
+      # single-version convenience libraries.  Whenever we create
+      # different ones for PIC/non-PIC, this we'll have to duplicate
+      # the extraction.
+      reload_conv_objs=
+      gentop=
+      # reload_cmds runs $LD directly, so let us get rid of
+      # -Wl from whole_archive_flag_spec and hope we can get by with
+      # turning comma into space..
+      wl=
 
-    if test -n "$prev"; then
-      $echo "$modename: the \`$prev' option requires an argument" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+      if test -n "$convenience"; then
+	if test -n "$whole_archive_flag_spec"; then
+	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+	  reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+	else
+	  gentop="$output_objdir/${obj}x"
+	  generated="$generated $gentop"
 
-    if test -z "$files"; then
-      if test -z "$dest"; then
-	$echo "$modename: no file or destination specified" 1>&2
-      else
-	$echo "$modename: you must specify a destination" 1>&2
+	  func_extract_archives $gentop $convenience
+	  reload_conv_objs="$reload_objs $func_extract_archives_result"
+	fi
       fi
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
 
-    # Strip any trailing slash from the destination.
-    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+      # Create the old-style object.
+      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
 
-    # Check to see that the destination is a directory.
-    test -d "$dest" && isdir=yes
-    if test "$isdir" = yes; then
-      destdir="$dest"
-      destname=
-    else
-      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
-      test "X$destdir" = "X$dest" && destdir=.
-      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+      output="$obj"
+      func_execute_cmds "$reload_cmds" 'exit $?'
 
-      # Not a directory, so check to see that there is only one file specified.
-      set dummy $files
-      if test "$#" -gt 2; then
-	$echo "$modename: \`$dest' is not a directory" 1>&2
-	$echo "$help" 1>&2
-	exit $EXIT_FAILURE
+      # Exit if we aren't doing a library object file.
+      if test -z "$libobj"; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
+
+	exit $EXIT_SUCCESS
       fi
-    fi
-    case $destdir in
-    [\\/]* | [A-Za-z]:[\\/]*) ;;
-    *)
-      for file in $files; do
-	case $file in
-	*.lo) ;;
-	*)
-	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-      done
+
+      if test "$build_libtool_libs" != yes; then
+	if test -n "$gentop"; then
+	  func_show_eval '${RM}r "$gentop"'
+	fi
+
+	# Create an invalid libtool object if no PIC, so that we don't
+	# accidentally link it into a program.
+	# $show "echo timestamp > $libobj"
+	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+	exit $EXIT_SUCCESS
+      fi
+
+      if test -n "$pic_flag" || test "$pic_mode" != default; then
+	# Only do commands if we really have different PIC objects.
+	reload_objs="$libobjs $reload_conv_objs"
+	output="$libobj"
+	func_execute_cmds "$reload_cmds" 'exit $?'
+      fi
+
+      if test -n "$gentop"; then
+	func_show_eval '${RM}r "$gentop"'
+      fi
+
+      exit $EXIT_SUCCESS
       ;;
-    esac
 
-    # This variable tells wrapper scripts just to set variables rather
-    # than running their programs.
-    libtool_install_magic="$magic"
+    prog)
+      case $host in
+	*cygwin*) func_stripname '' '.exe' "$output"
+	          output=$func_stripname_result.exe;;
+      esac
+      test -n "$vinfo" && \
+	func_warning "\`-version-info' is ignored for programs"
 
-    staticlibs=
-    future_libdirs=
-    current_libdirs=
-    for file in $files; do
+      test -n "$release" && \
+	func_warning "\`-release' is ignored for programs"
 
-      # Do each installation.
-      case $file in
-      *.$libext)
-	# Do the static libraries later.
-	staticlibs="$staticlibs $file"
+      test "$preload" = yes \
+        && test "$dlopen_support" = unknown \
+	&& test "$dlopen_self" = unknown \
+	&& test "$dlopen_self_static" = unknown && \
+	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+      case $host in
+      *-*-rhapsody* | *-*-darwin1.[012])
+	# On Rhapsody replace the C library is the System framework
+	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
 	;;
+      esac
 
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
-	else
-	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
+      case $host in
+      *-*-darwin*)
+	# Don't allow lazy linking, it breaks C++ global constructors
+	# But is supposedly fixed on 10.4 or later (yay!).
+	if test "$tagname" = CXX ; then
+	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+	    10.[0123])
+	      compile_command="$compile_command ${wl}-bind_at_load"
+	      finalize_command="$finalize_command ${wl}-bind_at_load"
+	    ;;
+	  esac
 	fi
+	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
+	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+	;;
+      esac
 
-	library_names=
-	old_library=
-	relink_command=
-	# If there is no directory component, then add one.
-	case $file in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
 
-	# Add the libdir to current_libdirs if it is the destination.
-	if test "X$destdir" = "X$libdir"; then
-	  case "$current_libdirs " in
-	  *" $libdir "*) ;;
-	  *) current_libdirs="$current_libdirs $libdir" ;;
+      # move library search paths that coincide with paths to not yet
+      # installed libraries to the beginning of the library search list
+      new_libs=
+      for path in $notinst_path; do
+	case " $new_libs " in
+	*" -L$path/$objdir "*) ;;
+	*)
+	  case " $compile_deplibs " in
+	  *" -L$path/$objdir "*)
+	    new_libs="$new_libs -L$path/$objdir" ;;
 	  esac
-	else
-	  # Note the libdir as a future libdir.
-	  case "$future_libdirs " in
-	  *" $libdir "*) ;;
-	  *) future_libdirs="$future_libdirs $libdir" ;;
+	  ;;
+	esac
+      done
+      for deplib in $compile_deplibs; do
+	case $deplib in
+	-L*)
+	  case " $new_libs " in
+	  *" $deplib "*) ;;
+	  *) new_libs="$new_libs $deplib" ;;
 	  esac
-	fi
+	  ;;
+	*) new_libs="$new_libs $deplib" ;;
+	esac
+      done
+      compile_deplibs="$new_libs"
 
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
-	test "X$dir" = "X$file/" && dir=
-	dir="$dir$objdir"
 
-	if test -n "$relink_command"; then
-	  # Determine the prefix the user has applied to our future dir.
-	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+      compile_command="$compile_command $compile_deplibs"
+      finalize_command="$finalize_command $finalize_deplibs"
 
-	  # Don't allow the user to place us outside of our expected
-	  # location b/c this prevents finding dependent libraries that
-	  # are installed to the same prefix.
-	  # At present, this check doesn't affect windows .dll's that
-	  # are installed into $libdir/../bin (currently, that works fine)
-	  # but it's something to keep an eye on.
-	  if test "$inst_prefix_dir" = "$destdir"; then
-	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
+      if test -n "$rpath$xrpath"; then
+	# If the user specified any rpath flags, then add them.
+	for libdir in $rpath $xrpath; do
+	  # This is the magic to use -rpath.
+	  case "$finalize_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_rpath="$finalize_rpath $libdir" ;;
+	  esac
+	done
+      fi
 
-	  if test -n "$inst_prefix_dir"; then
-	    # Stick the inst_prefix_dir data into the link command.
-	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
+      # Now hardcode the library paths
+      rpath=
+      hardcode_libdirs=
+      for libdir in $compile_rpath $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
 	  else
-	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
 	  fi
+	elif test -n "$runpath_var"; then
+	  case "$perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) perm_rpath="$perm_rpath $libdir" ;;
+	  esac
+	fi
+	case $host in
+	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+	  case :$dllsearchpath: in
+	  *":$libdir:"*) ;;
+	  ::) dllsearchpath=$libdir;;
+	  *) dllsearchpath="$dllsearchpath:$libdir";;
+	  esac
+	  case :$dllsearchpath: in
+	  *":$testbindir:"*) ;;
+	  ::) dllsearchpath=$testbindir;;
+	  *) dllsearchpath="$dllsearchpath:$testbindir";;
+	  esac
+	  ;;
+	esac
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      compile_rpath="$rpath"
 
-	  $echo "$modename: warning: relinking \`$file'" 1>&2
-	  $show "$relink_command"
-	  if $run eval "$relink_command"; then :
+      rpath=
+      hardcode_libdirs=
+      for libdir in $finalize_rpath; do
+	if test -n "$hardcode_libdir_flag_spec"; then
+	  if test -n "$hardcode_libdir_separator"; then
+	    if test -z "$hardcode_libdirs"; then
+	      hardcode_libdirs="$libdir"
+	    else
+	      # Just accumulate the unique libdirs.
+	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+		;;
+	      *)
+		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+		;;
+	      esac
+	    fi
 	  else
-	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-	    exit $EXIT_FAILURE
+	    eval flag=\"$hardcode_libdir_flag_spec\"
+	    rpath="$rpath $flag"
 	  fi
+	elif test -n "$runpath_var"; then
+	  case "$finalize_perm_rpath " in
+	  *" $libdir "*) ;;
+	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+	  esac
 	fi
+      done
+      # Substitute the hardcoded libdirs into the rpath.
+      if test -n "$hardcode_libdir_separator" &&
+	 test -n "$hardcode_libdirs"; then
+	libdir="$hardcode_libdirs"
+	eval rpath=\" $hardcode_libdir_flag_spec\"
+      fi
+      finalize_rpath="$rpath"
 
-	# See the names of the shared library.
-	set dummy $library_names
-	if test -n "$2"; then
-	  realname="$2"
-	  shift
-	  shift
+      if test -n "$libobjs" && test "$build_old_libs" = yes; then
+	# Transform all the library objects into standard objects.
+	compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+	finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+      fi
 
-	  srcname="$realname"
-	  test -n "$relink_command" && srcname="$realname"T
+      func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
 
-	  # Install the shared library and build the symlinks.
-	  $show "$install_prog $dir/$srcname $destdir/$realname"
-	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
-	  if test -n "$stripme" && test -n "$striplib"; then
-	    $show "$striplib $destdir/$realname"
-	    $run eval "$striplib $destdir/$realname" || exit $?
-	  fi
+      # template prelinking step
+      if test -n "$prelink_cmds"; then
+	func_execute_cmds "$prelink_cmds" 'exit $?'
+      fi
 
-	  if test "$#" -gt 0; then
-	    # Delete the old symlinks, and create new ones.
-	    # Try `ln -sf' first, because the `ln' binary might depend on
-	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
-	    # so we also need to try rm && ln -s.
-	    for linkname
-	    do
-	      if test "$linkname" != "$realname"; then
-                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
-                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
-	      fi
-	    done
-	  fi
+      wrappers_required=yes
+      case $host in
+      *cygwin* | *mingw* )
+        if test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      *cegcc)
+        # Disable wrappers for cegcc, we are cross compiling anyway.
+        wrappers_required=no
+        ;;
+      *)
+        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+          wrappers_required=no
+        fi
+        ;;
+      esac
+      if test "$wrappers_required" = no; then
+	# Replace the output file specification.
+	compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	link_command="$compile_command$compile_rpath"
 
-	  # Do each command in the postinstall commands.
-	  lib="$destdir/$realname"
-	  cmds=$postinstall_cmds
-	  save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    eval cmd=\"$cmd\"
-	    $show "$cmd"
-	    $run eval "$cmd" || {
-	      lt_exit=$?
-
-	      # Restore the uninstalled library and exit
-	      if test "$mode" = relink; then
-		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
-	      fi
+	# We have no uninstalled library dependencies, so finalize right now.
+	exit_status=0
+	func_show_eval "$link_command" 'exit_status=$?'
 
-	      exit $lt_exit
-	    }
-	  done
-	  IFS="$save_ifs"
+	# Delete the generated files.
+	if test -f "$output_objdir/${outputname}S.${objext}"; then
+	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
 	fi
 
-	# Install the pseudo-library for information purposes.
-	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	instname="$dir/$name"i
-	$show "$install_prog $instname $destdir/$name"
-	$run eval "$install_prog $instname $destdir/$name" || exit $?
-
-	# Maybe install the static library, too.
-	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
-	;;
+	exit $exit_status
+      fi
 
-      *.lo)
-	# Install (i.e. copy) a libtool object.
+      if test -n "$compile_shlibpath$finalize_shlibpath"; then
+	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+      fi
+      if test -n "$finalize_shlibpath"; then
+	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+      fi
 
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
-	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
+      compile_var=
+      finalize_var=
+      if test -n "$runpath_var"; then
+	if test -n "$perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
 	fi
-
-	# Deduce the name of the destination old-style object file.
-	case $destfile in
-	*.lo)
-	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
-	  ;;
-	*.$objext)
-	  staticdest="$destfile"
-	  destfile=
-	  ;;
-	*)
-	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
-	  ;;
-	esac
-
-	# Install the libtool object if requested.
-	if test -n "$destfile"; then
-	  $show "$install_prog $file $destfile"
-	  $run eval "$install_prog $file $destfile" || exit $?
+	if test -n "$finalize_perm_rpath"; then
+	  # We should set the runpath_var.
+	  rpath=
+	  for dir in $finalize_perm_rpath; do
+	    rpath="$rpath$dir:"
+	  done
+	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
 	fi
+      fi
 
-	# Install the old object if enabled.
-	if test "$build_old_libs" = yes; then
-	  # Deduce the name of the old-style object file.
-	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
-
-	  $show "$install_prog $staticobj $staticdest"
-	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
-	fi
+      if test "$no_install" = yes; then
+	# We don't need to create a wrapper script.
+	link_command="$compile_var$compile_command$compile_rpath"
+	# Replace the output file specification.
+	link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+	# Delete the old output file.
+	$opt_dry_run || $RM $output
+	# Link the executable and exit
+	func_show_eval "$link_command" 'exit $?'
 	exit $EXIT_SUCCESS
-	;;
+      fi
 
-      *)
-	# Figure out destination file name, if it wasn't already specified.
-	if test -n "$destname"; then
-	  destfile="$destdir/$destname"
+      if test "$hardcode_action" = relink; then
+	# Fast installation is not supported
+	link_command="$compile_var$compile_command$compile_rpath"
+	relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+	func_warning "this platform does not like uninstalled shared libraries"
+	func_warning "\`$output' will be relinked during installation"
+      else
+	if test "$fast_install" != no; then
+	  link_command="$finalize_var$compile_command$finalize_rpath"
+	  if test "$fast_install" = yes; then
+	    relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+	  else
+	    # fast_install is set to needless
+	    relink_command=
+	  fi
 	else
-	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
-	  destfile="$destdir/$destfile"
+	  link_command="$compile_var$compile_command$compile_rpath"
+	  relink_command="$finalize_var$finalize_command$finalize_rpath"
 	fi
+      fi
 
-	# If the file is missing, and there is a .exe on the end, strip it
-	# because it is most likely a libtool script we actually want to
-	# install
-	stripped_ext=""
-	case $file in
-	  *.exe)
-	    if test ! -f "$file"; then
-	      file=`$echo $file|${SED} 's,.exe$,,'`
-	      stripped_ext=".exe"
-	    fi
-	    ;;
-	esac
-
-	# Do a test to see if this is really a libtool program.
-	case $host in
-	*cygwin*|*mingw*)
-	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
-	    ;;
-	*)
-	    wrapper=$file
-	    ;;
-	esac
-	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
-	  notinst_deplibs=
-	  relink_command=
-
-	  # Note that it is not necessary on cygwin/mingw to append a dot to
-	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
-	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-	  # `FILE.' does not work on cygwin managed mounts.
-	  #
-	  # If there is no directory component, then add one.
-	  case $wrapper in
-	  */* | *\\*) . ${wrapper} ;;
-	  *) . ./${wrapper} ;;
-	  esac
+      # Replace the output file specification.
+      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
 
-	  # Check the variables that should have been set.
-	  if test -z "$notinst_deplibs"; then
-	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
-	    exit $EXIT_FAILURE
-	  fi
+      # Delete the old output files.
+      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
 
-	  finalize=yes
-	  for lib in $notinst_deplibs; do
-	    # Check to see that each library is installed.
-	    libdir=
-	    if test -f "$lib"; then
-	      # If there is no directory component, then add one.
-	      case $lib in
-	      */* | *\\*) . $lib ;;
-	      *) . ./$lib ;;
-	      esac
-	    fi
-	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
-	    if test -n "$libdir" && test ! -f "$libfile"; then
-	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
-	      finalize=no
-	    fi
-	  done
+      func_show_eval "$link_command" 'exit $?'
 
-	  relink_command=
-	  # Note that it is not necessary on cygwin/mingw to append a dot to
-	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
-	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
-	  # `FILE.' does not work on cygwin managed mounts.
-	  #
-	  # If there is no directory component, then add one.
-	  case $wrapper in
-	  */* | *\\*) . ${wrapper} ;;
-	  *) . ./${wrapper} ;;
-	  esac
+      # Now create the wrapper script.
+      func_verbose "creating $output"
 
-	  outputname=
-	  if test "$fast_install" = no && test -n "$relink_command"; then
-	    if test "$finalize" = yes && test -z "$run"; then
-	      tmpdir=`func_mktempdir`
-	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
-	      outputname="$tmpdir/$file"
-	      # Replace the output file specification.
-	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
-
-	      $show "$relink_command"
-	      if $run eval "$relink_command"; then :
-	      else
-		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
-		${rm}r "$tmpdir"
-		continue
-	      fi
-	      file="$outputname"
-	    else
-	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
-	    fi
+      # Quote the relink command for shipping.
+      if test -n "$relink_command"; then
+	# Preserve any variables that may affect compiler behavior
+	for var in $variables_saved_for_relink; do
+	  if eval test -z \"\${$var+set}\"; then
+	    relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+	  elif eval var_value=\$$var; test -z "$var_value"; then
+	    relink_command="$var=; export $var; $relink_command"
 	  else
-	    # Install the binary that we compiled earlier.
-	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+	    func_quote_for_eval "$var_value"
+	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
 	  fi
-	fi
+	done
+	relink_command="(cd `pwd`; $relink_command)"
+	relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      fi
 
-	# remove .exe since cygwin /usr/bin/install will append another
-	# one anyway 
-	case $install_prog,$host in
-	*/usr/bin/install*,*cygwin*)
-	  case $file:$destfile in
-	  *.exe:*.exe)
-	    # this is ok
-	    ;;
-	  *.exe:*)
-	    destfile=$destfile.exe
-	    ;;
-	  *:*.exe)
-	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
-	    ;;
-	  esac
-	  ;;
+      # Quote $ECHO for shipping.
+      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+	case $progpath in
+	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+	esac
+	qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+      else
+	qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+      fi
+
+      # Only actually do things if not in dry run mode.
+      $opt_dry_run || {
+	# win32 will think the script is a binary if it has
+	# a .exe suffix, so we strip it off here.
+	case $output in
+	  *.exe) func_stripname '' '.exe' "$output"
+	         output=$func_stripname_result ;;
 	esac
-	$show "$install_prog$stripme $file $destfile"
-	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
-	test -n "$outputname" && ${rm}r "$tmpdir"
-	;;
-      esac
-    done
+	# test for cygwin because mv fails w/o .exe extensions
+	case $host in
+	  *cygwin*)
+	    exeext=.exe
+	    func_stripname '' '.exe' "$outputname"
+	    outputname=$func_stripname_result ;;
+	  *) exeext= ;;
+	esac
+	case $host in
+	  *cygwin* | *mingw* )
+	    func_dirname_and_basename "$output" "" "."
+	    output_name=$func_basename_result
+	    output_path=$func_dirname_result
+	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
+	    cwrapper="$output_path/$output_name.exe"
+	    $RM $cwrappersource $cwrapper
+	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+	    func_emit_cwrapperexe_src > $cwrappersource
+
+	    # The wrapper executable is built using the $host compiler,
+	    # because it contains $host paths and files. If cross-
+	    # compiling, it, like the target executable, must be
+	    # executed on the $host or under an emulation environment.
+	    $opt_dry_run || {
+	      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+	      $STRIP $cwrapper
+	    }
 
-    for file in $staticlibs; do
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+	    # Now, create the wrapper script for func_source use:
+	    func_ltwrapper_scriptname $cwrapper
+	    $RM $func_ltwrapper_scriptname_result
+	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+	    $opt_dry_run || {
+	      # note: this script will not be executed, so do not chmod.
+	      if test "x$build" = "x$host" ; then
+		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+	      else
+		func_emit_wrapper no > $func_ltwrapper_scriptname_result
+	      fi
+	    }
+	  ;;
+	  * )
+	    $RM $output
+	    trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
 
-      # Set up the ranlib parameters.
-      oldlib="$destdir/$name"
+	    func_emit_wrapper no > $output
+	    chmod +x $output
+	  ;;
+	esac
+      }
+      exit $EXIT_SUCCESS
+      ;;
+    esac
 
-      $show "$install_prog $file $oldlib"
-      $run eval "$install_prog \$file \$oldlib" || exit $?
+    # See if we need to build an old-fashioned archive.
+    for oldlib in $oldlibs; do
 
-      if test -n "$stripme" && test -n "$old_striplib"; then
-	$show "$old_striplib $oldlib"
-	$run eval "$old_striplib $oldlib" || exit $?
+      if test "$build_libtool_libs" = convenience; then
+	oldobjs="$libobjs_save $symfileobj"
+	addlibs="$convenience"
+	build_libtool_libs=no
+      else
+	if test "$build_libtool_libs" = module; then
+	  oldobjs="$libobjs_save"
+	  build_libtool_libs=no
+	else
+	  oldobjs="$old_deplibs $non_pic_objects"
+	  if test "$preload" = yes && test -f "$symfileobj"; then
+	    oldobjs="$oldobjs $symfileobj"
+	  fi
+	fi
+	addlibs="$old_convenience"
       fi
 
-      # Do each command in the postinstall commands.
-      cmds=$old_postinstall_cmds
-      save_ifs="$IFS"; IFS='~'
-      for cmd in $cmds; do
-	IFS="$save_ifs"
-	eval cmd=\"$cmd\"
-	$show "$cmd"
-	$run eval "$cmd" || exit $?
-      done
-      IFS="$save_ifs"
-    done
+      if test -n "$addlibs"; then
+	gentop="$output_objdir/${outputname}x"
+	generated="$generated $gentop"
 
-    if test -n "$future_libdirs"; then
-      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
-    fi
+	func_extract_archives $gentop $addlibs
+	oldobjs="$oldobjs $func_extract_archives_result"
+      fi
 
-    if test -n "$current_libdirs"; then
-      # Maybe just do a dry run.
-      test -n "$run" && current_libdirs=" -n$current_libdirs"
-      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
-    else
-      exit $EXIT_SUCCESS
-    fi
-    ;;
+      # Do each command in the archive commands.
+      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+	cmds=$old_archive_from_new_cmds
+      else
 
-  # libtool finish mode
-  finish)
-    modename="$modename: finish"
-    libdirs="$nonopt"
-    admincmds=
+	# Add any objects from preloaded convenience libraries
+	if test -n "$dlprefiles"; then
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
 
-    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
-      for dir
-      do
-	libdirs="$libdirs $dir"
-      done
+	  func_extract_archives $gentop $dlprefiles
+	  oldobjs="$oldobjs $func_extract_archives_result"
+	fi
 
-      for libdir in $libdirs; do
-	if test -n "$finish_cmds"; then
-	  # Do each command in the finish commands.
-	  cmds=$finish_cmds
-	  save_ifs="$IFS"; IFS='~'
-	  for cmd in $cmds; do
-	    IFS="$save_ifs"
-	    eval cmd=\"$cmd\"
-	    $show "$cmd"
-	    $run eval "$cmd" || admincmds="$admincmds
-       $cmd"
+	# POSIX demands no paths to be encoded in archives.  We have
+	# to avoid creating archives with duplicate basenames if we
+	# might have to extract them afterwards, e.g., when creating a
+	# static archive out of a convenience library, or when linking
+	# the entirety of a libtool archive into another (currently
+	# not supported by libtool).
+	if (for obj in $oldobjs
+	    do
+	      func_basename "$obj"
+	      $ECHO "$func_basename_result"
+	    done | sort | sort -uc >/dev/null 2>&1); then
+	  :
+	else
+	  $ECHO "copying selected object files to avoid basename conflicts..."
+	  gentop="$output_objdir/${outputname}x"
+	  generated="$generated $gentop"
+	  func_mkdir_p "$gentop"
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  counter=1
+	  for obj in $save_oldobjs
+	  do
+	    func_basename "$obj"
+	    objbase="$func_basename_result"
+	    case " $oldobjs " in
+	    " ") oldobjs=$obj ;;
+	    *[\ /]"$objbase "*)
+	      while :; do
+		# Make sure we don't pick an alternate name that also
+		# overlaps.
+		newobj=lt$counter-$objbase
+		func_arith $counter + 1
+		counter=$func_arith_result
+		case " $oldobjs " in
+		*[\ /]"$newobj "*) ;;
+		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
+		esac
+	      done
+	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+	      oldobjs="$oldobjs $gentop/$newobj"
+	      ;;
+	    *) oldobjs="$oldobjs $obj" ;;
+	    esac
 	  done
-	  IFS="$save_ifs"
-	fi
-	if test -n "$finish_eval"; then
-	  # Do the single finish_eval.
-	  eval cmds=\"$finish_eval\"
-	  $run eval "$cmds" || admincmds="$admincmds
-       $cmds"
 	fi
-      done
-    fi
-
-    # Exit here if they wanted silent mode.
-    test "$show" = : && exit $EXIT_SUCCESS
+	eval cmds=\"$old_archive_cmds\"
 
-    $echo "X----------------------------------------------------------------------" | $Xsed
-    $echo "Libraries have been installed in:"
-    for libdir in $libdirs; do
-      $echo "   $libdir"
+	func_len " $cmds"
+	len=$func_len_result
+	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+	  cmds=$old_archive_cmds
+	else
+	  # the command line is too long to link in one step, link in parts
+	  func_verbose "using piecewise archive linking..."
+	  save_RANLIB=$RANLIB
+	  RANLIB=:
+	  objlist=
+	  concat_cmds=
+	  save_oldobjs=$oldobjs
+	  oldobjs=
+	  # Is there a better way of finding the last object in the list?
+	  for obj in $save_oldobjs
+	  do
+	    last_oldobj=$obj
+	  done
+	  eval test_cmds=\"$old_archive_cmds\"
+	  func_len " $test_cmds"
+	  len0=$func_len_result
+	  len=$len0
+	  for obj in $save_oldobjs
+	  do
+	    func_len " $obj"
+	    func_arith $len + $func_len_result
+	    len=$func_arith_result
+	    func_append objlist " $obj"
+	    if test "$len" -lt "$max_cmd_len"; then
+	      :
+	    else
+	      # the above command should be used before it gets too long
+	      oldobjs=$objlist
+	      if test "$obj" = "$last_oldobj" ; then
+		RANLIB=$save_RANLIB
+	      fi
+	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+	      objlist=
+	      len=$len0
+	    fi
+	  done
+	  RANLIB=$save_RANLIB
+	  oldobjs=$objlist
+	  if test "X$oldobjs" = "X" ; then
+	    eval cmds=\"\$concat_cmds\"
+	  else
+	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+	  fi
+	fi
+      fi
+      func_execute_cmds "$cmds" 'exit $?'
     done
-    $echo
-    $echo "If you ever happen to want to link against installed libraries"
-    $echo "in a given directory, LIBDIR, you must either use libtool, and"
-    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
-    $echo "flag during linking and do at least one of the following:"
-    if test -n "$shlibpath_var"; then
-      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
-      $echo "     during execution"
-    fi
-    if test -n "$runpath_var"; then
-      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
-      $echo "     during linking"
-    fi
-    if test -n "$hardcode_libdir_flag_spec"; then
-      libdir=LIBDIR
-      eval flag=\"$hardcode_libdir_flag_spec\"
-
-      $echo "   - use the \`$flag' linker flag"
-    fi
-    if test -n "$admincmds"; then
-      $echo "   - have your system administrator run these commands:$admincmds"
-    fi
-    if test -f /etc/ld.so.conf; then
-      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
-    fi
-    $echo
-    $echo "See any operating system documentation about shared libraries for"
-    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
-    $echo "X----------------------------------------------------------------------" | $Xsed
-    exit $EXIT_SUCCESS
-    ;;
-
-  # libtool execute mode
-  execute)
-    modename="$modename: execute"
 
-    # The first argument is the command name.
-    cmd="$nonopt"
-    if test -z "$cmd"; then
-      $echo "$modename: you must specify a COMMAND" 1>&2
-      $echo "$help"
-      exit $EXIT_FAILURE
-    fi
+    test -n "$generated" && \
+      func_show_eval "${RM}r$generated"
 
-    # Handle -dlopen flags immediately.
-    for file in $execute_dlfiles; do
-      if test ! -f "$file"; then
-	$echo "$modename: \`$file' is not a file" 1>&2
-	$echo "$help" 1>&2
-	exit $EXIT_FAILURE
-      fi
+    # Now create the libtool archive.
+    case $output in
+    *.la)
+      old_library=
+      test "$build_old_libs" = yes && old_library="$libname.$libext"
+      func_verbose "creating $output"
 
-      dir=
-      case $file in
-      *.la)
-	# Check to see that this really is a libtool archive.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+      # Preserve any variables that may affect compiler behavior
+      for var in $variables_saved_for_relink; do
+	if eval test -z \"\${$var+set}\"; then
+	  relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+	elif eval var_value=\$$var; test -z "$var_value"; then
+	  relink_command="$var=; export $var; $relink_command"
 	else
-	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
-	  $echo "$help" 1>&2
-	  exit $EXIT_FAILURE
+	  func_quote_for_eval "$var_value"
+	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
 	fi
+      done
+      # Quote the link command for shipping.
+      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+      if test "$hardcode_automatic" = yes ; then
+	relink_command=
+      fi
 
-	# Read the libtool library.
-	dlname=
-	library_names=
+      # Only create the output if not a dry run.
+      $opt_dry_run || {
+	for installed in no yes; do
+	  if test "$installed" = yes; then
+	    if test -z "$install_libdir"; then
+	      break
+	    fi
+	    output="$output_objdir/$outputname"i
+	    # Replace all uninstalled libtool libraries with the installed ones
+	    newdependency_libs=
+	    for deplib in $dependency_libs; do
+	      case $deplib in
+	      *.la)
+		func_basename "$deplib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$deplib' is not a valid libtool archive"
+		newdependency_libs="$newdependency_libs $libdir/$name"
+		;;
+	      *) newdependency_libs="$newdependency_libs $deplib" ;;
+	      esac
+	    done
+	    dependency_libs="$newdependency_libs"
+	    newdlfiles=
 
-	# If there is no directory component, then add one.
-	case $file in
-	*/* | *\\*) . $file ;;
-	*) . ./$file ;;
-	esac
+	    for lib in $dlfiles; do
+	      case $lib in
+	      *.la)
+	        func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		newdlfiles="$newdlfiles $libdir/$name"
+		;;
+	      *) newdlfiles="$newdlfiles $lib" ;;
+	      esac
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+	      *.la)
+		# Only pass preopened files to the pseudo-archive (for
+		# eventual linking with the app. that links it) if we
+		# didn't already link the preopened objects directly into
+		# the library:
+		func_basename "$lib"
+		name="$func_basename_result"
+		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+		test -z "$libdir" && \
+		  func_fatal_error "\`$lib' is not a valid libtool archive"
+		newdlprefiles="$newdlprefiles $libdir/$name"
+		;;
+	      esac
+	    done
+	    dlprefiles="$newdlprefiles"
+	  else
+	    newdlfiles=
+	    for lib in $dlfiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlfiles="$newdlfiles $abs"
+	    done
+	    dlfiles="$newdlfiles"
+	    newdlprefiles=
+	    for lib in $dlprefiles; do
+	      case $lib in
+		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+		*) abs=`pwd`"/$lib" ;;
+	      esac
+	      newdlprefiles="$newdlprefiles $abs"
+	    done
+	    dlprefiles="$newdlprefiles"
+	  fi
+	  $RM $output
+	  # place dlname in correct position for cygwin
+	  tdlname=$dlname
+	  case $host,$output,$installed,$module,$dlname in
+	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+	  esac
+	  $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
 
-	# Skip this library if it cannot be dlopened.
-	if test -z "$dlname"; then
-	  # Warn if it was a shared library.
-	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
-	  continue
-	fi
+# The name that we can dlopen(3).
+dlname='$tdlname'
 
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
+# Names of this library.
+library_names='$library_names'
 
-	if test -f "$dir/$objdir/$dlname"; then
-	  dir="$dir/$objdir"
-	else
-	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
-	  exit $EXIT_FAILURE
-	fi
-	;;
+# The name of the static archive.
+old_library='$old_library'
 
-      *.lo)
-	# Just add the directory containing the .lo file.
-	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-	test "X$dir" = "X$file" && dir=.
-	;;
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
 
-      *)
-	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
-	continue
-	;;
-      esac
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
 
-      # Get the absolute pathname.
-      absdir=`cd "$dir" && pwd`
-      test -n "$absdir" && dir="$absdir"
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
 
-      # Now add the directory to shlibpath_var.
-      if eval "test -z \"\$$shlibpath_var\""; then
-	eval "$shlibpath_var=\"\$dir\""
-      else
-	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
-      fi
-    done
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
 
-    # This variable tells wrapper scripts just to set shlibpath_var
-    # rather than running their programs.
-    libtool_execute_magic="$magic"
+# Is this an already installed library?
+installed=$installed
 
-    # Check if any of the arguments is a wrapper script.
-    args=
-    for file
-    do
-      case $file in
-      -*) ;;
-      *)
-	# Do a test to see if this is really a libtool program.
-	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  # If there is no directory component, then add one.
-	  case $file in
-	  */* | *\\*) . $file ;;
-	  *) . ./$file ;;
-	  esac
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
 
-	  # Transform arg to wrapped name.
-	  file="$progdir/$program"
-	fi
-	;;
-      esac
-      # Quote arguments (to preserve shell metacharacters).
-      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
-      args="$args \"$file\""
-    done
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
 
-    if test -z "$run"; then
-      if test -n "$shlibpath_var"; then
-	# Export the shlibpath_var.
-	eval "export $shlibpath_var"
-      fi
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+	  if test "$installed" = no && test "$need_relink" = yes; then
+	    $ECHO >> $output "\
+relink_command=\"$relink_command\""
+	  fi
+	done
+      }
 
-      # Restore saved environment variables
-      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-      do
-       eval "if test \"\${save_$lt_var+set}\" = set; then
-               $lt_var=\$save_$lt_var; export $lt_var
-             else
-               $lt_unset $lt_var
-             fi"
-      done
+      # Do a symbolic link so that the libtool archive can be found in
+      # LD_LIBRARY_PATH before the program is installed.
+      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+      ;;
+    esac
+    exit $EXIT_SUCCESS
+}
 
+{ test "$mode" = link || test "$mode" = relink; } &&
+    func_mode_link ${1+"$@"}
 
-      # Now prepare to actually exec the command.
-      exec_cmd="\$cmd$args"
-    else
-      # Display what would be done.
-      if test -n "$shlibpath_var"; then
-	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
-	$echo "export $shlibpath_var"
-      fi
-      $echo "$cmd$args"
-      exit $EXIT_SUCCESS
-    fi
-    ;;
 
-  # libtool clean and uninstall mode
-  clean | uninstall)
-    modename="$modename: $mode"
-    rm="$nonopt"
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+    $opt_debug
+    RM="$nonopt"
     files=
     rmforce=
     exit_status=0
@@ -6494,30 +8202,28 @@ relink_command=\"$relink_command\""
     for arg
     do
       case $arg in
-      -f) rm="$rm $arg"; rmforce=yes ;;
-      -*) rm="$rm $arg" ;;
+      -f) RM="$RM $arg"; rmforce=yes ;;
+      -*) RM="$RM $arg" ;;
       *) files="$files $arg" ;;
       esac
     done
 
-    if test -z "$rm"; then
-      $echo "$modename: you must specify an RM program" 1>&2
-      $echo "$help" 1>&2
-      exit $EXIT_FAILURE
-    fi
+    test -z "$RM" && \
+      func_fatal_help "you must specify an RM program"
 
     rmdirs=
 
     origobjdir="$objdir"
     for file in $files; do
-      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
-      if test "X$dir" = "X$file"; then
-	dir=.
+      func_dirname "$file" "" "."
+      dir="$func_dirname_result"
+      if test "X$dir" = X.; then
 	objdir="$origobjdir"
       else
 	objdir="$dir/$origobjdir"
       fi
-      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+      func_basename "$file"
+      name="$func_basename_result"
       test "$mode" = uninstall && objdir="$dir"
 
       # Remember objdir for removal later, being careful to avoid duplicates
@@ -6529,9 +8235,9 @@ relink_command=\"$relink_command\""
       fi
 
       # Don't error if the file doesn't exist and rm -f was used.
-      if (test -L "$file") >/dev/null 2>&1 \
-	|| (test -h "$file") >/dev/null 2>&1 \
-	|| test -f "$file"; then
+      if { test -L "$file"; } >/dev/null 2>&1 ||
+	 { test -h "$file"; } >/dev/null 2>&1 ||
+	 test -f "$file"; then
 	:
       elif test -d "$file"; then
 	exit_status=1
@@ -6545,8 +8251,8 @@ relink_command=\"$relink_command\""
       case $name in
       *.la)
 	# Possibly a libtool archive, so verify it.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	  . $dir/$name
+	if func_lalib_p "$file"; then
+	  func_source $dir/$name
 
 	  # Delete the libtool libraries and symlinks.
 	  for n in $library_names; do
@@ -6561,39 +8267,17 @@ relink_command=\"$relink_command\""
 	    *" $dlname "*) ;;
 	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
 	    esac
-	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+	    test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
 	    ;;
 	  uninstall)
 	    if test -n "$library_names"; then
 	      # Do each command in the postuninstall commands.
-	      cmds=$postuninstall_cmds
-	      save_ifs="$IFS"; IFS='~'
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd"
-		if test "$?" -ne 0 && test "$rmforce" != yes; then
-		  exit_status=1
-		fi
-	      done
-	      IFS="$save_ifs"
+	      func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
 	    fi
 
 	    if test -n "$old_library"; then
 	      # Do each command in the old_postuninstall commands.
-	      cmds=$old_postuninstall_cmds
-	      save_ifs="$IFS"; IFS='~'
-	      for cmd in $cmds; do
-		IFS="$save_ifs"
-		eval cmd=\"$cmd\"
-		$show "$cmd"
-		$run eval "$cmd"
-		if test "$?" -ne 0 && test "$rmforce" != yes; then
-		  exit_status=1
-		fi
-	      done
-	      IFS="$save_ifs"
+	      func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
 	    fi
 	    # FIXME: should reinstall the best remaining shared library.
 	    ;;
@@ -6603,20 +8287,20 @@ relink_command=\"$relink_command\""
 
       *.lo)
 	# Possibly a libtool object, so verify it.
-	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+	if func_lalib_p "$file"; then
 
 	  # Read the .lo file
-	  . $dir/$name
+	  func_source $dir/$name
 
 	  # Add PIC object to the list of files to remove.
-	  if test -n "$pic_object" \
-	     && test "$pic_object" != none; then
+	  if test -n "$pic_object" &&
+	     test "$pic_object" != none; then
 	    rmfiles="$rmfiles $dir/$pic_object"
 	  fi
 
 	  # Add non-PIC object to the list of files to remove.
-	  if test -n "$non_pic_object" \
-	     && test "$non_pic_object" != none; then
+	  if test -n "$non_pic_object" &&
+	     test "$non_pic_object" != none; then
 	    rmfiles="$rmfiles $dir/$non_pic_object"
 	  fi
 	fi
@@ -6627,17 +8311,26 @@ relink_command=\"$relink_command\""
 	  noexename=$name
 	  case $file in
 	  *.exe)
-	    file=`$echo $file|${SED} 's,.exe$,,'`
-	    noexename=`$echo $name|${SED} 's,.exe$,,'`
+	    func_stripname '' '.exe' "$file"
+	    file=$func_stripname_result
+	    func_stripname '' '.exe' "$name"
+	    noexename=$func_stripname_result
 	    # $file with .exe has already been added to rmfiles,
 	    # add $file without .exe
 	    rmfiles="$rmfiles $file"
 	    ;;
 	  esac
 	  # Do a test to see if this is a libtool program.
-	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
-	    relink_command=
-	    . $dir/$noexename
+	  if func_ltwrapper_p "$file"; then
+	    if func_ltwrapper_executable_p "$file"; then
+	      func_ltwrapper_scriptname "$file"
+	      relink_command=
+	      func_source $func_ltwrapper_scriptname_result
+	      rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+	    else
+	      relink_command=
+	      func_source $dir/$noexename
+	    fi
 
 	    # note $name still contains .exe if it was in $file originally
 	    # as does the version of $file that was added into $rmfiles
@@ -6652,239 +8345,38 @@ relink_command=\"$relink_command\""
 	fi
 	;;
       esac
-      $show "$rm $rmfiles"
-      $run $rm $rmfiles || exit_status=1
+      func_show_eval "$RM $rmfiles" 'exit_status=1'
     done
     objdir="$origobjdir"
 
     # Try to remove the ${objdir}s in the directories where we deleted files
     for dir in $rmdirs; do
       if test -d "$dir"; then
-	$show "rmdir $dir"
-	$run rmdir $dir >/dev/null 2>&1
+	func_show_eval "rmdir $dir >/dev/null 2>&1"
       fi
     done
 
     exit $exit_status
-    ;;
+}
 
-  "")
-    $echo "$modename: you must specify a MODE" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-    ;;
-  esac
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+    func_mode_uninstall ${1+"$@"}
 
-  if test -z "$exec_cmd"; then
-    $echo "$modename: invalid operation mode \`$mode'" 1>&2
-    $echo "$generic_help" 1>&2
-    exit $EXIT_FAILURE
-  fi
-fi # test -z "$show_help"
+test -z "$mode" && {
+  help="$generic_help"
+  func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+  func_fatal_help "invalid operation mode \`$mode'"
 
 if test -n "$exec_cmd"; then
-  eval exec $exec_cmd
+  eval exec "$exec_cmd"
   exit $EXIT_FAILURE
 fi
 
-# We need to display help for each of the modes.
-case $mode in
-"") $echo \
-"Usage: $modename [OPTION]... [MODE-ARG]...
-
-Provide generalized library-building support services.
-
-    --config          show all configuration variables
-    --debug           enable verbose shell tracing
--n, --dry-run         display commands without modifying any files
-    --features        display basic configuration information and exit
-    --finish          same as \`--mode=finish'
-    --help            display this help message and exit
-    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
-    --quiet           same as \`--silent'
-    --silent          don't print informational messages
-    --tag=TAG         use configuration variables from tag TAG
-    --version         print version information
-
-MODE must be one of the following:
-
-      clean           remove files from the build directory
-      compile         compile a source file into a libtool object
-      execute         automatically set library path, then run a program
-      finish          complete the installation of libtool libraries
-      install         install libraries or executables
-      link            create a library or an executable
-      uninstall       remove libraries from an installed directory
-
-MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE.
-
-Report bugs to <bug-libtool at gnu.org>."
-  exit $EXIT_SUCCESS
-  ;;
-
-clean)
-  $echo \
-"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
-
-Remove files from the build directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, object or program, all the files associated
-with it are deleted. Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-compile)
-  $echo \
-"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
-
-Compile a source file into a libtool library object.
-
-This mode accepts the following additional options:
-
-  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
-  -prefer-pic       try to building PIC objects only
-  -prefer-non-pic   try to building non-PIC objects only
-  -static           always build a \`.o' file suitable for static linking
-
-COMPILE-COMMAND is a command to be used in creating a \`standard' object file
-from the given SOURCEFILE.
-
-The output file name is determined by removing the directory component from
-SOURCEFILE, then substituting the C source code suffix \`.c' with the
-library object suffix, \`.lo'."
-  ;;
-
-execute)
-  $echo \
-"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
-
-Automatically set library path, then run a program.
-
-This mode accepts the following additional options:
-
-  -dlopen FILE      add the directory containing FILE to the library path
-
-This mode sets the library path environment variable according to \`-dlopen'
-flags.
-
-If any of the ARGS are libtool executable wrappers, then they are translated
-into their corresponding uninstalled binary, and any of their required library
-directories are added to the library path.
-
-Then, COMMAND is executed, with ARGS as arguments."
-  ;;
-
-finish)
-  $echo \
-"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
-
-Complete the installation of libtool libraries.
-
-Each LIBDIR is a directory that contains libtool libraries.
-
-The commands that this mode executes may require superuser privileges.  Use
-the \`--dry-run' option if you just want to see what would be executed."
-  ;;
-
-install)
-  $echo \
-"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
-
-Install executables or libraries.
-
-INSTALL-COMMAND is the installation command.  The first component should be
-either the \`install' or \`cp' program.
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
-  ;;
-
-link)
-  $echo \
-"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
-
-Link object files or libraries together to form another library, or to
-create an executable program.
+exit $exit_status
 
-LINK-COMMAND is a command using the C compiler that you would use to create
-a program from several object files.
-
-The following components of LINK-COMMAND are treated specially:
-
-  -all-static       do not do any dynamic linking at all
-  -avoid-version    do not add a version suffix if possible
-  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
-  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
-  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-  -export-symbols SYMFILE
-                    try to export only the symbols listed in SYMFILE
-  -export-symbols-regex REGEX
-                    try to export only the symbols matching REGEX
-  -LLIBDIR          search LIBDIR for required installed libraries
-  -lNAME            OUTPUT-FILE requires the installed library libNAME
-  -module           build a library that can dlopened
-  -no-fast-install  disable the fast-install mode
-  -no-install       link a not-installable executable
-  -no-undefined     declare that a library does not refer to external symbols
-  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
-  -objectlist FILE  Use a list of object files found in FILE to specify objects
-  -precious-files-regex REGEX
-                    don't remove output files matching REGEX
-  -release RELEASE  specify package release information
-  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
-  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
-  -static           do not do any dynamic linking of uninstalled libtool libraries
-  -static-libtool-libs
-                    do not do any dynamic linking of libtool libraries
-  -version-info CURRENT[:REVISION[:AGE]]
-                    specify library version info [each variable defaults to 0]
-
-All other options (arguments beginning with \`-') are ignored.
-
-Every other argument is treated as a filename.  Files ending in \`.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.
-
-If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
-only library objects (\`.lo' files) may be specified, and \`-rpath' is
-required, except when creating a convenience library.
-
-If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
-using \`ar' and \`ranlib', or on Windows using \`lib'.
-
-If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
-is created, otherwise an executable program is created."
-  ;;
-
-uninstall)
-  $echo \
-"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
-
-Remove libraries from an installation directory.
-
-RM is the name of the program to use to delete files associated with each FILE
-(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
-to RM.
-
-If FILE is a libtool library, all the files associated with it are deleted.
-Otherwise, only FILE itself is deleted using RM."
-  ;;
-
-*)
-  $echo "$modename: invalid operation mode \`$mode'" 1>&2
-  $echo "$help" 1>&2
-  exit $EXIT_FAILURE
-  ;;
-esac
-
-$echo
-$echo "Try \`$modename --help' for more information about other modes."
-
-exit $?
 
 # The TAGs below are defined such that we never get into a situation
 # in which we disable both kinds of libraries.  Given conflicting
@@ -6898,14 +8390,17 @@ exit $?
 # configuration.  But we'll never go from static-only to shared-only.
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-disable_libs=shared
+build_libtool_libs=no
+build_old_libs=yes
 # ### END LIBTOOL TAG CONFIG: disable-shared
 
 # ### BEGIN LIBTOOL TAG CONFIG: disable-static
-disable_libs=static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
 # ### END LIBTOOL TAG CONFIG: disable-static
 
 # Local Variables:
 # mode:shell-script
 # sh-indentation:2
 # End:
+# vi:sw=2
+
diff --git a/configure b/configure
index e0b0228..42ea33e 100755
--- a/configure
+++ b/configure
@@ -1,26 +1,83 @@
 #! /bin/sh
 # From configure.ac Revision.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59.
+# Generated by GNU Autoconf 2.63.
 #
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 # This configure script is free software; the Free Software Foundation
 # gives unlimited permission to copy, distribute and modify it.
 ## --------------------- ##
 ## M4sh Initialization.  ##
 ## --------------------- ##
 
-# Be Bourne compatible
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
   emulate sh
   NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
 fi
-DUALCASE=1; export DUALCASE # for MKS sh
 
 # Support unset when possible.
 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
@@ -30,33 +87,60 @@ else
 fi
 
 
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
 
 # NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
-  fi
-done
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
 
 # Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
   as_basename=basename
 else
   as_basename=false
@@ -64,157 +148,391 @@ fi
 
 
 # Name of the executable.
-as_me=`$as_basename "$0" ||
+as_me=`$as_basename -- "$0" ||
 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
 	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)$' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\/\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
 
+# CDPATH.
+$as_unset CDPATH
 
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
+if test "x$CONFIG_SHELL" = x; then
+  if (eval ":") 2>/dev/null; then
+  as_have_required=yes
+else
+  as_have_required=no
 fi
 
+  if test $as_have_required = yes &&	 (eval ":
+(as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
 
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+  as_lineno_1=\$LINENO
+  as_lineno_2=\$LINENO
+  test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+  test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+  :
+else
+  as_candidate_shells=
     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-	 case $as_dir in
+  case $as_dir in
 	 /*)
-	   if ("$as_dir/$as_base" -c '
+	   for as_base in sh bash ksh sh5; do
+	     as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+	   done;;
+       esac
+done
+IFS=$as_save_IFS
+
+
+      for as_shell in $as_candidate_shells $SHELL; do
+	 # Try only shells that exist, to save several forks.
+	 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		{ ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+  CONFIG_SHELL=$as_shell
+	       as_have_required=yes
+	       if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+  (exit $1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
   as_lineno_1=$LINENO
   as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
   test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-	     CONFIG_SHELL=$as_dir/$as_base
-	     export CONFIG_SHELL
-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-	   fi;;
-	 esac
-       done
-done
-;;
-  esac
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+  break
+fi
+
+fi
+
+      done
+
+      if test "x$CONFIG_SHELL" != x; then
+  for as_var in BASH_ENV ENV
+	do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+	done
+	export CONFIG_SHELL
+	exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+    if test $as_have_required = no; then
+  echo This script requires a shell more modern than all the
+      echo shells that I found on your system.  Please install a
+      echo modern shell, or manually run the script under such a
+      echo shell if you do have one.
+      { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+  (exit \$1)
+}
+as_func_success () {
+  as_func_return 0
+}
+as_func_failure () {
+  as_func_return 1
+}
+as_func_ret_success () {
+  return 0
+}
+as_func_ret_failure () {
+  return 1
+}
+
+exitcode=0
+if as_func_success; then
+  :
+else
+  exitcode=1
+  echo as_func_success failed.
+fi
+
+if as_func_failure; then
+  exitcode=1
+  echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+  :
+else
+  exitcode=1
+  echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+  exitcode=1
+  echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+  :
+else
+  exitcode=1
+  echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+  echo No shell found that supports shell functions.
+  echo Please tell bug-autoconf at gnu.org about your system,
+  echo including any error possibly output before this message.
+  echo This can help us improve future autoconf versions.
+  echo Configuration will now proceed without shell functions.
+}
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
 
   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
   # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
     sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
       N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
       t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
+      s/-\n.*//
     ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
    { (exit 1); exit 1; }; }
 
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
   # Exit status is that of the last command.
   exit
 }
 
 
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
   as_expr=expr
 else
   as_expr=false
 fi
 
 rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
     as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
   fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
 else
   as_ln_s='cp -p'
 fi
-rm -f conf$$ conf$$.exe conf$$.file
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
 
 if mkdir -p . 2>/dev/null; then
   as_mkdir_p=:
@@ -223,7 +541,28 @@ else
   as_mkdir_p=false
 fi
 
-as_executable_p="test -f"
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -232,36 +571,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
 
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
 
 
 # Check that we are running under the correct shell.
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-case X$ECHO in
+case X$lt_ECHO in
 X*--fallback-echo)
   # Remove one level of quotation (which was required for Make).
-  ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
+  ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
   ;;
 esac
 
-echo=${ECHO-echo}
+ECHO=${lt_ECHO-echo}
 if test "X$1" = X--no-reexec; then
   # Discard the --no-reexec flag, and continue.
   shift
 elif test "X$1" = X--fallback-echo; then
   # Avoid inline document here, it may be left over
   :
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
-  # Yippee, $echo works!
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+  # Yippee, $ECHO works!
   :
 else
   # Restart under the correct shell.
@@ -271,9 +601,9 @@ fi
 if test "X$1" = X--fallback-echo; then
   # used as fallback echo
   shift
-  cat <<EOF
+  cat <<_LT_EOF
 $*
-EOF
+_LT_EOF
   exit 0
 fi
 
@@ -281,144 +611,136 @@ fi
 # if CDPATH is set.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
-if test -z "$ECHO"; then
-if test "X${echo_test_string+set}" != Xset; then
-# find a string as large as possible, as long as the shell can cope with it
-  for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
-    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
-    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
-       echo_test_string=`eval $cmd` &&
-       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
-    then
-      break
-    fi
-  done
-fi
+if test -z "$lt_ECHO"; then
+  if test "X${echo_test_string+set}" != Xset; then
+    # find a string as large as possible, as long as the shell can cope with it
+    for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+      # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+      if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+	 { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+      then
+        break
+      fi
+    done
+  fi
 
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-   test "X$echo_testing_string" = "X$echo_test_string"; then
-  :
-else
-  # The Solaris, AIX, and Digital Unix default echo programs unquote
-  # backslashes.  This makes it impossible to quote backslashes using
-  #   echo "$something" | sed 's/\\/\\\\/g'
-  #
-  # So, first we look for a working echo in the user's PATH.
+  if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+     echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+     test "X$echo_testing_string" = "X$echo_test_string"; then
+    :
+  else
+    # The Solaris, AIX, and Digital Unix default echo programs unquote
+    # backslashes.  This makes it impossible to quote backslashes using
+    #   echo "$something" | sed 's/\\/\\\\/g'
+    #
+    # So, first we look for a working echo in the user's PATH.
 
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for dir in $PATH /usr/ucb; do
+    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+    for dir in $PATH /usr/ucb; do
+      IFS="$lt_save_ifs"
+      if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+         test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        ECHO="$dir/echo"
+        break
+      fi
+    done
     IFS="$lt_save_ifs"
-    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
-       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      echo="$dir/echo"
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
 
-  if test "X$echo" = Xecho; then
-    # We didn't find a better echo, so look for alternatives.
-    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
-       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
-       test "X$echo_testing_string" = "X$echo_test_string"; then
-      # This shell has a builtin print -r that does the trick.
-      echo='print -r'
-    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
-	 test "X$CONFIG_SHELL" != X/bin/ksh; then
-      # If we have ksh, try running configure again with it.
-      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
-      export ORIGINAL_CONFIG_SHELL
-      CONFIG_SHELL=/bin/ksh
-      export CONFIG_SHELL
-      exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
-    else
-      # Try using printf.
-      echo='printf %s\n'
-      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
-	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
-	 test "X$echo_testing_string" = "X$echo_test_string"; then
-	# Cool, printf works
-	:
-      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
-	export CONFIG_SHELL
-	SHELL="$CONFIG_SHELL"
-	export SHELL
-	echo="$CONFIG_SHELL $0 --fallback-echo"
-      elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
-	   test "X$echo_testing_string" = 'X\t' &&
-	   echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
-	   test "X$echo_testing_string" = "X$echo_test_string"; then
-	echo="$CONFIG_SHELL $0 --fallback-echo"
+    if test "X$ECHO" = Xecho; then
+      # We didn't find a better echo, so look for alternatives.
+      if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+         echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+         test "X$echo_testing_string" = "X$echo_test_string"; then
+        # This shell has a builtin print -r that does the trick.
+        ECHO='print -r'
+      elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+	   test "X$CONFIG_SHELL" != X/bin/ksh; then
+        # If we have ksh, try running configure again with it.
+        ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+        export ORIGINAL_CONFIG_SHELL
+        CONFIG_SHELL=/bin/ksh
+        export CONFIG_SHELL
+        exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
       else
-	# maybe with a smaller string...
-	prev=:
-
-	for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
-	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
-	  then
-	    break
-	  fi
-	  prev="$cmd"
-	done
+        # Try using printf.
+        ECHO='printf %s\n'
+        if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+	   echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+	   test "X$echo_testing_string" = "X$echo_test_string"; then
+	  # Cool, printf works
+	  :
+        elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+	  export CONFIG_SHELL
+	  SHELL="$CONFIG_SHELL"
+	  export SHELL
+	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+	     test "X$echo_testing_string" = 'X\t' &&
+	     echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+	     test "X$echo_testing_string" = "X$echo_test_string"; then
+	  ECHO="$CONFIG_SHELL $0 --fallback-echo"
+        else
+	  # maybe with a smaller string...
+	  prev=:
 
-	if test "$prev" != 'sed 50q "$0"'; then
-	  echo_test_string=`eval $prev`
-	  export echo_test_string
-	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
-	else
-	  # Oops.  We lost completely, so just stick with echo.
-	  echo=echo
-	fi
+	  for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+	    if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+	    then
+	      break
+	    fi
+	    prev="$cmd"
+	  done
+
+	  if test "$prev" != 'sed 50q "$0"'; then
+	    echo_test_string=`eval $prev`
+	    export echo_test_string
+	    exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+	  else
+	    # Oops.  We lost completely, so just stick with echo.
+	    ECHO=echo
+	  fi
+        fi
       fi
     fi
   fi
 fi
-fi
 
 # Copy echo and quote the copy suitably for passing to libtool from
 # the Makefile, instead of quoting the original, which is used later.
-ECHO=$echo
-if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
-   ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+   lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
 fi
 
 
 
 
-tagnames=${tagnames+${tagnames},}CXX
-
-tagnames=${tagnames+${tagnames},}F77
+exec 7<&0 </dev/null 6>&1
 
 # Name of the host.
 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
-exec 6>&1
-
 #
 # Initializations.
 #
 ac_default_prefix=/usr/local
+ac_clean_files=
 ac_config_libobj_dir=.
+LIBOBJS=
 cross_compiling=no
 subdirs=
 MFLAGS=
 MAKEFLAGS=
 SHELL=${CONFIG_SHELL-/bin/sh}
 
-# Maximum number of lines to put in a shell here document.
-# This variable seems obsolete.  It should probably be removed, and
-# only ac_max_sed_lines should be used.
-: ${ac_max_here_lines=38}
-
 # Identity of this package.
 PACKAGE_NAME=
 PACKAGE_TARNAME=
@@ -430,46 +752,377 @@ ac_unique_file="configure.ac"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
-#if HAVE_SYS_TYPES_H
+#ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
-#if HAVE_SYS_STAT_H
+#ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#if STDC_HEADERS
+#ifdef STDC_HEADERS
 # include <stdlib.h>
 # include <stddef.h>
 #else
-# if HAVE_STDLIB_H
+# ifdef HAVE_STDLIB_H
 #  include <stdlib.h>
 # endif
 #endif
-#if HAVE_STRING_H
-# if !STDC_HEADERS && HAVE_MEMORY_H
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 #  include <memory.h>
 # endif
 # include <string.h>
 #endif
-#if HAVE_STRINGS_H
+#ifdef HAVE_STRINGS_H
 # include <strings.h>
 #endif
-#if HAVE_INTTYPES_H
+#ifdef HAVE_INTTYPES_H
 # include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
 #endif
-#if HAVE_UNISTD_H
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INS [...]
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+ADIOSLIB_EXTRA_CPPFLAGS
+ADIOSREADLIB_SEQ_LDADD
+ADIOSREADLIB_SEQ_LDFLAGS
+ADIOSREADLIB_SEQ_CFLAGS
+ADIOSREADLIB_SEQ_CPPFLAGS
+ADIOSREADLIB_LDADD
+ADIOSREADLIB_LDFLAGS
+ADIOSREADLIB_CFLAGS
+ADIOSREADLIB_CPPFLAGS
+ADIOSLIB_INT_LDADD
+ADIOSLIB_INT_LDFLAGS
+ADIOSLIB_INT_CFLAGS
+ADIOSLIB_INT_CPPFLAGS
+ADIOSLIB_SEQ_LDADD
+ADIOSLIB_SEQ_LDFLAGS
+ADIOSLIB_SEQ_CFLAGS
+ADIOSLIB_SEQ_CPPFLAGS
+ADIOSLIB_LDADD
+ADIOSLIB_LDFLAGS
+ADIOSLIB_CFLAGS
+ADIOSLIB_CPPFLAGS
+MACRODEFFLAG
+USE_PARALLEL_COMPILER_FALSE
+USE_PARALLEL_COMPILER_TRUE
+BUILD_WRITE_FALSE
+BUILD_WRITE_TRUE
+HAVE_DATATAP_FALSE
+HAVE_DATATAP_TRUE
+SKEL_TIMING_FALSE
+SKEL_TIMING_TRUE
+RESEARCH_TRANSPORTS_FALSE
+RESEARCH_TRANSPORTS_TRUE
+DT_LDFLAGS
+DT_CPPFLAGS
+DT_LIBS
+PATHPROG
+CSH
+LUSTRE_CPPFLAGS
+LUSTRE_LDFLAGS
+LUSTRE_LIBS
+HAVE_LUSTRE_FALSE
+HAVE_LUSTRE_TRUE
+DMALLOC_CPPFLAGS
+DMALLOC_LDFLAGS
+DMALLOC_LIBS
+HAVE_DMALLOC_FALSE
+HAVE_DMALLOC_TRUE
+DIMES_CPPFLAGS
+DIMES_LDFLAGS
+DIMES_LIBS
+HAVE_DIMES_FALSE
+HAVE_DIMES_TRUE
+DATASPACES_CPPFLAGS
+DATASPACES_LDFLAGS
+DATASPACES_LIBS
+HAVE_DATASPACES_FALSE
+HAVE_DATASPACES_TRUE
+NSSI_BUILDDIR
+NSSI_SRCDIR
+NSSI_LDFLAGS
+NSSI_CPPFLAGS
+NSSI_CFLAGS
+NSSI_SERVER_LIBS
+NSSI_LIBS
+HAVE_NSSI_FALSE
+HAVE_NSSI_TRUE
+PABLO_CPPFLAGS
+PABLO_LDFLAGS
+PABLO_LIBS
+HAVE_PABLO_FALSE
+HAVE_PABLO_TRUE
+NC4PAR_CPPFLAGS
+NC4PAR_LDFLAGS
+NC4PAR_LIBS
+HAVE_NC4PAR_FALSE
+HAVE_NC4PAR_TRUE
+NETCDF_CPPFLAGS
+NETCDF_LDFLAGS
+NETCDF_LIBS
+HAVE_NETCDF_FALSE
+HAVE_NETCDF_TRUE
+PHDF5_CPPFLAGS
+PHDF5_LDFLAGS
+PHDF5_LIBS
+HAVE_PHDF5_FALSE
+HAVE_PHDF5_TRUE
+HDF5_CPPFLAGS
+HDF5_LDFLAGS
+HDF5_LIBS
+HAVE_HDF5_FALSE
+HAVE_HDF5_TRUE
+CRAY_UGNI_CPPFLAGS
+CRAY_UGNI_LDFLAGS
+CRAY_UGNI_LIBS
+HAVE_CRAY_UGNI_FALSE
+HAVE_CRAY_UGNI_TRUE
+CRAY_PMI_CPPFLAGS
+CRAY_PMI_LDFLAGS
+CRAY_PMI_LIBS
+HAVE_CRAY_PMI_FALSE
+HAVE_CRAY_PMI_TRUE
+PORTALS_RT_HEADER
+PORTALS_NAL_HEADER
+PORTALS_HEADER
+PORTALS_LIBS
+PORTALS_LDFLAGS
+PORTALS_CFLAGS
+PORTALS_CPPFLAGS
+NEED_DARWIN_SINGLE_MODULE_FALSE
+NEED_DARWIN_SINGLE_MODULE_TRUE
+HAVE_PORTALS_FALSE
+HAVE_PORTALS_TRUE
+INFINIBAND_LIBS
+INFINIBAND_LDFLAGS
+INFINIBAND_CFLAGS
+INFINIBAND_CPPFLAGS
+HAVE_INFINIBAND_FALSE
+HAVE_INFINIBAND_TRUE
+MXML_CPPFLAGS
+MXML_LDFLAGS
+MXML_LIBS
+PTHREAD_CFLAGS
+PTHREAD_LIBS
+PTHREAD_CC
+HAVE_MXML_FALSE
+HAVE_MXML_TRUE
+CXXCPP
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+RANLIB
+AR
+OBJDUMP
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
+MPIFC
+FCLIBS
+ac_ct_FC
+FCFLAGS
+FC
+BUILD_FORTRAN_FALSE
+BUILD_FORTRAN_TRUE
+MPICXX
+MPILIBS
+MPICC
+HAVE_MPI_FALSE
+HAVE_MPI_TRUE
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+ac_ct_CXX
+CXXFLAGS
+CXX
+EGREP
+GREP
+CPP
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
 ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_dependency_tracking
+with_mpi
+enable_fortran
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+enable_libtool_lock
+with_mxml
+with_infiniband
+with_portals
+with_cray_pmi
+with_cray_pmi_incdir
+with_cray_pmi_libdir
+with_cray_pmi_libs
+with_cray_ugni
+with_cray_ugni_incdir
+with_cray_ugni_libdir
+with_cray_ugni_libs
+with_hdf5
+with_hdf5_incdir
+with_hdf5_libdir
+with_hdf5_libs
+with_phdf5
+with_phdf5_incdir
+with_phdf5_libdir
+with_phdf5_libs
+with_netcdf
+with_netcdf_incdir
+with_netcdf_libdir
+with_netcdf_libs
+with_nc4par
+with_nc4par_incdir
+with_nc4par_libdir
+with_nc4par_libs
+with_pablo
+with_nssi
+with_dataspaces
+with_dataspaces_incdir
+with_dataspaces_libdir
+with_dimes
+with_dimes_incdir
+with_dimes_libdir
+with_dmalloc
+with_lustre
+with_datatap
+with_installed
+with_local
+with_ibpbio
+with_ffs
+with_gen_thread
+with_ptlpbio
+enable_research_transports
+enable_skel_timing
+enable_write
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+CXX
+CXXFLAGS
+CCC
+MPICC
+MPICXX
+FC
+FCFLAGS
+MPIFC
+CXXCPP'
+
 
 # Initialize some variables set by options.
 ac_init_help=
 ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
 # The variables have the same names as the options, with
 # dashes changed to underlines.
 cache_file=/dev/null
@@ -492,34 +1145,48 @@ x_libraries=NONE
 # and all the variables that are supposed to be based on exec_prefix
 # by default will actually change.
 # Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
 bindir='${exec_prefix}/bin'
 sbindir='${exec_prefix}/sbin'
 libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
 sysconfdir='${prefix}/etc'
 sharedstatedir='${prefix}/com'
 localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
 includedir='${prefix}/include'
 oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
+docdir='${datarootdir}/doc/${PACKAGE}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
 
 ac_prev=
+ac_dashdash=
 for ac_option
 do
   # If the previous option needs an argument, assign it.
   if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
+    eval $ac_prev=\$ac_option
     ac_prev=
     continue
   fi
 
-  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+  case $ac_option in
+  *=*)	ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *)	ac_optarg=yes ;;
+  esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
 
-  case $ac_option in
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
 
   -bindir | --bindir | --bindi | --bind | --bin | --bi)
     ac_prev=bindir ;;
@@ -541,33 +1208,61 @@ do
   --config-cache | -C)
     cache_file=config.cache ;;
 
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+  -datadir | --datadir | --datadi | --datad)
     ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
     datadir=$ac_optarg ;;
 
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
   -disable-* | --disable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    eval "enable_$ac_feature=no" ;;
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
 
   -enable-* | --enable-*)
-    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
    { (exit 1); exit 1; }; }
-    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
     esac
-    eval "enable_$ac_feature='$ac_optarg'" ;;
+    eval enable_$ac_useropt=\$ac_optarg ;;
 
   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -594,6 +1289,12 @@ do
   -host=* | --host=* | --hos=* | --ho=*)
     host_alias=$ac_optarg ;;
 
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
   -includedir | --includedir | --includedi | --included | --include \
   | --includ | --inclu | --incl | --inc)
     ac_prev=includedir ;;
@@ -618,13 +1319,16 @@ do
   | --libexe=* | --libex=* | --libe=*)
     libexecdir=$ac_optarg ;;
 
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
   -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
+  | --localstate | --localstat | --localsta | --localst | --locals)
     ac_prev=localstatedir ;;
   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
     localstatedir=$ac_optarg ;;
 
   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
@@ -689,6 +1393,16 @@ do
   | --progr-tra=* | --program-tr=* | --program-t=*)
     program_transform_name=$ac_optarg ;;
 
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
   | -silent | --silent | --silen | --sile | --sil)
     silent=yes ;;
@@ -739,26 +1453,38 @@ do
     ac_init_version=: ;;
 
   -with-* | --with-*)
-    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case $ac_option in
-      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
-      *) ac_optarg=yes ;;
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
     esac
-    eval "with_$ac_package='$ac_optarg'" ;;
+    eval with_$ac_useropt=\$ac_optarg ;;
 
   -without-* | --without-*)
-    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
-    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid package name: $ac_package" >&2
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
    { (exit 1); exit 1; }; }
-    ac_package=`echo $ac_package | sed 's/-/_/g'`
-    eval "with_$ac_package=no" ;;
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
 
   --x)
     # Obsolete; use --with-x.
@@ -778,7 +1504,7 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) { echo "$as_me: error: unrecognized option: $ac_option
+  -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
 Try \`$0 --help' for more information." >&2
    { (exit 1); exit 1; }; }
     ;;
@@ -787,17 +1513,16 @@ Try \`$0 --help' for more information." >&2
     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
     # Reject names that are not valid shell variable names.
     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
-      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+      { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
    { (exit 1); exit 1; }; }
-    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
-    eval "$ac_envvar='$ac_optarg'"
+    eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
 
   *)
     # FIXME: should be removed in autoconf 3.0.
-    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
     ;;
 
@@ -806,31 +1531,39 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  { echo "$as_me: error: missing argument to $ac_option" >&2
+  { $as_echo "$as_me: error: missing argument to $ac_option" >&2
    { (exit 1); exit 1; }; }
 fi
 
-# Be sure to have absolute paths.
-for ac_var in exec_prefix prefix
-do
-  eval ac_val=$`echo $ac_var`
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+   { (exit 1); exit 1; }; } ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
-done
+fi
 
-# Be sure to have absolute paths.
-for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
-	      localstatedir libdir includedir oldincludedir infodir mandir
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
 do
-  eval ac_val=$`echo $ac_var`
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
   case $ac_val in
-    [\\/$]* | ?:[\\/]* ) ;;
-    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
-   { (exit 1); exit 1; }; };;
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
+  { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; }
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -844,7 +1577,7 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    $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
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
@@ -857,114 +1590,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias-
 test "$silent" = yes && exec 6>/dev/null
 
 
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  { $as_echo "$as_me: error: working directory cannot be determined" >&2
+   { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+   { (exit 1); exit 1; }; }
+
+
 # Find the source files, if location was not specified.
 if test -z "$srcdir"; then
   ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_confdir=`(dirname "$0") 2>/dev/null ||
-$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$0" : 'X\(//\)[^/]' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$0" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
   srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
+  if test ! -r "$srcdir/$ac_unique_file"; then
     srcdir=..
   fi
 else
   ac_srcdir_defaulted=no
 fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
-   { (exit 1); exit 1; }; }
-  else
-    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
    { (exit 1); exit 1; }; }
-  fi
 fi
-(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
-  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
    { (exit 1); exit 1; }; }
-srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
-ac_env_build_alias_set=${build_alias+set}
-ac_env_build_alias_value=$build_alias
-ac_cv_env_build_alias_set=${build_alias+set}
-ac_cv_env_build_alias_value=$build_alias
-ac_env_host_alias_set=${host_alias+set}
-ac_env_host_alias_value=$host_alias
-ac_cv_env_host_alias_set=${host_alias+set}
-ac_cv_env_host_alias_value=$host_alias
-ac_env_target_alias_set=${target_alias+set}
-ac_env_target_alias_value=$target_alias
-ac_cv_env_target_alias_set=${target_alias+set}
-ac_cv_env_target_alias_value=$target_alias
-ac_env_CC_set=${CC+set}
-ac_env_CC_value=$CC
-ac_cv_env_CC_set=${CC+set}
-ac_cv_env_CC_value=$CC
-ac_env_CFLAGS_set=${CFLAGS+set}
-ac_env_CFLAGS_value=$CFLAGS
-ac_cv_env_CFLAGS_set=${CFLAGS+set}
-ac_cv_env_CFLAGS_value=$CFLAGS
-ac_env_LDFLAGS_set=${LDFLAGS+set}
-ac_env_LDFLAGS_value=$LDFLAGS
-ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
-ac_cv_env_LDFLAGS_value=$LDFLAGS
-ac_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_env_CPPFLAGS_value=$CPPFLAGS
-ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
-ac_cv_env_CPPFLAGS_value=$CPPFLAGS
-ac_env_CPP_set=${CPP+set}
-ac_env_CPP_value=$CPP
-ac_cv_env_CPP_set=${CPP+set}
-ac_cv_env_CPP_value=$CPP
-ac_env_CXX_set=${CXX+set}
-ac_env_CXX_value=$CXX
-ac_cv_env_CXX_set=${CXX+set}
-ac_cv_env_CXX_value=$CXX
-ac_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_env_CXXFLAGS_value=$CXXFLAGS
-ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
-ac_cv_env_CXXFLAGS_value=$CXXFLAGS
-ac_env_MPICC_set=${MPICC+set}
-ac_env_MPICC_value=$MPICC
-ac_cv_env_MPICC_set=${MPICC+set}
-ac_cv_env_MPICC_value=$MPICC
-ac_env_MPICXX_set=${MPICXX+set}
-ac_env_MPICXX_value=$MPICXX
-ac_cv_env_MPICXX_set=${MPICXX+set}
-ac_cv_env_MPICXX_value=$MPICXX
-ac_env_FC_set=${FC+set}
-ac_env_FC_value=$FC
-ac_cv_env_FC_set=${FC+set}
-ac_cv_env_FC_value=$FC
-ac_env_FCFLAGS_set=${FCFLAGS+set}
-ac_env_FCFLAGS_value=$FCFLAGS
-ac_cv_env_FCFLAGS_set=${FCFLAGS+set}
-ac_cv_env_FCFLAGS_value=$FCFLAGS
-ac_env_MPIFC_set=${MPIFC+set}
-ac_env_MPIFC_value=$MPIFC
-ac_cv_env_MPIFC_set=${MPIFC+set}
-ac_cv_env_MPIFC_value=$MPIFC
-ac_env_CXXCPP_set=${CXXCPP+set}
-ac_env_CXXCPP_value=$CXXCPP
-ac_cv_env_CXXCPP_set=${CXXCPP+set}
-ac_cv_env_CXXCPP_value=$CXXCPP
-ac_env_F77_set=${F77+set}
-ac_env_F77_value=$F77
-ac_cv_env_F77_set=${F77+set}
-ac_cv_env_F77_value=$F77
-ac_env_FFLAGS_set=${FFLAGS+set}
-ac_env_FFLAGS_value=$FFLAGS
-ac_cv_env_FFLAGS_set=${FFLAGS+set}
-ac_cv_env_FFLAGS_value=$FFLAGS
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
 
 #
 # Report the --help message.
@@ -993,14 +1688,11 @@ Configuration:
   -n, --no-create         do not create output files
       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
 
-_ACEOF
-
-  cat <<_ACEOF
 Installation directories:
   --prefix=PREFIX         install architecture-independent files in PREFIX
-			  [$ac_default_prefix]
+                          [$ac_default_prefix]
   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-			  [PREFIX]
+                          [PREFIX]
 
 By default, \`make install' will install all the files in
 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
@@ -1010,18 +1702,25 @@ for instance \`--prefix=\$HOME'.
 For better control, use the options below.
 
 Fine tuning of the installation directories:
-  --bindir=DIR           user executables [EPREFIX/bin]
-  --sbindir=DIR          system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR       program executables [EPREFIX/libexec]
-  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
-  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
-  --libdir=DIR           object code libraries [EPREFIX/lib]
-  --includedir=DIR       C header files [PREFIX/include]
-  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
-  --infodir=DIR          info documentation [PREFIX/info]
-  --mandir=DIR           man documentation [PREFIX/man]
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/PACKAGE]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
 _ACEOF
 
   cat <<\_ACEOF
@@ -1042,15 +1741,14 @@ if test -n "$ac_init_help"; then
   cat <<\_ACEOF
 
 Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --disable-dependency-tracking  speeds up one-time build
   --enable-dependency-tracking   do not reject slow dependency extractors
   --disable-fortran       disable Fortran test programs in ADIOS.
-  --enable-shared[=PKGS]
-                          build shared libraries [default=yes]
-  --enable-static[=PKGS]
-                          build static libraries [default=yes]
+  --enable-shared[=PKGS]  build shared libraries [default=yes]
+  --enable-static[=PKGS]  build static libraries [default=yes]
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
@@ -1058,21 +1756,28 @@ Optional Features:
                           Enable building the various research transports.
                           Default is not to build these as they are not part
                           of the base distribution.
-  --disable-write         disable building the write methods in ADIOS. Must be
-                          used on MacOSX
+  --enable-skel-timing    Include the skel timing mechanism. By default this
+                          is not included
+  --disable-write         disable building the write methods in ADIOS.
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-mpi=<location of MPI installation>
-  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-pic              try to use only PIC/non-PIC objects [default=use
                           both]
-  --with-tags[=TAGS]
-                          include additional configurations [automatic]
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]
   --with-mxml=DIR      Location of Mini-XML library
   --with-infiniband=DIR      Location of Infiniband
   --with-portals=DIR      Location of Portals (yes/no/path_to_portals)
+  --with-cray-pmi=<location of CRAY_PMI installation>
+  --with-cray-pmi-incdir=<location of CRAY_PMI includes>
+  --with-cray-pmi-libdir=<location of CRAY_PMI library>
+  --with-cray-pmi-libs=<linker flags besides -L<cray-pmi-libdir>, e.g. -lpmi
+  --with-cray-ugni=<location of CRAY UGNI installation>
+  --with-cray-ugni-incdir=<location of CRAY UGNI includes>
+  --with-cray-ugni-libdir=<location of CRAY UGNI library>
+  --with-cray-ugni-libs=<linker flags besides -L<cray-ugni-libdir>, e.g. -lugni
   --with-hdf5=<location of HDF5 installation>
   --with-hdf5-incdir=<location of HDF5 includes>
   --with-hdf5-libdir=<location of HDF5 library>
@@ -1091,10 +1796,10 @@ Optional Packages:
   --with-nc4par-libs=<linker flags besides -L<nc4par_libdir>, e.g. -lnetcdf>
   --with-pablo=DIR      Location of Pablo library
   --with-nssi=DIR      Location of NSSI
-  --with-dart=DIR         Build the DART transport method. Point to the DART
-                          installation.
-  --with-dart-incdir=<location of dart includes>
-  --with-dart-libdir=<location of dart library>
+  --with-dataspaces=DIR   Build the DATASPACES transport method. Point to the
+                          DATASPACES installation.
+  --with-dataspaces-incdir=<location of dataspaces includes>
+  --with-dataspaces-libdir=<location of dataspaces library>
   --with-dimes=DIR        Build the DIMES transport method. Point to the DIMES
                           installation.
   --with-dimes-incdir=<location of dimes includes>
@@ -1114,8 +1819,9 @@ Some influential environment variables:
   CFLAGS      C compiler flags
   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
               nonstandard directory <lib dir>
-  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
-              headers in a nonstandard directory <include dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
   CPP         C preprocessor
   CXX         C++ compiler command
   CXXFLAGS    C++ compiler flags
@@ -1125,125 +1831,93 @@ Some influential environment variables:
   FCFLAGS     Fortran compiler flags
   MPIFC       MPI Fortran compiler command
   CXXCPP      C++ preprocessor
-  F77         Fortran 77 compiler command
-  FFLAGS      Fortran 77 compiler flags
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
 
 _ACEOF
+ac_status=$?
 fi
 
 if test "$ac_init_help" = "recursive"; then
   # If there are subdirs, report their specific --help.
-  ac_popdir=`pwd`
   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d $ac_dir || continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
     ac_builddir=.
 
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
 
 case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
+  .)  # We are building in place.
     ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
     ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
 esac
-
-    cd $ac_dir
-    # Check for guested configure; otherwise get Cygnus style configure.
-    if test -f $ac_srcdir/configure.gnu; then
-      echo
-      $SHELL $ac_srcdir/configure.gnu  --help=recursive
-    elif test -f $ac_srcdir/configure; then
-      echo
-      $SHELL $ac_srcdir/configure  --help=recursive
-    elif test -f $ac_srcdir/configure.ac ||
-	   test -f $ac_srcdir/configure.in; then
-      echo
-      $ac_configure --help
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
     else
-      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi
-    cd $ac_popdir
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
   done
 fi
 
-test -n "$ac_init_help" && exit 0
+test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
+configure
+generated by GNU Autoconf 2.63
 
-Copyright (C) 2003 Free Software Foundation, Inc.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
-  exit 0
+  exit
 fi
-exec 5>config.log
-cat >&5 <<_ACEOF
+cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
 It was created by $as_me, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
+generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
 
 _ACEOF
+exec 5>>config.log
 {
 cat <<_ASUNAME
 ## --------- ##
@@ -1262,7 +1936,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown`
 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
@@ -1274,8 +1948,9 @@ for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  echo "PATH: $as_dir"
+  $as_echo "PATH: $as_dir"
 done
+IFS=$as_save_IFS
 
 } >&5
 
@@ -1297,7 +1972,6 @@ _ACEOF
 ac_configure_args=
 ac_configure_args0=
 ac_configure_args1=
-ac_sep=
 ac_must_keep_next=false
 for ac_pass in 1 2
 do
@@ -1308,8 +1982,8 @@ do
     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
     | -silent | --silent | --silen | --sile | --sil)
       continue ;;
-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
     esac
     case $ac_pass in
     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
@@ -1330,9 +2004,7 @@ do
 	  -* ) ac_must_keep_next=true ;;
 	esac
       fi
-      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
-      # Get rid of the leading space.
-      ac_sep=" "
+      ac_configure_args="$ac_configure_args '$ac_arg'"
       ;;
     esac
   done
@@ -1343,8 +2015,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_
 # When interrupted or exit'd, cleanup temporary files, and complete
 # config.log.  We remove comments because anyway the quotes in there
 # would cause problems or look ugly.
-# WARNING: Be sure not to use single quotes in there, as some shells,
-# such as our DU 5.0 friend, will then `close' the trap.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
 trap 'exit_status=$?
   # Save into config.log some information that might help in debugging.
   {
@@ -1357,20 +2029,35 @@ trap 'exit_status=$?
 _ASBOX
     echo
     # The following way of writing the cache mishandles newlines in values,
-{
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
   (set) 2>&1 |
-    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
       sed -n \
-	"s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
-      ;;
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
     *)
-      sed -n \
-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
       ;;
-    esac;
-}
+    esac |
+    sort
+)
     echo
 
     cat <<\_ASBOX
@@ -1381,22 +2068,28 @@ _ASBOX
     echo
     for ac_var in $ac_subst_vars
     do
-      eval ac_val=$`echo $ac_var`
-      echo "$ac_var='"'"'$ac_val'"'"'"
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
     done | sort
     echo
 
     if test -n "$ac_subst_files"; then
       cat <<\_ASBOX
-## ------------- ##
-## Output files. ##
-## ------------- ##
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
 _ASBOX
       echo
       for ac_var in $ac_subst_files
       do
-	eval ac_val=$`echo $ac_var`
-	echo "$ac_var='"'"'$ac_val'"'"'"
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
       done | sort
       echo
     fi
@@ -1408,26 +2101,24 @@ _ASBOX
 ## ----------- ##
 _ASBOX
       echo
-      sed "/^$/d" confdefs.h | sort
+      cat confdefs.h
       echo
     fi
     test "$ac_signal" != 0 &&
-      echo "$as_me: caught signal $ac_signal"
-    echo "$as_me: exit $exit_status"
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
   } >&5
-  rm -f core *.core &&
-  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
     exit $exit_status
-     ' 0
+' 0
 for ac_signal in 1 2 13 15; do
   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
 done
 ac_signal=0
 
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+rm -f -r conftest* confdefs.h
 
 # Predefined preprocessor variables.
 
@@ -1457,18 +2148,24 @@ _ACEOF
 
 
 # Let the site file select an alternate cache file if it wants to.
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
   if test -r "$ac_site_file"; then
-    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
-echo "$as_me: loading site script $ac_site_file" >&6;}
+    { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
     . "$ac_site_file"
   fi
@@ -1478,54 +2175,61 @@ if test -r "$cache_file"; then
   # Some versions of bash will fail to source /dev/null (special
   # files actually), so we avoid doing that.
   if test -f "$cache_file"; then
-    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
-echo "$as_me: loading cache $cache_file" >&6;}
+    { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
     case $cache_file in
-      [\\/]* | ?:[\\/]* ) . $cache_file;;
-      *)                      . ./$cache_file;;
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
     esac
   fi
 else
-  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
-echo "$as_me: creating cache $cache_file" >&6;}
+  { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
   >$cache_file
 fi
 
 # Check that the precious variables saved in the cache have kept the same
 # value.
 ac_cache_corrupted=false
-for ac_var in `(set) 2>&1 |
-	       sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+for ac_var in $ac_precious_vars; do
   eval ac_old_set=\$ac_cv_env_${ac_var}_set
   eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
-  eval ac_new_val="\$ac_env_${ac_var}_value"
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
   case $ac_old_set,$ac_new_set in
     set,)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,set)
-      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
-echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
       ac_cache_corrupted=: ;;
     ,);;
     *)
       if test "x$ac_old_val" != "x$ac_new_val"; then
-	{ echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
-echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	{ echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
-echo "$as_me:   former value:  $ac_old_val" >&2;}
-	{ echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
-echo "$as_me:   current value: $ac_new_val" >&2;}
-	ac_cache_corrupted=:
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:$LINENO:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:$LINENO:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
       fi;;
   esac
   # Pass precious variables to config.status.
   if test "$ac_new_set" = set; then
     case $ac_new_val in
-    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
-      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
     *) ac_arg=$ac_var=$ac_new_val ;;
     esac
     case " $ac_configure_args " in
@@ -1535,19 +2239,15 @@ echo "$as_me:   current value: $ac_new_val" >&2;}
   fi
 done
 if $ac_cache_corrupted; then
-  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
-echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
-echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+  { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
 
 
 
@@ -1564,38 +2264,50 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 ac_aux_dir=
-for ac_dir in config $srcdir/config; do
-  if test -f $ac_dir/install-sh; then
+for ac_dir in config "$srcdir"/config; do
+  if test -f "$ac_dir/install-sh"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install-sh -c"
     break
-  elif test -f $ac_dir/install.sh; then
+  elif test -f "$ac_dir/install.sh"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/install.sh -c"
     break
-  elif test -f $ac_dir/shtool; then
+  elif test -f "$ac_dir/shtool"; then
     ac_aux_dir=$ac_dir
     ac_install_sh="$ac_aux_dir/shtool install -c"
     break
   fi
 done
 if test -z "$ac_aux_dir"; then
-  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config $srcdir/config" >&5
-echo "$as_me: error: cannot find install-sh or install.sh in config $srcdir/config" >&2;}
+  { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in config \"$srcdir\"/config" >&2;}
    { (exit 1); exit 1; }; }
 fi
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"
-ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
 
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 
-          ac_config_headers="$ac_config_headers config.h"
 
-am__api_version="1.9"
+
+ac_config_headers="$ac_config_headers config.h"
+
+am__api_version='1.11'
+
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
 # incompatible versions:
@@ -1609,11 +2321,12 @@ am__api_version="1.9"
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # OS/2's system install, which has a completely different semantic
 # ./install, which can be erroneously created by make from ./install.sh.
-echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
-echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
 if test -z "$INSTALL"; then
 if test "${ac_cv_path_install+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -1632,7 +2345,7 @@ case $as_dir/ in
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-	if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
 	  if test $ac_prog = install &&
 	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
 	    # AIX install.  It has an incompatible calling convention.
@@ -1642,30 +2355,43 @@ case $as_dir/ in
 	    # program-specific install script used by HP pwplus--don't use.
 	    :
 	  else
-	    ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
-	    break 3
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
 	  fi
 	fi
       done
     done
     ;;
 esac
+
 done
+IFS=$as_save_IFS
 
+rm -rf conftest.one conftest.two conftest.dir
 
 fi
   if test "${ac_cv_path_install+set}" = set; then
     INSTALL=$ac_cv_path_install
   else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
     # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
+    # removed, or if the value is a relative name.
     INSTALL=$ac_install_sh
   fi
 fi
-echo "$as_me:$LINENO: result: $INSTALL" >&5
-echo "${ECHO_T}$INSTALL" >&6
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
 
 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
 # It thinks the first close brace ends the variable substitution.
@@ -1675,21 +2401,38 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
 
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
-echo "$as_me:$LINENO: checking whether build environment is sane" >&5
-echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory name" >&5
+$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
+$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$*" != "X $srcdir/configure conftest.file" \
@@ -1699,9 +2442,9 @@ if (
       # if, for instance, CONFIG_SHELL is bash and it inherits a
       # broken ls alias from the environment.  This has actually
       # happened.  Such a system could not be considered "sane".
-      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+      { { $as_echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" >&5
-echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+$as_echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
 alias in your environment" >&2;}
    { (exit 1); exit 1; }; }
    fi
@@ -1712,81 +2455,209 @@ then
    # Ok.
    :
 else
-   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+   { { $as_echo "$as_me:$LINENO: error: newly created file is older than distributed files!
 Check your system clock" >&5
-echo "$as_me: error: newly created file is older than distributed files!
+$as_echo "$as_me: error: newly created file is older than distributed files!
 Check your system clock" >&2;}
    { (exit 1); exit 1; }; }
 fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 test "$program_prefix" != NONE &&
-  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
 # Use a double $ so make ignores it.
 test "$program_suffix" != NONE &&
-  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
-# Double any \ or $.  echo might interpret backslashes.
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
 # By default was `s,x,x', remove it if useless.
-cat <<\_ACEOF >conftest.sed
-s/[\\$]/&&/g;s/;s,x,x,$//
-_ACEOF
-program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
-rm conftest.sed
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
 
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
 else
   am_missing_run=
-  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
-echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
-  # We used to keeping the `.' as first argument, in order to
-  # allow $(mkdir_p) to be used without argument.  As in
-  #   $(mkdir_p) $(somedir)
-  # where $(somedir) is conditionally defined.  However this is wrong
-  # for two reasons:
-  #  1. if the package is installed by a user who cannot write `.'
-  #     make install will fail,
-  #  2. the above comment should most certainly read
-  #     $(mkdir_p) $(DESTDIR)$(somedir)
-  #     so it does not work when $(somedir) is undefined and
-  #     $(DESTDIR) is not.
-  #  To support the latter case, we have to write
-  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
-  #  so the `.' trick is pointless.
-  mkdir_p='mkdir -p --'
-else
-  # On NextStep and OpenStep, the `mkdir' command does not
-  # recognize any option.  It will interpret all options as
-  # directories to create, and then abort because `.' already
-  # exists.
-  for d in ./-p ./--version;
-  do
-    test -d $d && rmdir $d
-  done
-  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
-  if test -f "$ac_aux_dir/mkinstalldirs"; then
-    mkdir_p='$(mkinstalldirs)'
+  { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:$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
+  if test "${ac_cv_path_mkdir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+done
+IFS=$as_save_IFS
+
+fi
+
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
   else
-    mkdir_p='$(install_sh) -d'
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    test -d ./--version && rmdir ./--version
+    MKDIR_P="$ac_install_sh -d"
   fi
 fi
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+  [\\/$]* | ?:[\\/]*) ;;
+  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
 
 for ac_prog in gawk mawk nawk awk
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_AWK+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$AWK"; then
   ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -1797,54 +2668,58 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_AWK="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 AWK=$ac_cv_prog_AWK
 if test -n "$AWK"; then
-  echo "$as_me:$LINENO: result: $AWK" >&5
-echo "${ECHO_T}$AWK" >&6
+  { $as_echo "$as_me:$LINENO: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
   test -n "$AWK" && break
 done
 
-echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
-echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$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'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
 all:
-	@echo 'ac_maketemp="$(MAKE)"'
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
 rm -f conftest.make
 fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
   SET_MAKE=
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
   SET_MAKE="MAKE=${MAKE-make}"
 fi
 
@@ -1857,12 +2732,16 @@ else
 fi
 rmdir .tst 2>/dev/null
 
-# test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" &&
-   test -f $srcdir/config.status; then
-  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
-echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
    { (exit 1); exit 1; }; }
+  fi
 fi
 
 # test whether we have cygpath
@@ -1877,7 +2756,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE=adios
- VERSION=1.3
+ VERSION=1.4.1
 
 
 cat >>confdefs.h <<_ACEOF
@@ -1905,99 +2784,9 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"$am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  STRIP=$ac_ct_STRIP
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
-
-# We need awk for the "check" target.  The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
 
 AMTAR=${AMTAR-"${am_missing_run}tar"}
 
@@ -2016,60 +2805,58 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 DEPDIR="${am__leading_dot}deps"
 
-          ac_config_commands="$ac_config_commands depfiles"
+ac_config_commands="$ac_config_commands depfiles"
 
 
 am_make=${MAKE-make}
 cat > confinc << 'END'
 am__doit:
-	@echo done
+	@echo this is the am__doit target
 .PHONY: am__doit
 END
 # If we don't find an include directive, just comment out the code.
-echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
-echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
 am__include="#"
 am__quote=
 _am_result=none
 # First try GNU make style include.
 echo "include confinc" > confmf
-# We grep out `Entering directory' and `Leaving directory'
-# messages which can occur if `w' ends up in MAKEFLAGS.
-# In particular we don't look at `^make:' because GNU make might
-# be invoked under some other name (usually "gmake"), in which
-# case it prints its new name instead of `make'.
-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
-   am__include=include
-   am__quote=
-   _am_result=GNU
-fi
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
 # Now try BSD make style include.
 if test "$am__include" = "#"; then
    echo '.include "confinc"' > confmf
-   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
-      am__include=.include
-      am__quote="\""
-      _am_result=BSD
-   fi
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
 fi
 
 
-echo "$as_me:$LINENO: result: $_am_result" >&5
-echo "${ECHO_T}$_am_result" >&6
+{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
 rm -f confinc confmf
 
-# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+# Check whether --enable-dependency-tracking was given.
 if test "${enable_dependency_tracking+set}" = set; then
-  enableval="$enable_dependency_tracking"
+  enableval=$enable_dependency_tracking;
+fi
 
-fi;
 if test "x$enable_dependency_tracking" != xno; then
   am_depcomp="$ac_aux_dir/depcomp"
   AMDEPBACKSLASH='\'
 fi
-
-
-if test "x$enable_dependency_tracking" != xno; then
+ if test "x$enable_dependency_tracking" != xno; then
   AMDEP_TRUE=
   AMDEP_FALSE='#'
 else
@@ -2078,7 +2865,6 @@ else
 fi
 
 
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2087,10 +2873,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2101,34 +2887,36 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 fi
 if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2139,38 +2927,49 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    CC=$ac_ct_CC
+  fi
 else
   CC="$ac_cv_prog_CC"
 fi
 
 if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2181,76 +2980,36 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
 
+  fi
 fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2262,17 +3021,18 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
      fi
     ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
@@ -2290,24 +3050,25 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 fi
 if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
+  for ac_prog in cl.exe
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2318,38 +3079,40 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
     test -n "$CC" && break
   done
 fi
 if test -z "$CC"; then
   ac_ct_CC=$CC
-  for ac_prog in cl
+  for ac_prog in cl.exe
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2360,58 +3123,90 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
   test -n "$ac_ct_CC" && break
 done
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    CC=$ac_ct_CC
+  fi
 fi
 
 fi
 
 
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
 See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
 cat >conftest.$ac_ext <<_ACEOF
@@ -2430,111 +3225,150 @@ main ()
 }
 _ACEOF
 ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe b.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
 # Try to create an executable without -o first, disregard a.out.
 # It will help us diagnose broken compilers, and finding out an intuition
 # of exeext.
-echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
-echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
-ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
-  (eval $ac_link_default) 2>&5
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link_default") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  # Find the output, starting from the most likely.  This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
-
-# Be careful to initialize this variable, since it used to be cached.
-# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
-ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
 do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
-	;;
-    conftest.$ac_ext )
-	# This is the source file.
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
 	;;
     [ab].out )
 	# We found the default executable, but exeext='' is most
 	# certainly right.
 	break;;
     *.* )
-	ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	# FIXME: I believe we export ac_cv_exeext for Libtool,
-	# but it would be cool to find out if it's true.  Does anybody
-	# maintain Libtool? --akim.
-	export ac_cv_exeext
+        if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
 	break;;
     * )
 	break;;
   esac
 done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
 else
-  echo "$as_me: failed program was:" >&5
+  ac_file=''
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
 See \`config.log' for more details." >&5
-echo "$as_me: error: C compiler cannot create executables
+$as_echo "$as_me: error: C compiler cannot create executables
 See \`config.log' for more details." >&2;}
-   { (exit 77); exit 77; }; }
+   { (exit 77); exit 77; }; }; }
 fi
 
 ac_exeext=$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_file" >&5
-echo "${ECHO_T}$ac_file" >&6
 
-# Check the compiler produces executables we can run.  If not, either
+# Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether the C compiler works" >&5
-echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
 # If not cross compiling, check that we can run a simple program.
 if test "$cross_compiling" != yes; then
   if { ac_try='./$ac_file'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
     cross_compiling=no
   else
     if test "$cross_compiling" = maybe; then
 	cross_compiling=yes
     else
-	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
 See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run C compiled programs.
+$as_echo "$as_me: error: cannot run C compiled programs.
 If you meant to cross compile, use \`--host'.
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
     fi
   fi
 fi
-echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 
-rm -f a.out a.exe conftest$ac_cv_exeext b.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
 ac_clean_files=$ac_clean_files_save
-# Check the compiler produces executables we can run.  If not, either
+# Check that the compiler produces executables we can run.  If not, either
 # the compiler is broken, or we cross compile.
-echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
-echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $cross_compiling" >&5
-echo "${ECHO_T}$cross_compiling" >&6
-
-echo "$as_me:$LINENO: checking for suffix of executables" >&5
-echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   # If both `conftest.exe' and `conftest' are `present' (well, observable)
 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
@@ -2543,32 +3377,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
 for ac_file in conftest.exe conftest conftest.*; do
   test -f "$ac_file" || continue
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  export ac_cv_exeext
 	  break;;
     * ) break;;
   esac
 done
 else
-  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
 See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 fi
 
 rm -f conftest$ac_cv_exeext
-echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
-echo "${ECHO_T}$ac_cv_exeext" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
 
 rm -f conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
-echo "$as_me:$LINENO: checking for suffix of object files" >&5
-echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
 if test "${ac_cv_objext+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -2586,39 +3421,48 @@ main ()
 }
 _ACEOF
 rm -f conftest.o conftest.obj
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
-  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac
 done
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
 See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 fi
 
 rm -f conftest.$ac_cv_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
-echo "${ECHO_T}$ac_cv_objext" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
 OBJEXT=$ac_cv_objext
 ac_objext=$OBJEXT
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
 if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -2639,50 +3483,54 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_compiler_gnu=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_compiler_gnu=no
+	ac_compiler_gnu=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
 if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -2698,38 +3546,121 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_cc_g=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cc_g=no
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
@@ -2745,12 +3676,12 @@ else
     CFLAGS=
   fi
 fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_prog_cc_stdc=no
+  ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -2784,12 +3715,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
    function prototypes and stuff, but not '\xHH' hex character constants.
    These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std1 is added to get
+   as 'x'.  The following induces an error, until -std is added to get
    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
    array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std1.  */
+   that's true only with -std.  */
 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
 int test (int i, double x);
 struct s1 {int (*f) (int a);};
 struct s2 {int (*f) (double a);};
@@ -2804,205 +3740,58 @@ return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
   return 0;
 }
 _ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX			-qlanglvl=ansi
-# Ultrix and OSF/1	-std1
-# HP-UX 10.20 and later	-Ae
-# HP-UX older versions	-Aa -D_HPUX_SOURCE
-# SVR4			-Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
   rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_stdc=$ac_arg
-break
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
 CC=$ac_save_CC
 
 fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
   *)
-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 esac
 
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  for ac_declaration in \
-   '' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3011,10 +3800,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 depcc="$CC"   am_compiler_list=
 
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
@@ -3039,6 +3828,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -3056,7 +3850,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -3066,18 +3870,23 @@ else
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # 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.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -3101,13 +3910,11 @@ else
 fi
 
 fi
-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-
-
-if
+ if
   test "x$enable_dependency_tracking" != xno \
   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
   am__fastdepCC_TRUE=
@@ -3124,15 +3931,15 @@ ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
-echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
   if test "${ac_cv_prog_CPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
       # Double quotes because CPP needs to be expanded
     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -3159,35 +3966,35 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
 		     Syntax error
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   # Broken: fails on valid input.
 continue
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
+  # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3197,34 +4004,34 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
 done
@@ -3242,8 +4049,8 @@ fi
 else
   ac_cv_prog_CPP=$CPP
 fi
-echo "$as_me:$LINENO: result: $CPP" >&5
-echo "${ECHO_T}$CPP" >&6
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
 ac_preproc_ok=false
 for ac_c_preproc_warn_flag in '' yes
 do
@@ -3266,35 +4073,35 @@ cat >>conftest.$ac_ext <<_ACEOF
 #endif
 		     Syntax error
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   :
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   # Broken: fails on valid input.
 continue
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
-  # OK, works on sane cases.  Now check whether non-existent headers
+  # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3304,34 +4111,34 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <ac_nonexistent.h>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   # Broken: success on invalid input.
 continue
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   # Passes both tests.
 ac_preproc_ok=:
 break
 fi
+
 rm -f conftest.err conftest.$ac_ext
 
 done
@@ -3340,11 +4147,13 @@ rm -f conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then
   :
 else
-  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
 See \`config.log' for more details." >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 fi
 
 ac_ext=c
@@ -3354,25 +4163,144 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-echo "$as_me:$LINENO: checking for egrep" >&5
-echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
-    then ac_cv_prog_egrep='grep -E'
-    else ac_cv_prog_egrep='egrep'
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
     fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
 
 
-echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
-echo $ECHO_N "checking for preprocessor stringizing operator... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
+$as_echo_n "checking for preprocessor stringizing operator... " >&6; }
 if test "${ac_cv_c_stringize+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3393,8 +4321,8 @@ fi
 rm -f conftest*
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
-echo "${ECHO_T}$ac_cv_c_stringize" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
+$as_echo "$ac_cv_c_stringize" >&6; }
 if test $ac_cv_c_stringize = yes; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -3412,10 +4340,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 if test -n "$ac_tool_prefix"; then
   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -3426,34 +4354,36 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 fi
 if test -z "$ac_cv_prog_CC"; then
   ac_ct_CC=$CC
   # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -3464,38 +4394,49 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="gcc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    CC=$ac_ct_CC
+  fi
 else
   CC="$ac_cv_prog_CC"
 fi
 
 if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
 set dummy ${ac_tool_prefix}cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -3506,76 +4447,36 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  CC=$ac_ct_CC
-else
-  CC="$ac_cv_prog_CC"
-fi
 
+  fi
 fi
 if test -z "$CC"; then
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -3587,17 +4488,18 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
      fi
     ac_cv_prog_CC="cc"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 if test $ac_prog_rejected = yes; then
   # We found a bogon in the path, so make sure we never use it.
@@ -3615,24 +4517,25 @@ fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 fi
 if test -z "$CC"; then
   if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl
+  for ac_prog in cl.exe
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -3643,38 +4546,40 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CC=$ac_cv_prog_CC
 if test -n "$CC"; then
-  echo "$as_me:$LINENO: result: $CC" >&5
-echo "${ECHO_T}$CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
     test -n "$CC" && break
   done
 fi
 if test -z "$CC"; then
   ac_ct_CC=$CC
-  for ac_prog in cl
+  for ac_prog in cl.exe
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CC"; then
   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -3685,64 +4590,96 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CC=$ac_cv_prog_ac_ct_CC
 if test -n "$ac_ct_CC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
-echo "${ECHO_T}$ac_ct_CC" >&6
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
   test -n "$ac_ct_CC" && break
 done
 
-  CC=$ac_ct_CC
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    CC=$ac_ct_CC
+  fi
 fi
 
 fi
 
 
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
 See \`config.log' for more details." >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 
 # Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for C compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
-echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
 if test "${ac_cv_c_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3763,50 +4700,54 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_compiler_gnu=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_compiler_gnu=no
+	ac_compiler_gnu=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_c_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
-GCC=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
 ac_test_CFLAGS=${CFLAGS+set}
 ac_save_CFLAGS=$CFLAGS
-CFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
-echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
 if test "${ac_cv_prog_cc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -3822,38 +4763,121 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	CFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_cc_g=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cc_g=no
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
 if test "$ac_test_CFLAGS" = set; then
   CFLAGS=$ac_save_CFLAGS
 elif test $ac_cv_prog_cc_g = yes; then
@@ -3869,12 +4893,12 @@ else
     CFLAGS=
   fi
 fi
-echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
-echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
-if test "${ac_cv_prog_cc_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_prog_cc_stdc=no
+  ac_cv_prog_cc_c89=no
 ac_save_CC=$CC
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -3908,12 +4932,17 @@ static char *f (char * (*g) (char **, int), char **p, ...)
 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
    function prototypes and stuff, but not '\xHH' hex character constants.
    These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std1 is added to get
+   as 'x'.  The following induces an error, until -std is added to get
    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
    array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std1.  */
+   that's true only with -std.  */
 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
 
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
 int test (int i, double x);
 struct s1 {int (*f) (int a);};
 struct s2 {int (*f) (double a);};
@@ -3928,205 +4957,58 @@ return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
   return 0;
 }
 _ACEOF
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX			-qlanglvl=ansi
-# Ultrix and OSF/1	-std1
-# HP-UX 10.20 and later	-Ae
-# HP-UX older versions	-Aa -D_HPUX_SOURCE
-# SVR4			-Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
   rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_cc_stdc=$ac_arg
-break
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cc_c89=$ac_arg
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext
+
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
-rm -f conftest.$ac_ext conftest.$ac_objext
+rm -f conftest.$ac_ext
 CC=$ac_save_CC
 
 fi
-
-case "x$ac_cv_prog_cc_stdc" in
-  x|xno)
-    echo "$as_me:$LINENO: result: none needed" >&5
-echo "${ECHO_T}none needed" >&6 ;;
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
   *)
-    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
-echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
-    CC="$CC $ac_cv_prog_cc_stdc" ;;
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
 esac
 
-# Some people use a C++ compiler to compile C.  Since we use `exit',
-# in C++ we need to declare it.  In case someone uses the same compiler
-# for both compiling C and C++ we need to have the C++ compiler decide
-# the declaration of exit, since it's the most demanding environment.
-cat >conftest.$ac_ext <<_ACEOF
-#ifndef __cplusplus
-  choke me
-#endif
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  for ac_declaration in \
-   '' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-#include <stdlib.h>
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_declaration
-int
-main ()
-{
-exit (42);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
-fi
-
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4135,10 +5017,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 depcc="$CC"   am_compiler_list=
 
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
@@ -4163,6 +5045,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -4180,7 +5067,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -4190,18 +5087,23 @@ else
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # 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.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -4225,13 +5127,11 @@ else
 fi
 
 fi
-echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
 
-
-
-if
+ if
   test "x$enable_dependency_tracking" != xno \
   && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
   am__fastdepCC_TRUE=
@@ -4243,16 +5143,16 @@ fi
 
 
 if test "x$CC" != xcc; then
-  echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
-echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
+  { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
 else
-  echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
-echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
+  { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
 fi
-set dummy $CC; ac_cc=`echo $2 |
+set dummy $CC; ac_cc=`$as_echo "$2" |
 		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4272,37 +5172,64 @@ _ACEOF
 # Make sure it works both with $CC and with simple cc.
 # We do the test twice because some compilers refuse to overwrite an
 # existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
-if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-   test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+   test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); };
 then
   eval ac_cv_prog_cc_${ac_cc}_c_o=yes
   if test "x$CC" != xcc; then
     # Test first that cc exists at all.
     if { ac_try='cc -c conftest.$ac_ext >&5'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-      ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
-      if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+      ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+      rm -f conftest2.*
+      if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-	 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+	 test -f conftest2.$ac_objext && { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); };
       then
 	# cc works too.
@@ -4316,15 +5243,15 @@ then
 else
   eval ac_cv_prog_cc_${ac_cc}_c_o=no
 fi
-rm -f conftest*
+rm -f core conftest*
 
 fi
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 cat >>confdefs.h <<\_ACEOF
 #define NO_MINUS_C_MINUS_O 1
@@ -4335,8 +5262,9 @@ fi
 # FIXME: we rely on the cache variable name because
 # there is no other way.
 set dummy $CC
-ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
    # Losing compiler, so override with the script.
    # FIXME: It is wrong to rewrite CC.
    # But if we don't then we get into trouble of one sort or another.
@@ -4345,20 +5273,25 @@ if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
    CC="$am_aux_dir/compile $CC"
 fi
 
-ac_ext=cc
+
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
@@ -4369,38 +5302,40 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 CXX=$ac_cv_prog_CXX
 if test -n "$CXX"; then
-  echo "$as_me:$LINENO: result: $CXX" >&5
-echo "${ECHO_T}$CXX" >&6
+  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
     test -n "$CXX" && break
   done
 fi
 if test -z "$CXX"; then
   ac_ct_CXX=$CXX
-  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_CXX"; then
   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
@@ -4411,57 +5346,87 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_CXX="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
 if test -n "$ac_ct_CXX"; then
-  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
-echo "${ECHO_T}$ac_ct_CXX" >&6
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
   test -n "$ac_ct_CXX" && break
 done
-test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
 
-  CXX=$ac_ct_CXX
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    CXX=$ac_ct_CXX
+  fi
 fi
 
-
+  fi
+fi
 # Provide some information about the compiler.
-echo "$as_me:$LINENO:" \
-     "checking for C++ compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
+$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 
-echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4482,50 +5447,54 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_compiler_gnu=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_compiler_gnu=no
+	ac_compiler_gnu=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
-GXX=`test $ac_compiler_gnu = yes && echo yes`
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
 ac_test_CXXFLAGS=${CXXFLAGS+set}
 ac_save_CXXFLAGS=$CXXFLAGS
-CXXFLAGS="-g"
-echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
-echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
 if test "${ac_cv_prog_cxx_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -4541,159 +5510,136 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_cxx_g=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_cxx_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
-echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
-if test "$ac_test_CXXFLAGS" = set; then
-  CXXFLAGS=$ac_save_CXXFLAGS
-elif test $ac_cv_prog_cxx_g = yes; then
-  if test "$GXX" = yes; then
-    CXXFLAGS="-g -O2"
-  else
-    CXXFLAGS="-g"
-  fi
-else
-  if test "$GXX" = yes; then
-    CXXFLAGS="-O2"
-  else
-    CXXFLAGS=
-  fi
-fi
-for ac_declaration in \
-   '' \
-   'extern "C" void std::exit (int) throw (); using std::exit;' \
-   'extern "C" void std::exit (int); using std::exit;' \
-   'extern "C" void exit (int) throw ();' \
-   'extern "C" void exit (int);' \
-   'void exit (int);'
-do
-  cat >conftest.$ac_ext <<_ACEOF
+	CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_declaration
-#include <stdlib.h>
+
 int
 main ()
 {
-exit (42);
+
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   :
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-continue
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat >conftest.$ac_ext <<_ACEOF
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_declaration
+
 int
 main ()
 {
-exit (42);
+
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  break
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-rm -f conftest*
-if test -n "$ac_declaration"; then
-  echo '#ifdef __cplusplus' >>confdefs.h
-  echo $ac_declaration      >>confdefs.h
-  echo '#endif'             >>confdefs.h
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4702,10 +5648,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 depcc="$CXX"  am_compiler_list=
 
-echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
-echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
   # We make a subdir and do the tests there.  Otherwise we can end up
@@ -4730,6 +5676,11 @@ else
   if test "$am_compiler_list" = ""; then
      am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
   fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
   for depmode in $am_compiler_list; do
     # Setup a source with many dependencies, because some compilers
     # like to wrap large dependency lists on column 80 (with \), and
@@ -4747,7 +5698,17 @@ else
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
       # only be used when explicitly requested
@@ -4757,18 +5718,23 @@ else
 	break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # 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.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
@@ -4792,13 +5758,11 @@ else
 fi
 
 fi
-echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
-echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
-
-
-if
+ if
   test "x$enable_dependency_tracking" != xno \
   && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
   am__fastdepCXX_TRUE=
@@ -4818,9 +5782,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-
-
-if true; then
+ if true; then
   HAVE_MPI_TRUE=
   HAVE_MPI_FALSE='#'
 else
@@ -4830,11 +5792,11 @@ fi
 
 
 
-# Check whether --with-mpi or --without-mpi was given.
+# Check whether --with-mpi was given.
 if test "${with_mpi+set}" = set; then
-  withval="$with_mpi"
-  MPI_DIR=$withval
-fi;
+  withval=$with_mpi; MPI_DIR=$withval
+fi
+
 
 
 
@@ -4843,10 +5805,10 @@ fi;
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_MPICC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$MPICC"; then
   ac_cv_prog_MPICC="$MPICC" # Let the user override the test.
@@ -4857,25 +5819,27 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_MPICC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 MPICC=$ac_cv_prog_MPICC
 if test -n "$MPICC"; then
-  echo "$as_me:$LINENO: result: $MPICC" >&5
-echo "${ECHO_T}$MPICC" >&6
+  { $as_echo "$as_me:$LINENO: result: $MPICC" >&5
+$as_echo "$MPICC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
   test -n "$MPICC" && break
 done
 test -n "$MPICC" || MPICC="$CC"
@@ -4886,10 +5850,10 @@ test -n "$MPICC" || MPICC="$CC"
 
 
 if test x = x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for MPI_Init" >&5
-echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5
+$as_echo_n "checking for MPI_Init... " >&6; }
 if test "${ac_cv_func_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -4914,79 +5878,74 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #undef MPI_Init
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char MPI_Init ();
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_MPI_Init) || defined (__stub___MPI_Init)
+#if defined __stub_MPI_Init || defined __stub___MPI_Init
 choke me
-#else
-char (*f) () = MPI_Init;
-#endif
-#ifdef __cplusplus
-}
 #endif
 
 int
 main ()
 {
-return f != MPI_Init;
+return MPI_Init ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_func_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_MPI_Init=no
+	ac_cv_func_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_func_MPI_Init" >&6
-if test $ac_cv_func_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5
+$as_echo "$ac_cv_func_MPI_Init" >&6; }
+if test "x$ac_cv_func_MPI_Init" = x""yes; then
   MPILIBS=" "
 fi
 
 fi
 
 if test x = x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
-echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
+$as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
 if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmpi  $LIBS"
@@ -4997,66 +5956,67 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char MPI_Init ();
 int
 main ()
 {
-MPI_Init ();
+return MPI_Init ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_lib_mpi_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_mpi_MPI_Init=no
+	ac_cv_lib_mpi_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
-if test $ac_cv_lib_mpi_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
+$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
+if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then
   MPILIBS="-lmpi"
 fi
 
 fi
 if test x = x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
-echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
+$as_echo_n "checking for MPI_Init in -lmpich... " >&6; }
 if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmpich  $LIBS"
@@ -5067,65 +6027,66 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char MPI_Init ();
 int
 main ()
 {
-MPI_Init ();
+return MPI_Init ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_lib_mpich_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_mpich_MPI_Init=no
+	ac_cv_lib_mpich_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
-if test $ac_cv_lib_mpich_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
+$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; }
+if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then
   MPILIBS="-lmpich"
 fi
 
 fi
 
 if test x != x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for mpi.h" >&5
-echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for mpi.h" >&5
+$as_echo_n "checking for mpi.h... " >&6; }
 	cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -5142,38 +6103,35 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-MPILIBS=""
-		echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+	MPILIBS=""
+		{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 CC="$acx_mpi_save_CC"
@@ -5182,8 +6140,8 @@ CC="$acx_mpi_save_CC"
 
 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
 if test x = x"$MPILIBS"; then
-        { { echo "$as_me:$LINENO: error: couldn't find mpi library for C" >&5
-echo "$as_me: error: couldn't find mpi library for C" >&2;}
+        { { $as_echo "$as_me:$LINENO: error: couldn't find mpi library for C" >&5
+$as_echo "$as_me: error: couldn't find mpi library for C" >&2;}
    { (exit 1); exit 1; }; }
         :
 else
@@ -5196,7 +6154,7 @@ _ACEOF
 fi
 
 
-ac_ext=cc
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
@@ -5205,9 +6163,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
 
-
-
-if true; then
+ if true; then
   HAVE_MPI_TRUE=
   HAVE_MPI_FALSE='#'
 else
@@ -5217,11 +6173,11 @@ fi
 
 
 
-# Check whether --with-mpi or --without-mpi was given.
+# Check whether --with-mpi was given.
 if test "${with_mpi+set}" = set; then
-  withval="$with_mpi"
-  MPI_DIR=$withval
-fi;
+  withval=$with_mpi; MPI_DIR=$withval
+fi
+
 
 
 
@@ -5230,10 +6186,10 @@ fi;
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_MPICXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$MPICXX"; then
   ac_cv_prog_MPICXX="$MPICXX" # Let the user override the test.
@@ -5244,25 +6200,27 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_MPICXX="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 MPICXX=$ac_cv_prog_MPICXX
 if test -n "$MPICXX"; then
-  echo "$as_me:$LINENO: result: $MPICXX" >&5
-echo "${ECHO_T}$MPICXX" >&6
+  { $as_echo "$as_me:$LINENO: result: $MPICXX" >&5
+$as_echo "$MPICXX" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
   test -n "$MPICXX" && break
 done
 test -n "$MPICXX" || MPICXX="$CXX"
@@ -5273,10 +6231,10 @@ test -n "$MPICXX" || MPICXX="$CXX"
 
 
 if test x = x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for MPI_Init" >&5
-echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5
+$as_echo_n "checking for MPI_Init... " >&6; }
 if test "${ac_cv_func_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -5301,79 +6259,74 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #undef MPI_Init
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char MPI_Init ();
 /* The GNU C library defines this for functions which it implements
     to always fail with ENOSYS.  Some functions are actually named
     something starting with __ and the normal name is an alias.  */
-#if defined (__stub_MPI_Init) || defined (__stub___MPI_Init)
+#if defined __stub_MPI_Init || defined __stub___MPI_Init
 choke me
-#else
-char (*f) () = MPI_Init;
-#endif
-#ifdef __cplusplus
-}
 #endif
 
 int
 main ()
 {
-return f != MPI_Init;
+return MPI_Init ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_func_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_MPI_Init=no
+	ac_cv_func_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_func_MPI_Init" >&6
-if test $ac_cv_func_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_MPI_Init" >&5
+$as_echo "$ac_cv_func_MPI_Init" >&6; }
+if test "x$ac_cv_func_MPI_Init" = x""yes; then
   MPILIBS=" "
 fi
 
 fi
 
 if test x = x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
-echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
+$as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
 if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmpi  $LIBS"
@@ -5384,66 +6337,67 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char MPI_Init ();
 int
 main ()
 {
-MPI_Init ();
+return MPI_Init ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_lib_mpi_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_mpi_MPI_Init=no
+	ac_cv_lib_mpi_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
-if test $ac_cv_lib_mpi_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
+$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
+if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then
   MPILIBS="-lmpi"
 fi
 
 fi
 if test x = x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
-echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
+$as_echo_n "checking for MPI_Init in -lmpich... " >&6; }
 if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmpich  $LIBS"
@@ -5454,65 +6408,66 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char MPI_Init ();
 int
 main ()
 {
-MPI_Init ();
+return MPI_Init ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_lib_mpich_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_mpich_MPI_Init=no
+	ac_cv_lib_mpich_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
-if test $ac_cv_lib_mpich_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
+$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; }
+if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then
   MPILIBS="-lmpich"
 fi
 
 fi
 
 if test x != x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for mpi.h" >&5
-echo $ECHO_N "checking for mpi.h... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for mpi.h" >&5
+$as_echo_n "checking for mpi.h... " >&6; }
 	cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -5529,38 +6484,35 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-MPILIBS=""
-		echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+	MPILIBS=""
+		{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 CXX="$acx_mpi_save_CXX"
@@ -5569,8 +6521,8 @@ CXX="$acx_mpi_save_CXX"
 
 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
 if test x = x"$MPILIBS"; then
-        { { echo "$as_me:$LINENO: error: couldn't find mpi library for C++" >&5
-echo "$as_me: error: couldn't find mpi library for C++" >&2;}
+        { { $as_echo "$as_me:$LINENO: error: couldn't find mpi library for C++" >&5
+$as_echo "$as_me: error: couldn't find mpi library for C++" >&2;}
    { (exit 1); exit 1; }; }
         :
 else
@@ -5583,14 +6535,12 @@ _ACEOF
 fi
 
 
-# Check whether --enable-fortran or --disable-fortran was given.
+# Check whether --enable-fortran was given.
 if test "${enable_fortran+set}" = set; then
-  enableval="$enable_fortran"
-
-fi;
-
+  enableval=$enable_fortran;
+fi
 
-if test "x$enable_fortran" != "xno"; then
+ if test "x$enable_fortran" != "xno"; then
   BUILD_FORTRAN_TRUE=
   BUILD_FORTRAN_FALSE='#'
 else
@@ -5600,19 +6550,19 @@ fi
 
 
 if test "x$enable_fortran" != "xno"; then
-    ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+    ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 if test -n "$ac_tool_prefix"; then
-  for ac_prog in f95 fort xlf95 ifc efc pgf95 lf95 gfortran f90 xlf90 pgf90 epcf90 g77 f77 xlf frt pgf77 fort77 fl32 af77
+  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_FC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$FC"; then
   ac_cv_prog_FC="$FC" # Let the user override the test.
@@ -5623,38 +6573,40 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_FC="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 FC=$ac_cv_prog_FC
 if test -n "$FC"; then
-  echo "$as_me:$LINENO: result: $FC" >&5
-echo "${ECHO_T}$FC" >&6
+  { $as_echo "$as_me:$LINENO: result: $FC" >&5
+$as_echo "$FC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
     test -n "$FC" && break
   done
 fi
 if test -z "$FC"; then
   ac_ct_FC=$FC
-  for ac_prog in f95 fort xlf95 ifc efc pgf95 lf95 gfortran f90 xlf90 pgf90 epcf90 g77 f77 xlf frt pgf77 fort77 fl32 af77
+  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_ac_ct_FC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$ac_ct_FC"; then
   ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
@@ -5665,50 +6617,80 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_ac_ct_FC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 ac_ct_FC=$ac_cv_prog_ac_ct_FC
 if test -n "$ac_ct_FC"; then
-  echo "$as_me:$LINENO: result: $ac_ct_FC" >&5
-echo "${ECHO_T}$ac_ct_FC" >&6
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_FC" >&5
+$as_echo "$ac_ct_FC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
   test -n "$ac_ct_FC" && break
 done
 
-  FC=$ac_ct_FC
+  if test "x$ac_ct_FC" = x; then
+    FC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    FC=$ac_ct_FC
+  fi
 fi
 
 
 # Provide some information about the compiler.
-echo "$as_me:5695:" \
-     "checking for Fortran compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
+$as_echo "$as_me:$LINENO: checking for Fortran compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
 rm -f a.out
 
@@ -5716,10 +6698,10 @@ rm -f a.out
 # input file.  (Note that this only needs to work for GNU compilers.)
 ac_save_ext=$ac_ext
 ac_ext=F
-echo "$as_me:$LINENO: checking whether we are using the GNU Fortran compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU Fortran compiler... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
 if test "${ac_cv_fc_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
       program main
@@ -5730,48 +6712,45 @@ else
       end
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_compiler_gnu=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_compiler_gnu=no
+	ac_compiler_gnu=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 ac_cv_fc_compiler_gnu=$ac_compiler_gnu
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_fc_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_fc_compiler_gnu" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_compiler_gnu" >&5
+$as_echo "$ac_cv_fc_compiler_gnu" >&6; }
 ac_ext=$ac_save_ext
 ac_test_FFLAGS=${FCFLAGS+set}
 ac_save_FFLAGS=$FCFLAGS
 FCFLAGS=
-echo "$as_me:$LINENO: checking whether $FC accepts -g" >&5
-echo $ECHO_N "checking whether $FC accepts -g... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether $FC accepts -g" >&5
+$as_echo_n "checking whether $FC accepts -g... " >&6; }
 if test "${ac_cv_prog_fc_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   FCFLAGS=-g
 cat >conftest.$ac_ext <<_ACEOF
@@ -5780,39 +6759,36 @@ cat >conftest.$ac_ext <<_ACEOF
       end
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_fc_g=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_fc_g=no
+	ac_cv_prog_fc_g=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_fc_g" >&5
-echo "${ECHO_T}$ac_cv_prog_fc_g" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_fc_g" >&5
+$as_echo "$ac_cv_prog_fc_g" >&6; }
 if test "$ac_test_FFLAGS" = set; then
   FCFLAGS=$ac_save_FFLAGS
 elif test $ac_cv_prog_fc_g = yes; then
@@ -5829,20 +6805,20 @@ else
   fi
 fi
 
-ac_ext=cc
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-    ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+    ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
-echo "$as_me:$LINENO: checking whether $FC understands -c and -o together" >&5
-echo $ECHO_N "checking whether $FC understands -c and -o together... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking whether $FC understands -c and -o together" >&5
+$as_echo_n "checking whether $FC understands -c and -o together... " >&6; }
 if test "${ac_cv_prog_fc_c_o+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
       program main
@@ -5851,17 +6827,28 @@ else
 _ACEOF
 # We test twice because some compilers refuse to overwrite an existing
 # `.o' file with `-o', although they will create one.
-ac_try='$FC $FCFLAGS -c conftest.$ac_ext -o conftest.$ac_objext >&5'
-if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+ac_try='$FC $FCFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-     test -f conftest.$ac_objext &&
-     { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+     test -f conftest2.$ac_objext &&
+     { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
   ac_cv_prog_fc_c_o=yes
 else
@@ -5869,8 +6856,8 @@ else
 fi
 rm -f conftest*
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_fc_c_o" >&5
-echo "${ECHO_T}$ac_cv_prog_fc_c_o" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_fc_c_o" >&5
+$as_echo "$ac_cv_prog_fc_c_o" >&6; }
 if test $ac_cv_prog_fc_c_o = no; then
 
 cat >>confdefs.h <<\_ACEOF
@@ -5879,21 +6866,21 @@ _ACEOF
 
 fi
 
-ac_ext=cc
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
-ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
-echo "$as_me:$LINENO: checking how to get verbose linking output from $FC" >&5
-echo $ECHO_N "checking how to get verbose linking output from $FC... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking how to get verbose linking output from $FC" >&5
+$as_echo_n "checking how to get verbose linking output from $FC... " >&6; }
 if test "${ac_cv_prog_fc_v+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
       program main
@@ -5901,27 +6888,23 @@ else
       end
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_cv_prog_fc_v=
 # Try some options frequently used verbose output
 for ac_verb in -v -verbose --verbose -V -\#\#\#; do
@@ -5937,20 +6920,28 @@ _ACEOF
 # flags.
 ac_save_FFLAGS=$FCFLAGS
 FCFLAGS="$FCFLAGS $ac_verb"
-(eval echo $as_me:5940: \"$ac_link\") >&5
-ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
-echo "$ac_fc_v_output" >&5
+eval "set x $ac_link"
+shift
+$as_echo "$as_me:$LINENO: $*" >&5
+# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+# LIBRARY_PATH; skip all such settings.
+ac_fc_v_output=`eval $ac_link 5>&1 2>&1 |
+  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
+$as_echo "$ac_fc_v_output" >&5
 FCFLAGS=$ac_save_FFLAGS
 
-rm -f conftest*
+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_fc_v_output="`echo $ac_fc_v_output |
 	grep 'LPATH is:' |
-	sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_fc_v_output"
+	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_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_fc_v_output in
   # If we are using xlf then replace all the commas with spaces.
   *xlfentry*)
@@ -5959,13 +6950,20 @@ case $ac_fc_v_output in
   # 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_fc_v_output=`echo $ac_fc_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;;
+    ac_fc_v_output=`echo $ac_fc_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_fc_v_output=`echo $ac_fc_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 Cray Fortran then delete quotes.
-  # Use "\"" instead of '"' for font-lock-mode.
-  # FIXME: a more general fix for quoted arguments with spaces?
   *cft90*)
-    ac_fc_v_output=`echo $ac_fc_v_output | sed "s/\"//g"` ;;
+    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
 esac
 
 
@@ -5979,25 +6977,26 @@ esac
   done
 done
 if test -z "$ac_cv_prog_fc_v"; then
-   { echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $FC" >&5
-echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;}
+   { $as_echo "$as_me:$LINENO: WARNING: cannot determine how to obtain linking information from $FC" >&5
+$as_echo "$as_me: WARNING: cannot determine how to obtain linking information from $FC" >&2;}
 fi
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ echo "$as_me:$LINENO: WARNING: compilation failed" >&5
-echo "$as_me: WARNING: compilation failed" >&2;}
+	{ $as_echo "$as_me:$LINENO: WARNING: compilation failed" >&5
+$as_echo "$as_me: WARNING: compilation failed" >&2;}
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_fc_v" >&5
-echo "${ECHO_T}$ac_cv_prog_fc_v" >&6
-echo "$as_me:$LINENO: checking for Fortran libraries of $FC" >&5
-echo $ECHO_N "checking for Fortran libraries of $FC... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_fc_v" >&5
+$as_echo "$ac_cv_prog_fc_v" >&6; }
+{ $as_echo "$as_me:$LINENO: checking for Fortran libraries of $FC" >&5
+$as_echo_n "checking for Fortran libraries of $FC... " >&6; }
 if test "${ac_cv_fc_libs+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test "x$FCLIBS" != "x"; then
   ac_cv_fc_libs="$FCLIBS" # Let the user override the test.
@@ -6015,20 +7014,28 @@ _ACEOF
 # flags.
 ac_save_FFLAGS=$FCFLAGS
 FCFLAGS="$FCFLAGS $ac_cv_prog_fc_v"
-(eval echo $as_me:6018: \"$ac_link\") >&5
-ac_fc_v_output=`eval $ac_link 5>&1 2>&1 | grep -v 'Driving:'`
-echo "$ac_fc_v_output" >&5
+eval "set x $ac_link"
+shift
+$as_echo "$as_me:$LINENO: $*" >&5
+# gfortran 4.3 outputs lines setting COLLECT_GCC_OPTIONS, COMPILER_PATH,
+# LIBRARY_PATH; skip all such settings.
+ac_fc_v_output=`eval $ac_link 5>&1 2>&1 |
+  grep -v 'Driving:' | grep -v "^[_$as_cr_Letters][_$as_cr_alnum]*="`
+$as_echo "$ac_fc_v_output" >&5
 FCFLAGS=$ac_save_FFLAGS
 
-rm -f conftest*
+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_fc_v_output="`echo $ac_fc_v_output |
 	grep 'LPATH is:' |
-	sed 's,.*LPATH is\(: *[^ ]*\).*,\1,;s,: */, -L/,g'` $ac_fc_v_output"
+	sed 's|.*LPATH is\(: *[^ ]*\).*|\1|;s|: */| -L/|g'` $ac_fc_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_fc_v_output in
   # If we are using xlf then replace all the commas with spaces.
   *xlfentry*)
@@ -6037,13 +7044,20 @@ case $ac_fc_v_output in
   # 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_fc_v_output=`echo $ac_fc_v_output | sed 's/\"-mGLOB[^\"]*\"/ /g'` ;;
+    ac_fc_v_output=`echo $ac_fc_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_fc_v_output=`echo $ac_fc_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 Cray Fortran then delete quotes.
-  # Use "\"" instead of '"' for font-lock-mode.
-  # FIXME: a more general fix for quoted arguments with spaces?
   *cft90*)
-    ac_fc_v_output=`echo $ac_fc_v_output | sed "s/\"//g"` ;;
+    ac_fc_v_output=`echo $ac_fc_v_output | sed 's/"//g'` ;;
 esac
 
 
@@ -6097,12 +7111,12 @@ fi
 
           ;;
           # Ignore these flags.
-        -lang* | -lcrt[01].o | -lcrtbegin.o | -lc | -lgcc | -libmil | -LANG:=*)
+        -lang* | -lcrt*.o | -lc | -lgcc* | -lSystem | -libmil | -LANG:=* | -LIST:* | -LNO:*)
           ;;
         -lkernel32)
           test x"$CYGWIN" != xyes && ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
           ;;
-        -[LRuY])
+        -[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 -)
@@ -6116,7 +7130,7 @@ fi
 	  esac
           ;;
         -YP,*)
-          for ac_j in `echo $ac_arg | sed -e 's/-YP,/-L/;s/:/ -L/g'`; do
+          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_fc_libs; do
     if test x"$ac_j" = x"$ac_i"; then
@@ -6150,6 +7164,9 @@ else
 fi
 
           ;;
+	-zallextract*| -zdefaultextract)
+	  ac_cv_fc_libs="$ac_cv_fc_libs $ac_arg"
+	  ;;
           # Ignore everything else.
   esac
 done
@@ -6161,7 +7178,7 @@ set X $ac_save_positional; shift
 # must begin with a "/").
 case `(uname -sr) 2>/dev/null` in
    "SunOS 5"*)
-      ac_ld_run_path=`echo $ac_fc_v_output |
+      ac_ld_run_path=`$as_echo "$ac_fc_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
@@ -6176,26 +7193,26 @@ esac
 fi # test "x$[]_AC_LANG_PREFIX[]LIBS" = "x"
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_fc_libs" >&5
-echo "${ECHO_T}$ac_cv_fc_libs" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_libs" >&5
+$as_echo "$ac_cv_fc_libs" >&6; }
 FCLIBS="$ac_cv_fc_libs"
 
 
-ac_ext=cc
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 
-echo "$as_me:$LINENO: checking for dummy main to link with Fortran libraries" >&5
-echo $ECHO_N "checking for dummy main to link with Fortran libraries... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for dummy main to link with Fortran libraries" >&5
+$as_echo_n "checking for dummy main to link with Fortran libraries... " >&6; }
 if test "${ac_cv_fc_dummy_main+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   ac_fc_dm_save_LIBS=$LIBS
  LIBS="$LIBS $FCLIBS"
@@ -6231,35 +7248,36 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_fortran_dummy_main=none
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_fortran_dummy_main=unknown
+	ac_cv_fortran_dummy_main=unknown
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 
  if test $ac_cv_fortran_dummy_main = unknown; then
@@ -6288,48 +7306,50 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_fortran_dummy_main=$ac_func; break
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
    done
  fi
- ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+ ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
  ac_cv_fc_dummy_main=$ac_cv_fortran_dummy_main
- rm -f conftest*
+ rm -rf conftest*
  LIBS=$ac_fc_dm_save_LIBS
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_fc_dummy_main" >&5
-echo "${ECHO_T}$ac_cv_fc_dummy_main" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_dummy_main" >&5
+$as_echo "$ac_cv_fc_dummy_main" >&6; }
 FC_DUMMY_MAIN=$ac_cv_fc_dummy_main
 if test "$FC_DUMMY_MAIN" != unknown; then
   if test $FC_DUMMY_MAIN != none; then
@@ -6347,28 +7367,30 @@ _ACEOF
   fi
 fi
 else
-  { { echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: linking to Fortran libraries from C fails
 See \`config.log' for more details." >&5
-echo "$as_me: error: linking to Fortran libraries from C fails
+$as_echo "$as_me: error: linking to Fortran libraries from C fails
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 fi
 
 
-ac_ext=cc
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
-echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5
-echo $ECHO_N "checking for Fortran name-mangling scheme... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for Fortran name-mangling scheme" >&5
+$as_echo_n "checking for Fortran name-mangling scheme... " >&6; }
 if test "${ac_cv_fc_mangling+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
       subroutine foobar()
@@ -6379,27 +7401,23 @@ else
       end
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   mv conftest.$ac_objext cfortran_test.$ac_objext
 
   ac_save_LIBS=$LIBS
@@ -6421,12 +7439,12 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char $ac_func ();
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
@@ -6439,46 +7457,48 @@ char $ac_func ();
 int
 main ()
 {
-$ac_func ();
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_success=yes; break 2
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
     done
   done
-  ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+  ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 
   if test "$ac_success" = "yes"; then
@@ -6508,12 +7528,12 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
 char $ac_func ();
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
@@ -6526,45 +7546,47 @@ char $ac_func ();
 int
 main ()
 {
-$ac_func ();
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_success_extra=yes; break
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
      done
-     ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+     ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 
      if test "$ac_success_extra" = "yes"; then
@@ -6587,32 +7609,36 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu
   fi
 
   LIBS=$ac_save_LIBS
-  rm -f cfortran_test* conftest*
+  rm -rf conftest*
+  rm -f cfortran_test*
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-{ { echo "$as_me:$LINENO: error: cannot compile a simple Fortran program
+	{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compile a simple Fortran program
 See \`config.log' for more details." >&5
-echo "$as_me: error: cannot compile a simple Fortran program
+$as_echo "$as_me: error: cannot compile a simple Fortran program
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_fc_mangling" >&5
-echo "${ECHO_T}$ac_cv_fc_mangling" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_mangling" >&5
+$as_echo "$ac_cv_fc_mangling" >&6; }
 
-ac_ext=cc
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 
 
@@ -6690,28 +7716,26 @@ _ACEOF
 _ACEOF
  ;;
   *)
-          { echo "$as_me:$LINENO: WARNING: unknown Fortran name-mangling scheme" >&5
-echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;}
+          { $as_echo "$as_me:$LINENO: WARNING: unknown Fortran name-mangling scheme" >&5
+$as_echo "$as_me: WARNING: unknown Fortran name-mangling scheme" >&2;}
           ;;
 esac
 
-ac_ext=cc
+ac_ext=cpp
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
     F77=$FC
-            ac_ext=${FC_SRCEXT-f}
-ac_compile='$FC -c $FCFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext >&5'
-ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $FCFLAGS_SRCEXT conftest.$ac_ext $LIBS >&5'
+            ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 
 
 
-
-
-if true; then
+ if true; then
   HAVE_MPI_TRUE=
   HAVE_MPI_FALSE='#'
 else
@@ -6721,11 +7745,11 @@ fi
 
 
 
-# Check whether --with-mpi or --without-mpi was given.
+# Check whether --with-mpi was given.
 if test "${with_mpi+set}" = set; then
-  withval="$with_mpi"
-  MPI_DIR=$withval
-fi;
+  withval=$with_mpi; MPI_DIR=$withval
+fi
+
 
 
 
@@ -6734,10 +7758,10 @@ fi;
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
 if test "${ac_cv_prog_MPIFC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$MPIFC"; then
   ac_cv_prog_MPIFC="$MPIFC" # Let the user override the test.
@@ -6748,25 +7772,27 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
     ac_cv_prog_MPIFC="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
 MPIFC=$ac_cv_prog_MPIFC
 if test -n "$MPIFC"; then
-  echo "$as_me:$LINENO: result: $MPIFC" >&5
-echo "${ECHO_T}$MPIFC" >&6
+  { $as_echo "$as_me:$LINENO: result: $MPIFC" >&5
+$as_echo "$MPIFC" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
   test -n "$MPIFC" && break
 done
 test -n "$MPIFC" || MPIFC="$FC"
@@ -6777,54 +7803,55 @@ test -n "$MPIFC" || MPIFC="$FC"
 
 
 if test x = x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for MPI_Init" >&5
-echo $ECHO_N "checking for MPI_Init... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for MPI_Init" >&5
+$as_echo_n "checking for MPI_Init... " >&6; }
 			cat >conftest.$ac_ext <<_ACEOF
       program main
       call MPI_Init
       end
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   MPILIBS=" "
-				echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+				{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 fi
 
 	if test x = x"$MPILIBS"; then
-		echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5
-echo $ECHO_N "checking for MPI_Init in -lfmpi... $ECHO_C" >&6
+		{ $as_echo "$as_me:$LINENO: checking for MPI_Init in -lfmpi" >&5
+$as_echo_n "checking for MPI_Init in -lfmpi... " >&6; }
 if test "${ac_cv_lib_fmpi_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lfmpi  $LIBS"
@@ -6834,50 +7861,51 @@ cat >conftest.$ac_ext <<_ACEOF
       end
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_lib_fmpi_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_fmpi_MPI_Init=no
+	ac_cv_lib_fmpi_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_lib_fmpi_MPI_Init" >&6
-if test $ac_cv_lib_fmpi_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_fmpi_MPI_Init" >&5
+$as_echo "$ac_cv_lib_fmpi_MPI_Init" >&6; }
+if test "x$ac_cv_lib_fmpi_MPI_Init" = x""yes; then
   MPILIBS="-lfmpi"
 fi
 
 	fi
 	if test x = x"$MPILIBS"; then
-		echo "$as_me:$LINENO: checking for MPI_Init in -lmpichf90" >&5
-echo $ECHO_N "checking for MPI_Init in -lmpichf90... $ECHO_C" >&6
+		{ $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpichf90" >&5
+$as_echo_n "checking for MPI_Init in -lmpichf90... " >&6; }
 if test "${ac_cv_lib_mpichf90_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmpichf90  $LIBS"
@@ -6887,51 +7915,52 @@ cat >conftest.$ac_ext <<_ACEOF
       end
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_lib_mpichf90_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_mpichf90_MPI_Init=no
+	ac_cv_lib_mpichf90_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_mpichf90_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_lib_mpichf90_MPI_Init" >&6
-if test $ac_cv_lib_mpichf90_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpichf90_MPI_Init" >&5
+$as_echo "$ac_cv_lib_mpichf90_MPI_Init" >&6; }
+if test "x$ac_cv_lib_mpichf90_MPI_Init" = x""yes; then
   MPILIBS="-lmpichf90"
 fi
 
 	fi
 
 if test x = x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
-echo $ECHO_N "checking for MPI_Init in -lmpi... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpi" >&5
+$as_echo_n "checking for MPI_Init in -lmpi... " >&6; }
 if test "${ac_cv_lib_mpi_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmpi  $LIBS"
@@ -6941,50 +7970,51 @@ cat >conftest.$ac_ext <<_ACEOF
       end
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_lib_mpi_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_mpi_MPI_Init=no
+	ac_cv_lib_mpi_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_lib_mpi_MPI_Init" >&6
-if test $ac_cv_lib_mpi_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpi_MPI_Init" >&5
+$as_echo "$ac_cv_lib_mpi_MPI_Init" >&6; }
+if test "x$ac_cv_lib_mpi_MPI_Init" = x""yes; then
   MPILIBS="-lmpi"
 fi
 
 fi
 if test x = x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
-echo $ECHO_N "checking for MPI_Init in -lmpich... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for MPI_Init in -lmpich" >&5
+$as_echo_n "checking for MPI_Init in -lmpich... " >&6; }
 if test "${ac_cv_lib_mpich_MPI_Init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lmpich  $LIBS"
@@ -6994,87 +8024,85 @@ cat >conftest.$ac_ext <<_ACEOF
       end
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
   ac_cv_lib_mpich_MPI_Init=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_mpich_MPI_Init=no
+	ac_cv_lib_mpich_MPI_Init=no
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
-echo "${ECHO_T}$ac_cv_lib_mpich_MPI_Init" >&6
-if test $ac_cv_lib_mpich_MPI_Init = yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpich_MPI_Init" >&5
+$as_echo "$ac_cv_lib_mpich_MPI_Init" >&6; }
+if test "x$ac_cv_lib_mpich_MPI_Init" = x""yes; then
   MPILIBS="-lmpich"
 fi
 
 fi
 
 if test x != x"$MPILIBS"; then
-	echo "$as_me:$LINENO: checking for mpif.h" >&5
-echo $ECHO_N "checking for mpif.h... $ECHO_C" >&6
+	{ $as_echo "$as_me:$LINENO: checking for mpif.h" >&5
+$as_echo_n "checking for mpif.h... " >&6; }
 	cat >conftest.$ac_ext <<_ACEOF
       program main
       include 'mpif.h'
       end
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_fc_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-MPILIBS=""
-		echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+	MPILIBS=""
+		{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 
 FC="$acx_mpi_save_FC"
@@ -7083,8 +8111,8 @@ FC="$acx_mpi_save_FC"
 
 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
 if test x = x"$MPILIBS"; then
-        { { echo "$as_me:$LINENO: error: couldn't find mpi library for Fortran" >&5
-echo "$as_me: error: couldn't find mpi library for Fortran" >&2;}
+        { { $as_echo "$as_me:$LINENO: error: couldn't find mpi library for Fortran" >&5
+$as_echo "$as_me: error: couldn't find mpi library for Fortran" >&2;}
    { (exit 1); exit 1; }; }
         :
 else
@@ -7105,204 +8133,299 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-# Check whether --enable-shared or --disable-shared was given.
-if test "${enable_shared+set}" = set; then
-  enableval="$enable_shared"
-  p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_shared=yes ;;
-    no) enable_shared=no ;;
-    *)
-      enable_shared=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_shared=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_shared=yes
-fi;
+case `pwd` in
+  *\ * | *\	*)
+    { $as_echo "$as_me:$LINENO: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
 
-# Check whether --enable-static or --disable-static was given.
-if test "${enable_static+set}" = set; then
-  enableval="$enable_static"
-  p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_static=yes ;;
-    no) enable_static=no ;;
-    *)
-     enable_static=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_static=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_static=yes
-fi;
 
-# Check whether --enable-fast-install or --disable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then
-  enableval="$enable_fast_install"
-  p=${PACKAGE-default}
-    case $enableval in
-    yes) enable_fast_install=yes ;;
-    no) enable_fast_install=no ;;
-    *)
-      enable_fast_install=no
-      # Look at the argument we got.  We use all the common list separators.
-      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-      for pkg in $enableval; do
-	IFS="$lt_save_ifs"
-	if test "X$pkg" = "X$p"; then
-	  enable_fast_install=yes
-	fi
-      done
-      IFS="$lt_save_ifs"
-      ;;
-    esac
-else
-  enable_fast_install=yes
-fi;
+
+macro_version='2.2.6b'
+macro_revision='1.3017'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
 
 # Make sure we can run config.sub.
-$ac_config_sub sun4 >/dev/null 2>&1 ||
-  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
-echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
    { (exit 1); exit 1; }; }
 
-echo "$as_me:$LINENO: checking build system type" >&5
-echo $ECHO_N "checking build system type... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
 if test "${ac_cv_build+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_build_alias=$build_alias
-test -z "$ac_cv_build_alias" &&
-  ac_cv_build_alias=`$ac_config_guess`
-test -z "$ac_cv_build_alias" &&
-  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
-echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
    { (exit 1); exit 1; }; }
-ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
    { (exit 1); exit 1; }; }
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_build" >&5
-echo "${ECHO_T}$ac_cv_build" >&6
-build=$ac_cv_build
-build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking host system type" >&5
-echo $ECHO_N "checking host system type... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
 if test "${ac_cv_host+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_host_alias=$host_alias
-test -z "$ac_cv_host_alias" &&
-  ac_cv_host_alias=$ac_cv_build_alias
-ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
-  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
-echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
    { (exit 1); exit 1; }; }
+fi
 
 fi
-echo "$as_me:$LINENO: result: $ac_cv_host" >&5
-echo "${ECHO_T}$ac_cv_host" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
 host=$ac_cv_host
-host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-
-
-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
-if test "${lt_cv_path_SED+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+     for ac_i in 1 2 3 4 5 6 7; do
+       ac_script="$ac_script$as_nl$ac_script"
+     done
+     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+     $as_unset ac_script || ac_script=
+     if test -z "$SED"; then
+  ac_path_SED_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
 do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
-  for lt_ac_prog in sed gsed; do
+  for 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
+      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# 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
+*GNU*)
+  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo '' >> "conftest.nl"
+    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_SED_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_SED="$ac_path_SED"
+      ac_path_SED_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_SED_found && break 3
     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
+  if test -z "$ac_cv_path_SED"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable sed could be found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable sed could be found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
   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
+else
+  ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+  rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+   then ac_cv_path_FGREP="$GREP -F"
+   else
+     if test -z "$FGREP"; then
+  ac_path_FGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_prog in fgrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+      { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# 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
+*GNU*)
+  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'FGREP' >> "conftest.nl"
+    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    ac_count=`expr $ac_count + 1`
+    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_FGREP="$ac_path_FGREP"
+      ac_path_FGREP_max=$ac_count
     fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_FGREP_found && break 3
+    done
   done
 done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_FGREP"; then
+    { { $as_echo "$as_me:$LINENO: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+else
+  ac_cv_path_FGREP=$FGREP
+fi
 
+   fi
 fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
 
-SED=$lt_cv_path_SED
 
-echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
 
 
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
 if test "${with_gnu_ld+set}" = set; then
-  withval="$with_gnu_ld"
-  test "$withval" = no || with_gnu_ld=yes
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
 else
   with_gnu_ld=no
-fi;
+fi
+
 ac_prog=ld
 if test "$GCC" = yes; then
   # Check if gcc -print-prog-name=ld gives a path.
-  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
+  { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
   case $host in
   *-*-mingw*)
     # gcc leaves a trailing carriage return which upsets mingw
@@ -7315,9 +8438,9 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
     [\\/]* | ?:[\\/]*)
       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%/%"`
+      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"
       ;;
@@ -7331,14 +8454,14 @@ echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
     ;;
   esac
 elif test "$with_gnu_ld" = yes; then
-  echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
 else
-  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
 fi
 if test "${lt_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -z "$LD"; then
   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
@@ -7368,19 +8491,19 @@ fi
 
 LD="$lt_cv_path_LD"
 if test -n "$LD"; then
-  echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
+  { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
    { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
 if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   # I'd rather use --version here, but apparently some GNU lds only accept -v.
 case `$LD -v 2>&1 </dev/null` in
@@ -7392,40 +8515,22 @@ case `$LD -v 2>&1 </dev/null` in
   ;;
 esac
 fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
 with_gnu_ld=$lt_cv_prog_gnu_ld
 
 
-echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
-echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6
-if test "${lt_cv_ld_reload_flag+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_ld_reload_flag='-r'
-fi
-echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
-echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
-  darwin*)
-    if test "$GCC" = yes; then
-      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
-    else
-      reload_cmds='$LD$reload_flag -o $output$reload_objs'
-    fi
-    ;;
-esac
 
-echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
-echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
+
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
 if test "${lt_cv_path_NM+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
   if test -n "$NM"; then
   # Let the user override the test.
@@ -7468,1088 +8573,712 @@ else
     done
     IFS="$lt_save_ifs"
   done
-  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+  : ${lt_cv_path_NM=no}
 fi
 fi
-echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
-echo "${ECHO_T}$lt_cv_path_NM" >&6
-NM="$lt_cv_path_NM"
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+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 "$ac_tool_prefix"; then
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+  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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DUMPBIN"; then
+  ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-echo "$as_me:$LINENO: checking whether ln -s works" >&5
-echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+  { $as_echo "$as_me:$LINENO: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
 else
-  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
-echo "${ECHO_T}no, using $LN_S" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5
-echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6
-if test "${lt_cv_deplibs_check_method+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
 
-case $host_os in
-aix4* | aix5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+    test -n "$DUMPBIN" && break
+  done
+fi
+if test -z "$DUMPBIN"; then
+  ac_ct_DUMPBIN=$DUMPBIN
+  for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_DUMPBIN"; then
+  ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-beos*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-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'
-  ;;
+  test -n "$ac_ct_DUMPBIN" && break
+done
 
-mingw* | pw32*)
-  # Base MSYS/MinGW do not provide the 'file' command needed by
-  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
-  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
-  lt_cv_file_magic_cmd='$OBJDUMP -f'
-  ;;
+  if test "x$ac_ct_DUMPBIN" = x; then
+    DUMPBIN=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    DUMPBIN=$ac_ct_DUMPBIN
+  fi
+fi
 
-darwin* | rhapsody*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-freebsd* | kfreebsd*-gnu | dragonfly*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    case $host_cpu in
-    i*86 )
-      # Not sure whether the presence of OpenBSD here was a mistake.
-      # Let's accept both of them until this is cleared up.
-      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
-      lt_cv_file_magic_cmd=/usr/bin/file
-      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
-      ;;
-    esac
-  else
-    lt_cv_deplibs_check_method=pass_all
+  if test "$DUMPBIN" != ":"; then
+    NM="$DUMPBIN"
   fi
-  ;;
+fi
+test -z "$NM" && NM=nm
 
-gnu*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-hpux10.20* | hpux11*)
-  lt_cv_file_magic_cmd=/usr/bin/file
-  case $host_cpu in
-  ia64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
-    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
-    ;;
-  hppa*64*)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
-    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
-    ;;
-  *)
-    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
-    lt_cv_file_magic_test_file=/usr/lib/libc.sl
-    ;;
-  esac
-  ;;
 
-interix3*)
-  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
-  lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
-  ;;
 
-irix5* | irix6* | nonstopux*)
-  case $LD in
-  *-32|*"-32 ") libmagic=32-bit;;
-  *-n32|*"-n32 ") libmagic=N32;;
-  *-64|*"-64 ") libmagic=64-bit;;
-  *) libmagic=never-match;;
-  esac
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-# This must be Linux ELF.
-linux*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
 
-netbsd*)
-  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
-  else
-    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+{ $as_echo "$as_me:$LINENO: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_nm_interface="BSD nm"
+  echo "int some_variable = 0;" > conftest.$ac_ext
+  (eval echo "\"\$as_me:8704: $ac_compile\"" >&5)
+  (eval "$ac_compile" 2>conftest.err)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:8707: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+  cat conftest.err >&5
+  (eval echo "\"\$as_me:8710: output\"" >&5)
+  cat conftest.out >&5
+  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+    lt_cv_nm_interface="MS dumpbin"
   fi
-  ;;
+  rm -f conftest*
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
 
-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
-  ;;
+{ $as_echo "$as_me:$LINENO: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
 
-nto-qnx*)
-  lt_cv_deplibs_check_method=unknown
-  ;;
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+    i=0
+  teststring="ABCD"
 
-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
-  ;;
+  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
+    ;;
 
-osf3* | osf4* | osf5*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+  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;
+    ;;
 
-solaris*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
+  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;
+    ;;
 
-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*`
+  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;
     ;;
-  ncr)
-    lt_cv_deplibs_check_method=pass_all
+
+  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`
     ;;
-  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 )'
+
+  interix*)
+    # We know the value 262144 and hardcode it with a safety zone (like BSD)
+    lt_cv_sys_max_cmd_len=196608
     ;;
-  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
+
+  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
     ;;
-  siemens)
-    lt_cv_deplibs_check_method=pass_all
+  sco3.2v5*)
+    lt_cv_sys_max_cmd_len=102400
     ;;
-  pc)
-    lt_cv_deplibs_check_method=pass_all
+  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"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+	         = "XX$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
-  ;;
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  lt_cv_deplibs_check_method=pass_all
-  ;;
-esac
+fi
 
+if test -n $lt_cv_sys_max_cmd_len ; then
+  { $as_echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: none" >&5
+$as_echo "none" >&6; }
 fi
-echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
-echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
+max_cmd_len=$lt_cv_sys_max_cmd_len
 
 
 
 
-# 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
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
 
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval="$enable_libtool_lock"
+{ $as_echo "$as_me:$LINENO: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+      = c,a/b,, \
+    && eval 'test $(( 1 + 1 )) -eq 2 \
+    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+  && xsi_shell=yes
+{ $as_echo "$as_me:$LINENO: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
 
-fi;
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *ELF-32*)
-      HPUX_IA64_MODE="32"
-      ;;
-    *ELF-64*)
-      HPUX_IA64_MODE="64"
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
-*-*-irix6*)
-  # Find out which ABI we are using.
-  echo '#line 7714 "configure"' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-   if test "$lt_cv_prog_gnu_ld" = yes; then
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -melf32bsmip"
-      ;;
-    *N32*)
-      LD="${LD-ld} -melf32bmipn32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -melf64bmip"
-      ;;
-    esac
-   else
-    case `/usr/bin/file conftest.$ac_objext` in
-    *32-bit*)
-      LD="${LD-ld} -32"
-      ;;
-    *N32*)
-      LD="${LD-ld} -n32"
-      ;;
-    *64-bit*)
-      LD="${LD-ld} -64"
-      ;;
-    esac
-   fi
-  fi
-  rm -rf conftest*
-  ;;
+{ $as_echo "$as_me:$LINENO: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+    >/dev/null 2>&1 \
+  && lt_shell_append=yes
+{ $as_echo "$as_me:$LINENO: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
 
-x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-    *32-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_i386"
-          ;;
-        ppc64-*linux*|powerpc64-*linux*)
-          LD="${LD-ld} -m elf32ppclinux"
-          ;;
-        s390x-*linux*)
-          LD="${LD-ld} -m elf_s390"
-          ;;
-        sparc64-*linux*)
-          LD="${LD-ld} -m elf32_sparc"
-          ;;
-      esac
-      ;;
-    *64-bit*)
-      case $host in
-        x86_64-*linux*)
-          LD="${LD-ld} -m elf_x86_64"
-          ;;
-        ppc*-*linux*|powerpc*-*linux*)
-          LD="${LD-ld} -m elf64ppc"
-          ;;
-        s390*-*linux*)
-          LD="${LD-ld} -m elf64_s390"
-          ;;
-        sparc*-*linux*)
-          LD="${LD-ld} -m elf64_sparc"
-          ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
-  ;;
 
-*-*-sco3.2v5*)
-  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
-  SAVE_CFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -belf"
-  echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  lt_unset=unset
 else
-  ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
+  lt_unset=false
+fi
 
-     cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  lt_cv_cc_needs_belf=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-lt_cv_cc_needs_belf=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-     ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6
-  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
-    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
-    CFLAGS="$SAVE_CFLAGS"
-  fi
+# 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'
   ;;
-sparc*-*solaris*)
-  # Find out which ABI we are using.
-  echo 'int i;' > conftest.$ac_ext
-  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-    case `/usr/bin/file conftest.o` in
-    *64-bit*)
-      case $lt_cv_prog_gnu_ld in
-      yes*) LD="${LD-ld} -m elf64_sparc" ;;
-      *)    LD="${LD-ld} -64" ;;
-      esac
-      ;;
-    esac
-  fi
-  rm -rf conftest*
+ *) # EBCDIC based system
+  lt_SP2NL='tr \100 \n'
+  lt_NL2SP='tr \r\n \100\100'
   ;;
-
-
 esac
 
-need_locks="$enable_libtool_lock"
 
 
-echo "$as_me:$LINENO: checking for ANSI C header files" >&5
-echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
-if test "${ac_cv_header_stdc+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
 
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_header_stdc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_header_stdc=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <string.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then
-  :
+
+{ $as_echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_stdc=no
+  lt_cv_ld_reload_flag='-r'
 fi
-rm -f conftest*
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+  darwin*)
+    if test "$GCC" = yes; then
+      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+    else
+      reload_cmds='$LD$reload_flag -o $output$reload_objs'
+    fi
+    ;;
+esac
 
-fi
 
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdlib.h>
 
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then
-  :
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
 
-fi
 
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then
-  :
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ctype.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
 
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      exit(2);
-  exit (0);
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  if test -n "$OBJDUMP"; then
+  ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-( exit $ac_status )
-ac_cv_header_stdc=no
-fi
-rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 fi
 fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+  { $as_echo "$as_me:$LINENO: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
-echo "${ECHO_T}$ac_cv_header_stdc" >&6
-if test $ac_cv_header_stdc = yes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define STDC_HEADERS 1
-_ACEOF
 
 fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+  ac_ct_OBJDUMP=$OBJDUMP
+  # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OBJDUMP"; then
+  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OBJDUMP="objdump"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
+  if test "x$ac_ct_OBJDUMP" = x; then
+    OBJDUMP="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    OBJDUMP=$ac_ct_OBJDUMP
+  fi
+else
+  OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
 
+test -z "$OBJDUMP" && OBJDUMP=objdump
 
 
 
 
 
 
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
 
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-fi
+{ $as_echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
 
-done
+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
+  ;;
 
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+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'
+  ;;
 
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+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.
+  if ( 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
+    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+    lt_cv_file_magic_cmd='$OBJDUMP -f'
+  fi
+  ;;
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+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
-    ac_cpp_err=
+    lt_cv_deplibs_check_method=pass_all
   fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ;;
 
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
+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
     ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+  hppa*64*)
+    lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
     ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
+  *)
+    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
+  ;;
 
-done
+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 Linux ELF.
+linux* | k*bsd*-gnu)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-    (test "X$CXX" != "Xg++"))) ; then
-  ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
-echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
-if test -z "$CXXCPP"; then
-  if test "${ac_cv_prog_CXXCPP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      # Double quotes because CXXCPP needs to be expanded
-    for CXXCPP in "$CXX -E" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+netbsd*)
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
   else
-    ac_cpp_err=
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
   fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ;;
 
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
+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
+  ;;
 
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+*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
-    ac_cpp_err=
+    lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
   fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ;;
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.$ac_ext
+osf3* | osf4* | osf5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  break
-fi
+rdos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-    done
-    ac_cv_prog_CXXCPP=$CXXCPP
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-fi
-  CXXCPP=$ac_cv_prog_CXXCPP
-else
-  ac_cv_prog_CXXCPP=$CXXCPP
-fi
-echo "$as_me:$LINENO: result: $CXXCPP" >&5
-echo "${ECHO_T}$CXXCPP" >&6
-ac_preproc_ok=false
-for ac_cxx_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  :
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
 
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.$ac_ext
+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
+  ;;
 
-  # OK, works on sane cases.  Now check whether non-existent headers
-  # can be detected and how.
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  # Broken: success on invalid input.
-continue
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+tpf*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+esac
 
-  # Passes both tests.
-ac_preproc_ok=:
-break
 fi
-rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
 
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then
-  :
-else
-  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&5
-echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-fi
 
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
 if test -n "$ac_tool_prefix"; then
-  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$F77"; then
-  ac_cv_prog_F77="$F77" # Let the user override the test.
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -8557,41 +9286,39 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_AR="${ac_tool_prefix}ar"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
-F77=$ac_cv_prog_F77
-if test -n "$F77"; then
-  echo "$as_me:$LINENO: result: $F77" >&5
-echo "${ECHO_T}$F77" >&6
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  { $as_echo "$as_me:$LINENO: result: $AR" >&5
+$as_echo "$AR" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-    test -n "$F77" && break
-  done
+
 fi
-if test -z "$F77"; then
-  ac_ct_F77=$F77
-  for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_AR"; then
+  ac_ct_AR=$AR
+  # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_F77"; then
-  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+  if test -n "$ac_ct_AR"; then
+  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -8599,306 +9326,317 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_F77="$ac_prog"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_AR="ar"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
-ac_ct_F77=$ac_cv_prog_ac_ct_F77
-if test -n "$ac_ct_F77"; then
-  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
-echo "${ECHO_T}$ac_ct_F77" >&6
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  test -n "$ac_ct_F77" && break
-done
-
-  F77=$ac_ct_F77
+  if test "x$ac_ct_AR" = x; then
+    AR="false"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    AR=$ac_ct_AR
+  fi
+else
+  AR="$ac_cv_prog_AR"
 fi
 
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
 
-# Provide some information about the compiler.
-echo "$as_me:8629:" \
-     "checking for Fortran 77 compiler version" >&5
-ac_compiler=`set X $ac_compile; echo $2`
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
-  (eval $ac_compiler --version </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
-  (eval $ac_compiler -v </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
-  (eval $ac_compiler -V </dev/null >&5) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-rm -f a.out
-
-# If we don't use `.F' as extension, the preprocessor is not run on the
-# input file.  (Note that this only needs to work for GNU compilers.)
-ac_save_ext=$ac_ext
-ac_ext=F
-echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
-echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
-if test "${ac_cv_f77_compiler_gnu+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-      program main
-#ifndef __GNUC__
-       choke me
-#endif
-
-      end
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_f77_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_compiler_gnu=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_compiler_gnu=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_f77_compiler_gnu=$ac_compiler_gnu
 
-fi
-echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
-echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
-ac_ext=$ac_save_ext
-ac_test_FFLAGS=${FFLAGS+set}
-ac_save_FFLAGS=$FFLAGS
-FFLAGS=
-echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
-echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
-if test "${ac_cv_prog_f77_g+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  FFLAGS=-g
-cat >conftest.$ac_ext <<_ACEOF
-      program main
 
-      end
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_f77_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_prog_f77_g=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_prog_f77_g=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
-fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
-echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
-if test "$ac_test_FFLAGS" = set; then
-  FFLAGS=$ac_save_FFLAGS
-elif test $ac_cv_prog_f77_g = yes; then
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-g -O2"
-  else
-    FFLAGS="-g"
-  fi
-else
-  if test "x$ac_cv_f77_compiler_gnu" = xyes; then
-    FFLAGS="-O2"
-  else
-    FFLAGS=
-  fi
-fi
 
-G77=`test $ac_compiler_gnu = yes && echo yes`
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
 
-# find the maximum length of command line arguments
-echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
-echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-    i=0
-  teststring="ABCD"
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-  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
-    ;;
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-  gnu*)
-    # Under GNU Hurd, this test is not required because there is
-    # no limit to the length of command line arguments.
-    # Libtool will interpret -1 as no limit whatsoever
-    lt_cv_sys_max_cmd_len=-1;
-    ;;
 
-  cygwin* | mingw*)
-    # On Win9x/ME, this test blows up -- it succeeds, but takes
-    # about 5 minutes as the teststring grows exponentially.
-    # Worse, since 9x/ME are not pre-emptively multitasking,
-    # you end up with a "frozen" computer, even though with patience
-    # the test eventually succeeds (with a max line length of 256k).
-    # Instead, let's just punt: use the minimum linelength reported by
-    # all of the supported platforms: 8192 (on NT/2K/XP).
-    lt_cv_sys_max_cmd_len=8192;
-    ;;
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-  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;
-    ;;
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-  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`
-    ;;
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
 
-  interix*)
-    # We know the value 262144 and hardcode it with a safety zone (like BSD)
-    lt_cv_sys_max_cmd_len=196608
-    ;;
+test -z "$STRIP" && STRIP=:
 
-  osf*)
-    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
-    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
-    # nice to cause kernel panics so lets avoid the loop below.
-    # First set a reasonable default.
-    lt_cv_sys_max_cmd_len=16384
-    #
-    if test -x /sbin/sysconfig; then
-      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
-        *1*) lt_cv_sys_max_cmd_len=-1 ;;
-      esac
-    fi
-    ;;
-  sco3.2v5*)
-    lt_cv_sys_max_cmd_len=102400
-    ;;
-  sysv5* | sco5v6* | sysv4.2uw2*)
-    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
-    if test -n "$kargmax"; then
-      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ 	]//'`
-    else
-      lt_cv_sys_max_cmd_len=32768
-    fi
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_RANLIB" = x; then
+    RANLIB=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    RANLIB=$ac_ct_RANLIB
+  fi
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# 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 \$oldlib"
     ;;
   *)
-    # If test is not a shell built-in, we'll probably end up computing a
-    # maximum length that is only half of the actual maximum length, but
-    # we can't tell.
-    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
-    while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
-	       = "XX$teststring") >/dev/null 2>&1 &&
-	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
-	    lt_cv_sys_max_cmd_len=$new_result &&
-	    test $i != 17 # 1/2 MB should be enough
-    do
-      i=`expr $i + 1`
-      teststring=$teststring$teststring
-    done
-    teststring=
-    # Add a significant safety factor because C++ compilers can tack on massive
-    # amounts of additional arguments before passing them to the linker.
-    # It appears as though 1/2 is a usable value.
-    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
     ;;
   esac
-
+  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
 
-if test -n $lt_cv_sys_max_cmd_len ; then
-  echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
-echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
-else
-  echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
-fi
 
 
 
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
 # Check for command to grab the raw symbol name followed by C symbol from nm.
-echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
-echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  $as_echo_n "(cached) " >&6
 else
 
 # These are sane defaults that work on at least a few old systems.
@@ -8910,33 +9648,18 @@ symcode='[BCDEGRST]'
 # Regexp to match symbols that can be accessed directly from C.
 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
 
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-
 # Define system-specific variables.
 case $host_os in
 aix*)
   symcode='[BCDT]'
   ;;
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   symcode='[ABCDGISTW]'
   ;;
-hpux*) # Its linker distinguishes data from code symbols
+hpux*)
   if test "$host_cpu" = ia64; then
     symcode='[ABCDEGRST]'
   fi
-  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  ;;
-linux*)
-  if test "$host_cpu" = ia64; then
-    symcode='[ABCDGIRSTW]'
-    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
-  fi
   ;;
 irix* | nonstopux*)
   symcode='[BCDEGRST]'
@@ -8961,56 +9684,84 @@ sysv4)
   ;;
 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
+  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
   ;;
 esac
 
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
-  symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Try without a prefix undercore, then with it.
+# 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.
-  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ 	]\($symcode$symcode*\)[ 	][ 	]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+  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};"\
+"     /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
 
   # Check to see that the pipe works correctly.
   pipe_works=no
 
   rm -f conftest*
-  cat > conftest.$ac_ext <<EOF
+  cat > conftest.$ac_ext <<_LT_EOF
 #ifdef __cplusplus
 extern "C" {
 #endif
 char nm_test_var;
-void nm_test_func(){}
+void nm_test_func(void);
+void nm_test_func(void){}
 #ifdef __cplusplus
 }
 #endif
 int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+_LT_EOF
 
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; then
     # Now try to grab the symbols.
     nlist=conftest.nm
     if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5
   (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && test -s "$nlist"; then
       # Try sorting and uniquifying the output.
       if sort "$nlist" | uniq > "$nlist"T; then
@@ -9020,42 +9771,44 @@ EOF
       fi
 
       # Make sure that we snagged all the symbols we need.
-      if grep ' nm_test_var$' "$nlist" >/dev/null; then
-	if grep ' nm_test_func$' "$nlist" >/dev/null; then
-	  cat <<EOF > conftest.$ac_ext
+      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+	  cat <<_LT_EOF > conftest.$ac_ext
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-EOF
+_LT_EOF
 	  # Now generate the symbol file.
-	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
 
-	  cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr_t void *
-#else
-# define lt_ptr_t char *
-# define const
-#endif
+	  cat <<_LT_EOF >> conftest.$ac_ext
 
-/* The mapping between symbol names and symbols. */
+/* The mapping between symbol names and symbols.  */
 const struct {
   const char *name;
-  lt_ptr_t address;
+  void       *address;
 }
-lt_preloaded_symbols[] =
+lt__PROGRAM__LTX_preloaded_symbols[] =
 {
-EOF
-	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
-	  cat <<\EOF >> conftest.$ac_ext
-  {0, (lt_ptr_t) 0}
+  { "@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
-EOF
+_LT_EOF
 	  # Now try linking the two files.
 	  mv conftest.$ac_objext conftstm.$ac_objext
 	  lt_save_LIBS="$LIBS"
@@ -9065,7 +9818,7 @@ EOF
 	  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
   (eval $ac_link) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && test -s conftest${ac_exeext}; then
 	    pipe_works=yes
 	  fi
@@ -9084,7 +9837,7 @@ EOF
     echo "$progname: failed program was:" >&5
     cat conftest.$ac_ext >&5
   fi
-  rm -f conftest* conftst*
+  rm -rf conftest* conftst*
 
   # Do not use the global_symbol_pipe unless it works.
   if test "$pipe_works" = yes; then
@@ -9100,87 +9853,277 @@ if test -z "$lt_cv_sys_global_symbol_pipe"; then
   lt_cv_sys_global_symbol_to_cdecl=
 fi
 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
-  echo "$as_me:$LINENO: result: failed" >&5
-echo "${ECHO_T}failed" >&6
+  { $as_echo "$as_me:$LINENO: result: failed" >&5
+$as_echo "failed" >&6; }
 else
-  echo "$as_me:$LINENO: result: ok" >&5
-echo "${ECHO_T}ok" >&6
+  { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
 fi
 
-echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6
-if test "${lt_cv_objdir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
-  lt_cv_objdir=.libs
-else
-  # MS-DOS does not allow filenames that begin with a dot.
-  lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
-echo "${ECHO_T}$lt_cv_objdir" >&6
-objdir=$lt_cv_objdir
 
 
 
 
 
-case $host_os in
-aix3*)
-  # AIX sometimes has problems with the GCC collect2 program.  For some
-  # reason, if we set the COLLECT_NAMES environment variable, the problems
-  # vanish in a puff of smoke.
-  if test "X${COLLECT_NAMES+set}" != Xset; then
-    COLLECT_NAMES=
-    export COLLECT_NAMES
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+      *ELF-32*)
+	HPUX_IA64_MODE="32"
+	;;
+      *ELF-64*)
+	HPUX_IA64_MODE="64"
+	;;
+    esac
   fi
+  rm -rf conftest*
+  ;;
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 9915 "configure"' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    if test "$lt_cv_prog_gnu_ld" = yes; then
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -melf32bsmip"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -melf32bmipn32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -melf64bmip"
+	;;
+      esac
+    else
+      case `/usr/bin/file conftest.$ac_objext` in
+	*32-bit*)
+	  LD="${LD-ld} -32"
+	  ;;
+	*N32*)
+	  LD="${LD-ld} -n32"
+	  ;;
+	*64-bit*)
+	  LD="${LD-ld} -64"
+	  ;;
+      esac
+    fi
+  fi
+  rm -rf conftest*
   ;;
-esac
 
-# Sed substitution that helps us do robust quoting.  It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e 1s/^X//'
-sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
+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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+      *32-bit*)
+	case $host in
+	  x86_64-*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*
+  ;;
 
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  { $as_echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+     cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
 
-# Constants:
-rm="rm -f"
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  lt_cv_cc_needs_belf=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
+	lt_cv_cc_needs_belf=no
+fi
 
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+     ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$AR"; then
-  ac_cv_prog_AR="$AR" # Let the user override the test.
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+sparc*-*solaris*)
+  # Find out which ABI we are using.
+  echo 'int i;' > conftest.$ac_ext
+  if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+    case `/usr/bin/file conftest.o` in
+    *64-bit*)
+      case $lt_cv_prog_gnu_ld in
+      yes*) LD="${LD-ld} -m elf64_sparc" ;;
+      *)
+	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"
+
+
+  case $host_os in
+    rhapsody* | darwin*)
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$DSYMUTIL"; then
+  ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -9188,37 +10131,39 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_AR="${ac_tool_prefix}ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
-  echo "$as_me:$LINENO: result: $AR" >&5
-echo "${ECHO_T}$AR" >&6
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+  { $as_echo "$as_me:$LINENO: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 fi
-if test -z "$ac_cv_prog_AR"; then
-  ac_ct_AR=$AR
-  # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+  ac_ct_DSYMUTIL=$DSYMUTIL
+  # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_AR"; then
-  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+  if test -n "$ac_ct_DSYMUTIL"; then
+  ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -9226,41 +10171,51 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_AR="ar"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
-  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false"
 fi
 fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
-  echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
-echo "${ECHO_T}$ac_ct_AR" >&6
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  AR=$ac_ct_AR
+  if test "x$ac_ct_DSYMUTIL" = x; then
+    DSYMUTIL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    DSYMUTIL=$ac_ct_DSYMUTIL
+  fi
 else
-  AR="$ac_cv_prog_AR"
+  DSYMUTIL="$ac_cv_prog_DSYMUTIL"
 fi
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+  if test -n "$NMEDIT"; then
+  ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -9268,37 +10223,39 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
-RANLIB=$ac_cv_prog_RANLIB
-if test -n "$RANLIB"; then
-  echo "$as_me:$LINENO: result: $RANLIB" >&5
-echo "${ECHO_T}$RANLIB" >&6
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+  { $as_echo "$as_me:$LINENO: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 fi
-if test -z "$ac_cv_prog_RANLIB"; then
-  ac_ct_RANLIB=$RANLIB
-  # Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_NMEDIT"; then
+  ac_ct_NMEDIT=$NMEDIT
+  # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_RANLIB"; then
-  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+  if test -n "$ac_ct_NMEDIT"; then
+  ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -9306,41 +10263,51 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_RANLIB="ranlib"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_NMEDIT="nmedit"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
-  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
 fi
 fi
-ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
-if test -n "$ac_ct_RANLIB"; then
-  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
-echo "${ECHO_T}$ac_ct_RANLIB" >&6
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  RANLIB=$ac_ct_RANLIB
+  if test "x$ac_ct_NMEDIT" = x; then
+    NMEDIT=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    NMEDIT=$ac_ct_NMEDIT
+  fi
 else
-  RANLIB="$ac_cv_prog_RANLIB"
+  NMEDIT="$ac_cv_prog_NMEDIT"
 fi
 
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+  if test -n "$LIPO"; then
+  ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -9348,37 +10315,39 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
 fi
 fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  echo "$as_me:$LINENO: result: $STRIP" >&5
-echo "${ECHO_T}$STRIP" >&6
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+  { $as_echo "$as_me:$LINENO: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+
 fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+if test -z "$ac_cv_prog_LIPO"; then
+  ac_ct_LIPO=$LIPO
+  # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+  if test -n "$ac_ct_LIPO"; then
+  ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
 else
 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 for as_dir in $PATH
@@ -9386,1134 +10355,936 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
   for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_LIPO="lipo"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
   fi
 done
 done
+IFS=$as_save_IFS
 
-  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
 fi
 fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-echo "${ECHO_T}$ac_ct_STRIP" >&6
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
-  STRIP=$ac_ct_STRIP
+  if test "x$ac_ct_LIPO" = x; then
+    LIPO=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    LIPO=$ac_ct_LIPO
+  fi
 else
-  STRIP="$ac_cv_prog_STRIP"
+  LIPO="$ac_cv_prog_LIPO"
 fi
 
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$OTOOL"; then
+  ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$SED" && SED=sed
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+  { $as_echo "$as_me:$LINENO: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
 
-if test -n "$RANLIB"; then
-  case $host_os in
-  openbsd*)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
-    ;;
-  *)
-    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
-    ;;
-  esac
-  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
 fi
-
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
+if test -z "$ac_cv_prog_OTOOL"; then
+  ac_ct_OTOOL=$OTOOL
+  # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL"; then
+  ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL="otool"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
 done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
+done
+IFS=$as_save_IFS
 
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
-  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
-    echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
 else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/${ac_tool_prefix}file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    $EGREP "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
+  if test "x$ac_ct_OTOOL" = x; then
+    OTOOL=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    OTOOL=$ac_ct_OTOOL
+  fi
+else
+  OTOOL="$ac_cv_prog_OTOOL"
 fi
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
+    if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
+  if test -n "$OTOOL64"; then
+  ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-if test -z "$lt_cv_path_MAGIC_CMD"; then
-  if test -n "$ac_tool_prefix"; then
-    echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+  { $as_echo "$as_me:$LINENO: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
 else
-  case $MAGIC_CMD in
-[\\/*] |  ?:[\\/]*)
-  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
-  ;;
-*)
-  lt_save_MAGIC_CMD="$MAGIC_CMD"
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
-  for ac_dir in $ac_dummy; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/file; then
-      lt_cv_path_MAGIC_CMD="$ac_dir/file"
-      if test -n "$file_magic_test_file"; then
-	case $deplibs_check_method in
-	"file_magic "*)
-	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
-	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
-	    $EGREP "$file_magic_regex" > /dev/null; then
-	    :
-	  else
-	    cat <<EOF 1>&2
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such.  This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem.  Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool at gnu.org
 
-EOF
-	  fi ;;
-	esac
-      fi
-      break
-    fi
-  done
-  IFS="$lt_save_ifs"
-  MAGIC_CMD="$lt_save_MAGIC_CMD"
-  ;;
-esac
 fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+  ac_ct_OTOOL64=$OTOOL64
+  # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_OTOOL64"; then
+  ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_OTOOL64="otool64"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
-  echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+  if test "x$ac_ct_OTOOL64" = x; then
+    OTOOL64=":"
   else
-    MAGIC_CMD=:
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    OTOOL64=$ac_ct_OTOOL64
   fi
+else
+  OTOOL64="$ac_cv_prog_OTOOL64"
 fi
 
-  fi
-  ;;
-esac
 
-enable_dlopen=no
-enable_win32_dll=no
 
-# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then
-  enableval="$enable_libtool_lock"
 
-fi;
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
 
 
-# Check whether --with-pic or --without-pic was given.
-if test "${with_pic+set}" = set; then
-  withval="$with_pic"
-  pic_mode="$withval"
-else
-  pic_mode=default
-fi;
-test -z "$pic_mode" && pic_mode=default
 
-# Use C for the default configuration in the libtool script
-tagname=
-lt_save_CC="$CC"
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-# Source file extension for C test sources.
-ac_ext=c
 
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}\n'
 
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
 
 
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
 
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
 
 
 
-lt_prog_compiler_no_builtin_flag=
 
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
 
 
-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9692: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:9696: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $rm conftest*
 
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
 
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+    { $as_echo "$as_me:$LINENO: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-    :
+  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" >&5
+	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+        _lt_result=$?
+	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+	  lt_cv_apple_cc_single_mod=yes
+	else
+	  cat conftest.err >&5
+	fi
+	rm -rf libconftest.dylib*
+	rm -f conftest.*
+      fi
 fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+    { $as_echo "$as_me:$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_n "(cached) " >&6
+else
+  lt_cv_ld_exported_symbols_list=no
+      save_LDFLAGS=$LDFLAGS
+      echo "_main" > conftest.sym
+      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+      cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-fi
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
 
-lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  lt_cv_ld_exported_symbols_list=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+	lt_cv_ld_exported_symbols_list=no
+fi
 
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl='-Wl,'
-    lt_prog_compiler_static='-static'
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+	LDFLAGS="$save_LDFLAGS"
 
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
     case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
+    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" != ":"; then
+      _lt_dsymutil='~$DSYMUTIL $lib || :'
+    else
+      _lt_dsymutil=
+    fi
+    ;;
+  esac
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic='-fno-common'
-      ;;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
 
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_header_stdc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared=no
-      enable_shared=no
-      ;;
+	ac_cv_header_stdc=no
+fi
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	lt_prog_compiler_pic=-Kconform_pic
-      fi
-      ;;
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	lt_prog_compiler_pic='-fPIC'
-	;;
-      esac
-      ;;
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
 
-    *)
-      lt_prog_compiler_pic='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static='-Bstatic'
-      else
-	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         lt_prog_compiler_pic='-qnocommon'
-         lt_prog_compiler_wl='-Wl,'
-         ;;
-       esac
-       ;;
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic='-DDLL_EXPORT'
-      ;;
+fi
 
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	lt_prog_compiler_pic='+Z'
-	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static='${wl}-a ${wl}archive'
-      ;;
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
 
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static='-non_shared'
-      ;;
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
 
-    newsos6)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+fi
 
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='-KPIC'
-	lt_prog_compiler_static='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	lt_prog_compiler_wl='-Wl,'
-	lt_prog_compiler_pic='-fpic'
-	lt_prog_compiler_static='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static='-non_shared'
-        ;;
-      esac
-      ;;
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
 
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static='-non_shared'
-      ;;
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    solaris*)
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-	lt_prog_compiler_wl='-Qoption ld ';;
-      *)
-	lt_prog_compiler_wl='-Wl,';;
-      esac
-      ;;
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
 
-    sunos4*)
-      lt_prog_compiler_wl='-Qoption ld '
-      lt_prog_compiler_pic='-PIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
 
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	lt_prog_compiler_pic='-Kconform_pic'
-	lt_prog_compiler_static='-Bstatic'
-      fi
-      ;;
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
 
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_pic='-KPIC'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
+fi
 
-    unicos*)
-      lt_prog_compiler_wl='-Wl,'
-      lt_prog_compiler_can_build_shared=no
-      ;;
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
 
-    uts4*)
-      lt_prog_compiler_pic='-pic'
-      lt_prog_compiler_static='-Bstatic'
-      ;;
 
-    *)
-      lt_prog_compiler_can_build_shared=no
-      ;;
-    esac
-  fi
 
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic" >&6
 
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
 
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:9960: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:9964: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works=yes
-     fi
-   fi
-   $rm conftest*
 
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
 
-if test x"$lt_prog_compiler_pic_works" = xyes; then
-    case $lt_prog_compiler_pic in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
-     esac
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-    lt_prog_compiler_pic=
-     lt_prog_compiler_can_build_shared=no
-fi
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
 
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic=
-    ;;
-  *)
-    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
-    ;;
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
 else
-  lt_prog_compiler_static_works=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works=yes
-       fi
-     else
-       lt_prog_compiler_static_works=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	eval "$as_ac_Header=no"
 fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
 
-if test x"$lt_prog_compiler_static_works" = xyes; then
-    :
-else
-    lt_prog_compiler_static=
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-
-
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:10064: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:10068: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
 fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6
 
+done
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
 
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
 
-  runpath_var=
-  allow_undefined_flag=
-  enable_shared_with_static_runtimes=no
-  archive_cmds=
-  archive_expsym_cmds=
-  old_archive_From_new_cmds=
-  old_archive_from_expsyms_cmds=
-  export_dynamic_flag_spec=
-  whole_archive_flag_spec=
-  thread_safe_flag_spec=
-  hardcode_libdir_flag_spec=
-  hardcode_libdir_flag_spec_ld=
-  hardcode_libdir_separator=
-  hardcode_direct=no
-  hardcode_minus_L=no
-  hardcode_shlibpath_var=unsupported
-  link_all_deplibs=unknown
-  hardcode_automatic=no
-  module_cmds=
-  module_expsym_cmds=
-  always_export_symbols=no
-  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
+for ac_header in dlfcn.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
 
-  ld_shlibs=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	whole_archive_flag_spec=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
+	eval "$as_ac_Header=no"
+fi
 
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	ld_shlibs=no
-	cat <<EOF 1>&2
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+fi
 
-EOF
-      fi
-      ;;
+done
 
-    amigaos*)
-      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
 
-      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs=no
-      ;;
 
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	allow_undefined_flag=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec='-L$libdir'
-      allow_undefined_flag=unsupported
-      always_export_symbols=no
-      enable_shared_with_static_runtimes=yes
-      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:$LINENO: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
 
-    interix3*)
-      hardcode_direct=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	tmp_addflag=
-	case $cc_basename,$host_cpu in
-	pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag'
-	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag -Mnomain' ;;
-	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
-	  tmp_addflag=' -i_dynamic' ;;
-	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
-	  tmp_addflag=' -i_dynamic -nofor_main' ;;
-	ifc* | ifort*)			# Intel Fortran compiler
-	  tmp_addflag=' -nofor_main' ;;
-	esac
-	archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-	if test $supports_anon_versioning = yes; then
-	  archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-	fi
-      else
-	ld_shlibs=no
-      fi
-      ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
+  test -n "$ac_ct_CXX" && break
+done
 
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-	ld_shlibs=no
-	cat <<EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
-
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-	ld_shlibs=no
-	cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
-	;;
-	*)
-	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-	  else
-	    ld_shlibs=no
-	  fi
-	;;
-      esac
-      ;;
-
-    sunos4*)
-      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
-
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs=no
-      fi
-      ;;
-    esac
-
-    if test "$ld_shlibs" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec=
-      export_dynamic_flag_spec=
-      whole_archive_flag_spec=
-    fi
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
   else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag=unsupported
-      always_export_symbols=yes
-      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	hardcode_direct=unsupported
-      fi
-      ;;
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    CXX=$ac_ct_CXX
+  fi
+fi
 
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-	else
-	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-	fi
-	aix_use_runtimelinking=no
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
 
-	# Test if we are trying to use run time linking or normal
-	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
-	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-	  for ld_flag in $LDFLAGS; do
-  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-  	    aix_use_runtimelinking=yes
-  	    break
-  	  fi
-	  done
-	  ;;
-	esac
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
 
-      # 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.
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-      archive_cmds=''
-      hardcode_direct=yes
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
+	ac_compiler_gnu=no
+fi
 
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[012]|aix4.[012].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" && \
-  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	  then
-  	  # We have reworked collect2
-  	  hardcode_direct=yes
-	  else
-  	  # We have old collect2
-  	  hardcode_direct=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  hardcode_minus_L=yes
-  	  hardcode_libdir_flag_spec='-L$libdir'
-  	  hardcode_libdir_separator=
-	  fi
-	  ;;
-	esac
-	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
-	fi
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-  	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
-	  else
-	    shared_flag='${wl}-bM:SRE'
-	  fi
-	fi
-      fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
 
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols=yes
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	allow_undefined_flag='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+$as_echo_n "checking whether $CXX accepts -g... " >&6; }
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -10536,53 +11307,31 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-	archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
-	  allow_undefined_flag="-z nodefs"
-	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # Determine the default libpath from the value encoded in an empty executable.
-	 cat >conftest.$ac_ext <<_ACEOF
+	CXXFLAGS=""
+      cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -10605,3063 +11354,2242 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
-	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag=' ${wl}-bernotok'
-	  allow_undefined_flag=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec='$convenience'
-	  archive_cmds_need_lc=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-	fi
-      fi
-      ;;
+	ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-    amigaos*)
-      archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs=no
-      ;;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
 
-    bsdi[45]*)
-      export_dynamic_flag_spec=-rdynamic
-      ;;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_cxx_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec=' '
-      allow_undefined_flag=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes=yes
-      ;;
 
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc=no
-      hardcode_direct=no
-      hardcode_automatic=yes
-      hardcode_shlibpath_var=unsupported
-      whole_archive_flag_spec=''
-      link_all_deplibs=yes
-    if test "$GCC" = yes ; then
-    	output_verbose_link_cmd='echo'
-        archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs=no
-          ;;
-      esac
-    fi
-      ;;
+fi
 
-    dgux*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
-    freebsd1*)
-      ld_shlibs=no
-      ;;
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
+depcc="$CXX"  am_compiler_list=
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu | dragonfly*)
-      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
+{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
 
-    hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-	archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_direct=yes
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
 
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L=yes
-      export_dynamic_flag_spec='${wl}-E'
-      ;;
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+      # Solaris 8's {/usr,}/bin/sh.
+      touch sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
       else
-	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator=:
-
-	hardcode_direct=yes
-	export_dynamic_flag_spec='${wl}-E'
-
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	hardcode_minus_L=yes
+	break
       fi
       ;;
-
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      else
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
+    msvisualcpp | msvcmsys)
+      # 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.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
       fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator=:
+    fi
+  done
 
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  hardcode_libdir_flag_spec_ld='+b $libdir'
-	  hardcode_direct=no
-	  hardcode_shlibpath_var=no
-	  ;;
-	*)
-	  hardcode_direct=yes
-	  export_dynamic_flag_spec='${wl}-E'
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
 
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  hardcode_minus_L=yes
-	  ;;
-	esac
-      fi
-      ;;
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_ld='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      link_all_deplibs=yes
-      ;;
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      ;;
 
-    newsos6)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct=yes
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      hardcode_shlibpath_var=no
-      ;;
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+    (test "X$CXX" != "Xg++"))) ; then
+  ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    openbsd*)
-      hardcode_direct=yes
-      hardcode_shlibpath_var=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	export_dynamic_flag_spec='${wl}-E'
-      else
-       case $host_os in
-	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	   archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	   hardcode_libdir_flag_spec='-R$libdir'
-	   ;;
-	 *)
-	   archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	   hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
-	   ;;
-       esac
-      fi
-      ;;
+  # Broken: fails on valid input.
+continue
+fi
 
-    os2*)
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_minus_L=yes
-      allow_undefined_flag=unsupported
-      archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
+rm -f conftest.err conftest.$ac_ext
 
-    osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator=:
-      ;;
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
-      else
-	allow_undefined_flag=' -expect_unresolved \*'
-	archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
 
-	# Both c and cxx compiler support -rpath directly
-	hardcode_libdir_flag_spec='-rpath $libdir'
-      fi
-      hardcode_libdir_separator=:
-      ;;
+rm -f conftest.err conftest.$ac_ext
 
-    solaris*)
-      no_undefined_flag=' -z text'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-	wlarc=''
-	archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec='-R$libdir'
-      hardcode_shlibpath_var=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
- 	# The compiler driver will combine linker options so we
- 	# cannot just pass the convience library names through
- 	# without $wl, iff we do not link with $LD.
- 	# Luckily, gcc supports the same syntax we need for Sun Studio.
- 	# Supported since Solaris 2.6 (maybe 2.5.1?)
- 	case $wlarc in
- 	'')
- 	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- 	*)
- 	  whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- 	esac ;;
-      esac
-      link_all_deplibs=yes
-      ;;
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
 
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-	# Use $CC to link under sequent, because it throws in some extra .o
-	# files that make .init and .fini sections work.
-	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_direct=yes
-      hardcode_minus_L=yes
-      hardcode_shlibpath_var=no
-      ;;
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
 
-    sysv4)
-      case $host_vendor in
-	sni)
-	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct=yes # is this really true???
-	;;
-	siemens)
-	  ## LD is ld it makes a PLAMLIB
-	  ## CC just makes a GrossModule.
-	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  reload_cmds='$CC -r -o $output$reload_objs'
-	  hardcode_direct=no
-        ;;
-	motorola)
-	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
-	;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var=no
-      ;;
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+{ $as_echo "$as_me:$LINENO: result: $CXXCPP" >&5
+$as_echo "$CXXCPP" >&6; }
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    sysv4.3*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var=no
-      export_dynamic_flag_spec='-Bexport'
-      ;;
+  # Broken: fails on valid input.
+continue
+fi
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_shlibpath_var=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	ld_shlibs=yes
-      fi
-      ;;
+rm -f conftest.err conftest.$ac_ext
 
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      no_undefined_flag='${wl}-z,text'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      runpath_var='LD_RUN_PATH'
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  # Broken: success on invalid input.
+continue
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
 
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag='${wl}-z,text'
-      allow_undefined_flag='${wl}-z,nodefs'
-      archive_cmds_need_lc=no
-      hardcode_shlibpath_var=no
-      hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator=':'
-      link_all_deplibs=yes
-      export_dynamic_flag_spec='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
+rm -f conftest.err conftest.$ac_ext
 
-      if test "$GCC" = yes; then
-	archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+_lt_caught_CXX_error=yes; }
+fi
 
-    uts4*)
-      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec='-L$libdir'
-      hardcode_shlibpath_var=no
-      ;;
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-    *)
-      ld_shlibs=no
-      ;;
-    esac
+else
+  _lt_caught_CXX_error=yes
+fi
+
+
+
+
+ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
+  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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_FC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$FC"; then
+  ac_cv_prog_FC="$FC" # 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_FC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
   fi
+done
+done
+IFS=$as_save_IFS
 
-echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6
-test "$ld_shlibs" = no && can_build_shared=no
+fi
+fi
+FC=$ac_cv_prog_FC
+if test -n "$FC"; then
+  { $as_echo "$as_me:$LINENO: result: $FC" >&5
+$as_echo "$FC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+    test -n "$FC" && break
+  done
+fi
+if test -z "$FC"; then
+  ac_ct_FC=$FC
+  for ac_prog in gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn xlf90 f90 pgf90 pghpf epcf90 g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77
+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:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_FC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_FC"; then
+  ac_cv_prog_ac_ct_FC="$ac_ct_FC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_FC="$ac_prog"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
+fi
+fi
+ac_ct_FC=$ac_cv_prog_ac_ct_FC
+if test -n "$ac_ct_FC"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_FC" >&5
+$as_echo "$ac_ct_FC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_FC" && break
+done
+
+  if test "x$ac_ct_FC" = x; then
+    FC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$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
+    FC=$ac_ct_FC
+  fi
+fi
+
+
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for Fortran compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler --version >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl
-	pic_flag=$lt_prog_compiler_pic
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag
-        allow_undefined_flag=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -v >&5") 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }
-        then
-	  archive_cmds_need_lc=no
-        else
-	  archive_cmds_need_lc=yes
-        fi
-        allow_undefined_flag=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
-echo "${ECHO_T}$archive_cmds_need_lc" >&6
-      ;;
-    esac
-  fi
-  ;;
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compiler -V >&5") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+rm -f a.out
 
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.  (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU Fortran compiler" >&5
+$as_echo_n "checking whether we are using the GNU Fortran compiler... " >&6; }
+if test "${ac_cv_fc_compiler_gnu+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
 
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_compiler_gnu=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
+	ac_compiler_gnu=no
+fi
 
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_fc_compiler_gnu=$ac_compiler_gnu
 
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_fc_compiler_gnu" >&5
+$as_echo "$ac_cv_fc_compiler_gnu" >&6; }
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FCFLAGS+set}
+ac_save_FFLAGS=$FCFLAGS
+FCFLAGS=
+{ $as_echo "$as_me:$LINENO: checking whether $FC accepts -g" >&5
+$as_echo_n "checking whether $FC accepts -g... " >&6; }
+if test "${ac_cv_prog_fc_g+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  FCFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_cv_prog_fc_g=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_prog_fc_g=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_fc_g" >&5
+$as_echo "$ac_cv_prog_fc_g" >&6; }
+if test "$ac_test_FFLAGS" = set; then
+  FCFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_fc_g = yes; then
+  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+    FCFLAGS="-g -O2"
   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
+    FCFLAGS="-g"
   fi
-  ;;
+else
+  if test "x$ac_cv_fc_compiler_gnu" = xyes; then
+    FCFLAGS="-O2"
+  else
+    FCFLAGS=
+  fi
+fi
 
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-  ;;
+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
 
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
+if test -z "$FC" || test "X$FC" = "Xno"; then
+  _lt_disable_FC=yes
+fi
 
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
 
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
 
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+# Set options
+
+
+
+        enable_dlopen=no
+
+
+  enable_win32_dll=no
+
+
+            # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval=$enable_shared; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_shared=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
       ;;
     esac
-    ;;
+else
+  enable_shared=yes
+fi
 
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
-  esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
 
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
 
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
 
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
 
-gnu*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  ;;
-
-hpux9* | hpux10* | hpux11*)
-  # Give a soname corresponding to the major version so that dld.sl refuses to
-  # link against other versions.
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  case $host_cpu in
-  ia64*)
-    shrext_cmds='.so'
-    hardcode_into_libs=yes
-    dynamic_linker="$host_os dld.so"
-    shlibpath_var=LD_LIBRARY_PATH
-    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    if test "X$HPUX_IA64_MODE" = X32; then
-      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
-    else
-      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
-    fi
-    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-    ;;
-   hppa*64*)
-     shrext_cmds='.sl'
-     hardcode_into_libs=yes
-     dynamic_linker="$host_os dld.sl"
-     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
-     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
-     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-     soname_spec='${libname}${release}${shared_ext}$major'
-     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
-     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
-     ;;
-   *)
-    shrext_cmds='.sl'
-    dynamic_linker="$host_os dld.sl"
-    shlibpath_var=SHLIB_PATH
-    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    ;;
-  esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
-  postinstall_cmds='chmod 555 $lib'
-  ;;
 
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
 
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
+  # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval=$enable_static; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
     *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
-	else
-		version_type=irix
-	fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
+     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
-    ;;
-  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
-  ;;
+else
+  enable_static=yes
+fi
 
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
 
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 11549 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
 
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
-  fi
 
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
-  # powerpc, because MkLinux only supported shared libraries with the
-  # GNU dynamic linker.  Since this was broken with cross compilers,
-  # most powerpc-linux boxes support dynamic linking these days and
-  # people can always --disable-shared, the test was removed, and we
-  # assume the GNU/Linux dynamic linker is in use.
-  dynamic_linker='GNU/Linux ld.so'
-  ;;
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
 
-netbsd*)
-  version_type=sunos
-  need_lib_prefix=no
-  need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-    dynamic_linker='NetBSD (a.out) ld.so'
-  else
-    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-    soname_spec='${libname}${release}${shared_ext}$major'
-    dynamic_linker='NetBSD ld.elf_so'
-  fi
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  ;;
 
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
 
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
 
-openbsd*)
-  version_type=sunos
-  sys_lib_dlsearch_path_spec="/usr/lib"
-  need_lib_prefix=no
-  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
-  case $host_os in
-    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
-    *)                         need_version=no  ;;
-  esac
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-    case $host_os in
-      openbsd2.[89] | openbsd2.[89].*)
-	shlibpath_overrides_runpath=no
-	;;
-      *)
-	shlibpath_overrides_runpath=yes
-	;;
-      esac
-  else
-    shlibpath_overrides_runpath=yes
-  fi
-  ;;
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then
+  withval=$with_pic; pic_mode="$withval"
+else
+  pic_mode=default
+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"
-  ;;
+test -z "$pic_mode" && pic_mode=default
 
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
 
-sunos4*)
-  version_type=sunos
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
-  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  if test "$with_gnu_ld" = yes; then
-    need_lib_prefix=no
-  fi
-  need_version=yes
-  ;;
 
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
 
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-	;;
+
+
+  # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval=$enable_fast_install; p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+	IFS="$lt_save_ifs"
+	if test "X$pkg" = "X$p"; then
+	  enable_fast_install=yes
+	fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
     esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
+else
+  enable_fast_install=yes
+fi
 
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
 
-*)
-  dynamic_linker=no
-  ;;
-esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
-test "$dynamic_linker" = no && can_build_shared=no
 
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
-  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
 
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
-   test -n "$runpath_var" || \
-   test "X$hardcode_automatic" = "Xyes" ; then
 
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no &&
-     test "$hardcode_minus_L" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6
 
-if test "$hardcode_action" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
 
-striplib=
-old_striplib=
-echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
-echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6
-if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
-  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
-  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-# FIXME - insert some real tests, host_os isn't really good enough
-  case $host_os in
-   darwin*)
-       if test -n "$STRIP" ; then
-         striplib="$STRIP -x"
-         echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-       else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-       ;;
-   *)
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-    ;;
-  esac
-fi
 
-if test "x$enable_dlopen" != xyes; then
-  enable_dlopen=unknown
-  enable_dlopen_self=unknown
-  enable_dlopen_self_static=unknown
-else
-  lt_cv_dlopen=no
-  lt_cv_dlopen_libs=
 
-  case $host_os in
-  beos*)
-    lt_cv_dlopen="load_add_on"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
-    ;;
 
-  mingw* | pw32*)
-    lt_cv_dlopen="LoadLibrary"
-    lt_cv_dlopen_libs=
-   ;;
 
-  cygwin*)
-    lt_cv_dlopen="dlopen"
-    lt_cv_dlopen_libs=
-   ;;
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
 
-  darwin*)
-  # if libdl is installed we need to link against it
-    echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
 
-    lt_cv_dlopen="dyld"
-    lt_cv_dlopen_libs=
-    lt_cv_dlopen_self=yes
 
-fi
 
-   ;;
 
-  *)
-    echo "$as_me:$LINENO: checking for shl_load" >&5
-echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
-if test "${ac_cv_func_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define shl_load innocuous_shl_load
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char shl_load (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef shl_load
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char shl_load ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_shl_load) || defined (__stub___shl_load)
-choke me
-#else
-char (*f) () = shl_load;
-#endif
-#ifdef __cplusplus
-}
-#endif
 
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-return f != shl_load;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
-echo "${ECHO_T}$ac_cv_func_shl_load" >&6
-if test $ac_cv_func_shl_load = yes; then
-  lt_cv_dlopen="shl_load"
-else
-  echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
-echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char shl_load ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-shl_load ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dld_shl_load=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_dld_shl_load=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
-if test $ac_cv_lib_dld_shl_load = yes; then
-  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
-else
-  echo "$as_me:$LINENO: checking for dlopen" >&5
-echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
-if test "${ac_cv_func_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define dlopen innocuous_dlopen
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char dlopen (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef dlopen
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_dlopen) || defined (__stub___dlopen)
-choke me
-#else
-char (*f) () = dlopen;
-#endif
-#ifdef __cplusplus
-}
-#endif
 
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-return f != dlopen;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_func_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_func_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
-echo "${ECHO_T}$ac_cv_func_dlopen" >&6
-if test $ac_cv_func_dlopen = yes; then
-  lt_cv_dlopen="dlopen"
-else
-  echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
-echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dl_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_dl_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
-if test $ac_cv_lib_dl_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-  echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
-echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dlopen ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-dlopen ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_svld_dlopen=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_svld_dlopen=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+   setopt NO_GLOB_SUBST
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
-echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
-if test $ac_cv_lib_svld_dlopen = yes; then
-  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+
+{ $as_echo "$as_me:$LINENO: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
-echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+  lt_cv_objdir=.libs
 else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+  # MS-DOS does not allow filenames that begin with a dot.
+  lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char dld_link ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-dld_link ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_dld_dld_link=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_dld_dld_link=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
-echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
-if test $ac_cv_lib_dld_dld_link = yes; then
-  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
-fi
 
 
-fi
 
 
-fi
 
 
-fi
 
 
-fi
 
 
-fi
 
-    ;;
-  esac
 
-  if test "x$lt_cv_dlopen" != xno; then
-    enable_dlopen=yes
-  else
-    enable_dlopen=no
+
+
+
+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
 
-  case $lt_cv_dlopen in
-  dlopen)
-    save_CPPFLAGS="$CPPFLAGS"
-    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+# Sed substitution that helps us do robust quoting.  It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
 
-    save_LDFLAGS="$LDFLAGS"
-    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
 
-    save_LIBS="$LIBS"
-    LIBS="$lt_cv_dlopen_libs $LIBS"
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
 
-    echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
-echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  	  if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self=cross
-else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 12502 "configure"
-#include "confdefs.h"
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
 
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
 
-#include <stdio.h>
+# Global variables:
+ofile=libtool
+can_build_shared=yes
 
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
 
-/* 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
+with_gnu_ld="$lt_cv_prog_gnu_ld"
 
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
 
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
+# 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
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
+for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
-    exit (status);
-}
-EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self=no
-  fi
-fi
-rm -fr conftest*
 
+# 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
+    { $as_echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_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
 fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self" >&6
 
-    if test "x$lt_cv_dlopen_self" = xyes; then
-      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
-      echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
-echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
-if test "${lt_cv_dlopen_self_static+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  	  if test "$cross_compiling" = yes; then :
-  lt_cv_dlopen_self_static=cross
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
 else
-  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-  lt_status=$lt_dlunknown
-  cat > conftest.$ac_ext <<EOF
-#line 12602 "configure"
-#include "confdefs.h"
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
 
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
 
-#include <stdio.h>
 
-#ifdef RTLD_GLOBAL
-#  define LT_DLGLOBAL		RTLD_GLOBAL
-#else
-#  ifdef DL_GLOBAL
-#    define LT_DLGLOBAL		DL_GLOBAL
-#  else
-#    define LT_DLGLOBAL		0
-#  endif
-#endif
 
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
-   find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-#  ifdef RTLD_LAZY
-#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
-#  else
-#    ifdef DL_LAZY
-#      define LT_DLLAZY_OR_NOW		DL_LAZY
-#    else
-#      ifdef RTLD_NOW
-#        define LT_DLLAZY_OR_NOW	RTLD_NOW
-#      else
-#        ifdef DL_NOW
-#          define LT_DLLAZY_OR_NOW	DL_NOW
-#        else
-#          define LT_DLLAZY_OR_NOW	0
-#        endif
-#      endif
-#    endif
-#  endif
-#endif
 
-#ifdef __cplusplus
-extern "C" void exit (int);
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
-  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
-  int status = $lt_dlunknown;
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    { $as_echo "$as_me:$LINENO: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $MAGIC_CMD in
+[\\/*] |  ?:[\\/]*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+*)
+  lt_save_MAGIC_CMD="$MAGIC_CMD"
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+  for ac_dir in $ac_dummy; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    $EGREP "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <<_LT_EOF 1>&2
 
-  if (self)
-    {
-      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
-      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
-      /* dlclose (self); */
-    }
-  else
-    puts (dlerror ());
+*** 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
 
-    exit (status);
-}
-EOF
-  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
-    (./conftest; exit; ) >&5 2>/dev/null
-    lt_status=$?
-    case x$lt_status in
-      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
-      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
-    esac
-  else :
-    # compilation failed
-    lt_cv_dlopen_self_static=no
-  fi
+_LT_EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$lt_save_ifs"
+  MAGIC_CMD="$lt_save_MAGIC_CMD"
+  ;;
+esac
 fi
-rm -fr conftest*
-
 
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  { $as_echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
-echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
-    fi
-
-    CPPFLAGS="$save_CPPFLAGS"
-    LDFLAGS="$save_LDFLAGS"
-    LIBS="$save_LIBS"
-    ;;
-  esac
 
-  case $lt_cv_dlopen_self in
-  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
-  *) enable_dlopen_self=unknown ;;
-  esac
 
-  case $lt_cv_dlopen_self_static in
-  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
-  *) enable_dlopen_self_static=unknown ;;
-  esac
+  else
+    MAGIC_CMD=:
+  fi
 fi
 
-
-# Report which library types will actually be built
-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
-
-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
-test "$can_build_shared" = "no" && enable_shared=no
-
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
   fi
   ;;
-
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-    ;;
 esac
-echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
-
-echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler \
-    CC \
-    LD \
-    lt_prog_compiler_wl \
-    lt_prog_compiler_pic \
-    lt_prog_compiler_static \
-    lt_prog_compiler_no_builtin_flag \
-    export_dynamic_flag_spec \
-    thread_safe_flag_spec \
-    whole_archive_flag_spec \
-    enable_shared_with_static_runtimes \
-    old_archive_cmds \
-    old_archive_from_new_cmds \
-    predep_objects \
-    postdep_objects \
-    predeps \
-    postdeps \
-    compiler_lib_search_path \
-    archive_cmds \
-    archive_expsym_cmds \
-    postinstall_cmds \
-    postuninstall_cmds \
-    old_archive_from_expsyms_cmds \
-    allow_undefined_flag \
-    no_undefined_flag \
-    export_symbols_cmds \
-    hardcode_libdir_flag_spec \
-    hardcode_libdir_flag_spec_ld \
-    hardcode_libdir_separator \
-    hardcode_automatic \
-    module_cmds \
-    module_expsym_cmds \
-    lt_cv_prog_compiler_c_o \
-    exclude_expsyms \
-    include_expsyms; do
-
-    case $var in
-    old_archive_cmds | \
-    old_archive_from_new_cmds | \
-    archive_cmds | \
-    archive_expsym_cmds | \
-    module_cmds | \
-    module_expsym_cmds | \
-    old_archive_from_expsyms_cmds | \
-    export_symbols_cmds | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
-
-cfgfile="${ofile}T"
-  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
-  $rm -f "$cfgfile"
-  { echo "$as_me:$LINENO: creating $ofile" >&5
-echo "$as_me: creating $ofile" >&6;}
+# Use C for the default configuration in the libtool script
 
-  cat <<__EOF__ >> "$cfgfile"
-#! $SHELL
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
-#
-# This file is part of GNU Libtool:
-# Originally by Gordon Matzigkeit <gord at gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
 
-# A sed program that does not truncate output.
-SED=$lt_SED
+# Source file extension for C test sources.
+ac_ext=c
 
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="$SED -e 1s/^X//"
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
 
-# 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
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
 
-# The names of the tagged configurations supported by this script.
-available_tags=
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
 
-# ### BEGIN LIBTOOL CONFIG
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
+# 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
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
+# save warnings/boilerplate of simple test code
+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*
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
+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*
 
-# A C compiler.
-LTCC=$lt_LTCC
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
+if test -n "$compiler"; then
 
-# A language-specific compiler.
-CC=$lt_compiler
+lt_prog_compiler_no_builtin_flag=
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC
+if test "$GCC" = yes; then
+  lt_prog_compiler_no_builtin_flag=' -fno-builtin'
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
+  { $as_echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_rtti_exceptions=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="-fno-rtti -fno-exceptions"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:12592: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:12596: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_rtti_exceptions=yes
+     fi
+   fi
+   $RM conftest*
 
-# An ERE matcher.
-EGREP=$lt_EGREP
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
 
-# The linker used to build libraries.
-LD=$lt_LD
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+    lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+    :
+fi
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
+fi
 
-# A BSD-compatible nm program.
-NM=$lt_NM
 
-# A symbol stripping program
-STRIP=$lt_STRIP
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
 
-# Used on cygwin: assembler.
-AS="$AS"
+  lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl='-Wl,'
+    lt_prog_compiler_static='-static'
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-pic_mode=$pic_mode
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic='-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_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+      # PIC is the default for these OSes.
+      ;;
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+    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
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic='-fno-common'
+      ;;
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
+    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_prog_compiler_pic='-fPIC'
+	;;
+      esac
+      ;;
 
-# Do we need a version for libraries?
-need_version=$need_version
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared=no
+      enable_shared=no
+      ;;
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic=-Kconform_pic
+      fi
+      ;;
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
+    *)
+      lt_prog_compiler_pic='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static='-Bstatic'
+      else
+	lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+    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).
+      lt_prog_compiler_pic='-DDLL_EXPORT'
+      ;;
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static='${wl}-a ${wl}archive'
+      ;;
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-KPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fPIC'
+	lt_prog_compiler_static='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='--shared'
+	lt_prog_compiler_static='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-fpic'
+	lt_prog_compiler_static='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	lt_prog_compiler_wl='-Wl,'
+	lt_prog_compiler_pic='-qpic'
+	lt_prog_compiler_static='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic='-KPIC'
+	  lt_prog_compiler_static='-Bstatic'
+	  lt_prog_compiler_wl='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # 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=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
 
-# Library versioning type.
-version_type=$version_type
+    newsos6)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic='-fPIC -shared'
+      ;;
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
+    rdos*)
+      lt_prog_compiler_static='-non_shared'
+      ;;
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
+    solaris*)
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl='-Wl,';;
+      esac
+      ;;
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+    sunos4*)
+      lt_prog_compiler_wl='-Qoption ld '
+      lt_prog_compiler_pic='-PIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic='-Kconform_pic'
+	lt_prog_compiler_static='-Bstatic'
+      fi
+      ;;
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_pic='-KPIC'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
+    unicos*)
+      lt_prog_compiler_wl='-Wl,'
+      lt_prog_compiler_can_build_shared=no
+      ;;
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    uts4*)
+      lt_prog_compiler_pic='-pic'
+      lt_prog_compiler_static='-Bstatic'
+      ;;
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    *)
+      lt_prog_compiler_can_build_shared=no
+      ;;
+    esac
+  fi
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic=
+    ;;
+  *)
+    lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+  { $as_echo "$as_me:$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; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+   # Insert the option either (1) after the last *FLAGS variable, or
+   # (2) before a word containing "conftest.", or (3) at the end.
+   # Note that $ac_compile itself does not contain backslashes and begins
+   # with a dollar sign (not a hyphen), so the echo should work correctly.
+   # The option is referenced via a variable to avoid confusing sed.
+   lt_compile=`echo "$ac_compile" | $SED \
+   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+   -e 's:$: $lt_compiler_flag:'`
+   (eval echo "\"\$as_me:12931: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:12935: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works=yes
+     fi
+   fi
+   $RM conftest*
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+    case $lt_prog_compiler_pic in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+     esac
+else
+    lt_prog_compiler_pic=
+     lt_prog_compiler_can_build_shared=no
+fi
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
+fi
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:$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; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   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>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+    :
+else
+    lt_prog_compiler_static=
+fi
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
+  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
+   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:13036: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13040: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
 
-# ### END LIBTOOL CONFIG
 
-__EOF__
 
+  { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-  case $host_os in
-  aix3*)
-    cat <<\EOF >> "$cfgfile"
+   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:13091: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:13095: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
-# AIX sometimes has problems with the GCC collect2 program.  For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
-  COLLECT_NAMES=
-  export COLLECT_NAMES
 fi
-EOF
-    ;;
-  esac
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
 
-  # We use sed instead of cat because bash on DJGPP gets confused if
-  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
-  # text mode, it properly converts lines to CR/LF.  This bash problem
-  # is reportedly fixed, but why not run on old versions too?
-  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
 
-  mv -f "$cfgfile" "$ofile" || \
-    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
-  chmod +x "$ofile"
 
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
   fi
+else
+  need_locks=no
 fi
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
 
-# Check whether --with-tags or --without-tags was given.
-if test "${with_tags+set}" = set; then
-  withval="$with_tags"
-  tagnames="$withval"
-fi;
 
-if test -f "$ltmain" && test -n "$tagnames"; then
-  if test ! -f "${ofile}"; then
-    { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
-  fi
 
-  if test -z "$LTCC"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
-    if test -z "$LTCC"; then
-      { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
-echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
-    else
-      { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
-echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
-    fi
-  fi
-  if test -z "$LTCFLAGS"; then
-    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
-  fi
 
-  # Extract list of available tagged configurations in $ofile.
-  # Note that this assumes the entire list is on one line.
-  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+  { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
-  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
-  for tagname in $tagnames; do
-    IFS="$lt_save_ifs"
-    # Check whether tagname contains only valid characters
-    case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
-    "") ;;
-    *)  { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
-echo "$as_me: error: invalid tag name: $tagname" >&2;}
-   { (exit 1); exit 1; }; }
-	;;
-    esac
+  runpath_var=
+  allow_undefined_flag=
+  always_export_symbols=no
+  archive_cmds=
+  archive_expsym_cmds=
+  compiler_needs_object=no
+  enable_shared_with_static_runtimes=no
+  export_dynamic_flag_spec=
+  export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic=no
+  hardcode_direct=no
+  hardcode_direct_absolute=no
+  hardcode_libdir_flag_spec=
+  hardcode_libdir_flag_spec_ld=
+  hardcode_libdir_separator=
+  hardcode_minus_L=no
+  hardcode_shlibpath_var=unsupported
+  inherit_rpath=no
+  link_all_deplibs=unknown
+  module_cmds=
+  module_expsym_cmds=
+  old_archive_from_new_cmds=
+  old_archive_from_expsyms_cmds=
+  thread_safe_flag_spec=
+  whole_archive_flag_spec=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_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.
+  extract_expsyms_cmds=
 
-    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
-    then
-      { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
-echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
-   { (exit 1); exit 1; }; }
+  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
+    ;;
+  esac
 
-    # Update the list of available tags.
-    if test -n "$tagname"; then
-      echo appending configuration tag \"$tagname\" to $ofile
-
-      case $tagname in
-      CXX)
-	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
-	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
-	    (test "X$CXX" != "Xg++"))) ; then
-	  ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
-
+  ld_shlibs=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
 
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
 
-archive_cmds_need_lc_CXX=no
-allow_undefined_flag_CXX=
-always_export_symbols_CXX=no
-archive_expsym_cmds_CXX=
-export_dynamic_flag_spec_CXX=
-hardcode_direct_CXX=no
-hardcode_libdir_flag_spec_CXX=
-hardcode_libdir_flag_spec_ld_CXX=
-hardcode_libdir_separator_CXX=
-hardcode_minus_L_CXX=no
-hardcode_shlibpath_var_CXX=unsupported
-hardcode_automatic_CXX=no
-module_cmds_CXX=
-module_expsym_cmds_CXX=
-link_all_deplibs_CXX=unknown
-old_archive_cmds_CXX=$old_archive_cmds
-no_undefined_flag_CXX=
-whole_archive_flag_spec_CXX=
-enable_shared_with_static_runtimes_CXX=no
+    # 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
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
 
-# Dependencies to place before and after the object being linked:
-predep_objects_CXX=
-postdep_objects_CXX=
-predeps_CXX=
-postdeps_CXX=
-compiler_lib_search_path_CXX=
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
 
-# Source file extension for C++ test sources.
-ac_ext=cpp
+_LT_EOF
+      fi
+      ;;
 
-# Object file extension for compiled C++ test sources.
-objext=o
-objext_CXX=$objext
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;\n"
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
 
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec='-L$libdir'
+      allow_undefined_flag=unsupported
+      always_export_symbols=no
+      enable_shared_with_static_runtimes=yes
+      export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+    interix[3-9]*)
+      hardcode_direct=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      ;;
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+    gnu* | linux* | tpf* | k*bsd*-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=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec=
+	  tmp_sharedflag='--shared' ;;
+	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	    echo "local: *; };" >> $output_objdir/$libname.ver~
+	    $CC '"$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*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+	  hardcode_libdir_flag_spec=
+	  hardcode_libdir_flag_spec_ld='-rpath $libdir'
+	  archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+	      echo "local: *; };" >> $output_objdir/$libname.ver~
+	      $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs=no
+      fi
+      ;;
 
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
 
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs=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.
 
-# Allow CC to be a program name with arguments.
-lt_save_CC=$CC
-lt_save_LD=$LD
-lt_save_GCC=$GCC
-GCC=$GXX
-lt_save_with_gnu_ld=$with_gnu_ld
-lt_save_path_LD=$lt_cv_path_LD
-if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
-  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
-else
-  $as_unset lt_cv_prog_gnu_ld
-fi
-if test -n "${lt_cv_path_LDCXX+set}"; then
-  lt_cv_path_LD=$lt_cv_path_LDCXX
-else
-  $as_unset lt_cv_path_LD
-fi
-test -z "${LDCXX+set}" || LD=$LDCXX
-CC=${CXX-"c++"}
-compiler=$CC
-compiler_CXX=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
+      ;;
 
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs=no
+	cat <<_LT_EOF 1>&2
 
-# We don't want -fno-exception wen compiling C++ code, so set the
-# no_builtin_flag separately
-if test "$GXX" = yes; then
-  lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
-else
-  lt_prog_compiler_no_builtin_flag_CXX=
-fi
+*** 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.
 
-if test "$GXX" = yes; then
-  # Set up default GNU C++ configuration
+_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
+	    hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+	    archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    ld_shlibs=no
+	  fi
+	;;
+      esac
+      ;;
 
+    sunos4*)
+      archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
 
-# Check whether --with-gnu-ld or --without-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval="$with_gnu_ld"
-  test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi;
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  echo "$as_me:$LINENO: checking for ld used by $CC" >&5
-echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | ?:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the pathname of ld
-      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs=no
+      fi
       ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
-else
-  echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
-fi
-if test "${lt_cv_path_LD+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -z "$LD"; then
-  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-  for ac_dir in $PATH; do
-    IFS="$lt_save_ifs"
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      lt_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some variants of GNU ld only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break
-	;;
-      *)
-	test "$with_gnu_ld" != yes && break
-	;;
-      esac
-    fi
-  done
-  IFS="$lt_save_ifs"
-else
-  lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
-  echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
-if test "${lt_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  lt_cv_prog_gnu_ld=yes
-  ;;
-*)
-  lt_cv_prog_gnu_ld=no
-  ;;
-esac
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-  # Check if GNU C++ uses GNU ld as the underlying linker, since the
-  # archiving commands below assume that GNU ld is being used.
-  if test "$with_gnu_ld" = yes; then
-    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
-    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
-    #     investigate it a little bit more. (MM)
-    wlarc='${wl}'
+    esac
 
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
-	grep 'no-whole-archive' > /dev/null; then
-      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    else
-      whole_archive_flag_spec_CXX=
+    if test "$ld_shlibs" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec=
+      export_dynamic_flag_spec=
+      whole_archive_flag_spec=
     fi
   else
-    with_gnu_ld=no
-    wlarc=
-
-    # A generic and very simple default shared library creation
-    # command for GNU C++ for the case where it uses the native
-    # linker, instead of GNU ld.  If possible, this setting should
-    # overridden to take advantage of the native linker features on
-    # the platform it is being used on.
-    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-  fi
-
-  # Commands to make compiler produce verbose output that lists
-  # what "hidden" libraries, object files and flags are used when
-  # linking a shared library.
-  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag=unsupported
+      always_export_symbols=yes
+      archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct=unsupported
+      fi
+      ;;
 
-else
-  GXX=no
-  with_gnu_ld=no
-  wlarc=
-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
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	fi
+	aix_use_runtimelinking=no
 
-# PORTME: fill in a description of your system's C++ link characteristics
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
-ld_shlibs_CXX=yes
-case $host_os in
-  aix3*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  aix4* | aix5*)
-    if test "$host_cpu" = ia64; then
-      # On IA64, the linker does run time linking by default, so we don't
-      # have to do anything special.
-      aix_use_runtimelinking=no
-      exp_sym_flag='-Bexport'
-      no_entry_flag=""
-    else
-      aix_use_runtimelinking=no
-
-      # Test if we are trying to use run time linking or normal
-      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
-      # need to do runtime linking.
-      case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-	for ld_flag in $LDFLAGS; do
-	  case $ld_flag in
-	  *-brtl*)
+	# 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
-	    ;;
-	  esac
-	done
-	;;
-      esac
+	  fi
+	  done
+	  ;;
+	esac
 
-      exp_sym_flag='-bexport'
-      no_entry_flag='-bnoentry'
-    fi
+	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.
+      # When large executables or shared objects are built, AIX ld can
+      # have problems creating the table of contents.  If linking a library
+      # or program results in "error TOC overflow" add -mminimal-toc to
+      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-    archive_cmds_CXX=''
-    hardcode_direct_CXX=yes
-    hardcode_libdir_separator_CXX=':'
-    link_all_deplibs_CXX=yes
+      archive_cmds=''
+      hardcode_direct=yes
+      hardcode_direct_absolute=yes
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      file_list_spec='${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
+      if test "$GCC" = yes; then
+	case $host_os in aix4.[012]|aix4.[012].*)
+	# We only want to do this on AIX 4.2 and lower, the check
+	# below for broken collect2 doesn't work under 4.3+
+	  collect2name=`${CC} -print-prog-name=collect2`
+	  if test -f "$collect2name" &&
+	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+	  then
 	  # We have reworked collect2
-	  hardcode_direct_CXX=yes
-	else
+	  :
+	  else
 	  # We have old collect2
-	  hardcode_direct_CXX=unsupported
+	  hardcode_direct=unsupported
 	  # It fails to find uninstalled libraries when the uninstalled
 	  # path is not listed in the libpath.  Setting hardcode_minus_L
 	  # to unsupported forces relinking
-	  hardcode_minus_L_CXX=yes
-	  hardcode_libdir_flag_spec_CXX='-L$libdir'
-	  hardcode_libdir_separator_CXX=
+	  hardcode_minus_L=yes
+	  hardcode_libdir_flag_spec='-L$libdir'
+	  hardcode_libdir_separator=
+	  fi
+	  ;;
+	esac
+	shared_flag='-shared'
+	if test "$aix_use_runtimelinking" = yes; then
+	  shared_flag="$shared_flag "'${wl}-G'
 	fi
-	;;
-      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
+      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'
+	  shared_flag='-G'
 	else
-	  shared_flag='${wl}-bM:SRE'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag='${wl}-G'
+	  else
+	    shared_flag='${wl}-bM:SRE'
+	  fi
 	fi
       fi
-    fi
 
-    # It seems that -bexpall does not export symbols beginning with
-    # underscore (_), so it is better to generate a list of symbols to export.
-    always_export_symbols_CXX=yes
-    if test "$aix_use_runtimelinking" = yes; then
-      # Warning - without using the other runtime loading flags (-brtl),
-      # -berok will link without error, but may produce a broken library.
-      allow_undefined_flag_CXX='-berok'
-      # Determine the default libpath from the value encoded in an empty executable.
-      cat >conftest.$ac_ext <<_ACEOF
+      export_dynamic_flag_spec='${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.
+      always_export_symbols=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -13685,53 +13613,62 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-      hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-
-      archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-     else
-      if test "$host_cpu" = ia64; then
-	hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
-	allow_undefined_flag_CXX="-z nodefs"
-	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+        hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
       else
-	# Determine the default libpath from the value encoded in an empty executable.
-	cat >conftest.$ac_ext <<_ACEOF
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag="-z nodefs"
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -13755,1459 +13692,844 @@ main ()
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`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 "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
+if test -z "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-	hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
-	# Warning - without using the other run time loading flags,
-	# -berok will link without error, but may produce a broken library.
-	no_undefined_flag_CXX=' ${wl}-bernotok'
-	allow_undefined_flag_CXX=' ${wl}-berok'
-	# Exported symbols can be pulled into shared objects from archives
-	whole_archive_flag_spec_CXX='$convenience'
-	archive_cmds_need_lc_CXX=yes
-	# This is similar to how AIX traditionally builds its shared libraries.
-	archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag=' ${wl}-bernotok'
+	  allow_undefined_flag=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec='$convenience'
+	  archive_cmds_need_lc=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+	fi
       fi
-    fi
-    ;;
+      ;;
 
-  beos*)
-    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-      allow_undefined_flag_CXX=unsupported
-      # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-      # support --undefined.  This deserves some investigation.  FIXME
-      archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-    else
-      ld_shlibs_CXX=no
-    fi
-    ;;
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds=''
+        ;;
+      m68k)
+            archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec='-L$libdir'
+            hardcode_minus_L=yes
+        ;;
+      esac
+      ;;
 
-  chorus*)
-    case $cc_basename in
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-    esac
-    ;;
+    bsdi[45]*)
+      export_dynamic_flag_spec=-rdynamic
+      ;;
 
-  cygwin* | mingw* | pw32*)
-    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
-    # as there is no search path for DLLs.
-    hardcode_libdir_flag_spec_CXX='-L$libdir'
-    allow_undefined_flag_CXX=unsupported
-    always_export_symbols_CXX=no
-    enable_shared_with_static_runtimes_CXX=yes
-
-    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-      archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      # If the export-symbols file already is a .def file (1st line
-      # is EXPORTS), use it as is; otherwise, prepend...
-      archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	cp $export_symbols $output_objdir/$soname.def;
-      else
-	echo EXPORTS > $output_objdir/$soname.def;
-	cat $export_symbols >> $output_objdir/$soname.def;
-      fi~
-      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-    else
-      ld_shlibs_CXX=no
-    fi
-  ;;
-      darwin* | rhapsody*)
-        case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-        esac
-      archive_cmds_need_lc_CXX=no
-      hardcode_direct_CXX=no
-      hardcode_automatic_CXX=yes
-      hardcode_shlibpath_var_CXX=unsupported
-      whole_archive_flag_spec_CXX=''
-      link_all_deplibs_CXX=yes
-
-    if test "$GXX" = yes ; then
-      lt_int_apple_cc_single_mod=no
-      output_verbose_link_cmd='echo'
-      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
-       lt_int_apple_cc_single_mod=yes
-      fi
-      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-       archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      else
-          archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-        fi
-        module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          else
-            archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          fi
-            module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-          archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-          module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-          archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs_CXX=no
-          ;;
-      esac
-      fi
-        ;;
+    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.
+      hardcode_libdir_flag_spec=' '
+      allow_undefined_flag=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_from_new_cmds='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes=yes
+      ;;
+
+    darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc=no
+  hardcode_direct=no
+  hardcode_automatic=yes
+  hardcode_shlibpath_var=unsupported
+  whole_archive_flag_spec=''
+  link_all_deplibs=yes
+  allow_undefined_flag="$_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=echo
+    archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds="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}"
+    module_expsym_cmds="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}"
+
+  else
+  ld_shlibs=no
+  fi
 
-  dgux*)
-    case $cc_basename in
-      ec++*)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      ghcx*)
-	# Green Hills C++ Compiler
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-    esac
-    ;;
-  freebsd[12]*)
-    # C++ shared libraries reported to be fairly broken before switch to ELF
-    ld_shlibs_CXX=no
-    ;;
-  freebsd-elf*)
-    archive_cmds_need_lc_CXX=no
-    ;;
-  freebsd* | kfreebsd*-gnu | dragonfly*)
-    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
-    # conventions
-    ld_shlibs_CXX=yes
-    ;;
-  gnu*)
-    ;;
-  hpux9*)
-    hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-    hardcode_libdir_separator_CXX=:
-    export_dynamic_flag_spec_CXX='${wl}-E'
-    hardcode_direct_CXX=yes
-    hardcode_minus_L_CXX=yes # Not in the search PATH,
-				# but as the default
-				# location of the library.
-
-    case $cc_basename in
-    CC*)
-      # FIXME: insert proper C++ library support
-      ld_shlibs_CXX=no
       ;;
-    aCC*)
-      archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      # Commands to make compiler produce verbose output that lists
-      # what "hidden" libraries, object files and flags are used when
-      # linking a shared library.
-      #
-      # There doesn't appear to be a way to prevent this compiler from
-      # explicitly linking system object files so we need to strip them
-      # from the output so that they don't get included in the library
-      # dependencies.
-      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+    dgux*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
       ;;
-    *)
-      if test "$GXX" = yes; then
-        archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+
+    freebsd1*)
+      ld_shlibs=no
+      ;;
+
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       else
-        # FIXME: insert proper C++ library support
-        ld_shlibs_CXX=no
+	archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
       fi
-      ;;
-    esac
-    ;;
-  hpux10*|hpux11*)
-    if test $with_gnu_ld = no; then
-      hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_CXX=:
+      hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_direct=yes
 
-      case $host_cpu in
-      hppa*64*|ia64*)
-	hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
-        ;;
-      *)
-	export_dynamic_flag_spec_CXX='${wl}-E'
-        ;;
-      esac
-    fi
-    case $host_cpu in
-    hppa*64*|ia64*)
-      hardcode_direct_CXX=no
-      hardcode_shlibpath_var_CXX=no
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L=yes
+      export_dynamic_flag_spec='${wl}-E'
       ;;
-    *)
-      hardcode_direct_CXX=yes
-      hardcode_minus_L_CXX=yes # Not in the search PATH,
-					      # but as the default
-					      # location of the library.
+
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld='+b $libdir'
+	hardcode_libdir_separator=:
+	hardcode_direct=yes
+	hardcode_direct_absolute=yes
+	export_dynamic_flag_spec='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L=yes
+      fi
       ;;
-    esac
 
-    case $cc_basename in
-      CC*)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      aCC*)
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
 	case $host_cpu in
 	hppa*64*)
-	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	ia64*)
-	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	*)
-	  archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	  archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test $with_gnu_ld = no; then
-	    case $host_cpu in
-	    hppa*64*)
-	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      ;;
-	    ia64*)
-	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      ;;
-	    *)
-	      archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	      ;;
-	    esac
-	  fi
-	else
-	  # FIXME: insert proper C++ library support
-	  ld_shlibs_CXX=no
-	fi
-	;;
-    esac
-    ;;
-  interix3*)
-    hardcode_direct_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-    export_dynamic_flag_spec_CXX='${wl}-E'
-    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-    # Instead, shared libraries are loaded at an image base (0x10000000 by
-    # default) and relocated if they conflict, which is a slow very memory
-    # consuming and fragmenting process.  To avoid this, we pick a random,
-    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-    archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-    ;;
-  irix5* | irix6*)
-    case $cc_basename in
-      CC*)
-	# SGI C++
-	archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-	# Archives containing C++ object files must be created using
-	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
-	;;
-      *)
-	if test "$GXX" = yes; then
-	  if test "$with_gnu_ld" = no; then
-	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	  else
-	    archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
-	  fi
-	fi
-	link_all_deplibs_CXX=yes
-	;;
-    esac
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-    hardcode_libdir_separator_CXX=:
-    ;;
-  linux*)
-    case $cc_basename in
-      KCC*)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
-
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-	archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-
-	hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir'
-	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
-	;;
-      icpc*)
-	# Intel C++
-	with_gnu_ld=yes
-	# version 8.0 and above of icpc choke on multiply defined symbols
-	# if we add $predep_objects and $postdep_objects, however 7.1 and
-	# earlier do not add the objects themselves.
-	case `$CC -V 2>&1` in
-	*"Version 7."*)
-  	  archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-  	  archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
-	*)  # Version 8.0 or newer
-	  tmp_idyn=
-	  case $host_cpu in
-	    ia64*) tmp_idyn=' -i_dynamic';;
-	  esac
-  	  archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	  archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	ia64*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
 	  ;;
 	esac
-	archive_cmds_need_lc_CXX=no
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
-	;;
-      pgCC*)
-        # Portland Group C++ compiler
-	archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
-  	archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
-
-	hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
-	export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
-	whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-        ;;
-      cxx*)
-	# Compaq C++
-	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator=:
 
-	runpath_var=LD_RUN_PATH
-	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-	hardcode_libdir_separator_CXX=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-    esac
-    ;;
-  lynxos*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  m88k*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  mvs*)
-    case $cc_basename in
-      cxx*)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-    esac
-    ;;
-  netbsd*)
-    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-      archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
-      wlarc=
-      hardcode_libdir_flag_spec_CXX='-R$libdir'
-      hardcode_direct_CXX=yes
-      hardcode_shlibpath_var_CXX=no
-    fi
-    # Workaround some broken pre-1.5 toolchains
-    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
-    ;;
-  openbsd2*)
-    # C++ shared libraries are fairly broken
-    ld_shlibs_CXX=no
-    ;;
-  openbsd*)
-    hardcode_direct_CXX=yes
-    hardcode_shlibpath_var_CXX=no
-    archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
-    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
-      export_dynamic_flag_spec_CXX='${wl}-E'
-      whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-    fi
-    output_verbose_link_cmd='echo'
-    ;;
-  osf3*)
-    case $cc_basename in
-      KCC*)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct=no
+	  hardcode_shlibpath_var=no
+	  ;;
+	*)
+	  hardcode_direct=yes
+	  hardcode_direct_absolute=yes
+	  export_dynamic_flag_spec='${wl}-E'
 
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L=yes
+	  ;;
+	esac
+      fi
+      ;;
 
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	hardcode_libdir_separator_CXX=:
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-	# Archives containing C++ object files must be created using
-	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
-	old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
 
-	;;
-      RCC*)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      cxx*)
-	allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-	hardcode_libdir_separator_CXX=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	  archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+fi
 
-	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-	  hardcode_libdir_separator_CXX=:
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        LDFLAGS="$save_LDFLAGS"
+      else
+	archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      inherit_rpath=yes
+      link_all_deplibs=yes
+      ;;
 
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_direct=yes
+      hardcode_shlibpath_var=no
+      ;;
 
-	else
-	  # FIXME: insert proper C++ library support
-	  ld_shlibs_CXX=no
-	fi
-	;;
-    esac
-    ;;
-  osf4* | osf5*)
-    case $cc_basename in
-      KCC*)
-	# Kuck and Associates, Inc. (KAI) C++ Compiler
+    newsos6)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct=yes
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      hardcode_shlibpath_var=no
+      ;;
 
-	# KCC will only create a shared library if the output file
-	# ends with ".so" (or ".sl" for HP-UX), so rename the library
-	# to its proper name (with version) after linking.
-	archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+    *nto* | *qnx*)
+      ;;
 
-	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
-	hardcode_libdir_separator_CXX=:
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct=yes
+	hardcode_shlibpath_var=no
+	hardcode_direct_absolute=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs=no
+      fi
+      ;;
 
-	# Archives containing C++ object files must be created using
-	# the KAI C++ compiler.
-	old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
-	;;
-      RCC*)
-	# Rational C++ 2.4.1
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      cxx*)
-	allow_undefined_flag_CXX=' -expect_unresolved \*'
-	archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
-	  echo "-hidden">> $lib.exp~
-	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
-	  $rm $lib.exp'
-
-	hardcode_libdir_flag_spec_CXX='-rpath $libdir'
-	hardcode_libdir_separator_CXX=:
-
-	# Commands to make compiler produce verbose output that lists
-	# what "hidden" libraries, object files and flags are used when
-	# linking a shared library.
-	#
-	# There doesn't appear to be a way to prevent this compiler from
-	# explicitly linking system object files so we need to strip them
-	# from the output so that they don't get included in the library
-	# dependencies.
-	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
-	;;
-      *)
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
-	 archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+    os2*)
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_minus_L=yes
+      allow_undefined_flag=unsupported
+      archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
 
-	  hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
-	  hardcode_libdir_separator_CXX=:
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator=:
+      ;;
+
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag=' -expect_unresolved \*'
+	archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; 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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
-	  # Commands to make compiler produce verbose output that lists
-	  # what "hidden" libraries, object files and flags are used when
-	  # linking a shared library.
-	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec='-rpath $libdir'
+      fi
+      archive_cmds_need_lc='no'
+      hardcode_libdir_separator=:
+      ;;
 
+    solaris*)
+      no_undefined_flag=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${wl}-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=''
+	  archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+	  ;;
+	*)
+	  wlarc='${wl}'
+	  archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+	  ;;
+	esac
+      fi
+      hardcode_libdir_flag_spec='-R$libdir'
+      hardcode_shlibpath_var=no
+      case $host_os in
+      solaris2.[0-5] | solaris2.[0-5].*) ;;
+      *)
+	# The compiler driver will combine 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
+	  whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
 	else
-	  # FIXME: insert proper C++ library support
-	  ld_shlibs_CXX=no
+	  whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
 	fi
 	;;
-    esac
-    ;;
-  psos*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  sunos4*)
-    case $cc_basename in
-      CC*)
-	# Sun C++ 4.x
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      lcc*)
-	# Lucid
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
+      esac
+      link_all_deplibs=yes
+      ;;
+
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_direct=yes
+      hardcode_minus_L=yes
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=yes # is this really true???
 	;;
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds='$CC -r -o $output$reload_objs'
+	  hardcode_direct=no
+        ;;
+	motorola)
+	  archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct=no #Motorola manual says yes, but my tests say they lie
 	;;
-    esac
-    ;;
-  solaris*)
-    case $cc_basename in
-      CC*)
-	# Sun C++ 4.2, 5.x and Centerline C++
-        archive_cmds_need_lc_CXX=yes
-	no_undefined_flag_CXX=' -zdefs'
-	archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
-	archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
-
-	hardcode_libdir_flag_spec_CXX='-R$libdir'
-	hardcode_shlibpath_var_CXX=no
-	case $host_os in
-	  solaris2.[0-5] | solaris2.[0-5].*) ;;
-	  *)
-	    # The C++ compiler is used as linker so we must use $wl
-	    # flag to pass the commands to the underlying system
-	    # linker. We must also pass each convience library through
-	    # to the system linker between allextract/defaultextract.
-	    # The C++ compiler will combine linker options so we
-	    # cannot just pass the convience library names through
-	    # without $wl.
-	    # Supported since Solaris 2.6 (maybe 2.5.1?)
-	    whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
-	    ;;
-	esac
-	link_all_deplibs_CXX=yes
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var=no
+      ;;
+
+    sysv4.3*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var=no
+      export_dynamic_flag_spec='-Bexport'
+      ;;
 
-	output_verbose_link_cmd='echo'
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs=yes
+      fi
+      ;;
 
-	# Archives containing C++ object files must be created using
-	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
-	# necessary to make sure instantiated templates are included
-	# in the archive.
-	old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
-	;;
-      gcx*)
-	# Green Hills C++ Compiler
-	archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag='${wl}-z,text'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      runpath_var='LD_RUN_PATH'
 
-	# The C++ compiler must be used to create the archive.
-	old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
-	;;
-      *)
-	# GNU C++ compiler with Solaris linker
-	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
-	  no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
-	  if $CC --version | grep -v '^2\.7' > /dev/null; then
-	    archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
 
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-	  else
-	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
-	    # platform.
-	    archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-	    archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag='${wl}-z,text'
+      allow_undefined_flag='${wl}-z,nodefs'
+      archive_cmds_need_lc=no
+      hardcode_shlibpath_var=no
+      hardcode_libdir_flag_spec='${wl}-R,$libdir'
+      hardcode_libdir_separator=':'
+      link_all_deplibs=yes
+      export_dynamic_flag_spec='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
 
-	    # Commands to make compiler produce verbose output that lists
-	    # what "hidden" libraries, object files and flags are used when
-	    # linking a shared library.
-	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
-	  fi
+      if test "$GCC" = yes; then
+	archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
 
-	  hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
-	fi
-	;;
-    esac
-    ;;
-  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
-    no_undefined_flag_CXX='${wl}-z,text'
-    archive_cmds_need_lc_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-	archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-      *)
-	archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-    esac
-    ;;
-  sysv5* | sco3.2v5* | sco5v6*)
-    # Note: We can NOT use -z defs as we might desire, because we do not
-    # link with -lc, and that would cause any symbols used from libc to
-    # always be unresolved, which means just about no library would
-    # ever link correctly.  If we're not using GNU ld we use -z text
-    # though, which does catch some bad symbols but isn't as heavy-handed
-    # as -z defs.
-    # For security reasons, it is highly recommended that you always
-    # use absolute paths for naming shared libraries, and exclude the
-    # DT_RUNPATH tag from executables and libraries.  But doing so
-    # requires that you compile everything twice, which is a pain.
-    # So that behaviour is only enabled if SCOABSPATH is set to a
-    # non-empty value in the environment.  Most likely only useful for
-    # creating official distributions of packages.
-    # This is a hack until libtool officially supports absolute path
-    # names for shared libraries.
-    no_undefined_flag_CXX='${wl}-z,text'
-    allow_undefined_flag_CXX='${wl}-z,nodefs'
-    archive_cmds_need_lc_CXX=no
-    hardcode_shlibpath_var_CXX=no
-    hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-    hardcode_libdir_separator_CXX=':'
-    link_all_deplibs_CXX=yes
-    export_dynamic_flag_spec_CXX='${wl}-Bexport'
-    runpath_var='LD_RUN_PATH'
-
-    case $cc_basename in
-      CC*)
-	archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
-      *)
-	archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	;;
+    uts4*)
+      archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec='-L$libdir'
+      hardcode_shlibpath_var=no
+      ;;
+
+    *)
+      ld_shlibs=no
+      ;;
     esac
-    ;;
-  tandem*)
-    case $cc_basename in
-      NCC*)
-	# NonStop-UX NCC 3.20
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
-	;;
-      *)
-	# FIXME: insert proper C++ library support
-	ld_shlibs_CXX=no
+
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec='${wl}-Blargedynsym'
 	;;
-    esac
-    ;;
-  vxworks*)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-  *)
-    # FIXME: insert proper C++ library support
-    ld_shlibs_CXX=no
-    ;;
-esac
-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6
-test "$ld_shlibs_CXX" = no && can_build_shared=no
+      esac
+    fi
+  fi
 
-GCC_CXX="$GXX"
-LD_CXX="$LD"
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
 
+with_gnu_ld=$with_gnu_ld
 
-cat > conftest.$ac_ext <<EOF
-class Foo
-{
-public:
-  Foo (void) { a = 0; }
-private:
-  int a;
-};
-EOF
 
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  # Parse the compiler output and extract the necessary
-  # objects, libraries and library flags.
 
-  # Sentinel used to keep track of whether or not we are before
-  # the conftest object file.
-  pre_test_object_deps_done=no
 
-  # The `*' in the case matches for architectures that use `case' in
-  # $output_verbose_cmd can trigger glob expansion during the loop
-  # eval without this substitution.
-  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
 
-  for p in `eval $output_verbose_link_cmd`; do
-    case $p in
 
-    -L* | -R* | -l*)
-       # Some compilers place space between "-{L,R}" and the path.
-       # Remove the space.
-       if test $p = "-L" \
-	  || test $p = "-R"; then
-	 prev=$p
-	 continue
-       else
-	 prev=
-       fi
 
-       if test "$pre_test_object_deps_done" = no; then
-	 case $p in
-	 -L* | -R*)
-	   # Internal compiler library paths should come after those
-	   # provided the user.  The postdeps already come after the
-	   # user supplied libs so there is no need to process them.
-	   if test -z "$compiler_lib_search_path_CXX"; then
-	     compiler_lib_search_path_CXX="${prev}${p}"
-	   else
-	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
-	   fi
-	   ;;
-	 # The "-l" case would never come before the object being
-	 # linked, so don't bother handling this case.
-	 esac
-       else
-	 if test -z "$postdeps_CXX"; then
-	   postdeps_CXX="${prev}${p}"
-	 else
-	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
-	 fi
-       fi
-       ;;
 
-    *.$objext)
-       # This assumes that the test object file only shows up
-       # once in the compiler output.
-       if test "$p" = "conftest.$objext"; then
-	 pre_test_object_deps_done=yes
-	 continue
-       fi
 
-       if test "$pre_test_object_deps_done" = no; then
-	 if test -z "$predep_objects_CXX"; then
-	   predep_objects_CXX="$p"
-	 else
-	   predep_objects_CXX="$predep_objects_CXX $p"
-	 fi
-       else
-	 if test -z "$postdep_objects_CXX"; then
-	   postdep_objects_CXX="$p"
-	 else
-	   postdep_objects_CXX="$postdep_objects_CXX $p"
-	 fi
-       fi
-       ;;
 
-    *) ;; # Ignore the rest.
 
-    esac
-  done
 
-  # Clean up.
-  rm -f a.out a.exe
-else
-  echo "libtool.m4: error: problem compiling CXX test program"
-fi
 
-$rm -f confest.$objext
 
-# PORTME: override above test on systems where it is broken
-case $host_os in
-interix3*)
-  # Interix 3.5 installs completely hosed .la files for C++, so rather than
-  # hack all around it, let's just trust "g++" to DTRT.
-  predep_objects_CXX=
-  postdep_objects_CXX=
-  postdeps_CXX=
-  ;;
 
-solaris*)
-  case $cc_basename in
-  CC*)
-    # Adding this requires a known-good setup of shared libraries for
-    # Sun compiler versions before 5.6, else PIC objects from an old
-    # archive will be linked into the output, leading to subtle bugs.
-    postdeps_CXX='-lCstd -lCrun'
-    ;;
-  esac
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
+      ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl
+	pic_flag=$lt_prog_compiler_pic
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag
+        allow_undefined_flag=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc=no
+        else
+	  archive_cmds_need_lc=yes
+        fi
+        allow_undefined_flag=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+      ;;
+    esac
+  fi
   ;;
 esac
 
 
-case " $postdeps_CXX " in
-*" -lc "*) archive_cmds_need_lc_CXX=no ;;
-esac
 
-lt_prog_compiler_wl_CXX=
-lt_prog_compiler_pic_CXX=
-lt_prog_compiler_static_CXX=
 
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
 
-  # C++ specific cases for pic, static, wl, etc.
-  if test "$GXX" = yes; then
-    lt_prog_compiler_wl_CXX='-Wl,'
-    lt_prog_compiler_static_CXX='-static'
 
-    case $host_os in
-    aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_CXX='-Bstatic'
-      fi
-      ;;
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
-      ;;
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
-    mingw* | os2* | pw32*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
-      ;;
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_CXX='-fno-common'
-      ;;
-    *djgpp*)
-      # DJGPP does not support shared libraries at all
-      lt_prog_compiler_pic_CXX=
-      ;;
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	lt_prog_compiler_pic_CXX=-Kconform_pic
-      fi
-      ;;
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	;;
-      *)
-	lt_prog_compiler_pic_CXX='-fPIC'
-	;;
-      esac
-      ;;
-    *)
-      lt_prog_compiler_pic_CXX='-fPIC'
-      ;;
-    esac
-  else
-    case $host_os in
-      aix4* | aix5*)
-	# All AIX code is PIC.
-	if test "$host_cpu" = ia64; then
-	  # AIX 5 now supports IA64 processor
-	  lt_prog_compiler_static_CXX='-Bstatic'
-	else
-	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
-	fi
-	;;
-      chorus*)
-	case $cc_basename in
-	cxch68*)
-	  # Green Hills C++ Compiler
-	  # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
-	  ;;
-	esac
-	;;
-       darwin*)
-         # PIC is the default on this platform
-         # Common symbols not allowed in MH_DYLIB files
-         case $cc_basename in
-           xlc*)
-           lt_prog_compiler_pic_CXX='-qnocommon'
-           lt_prog_compiler_wl_CXX='-Wl,'
-           ;;
-         esac
-       ;;
-      dgux*)
-	case $cc_basename in
-	  ec++*)
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    ;;
-	  ghcx*)
-	    # Green Hills C++ Compiler
-	    lt_prog_compiler_pic_CXX='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      freebsd* | kfreebsd*-gnu | dragonfly*)
-	# FreeBSD uses GNU C++
-	;;
-      hpux9* | hpux10* | hpux11*)
-	case $cc_basename in
-	  CC*)
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-	    if test "$host_cpu" != ia64; then
-	      lt_prog_compiler_pic_CXX='+Z'
-	    fi
-	    ;;
-	  aCC*)
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
-	    case $host_cpu in
-	    hppa*64*|ia64*)
-	      # +Z the default
-	      ;;
-	    *)
-	      lt_prog_compiler_pic_CXX='+Z'
-	      ;;
-	    esac
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      interix*)
-	# This is c89, which is MS Visual C++ (no shared libs)
-	# Anyone wants to do a port?
-	;;
-      irix5* | irix6* | nonstopux*)
-	case $cc_basename in
-	  CC*)
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_static_CXX='-non_shared'
-	    # CC pic flag -KPIC is the default.
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      linux*)
-	case $cc_basename in
-	  KCC*)
-	    # KAI C++ Compiler
-	    lt_prog_compiler_wl_CXX='--backend -Wl,'
-	    lt_prog_compiler_pic_CXX='-fPIC'
-	    ;;
-	  icpc* | ecpc*)
-	    # Intel C++
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    lt_prog_compiler_static_CXX='-static'
-	    ;;
-	  pgCC*)
-	    # Portland Group C++ compiler.
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_pic_CXX='-fpic'
-	    lt_prog_compiler_static_CXX='-Bstatic'
-	    ;;
-	  cxx*)
-	    # Compaq C++
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    lt_prog_compiler_pic_CXX=
-	    lt_prog_compiler_static_CXX='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      lynxos*)
-	;;
-      m88k*)
-	;;
-      mvs*)
-	case $cc_basename in
-	  cxx*)
-	    lt_prog_compiler_pic_CXX='-W c,exportall'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      netbsd*)
-	;;
-      osf3* | osf4* | osf5*)
-	case $cc_basename in
-	  KCC*)
-	    lt_prog_compiler_wl_CXX='--backend -Wl,'
-	    ;;
-	  RCC*)
-	    # Rational C++ 2.4.1
-	    lt_prog_compiler_pic_CXX='-pic'
-	    ;;
-	  cxx*)
-	    # Digital/Compaq C++
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    # Make sure the PIC flag is empty.  It appears that all Alpha
-	    # Linux and Compaq Tru64 Unix objects are PIC.
-	    lt_prog_compiler_pic_CXX=
-	    lt_prog_compiler_static_CXX='-non_shared'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      psos*)
-	;;
-      solaris*)
-	case $cc_basename in
-	  CC*)
-	    # Sun C++ 4.2, 5.x and Centerline C++
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    lt_prog_compiler_static_CXX='-Bstatic'
-	    lt_prog_compiler_wl_CXX='-Qoption ld '
-	    ;;
-	  gcx*)
-	    # Green Hills C++ Compiler
-	    lt_prog_compiler_pic_CXX='-PIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sunos4*)
-	case $cc_basename in
-	  CC*)
-	    # Sun C++ 4.x
-	    lt_prog_compiler_pic_CXX='-pic'
-	    lt_prog_compiler_static_CXX='-Bstatic'
-	    ;;
-	  lcc*)
-	    # Lucid
-	    lt_prog_compiler_pic_CXX='-pic'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      tandem*)
-	case $cc_basename in
-	  NCC*)
-	    # NonStop-UX NCC 3.20
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    ;;
-	  *)
-	    ;;
-	esac
-	;;
-      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-	case $cc_basename in
-	  CC*)
-	    lt_prog_compiler_wl_CXX='-Wl,'
-	    lt_prog_compiler_pic_CXX='-KPIC'
-	    lt_prog_compiler_static_CXX='-Bstatic'
-	    ;;
-	esac
-	;;
-      vxworks*)
-	;;
-      *)
-	lt_prog_compiler_can_build_shared_CXX=no
-	;;
-    esac
-  fi
 
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
 
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_CXX"; then
 
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works_CXX=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14961: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:14965: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works_CXX=yes
-     fi
-   fi
-   $rm conftest*
 
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
 
-if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then
-    case $lt_prog_compiler_pic_CXX in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
-     esac
-else
-    lt_prog_compiler_pic_CXX=
-     lt_prog_compiler_can_build_shared_CXX=no
-fi
 
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_CXX=
-    ;;
-  *)
-    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
-    ;;
-esac
 
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_static_works_CXX=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works_CXX=yes
-       fi
-     else
-       lt_prog_compiler_static_works_CXX=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
 
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6
 
-if test x"$lt_prog_compiler_static_works_CXX" = xyes; then
-    :
-else
-    lt_prog_compiler_static_CXX=
-fi
 
 
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o_CXX=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-   lt_compiler_flag="-o out/conftest2.$ac_objext"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15065: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:15069: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_CXX=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
 
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
 
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
 
-  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  case $host_os in
-  aix4* | aix5*)
-    # If we're using GNU nm, then we don't want the "-C" option.
-    # -C means demangle to AIX nm, but means don't demangle with GNU nm
-    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-    else
-      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-    fi
-    ;;
-  pw32*)
-    export_symbols_cmds_CXX="$ltdll_cmds"
-  ;;
-  cygwin* | mingw*)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  *)
-    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  ;;
-  esac
 
-echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
-echo "${ECHO_T}$ld_shlibs_CXX" >&6
-test "$ld_shlibs_CXX" = no && can_build_shared=no
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_CXX" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_CXX=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_CXX in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_CXX
-	pic_flag=$lt_prog_compiler_pic_CXX
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
-        allow_undefined_flag_CXX=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-	  archive_cmds_need_lc_CXX=no
-        else
-	  archive_cmds_need_lc_CXX=yes
-        fi
-        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
-      ;;
-    esac
-  fi
-  ;;
-esac
 
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+  case $host_os in
+    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+    *) lt_awk_arg="/^libraries:/" ;;
+  esac
+  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+  if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+    # if the path contains ";" then we assume it to be the separator
+    # otherwise default to the standard path separator (i.e. ":") - it is
+    # assumed that no part of a normal pathname contains ";" but that should
+    # okay in the real world where ";" in dirpaths is itself problematic.
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+  else
+    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+  fi
+  # 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; }
+}'`
+  sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -15221,20 +14543,6 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -15252,7 +14560,7 @@ aix3*)
   soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
-aix4* | aix5*)
+aix[4-9]*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -15271,7 +14579,7 @@ aix4* | aix5*)
       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
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
@@ -15297,9 +14605,18 @@ aix4* | aix5*)
   ;;
 
 amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
   ;;
 
 beos*)
@@ -15322,25 +14639,28 @@ bsdi[45]*)
   # libtool to hard-code these into programs
   ;;
 
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
   shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
 
   case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
     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'\''`~
+      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'
+      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'
+       $RM \$dlpath'
     shlibpath_overrides_runpath=yes
 
     case $host_os in
@@ -15349,20 +14669,20 @@ cygwin* | mingw* | pw32*)
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
       ;;
-    mingw*)
+    mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
         # It is most probably a Windows format PATH printed by
         # mingw gcc, but we are running on Cygwin. Gcc prints its search
         # path with ; separators, and with drive letters. We can handle the
         # drive letters (cygwin fileutils understands them), so leave them,
         # especially as we might pass files found there to a mingw objdump,
         # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+        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"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
       fi
       ;;
     pw32*)
@@ -15386,17 +14706,13 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  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`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
+
+  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
 
@@ -15413,18 +14729,6 @@ freebsd1*)
   dynamic_linker=no
   ;;
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -15462,7 +14766,7 @@ freebsd* | dragonfly*)
     shlibpath_overrides_runpath=no
     hardcode_into_libs=yes
     ;;
-  freebsd*) # from 4.6 on
+  *) # from 4.6 on, and DragonFly
     shlibpath_overrides_runpath=yes
     hardcode_into_libs=yes
     ;;
@@ -15501,18 +14805,18 @@ hpux9* | hpux10* | hpux11*)
     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
-     ;;
-   *)
+  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
@@ -15525,7 +14829,7 @@ hpux9* | hpux10* | hpux11*)
   postinstall_cmds='chmod 555 $lib'
   ;;
 
-interix3*)
+interix[3-9]*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -15580,7 +14884,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -15589,39 +14893,87 @@ linux*)
   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
   shlibpath_var=LD_LIBRARY_PATH
   shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
-
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 15601 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
+  # Some binutils ld are patched to set DT_RUNPATH
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-  # 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/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
-  fi
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
 
-  # We used to test for /lib/ld.so.1 and disable shared libraries on
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+  shlibpath_overrides_runpath=yes
+fi
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
+  # 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
+
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
+
+  # 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;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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
@@ -15630,23 +14982,11 @@ linux*)
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+  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'
@@ -15667,14 +15007,16 @@ newsos6)
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx*)
-  version_type=linux
+*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=yes
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
   ;;
 
 openbsd*)
@@ -15683,13 +15025,13 @@ openbsd*)
   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  ;;
+    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
+  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
@@ -15723,6 +15065,10 @@ osf3* | osf4* | osf5*)
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
   ;;
 
+rdos*)
+  dynamic_linker=no
+  ;;
+
 solaris*)
   version_type=linux
   need_lib_prefix=no
@@ -15757,7 +15103,6 @@ sysv4 | sysv4.3*)
     sni)
       shlibpath_overrides_runpath=no
       need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
       runpath_var=LD_RUN_PATH
       ;;
     siemens)
@@ -15788,13 +15133,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   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'
-    shlibpath_overrides_runpath=no
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
     case $host_os in
       sco3.2v5*)
         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
@@ -15804,6 +15148,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   sys_lib_dlsearch_path_spec='/usr/lib'
   ;;
 
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 uts4*)
   version_type=linux
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -15815,8 +15170,8 @@ uts4*)
   dynamic_linker=no
   ;;
 esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
 test "$dynamic_linker" = no && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
@@ -15824,3428 +15179,2921 @@ if test "$GCC" = yes; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action_CXX=
-if test -n "$hardcode_libdir_flag_spec_CXX" || \
-   test -n "$runpath_var_CXX" || \
-   test "X$hardcode_automatic_CXX" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_CXX" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
-     test "$hardcode_minus_L_CXX" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_CXX=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_CXX=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_CXX=unsupported
+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
-echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
-echo "${ECHO_T}$hardcode_action_CXX" >&6
-
-if test "$hardcode_action_CXX" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
+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
 
 
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_CXX \
-    CC_CXX \
-    LD_CXX \
-    lt_prog_compiler_wl_CXX \
-    lt_prog_compiler_pic_CXX \
-    lt_prog_compiler_static_CXX \
-    lt_prog_compiler_no_builtin_flag_CXX \
-    export_dynamic_flag_spec_CXX \
-    thread_safe_flag_spec_CXX \
-    whole_archive_flag_spec_CXX \
-    enable_shared_with_static_runtimes_CXX \
-    old_archive_cmds_CXX \
-    old_archive_from_new_cmds_CXX \
-    predep_objects_CXX \
-    postdep_objects_CXX \
-    predeps_CXX \
-    postdeps_CXX \
-    compiler_lib_search_path_CXX \
-    archive_cmds_CXX \
-    archive_expsym_cmds_CXX \
-    postinstall_cmds_CXX \
-    postuninstall_cmds_CXX \
-    old_archive_from_expsyms_cmds_CXX \
-    allow_undefined_flag_CXX \
-    no_undefined_flag_CXX \
-    export_symbols_cmds_CXX \
-    hardcode_libdir_flag_spec_CXX \
-    hardcode_libdir_flag_spec_ld_CXX \
-    hardcode_libdir_separator_CXX \
-    hardcode_automatic_CXX \
-    module_cmds_CXX \
-    module_expsym_cmds_CXX \
-    lt_cv_prog_compiler_c_o_CXX \
-    exclude_expsyms_CXX \
-    include_expsyms_CXX; do
-
-    case $var in
-    old_archive_cmds_CXX | \
-    old_archive_from_new_cmds_CXX | \
-    archive_cmds_CXX | \
-    archive_expsym_cmds_CXX | \
-    module_cmds_CXX | \
-    module_expsym_cmds_CXX | \
-    old_archive_from_expsyms_cmds_CXX | \
-    export_symbols_cmds_CXX | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
 
-cfgfile="$ofile"
 
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_CXX
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
 
-# A C compiler.
-LTCC=$lt_LTCC
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
 
-# A language-specific compiler.
-CC=$lt_compiler_CXX
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_CXX
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
 
-# An ERE matcher.
-EGREP=$lt_EGREP
 
-# The linker used to build libraries.
-LD=$lt_LD_CXX
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
 
-# A BSD-compatible nm program.
-NM=$lt_NM
 
-# A symbol stripping program
-STRIP=$lt_STRIP
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
 
-# Used on cygwin: assembler.
-AS="$AS"
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_CXX
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
 
-# Old archive suffix (normally "a").
-libext="$libext"
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
 
-# Executable file suffix (normally "").
-exeext="$exeext"
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_CXX
-pic_mode=$pic_mode
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
 
-# Do we need a version for libraries?
-need_version=$need_version
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_CXX
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
 
-# Library versioning type.
-version_type=$version_type
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_CXX
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_CXX
-archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_CXX
-module_expsym_cmds=$lt_module_expsym_cmds_CXX
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_CXX
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_CXX
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_CXX
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_CXX
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_CXX
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_CXX
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_CXX
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_CXX
+  { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+   test -n "$runpath_var" ||
+   test "X$hardcode_automatic" = "Xyes" ; then
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+     test "$hardcode_minus_L" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_CXX
+if test "$hardcode_action" = relink ||
+   test "$inherit_rpath" = 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
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_CXX"
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_CXX
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_CXX
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_CXX
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_CXX
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
 
 
+  if test "x$enable_dlopen" != xyes; then
+  enable_dlopen=unknown
+  enable_dlopen_self=unknown
+  enable_dlopen_self_static=unknown
 else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-
+  lt_cv_dlopen=no
+  lt_cv_dlopen_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
+  case $host_os in
+  beos*)
+    lt_cv_dlopen="load_add_on"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
+    ;;
 
-CC=$lt_save_CC
-LDCXX=$LD
-LD=$lt_save_LD
-GCC=$lt_save_GCC
-with_gnu_ldcxx=$with_gnu_ld
-with_gnu_ld=$lt_save_with_gnu_ld
-lt_cv_path_LDCXX=$lt_cv_path_LD
-lt_cv_path_LD=$lt_save_path_LD
-lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
-lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+  mingw* | pw32* | cegcc*)
+    lt_cv_dlopen="LoadLibrary"
+    lt_cv_dlopen_libs=
+    ;;
 
-	else
-	  tagname=""
-	fi
-	;;
+  cygwin*)
+    lt_cv_dlopen="dlopen"
+    lt_cv_dlopen_libs=
+    ;;
 
-      F77)
-	if test -n "$F77" && test "X$F77" != "Xno"; then
-
-ac_ext=f
-ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
-ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_f77_compiler_gnu
-
-
-archive_cmds_need_lc_F77=no
-allow_undefined_flag_F77=
-always_export_symbols_F77=no
-archive_expsym_cmds_F77=
-export_dynamic_flag_spec_F77=
-hardcode_direct_F77=no
-hardcode_libdir_flag_spec_F77=
-hardcode_libdir_flag_spec_ld_F77=
-hardcode_libdir_separator_F77=
-hardcode_minus_L_F77=no
-hardcode_automatic_F77=no
-module_cmds_F77=
-module_expsym_cmds_F77=
-link_all_deplibs_F77=unknown
-old_archive_cmds_F77=$old_archive_cmds
-no_undefined_flag_F77=
-whole_archive_flag_spec_F77=
-enable_shared_with_static_runtimes_F77=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-objext_F77=$objext
+  darwin*)
+  # if libdl is installed we need to link against it
+    { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Code to be used in simple link tests
-lt_simple_link_test_code="      program t\n      end\n"
+	ac_cv_lib_dl_dlopen=no
+fi
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+    lt_cv_dlopen="dyld"
+    lt_cv_dlopen_libs=
+    lt_cv_dlopen_self=yes
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+fi
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
+    ;;
 
+  *)
+    { $as_echo "$as_me:$LINENO: checking for shl_load" >&5
+$as_echo_n "checking for shl_load... " >&6; }
+if test "${ac_cv_func_shl_load+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define shl_load innocuous_shl_load
 
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shl_load (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
+#undef shl_load
 
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${F77-"f77"}
-compiler=$CC
-compiler_F77=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_shl_load || defined __stub___shl_load
+choke me
+#endif
 
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_shl_load=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
+	ac_cv_func_shl_load=no
+fi
 
-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6
-test "$can_build_shared" = "no" && enable_shared=no
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+$as_echo "$ac_cv_func_shl_load" >&6; }
+if test "x$ac_cv_func_shl_load" = x""yes; then
+  lt_cv_dlopen="shl_load"
+else
+  { $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-# On AIX, shared libraries and static libraries use the same namespace, and
-# are all built from PIC.
-case $host_os in
-aix3*)
-  test "$enable_shared" = yes && enable_static=no
-  if test -n "$RANLIB"; then
-    archive_cmds="$archive_cmds~\$RANLIB \$lib"
-    postinstall_cmds='$RANLIB $lib'
-  fi
-  ;;
-aix4* | aix5*)
-  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
-    test "$enable_shared" = yes && enable_static=no
-  fi
-  ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return shl_load ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dld_shl_load=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
+	ac_cv_lib_dld_shl_load=no
+fi
 
-GCC_F77="$G77"
-LD_F77="$LD"
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
+  lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+  { $as_echo "$as_me:$LINENO: checking for dlopen" >&5
+$as_echo_n "checking for dlopen... " >&6; }
+if test "${ac_cv_func_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define dlopen innocuous_dlopen
 
-lt_prog_compiler_wl_F77=
-lt_prog_compiler_pic_F77=
-lt_prog_compiler_static_F77=
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dlopen (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl_F77='-Wl,'
-    lt_prog_compiler_static_F77='-static'
+#undef dlopen
 
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_F77='-Bstatic'
-      fi
-      ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_dlopen || defined __stub___dlopen
+choke me
+#endif
 
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4'
-      ;;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_func_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
-      # PIC is the default for these OSes.
-      ;;
+	ac_cv_func_dlopen=no
+fi
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
-      ;;
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+$as_echo "$ac_cv_func_dlopen" >&6; }
+if test "x$ac_cv_func_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen"
+else
+  { $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-    darwin* | rhapsody*)
-      # PIC is the default on this platform
-      # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_F77='-fno-common'
-      ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dl_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    interix3*)
-      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
-      # Instead, we relocate shared libraries at runtime.
-      ;;
+	ac_cv_lib_dl_dlopen=no
+fi
 
-    msdosdjgpp*)
-      # Just because we use GCC doesn't mean we suddenly get shared libraries
-      # on systems that don't support them.
-      lt_prog_compiler_can_build_shared_F77=no
-      enable_shared=no
-      ;;
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+  { $as_echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	lt_prog_compiler_pic_F77=-Kconform_pic
-      fi
-      ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_svld_dlopen=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	lt_prog_compiler_pic_F77='-fPIC'
-	;;
-      esac
-      ;;
+	ac_cv_lib_svld_dlopen=no
+fi
 
-    *)
-      lt_prog_compiler_pic_F77='-fPIC'
-      ;;
-    esac
-  else
-    # PORTME Check for flag to pass linker flags through the system compiler.
-    case $host_os in
-    aix*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_F77='-Bstatic'
-      else
-	lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         lt_prog_compiler_pic_F77='-qnocommon'
-         lt_prog_compiler_wl_F77='-Wl,'
-         ;;
-       esac
-       ;;
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then
+  lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+  { $as_echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_F77='-DDLL_EXPORT'
-      ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return dld_link ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_dld_dld_link=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
-	;;
-      *)
-	lt_prog_compiler_pic_F77='+Z'
-	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
-      ;;
+	ac_cv_lib_dld_dld_link=no
+fi
 
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static_F77='-non_shared'
-      ;;
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then
+  lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
 
-    newsos6)
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
 
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-	lt_prog_compiler_wl_F77='-Wl,'
-	lt_prog_compiler_pic_F77='-KPIC'
-	lt_prog_compiler_static_F77='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	lt_prog_compiler_wl_F77='-Wl,'
-	lt_prog_compiler_pic_F77='-fpic'
-	lt_prog_compiler_static_F77='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl_F77='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static_F77='-non_shared'
-        ;;
-      esac
-      ;;
+fi
 
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static_F77='-non_shared'
-      ;;
 
-    solaris*)
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-	lt_prog_compiler_wl_F77='-Qoption ld ';;
-      *)
-	lt_prog_compiler_wl_F77='-Wl,';;
-      esac
-      ;;
+fi
 
-    sunos4*)
-      lt_prog_compiler_wl_F77='-Qoption ld '
-      lt_prog_compiler_pic_F77='-PIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
 
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
+fi
 
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	lt_prog_compiler_pic_F77='-Kconform_pic'
-	lt_prog_compiler_static_F77='-Bstatic'
-      fi
-      ;;
 
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_pic_F77='-KPIC'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
+fi
 
-    unicos*)
-      lt_prog_compiler_wl_F77='-Wl,'
-      lt_prog_compiler_can_build_shared_F77=no
-      ;;
 
-    uts4*)
-      lt_prog_compiler_pic_F77='-pic'
-      lt_prog_compiler_static_F77='-Bstatic'
-      ;;
+fi
 
-    *)
-      lt_prog_compiler_can_build_shared_F77=no
-      ;;
-    esac
-  fi
+    ;;
+  esac
 
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
+  if test "x$lt_cv_dlopen" != xno; then
+    enable_dlopen=yes
+  else
+    enable_dlopen=no
+  fi
 
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic_F77"; then
+  case $lt_cv_dlopen in
+  dlopen)
+    save_CPPFLAGS="$CPPFLAGS"
+    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
 
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works_F77=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_F77"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16659: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:16663: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works_F77=yes
-     fi
-   fi
-   $rm conftest*
+    save_LDFLAGS="$LDFLAGS"
+    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
 
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
+    save_LIBS="$LIBS"
+    LIBS="$lt_cv_dlopen_libs $LIBS"
 
-if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
-    case $lt_prog_compiler_pic_F77 in
-     "" | " "*) ;;
-     *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
-     esac
+    { $as_echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-    lt_prog_compiler_pic_F77=
-     lt_prog_compiler_can_build_shared_F77=no
-fi
-
-fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_F77=
-    ;;
-  *)
-    lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
-    ;;
-esac
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self=cross
 else
-  lt_prog_compiler_static_works_F77=no
-   save_LDFLAGS="$LDFLAGS"
-   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
-   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
-     # The linker can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     if test -s conftest.err; then
-       # Append any errors to the config.log.
-       cat conftest.err 1>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
-       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-       if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works_F77=yes
-       fi
-     else
-       lt_prog_compiler_static_works_F77=yes
-     fi
-   fi
-   $rm conftest*
-   LDFLAGS="$save_LDFLAGS"
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 15974 "configure"
+#include "confdefs.h"
 
-fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
-if test x"$lt_prog_compiler_static_works_F77" = xyes; then
-    :
-else
-    lt_prog_compiler_static_F77=
-fi
+#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
 
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_c_o_F77=no
-   $rm -r conftest 2>/dev/null
-   mkdir conftest
-   cd conftest
-   mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
 
-   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:16763: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>out/conftest.err)
-   ac_status=$?
-   cat out/conftest.err >&5
-   echo "$as_me:16767: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s out/conftest2.$ac_objext
-   then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
-     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
-     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_F77=yes
-     fi
-   fi
-   chmod u+w . 2>&5
-   $rm conftest*
-   # SGI C++ compiler will create directory out/ii_files/ for
-   # template instantiation
-   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
-   $rm out/* && rmdir out
-   cd ..
-   rmdir conftest
-   $rm conftest*
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
 
+  return status;
+}
+_LT_EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self=no
+  fi
 fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
+rm -fr conftest*
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
 fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
 
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+    if test "x$lt_cv_dlopen_self" = xyes; then
+      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+      { $as_echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  	  if test "$cross_compiling" = yes; then :
+  lt_cv_dlopen_self_static=cross
+else
+  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+  lt_status=$lt_dlunknown
+  cat > conftest.$ac_ext <<_LT_EOF
+#line 16070 "configure"
+#include "confdefs.h"
 
-  runpath_var=
-  allow_undefined_flag_F77=
-  enable_shared_with_static_runtimes_F77=no
-  archive_cmds_F77=
-  archive_expsym_cmds_F77=
-  old_archive_From_new_cmds_F77=
-  old_archive_from_expsyms_cmds_F77=
-  export_dynamic_flag_spec_F77=
-  whole_archive_flag_spec_F77=
-  thread_safe_flag_spec_F77=
-  hardcode_libdir_flag_spec_F77=
-  hardcode_libdir_flag_spec_ld_F77=
-  hardcode_libdir_separator_F77=
-  hardcode_direct_F77=no
-  hardcode_minus_L_F77=no
-  hardcode_shlibpath_var_F77=unsupported
-  link_all_deplibs_F77=unknown
-  hardcode_automatic_F77=no
-  module_cmds_F77=
-  module_expsym_cmds_F77=
-  always_export_symbols_F77=no
-  export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms_F77=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
 
-  case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
-    fi
-    ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
-  esac
+#include <stdio.h>
 
-  ld_shlibs_F77=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+#ifdef RTLD_GLOBAL
+#  define LT_DLGLOBAL		RTLD_GLOBAL
+#else
+#  ifdef DL_GLOBAL
+#    define LT_DLGLOBAL		DL_GLOBAL
+#  else
+#    define LT_DLGLOBAL		0
+#  endif
+#endif
 
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_F77='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-	whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	whole_archive_flag_spec_F77=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
+/* 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
 
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	ld_shlibs_F77=no
-	cat <<EOF 1>&2
+void fnord() { int i=42;}
+int main ()
+{
+  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+  int status = $lt_dlunknown;
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+  if (self)
+    {
+      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
+      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+      /* dlclose (self); */
+    }
+  else
+    puts (dlerror ());
 
-EOF
-      fi
-      ;;
+  return status;
+}
+_LT_EOF
+  if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+    (./conftest; exit; ) >&5 2>/dev/null
+    lt_status=$?
+    case x$lt_status in
+      x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+      x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+    esac
+  else :
+    # compilation failed
+    lt_cv_dlopen_self_static=no
+  fi
+fi
+rm -fr conftest*
 
-    amigaos*)
-      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-
-      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs_F77=no
-      ;;
 
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	allow_undefined_flag_F77=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+    fi
 
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      allow_undefined_flag_F77=unsupported
-      always_export_symbols_F77=no
-      enable_shared_with_static_runtimes_F77=yes
-      export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
+    CPPFLAGS="$save_CPPFLAGS"
+    LDFLAGS="$save_LDFLAGS"
+    LIBS="$save_LIBS"
+    ;;
+  esac
 
-    interix3*)
-      hardcode_direct_F77=no
-      hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_F77='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
+  case $lt_cv_dlopen_self in
+  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+  *) enable_dlopen_self=unknown ;;
+  esac
 
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	tmp_addflag=
-	case $cc_basename,$host_cpu in
-	pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag'
-	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag -Mnomain' ;;
-	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
-	  tmp_addflag=' -i_dynamic' ;;
-	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
-	  tmp_addflag=' -i_dynamic -nofor_main' ;;
-	ifc* | ifort*)			# Intel Fortran compiler
-	  tmp_addflag=' -nofor_main' ;;
-	esac
-	archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+  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
 
-	if test $supports_anon_versioning = yes; then
-	  archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-	fi
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
 
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-	ld_shlibs_F77=no
-	cat <<EOF 1>&2
 
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-	ld_shlibs_F77=no
-	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-_LT_EOF
-	;;
-	*)
-	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-	    archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-	    archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-	  else
-	    ld_shlibs_F77=no
-	  fi
-	;;
-      esac
-      ;;
 
-    sunos4*)
-      archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs_F77=no
-      fi
-      ;;
-    esac
 
-    if test "$ld_shlibs_F77" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec_F77=
-      export_dynamic_flag_spec_F77=
-      whole_archive_flag_spec_F77=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag_F77=unsupported
-      always_export_symbols_F77=yes
-      archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L_F77=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	hardcode_direct_F77=unsupported
-      fi
-      ;;
 
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-	  export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-	else
-	  export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-	fi
-	aix_use_runtimelinking=no
 
-	# Test if we are trying to use run time linking or normal
-	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
-	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-	  for ld_flag in $LDFLAGS; do
-  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-  	    aix_use_runtimelinking=yes
-  	    break
-  	  fi
-	  done
-	  ;;
-	esac
 
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
 
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      archive_cmds_F77=''
-      hardcode_direct_F77=yes
-      hardcode_libdir_separator_F77=':'
-      link_all_deplibs_F77=yes
 
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[012]|aix4.[012].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" && \
-  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	  then
-  	  # We have reworked collect2
-  	  hardcode_direct_F77=yes
-	  else
-  	  # We have old collect2
-  	  hardcode_direct_F77=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  hardcode_minus_L_F77=yes
-  	  hardcode_libdir_flag_spec_F77='-L$libdir'
-  	  hardcode_libdir_separator_F77=
-	  fi
-	  ;;
-	esac
-	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
-	fi
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-  	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
-	  else
-	    shared_flag='${wl}-bM:SRE'
-	  fi
-	fi
-      fi
+striplib=
+old_striplib=
+{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+  case $host_os in
+  darwin*)
+    if test -n "$STRIP" ; then
+      striplib="$STRIP -x"
+      old_striplib="$STRIP -S"
+      { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+    else
+      { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+    fi
+    ;;
+  *)
+    { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+fi
 
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols_F77=yes
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	allow_undefined_flag_F77='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-      program main
 
-      end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_f77_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-       hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-	archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
-	  allow_undefined_flag_F77="-z nodefs"
-	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # Determine the default libpath from the value encoded in an empty executable.
-	 cat >conftest.$ac_ext <<_ACEOF
-      program main
 
-      end
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_f77_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-	 hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag_F77=' ${wl}-bernotok'
-	  allow_undefined_flag_F77=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec_F77='$convenience'
-	  archive_cmds_need_lc_F77=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-	fi
-      fi
-      ;;
 
-    amigaos*)
-      archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs_F77=no
-      ;;
 
-    bsdi[45]*)
-      export_dynamic_flag_spec_F77=-rdynamic
-      ;;
 
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec_F77=' '
-      allow_undefined_flag_F77=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds_F77='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_F77='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_F77=yes
-      ;;
+  # Report which library types will actually be built
+  { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+  { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
 
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_F77='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc_F77=no
-      hardcode_direct_F77=no
-      hardcode_automatic_F77=yes
-      hardcode_shlibpath_var_F77=unsupported
-      whole_archive_flag_spec_F77=''
-      link_all_deplibs_F77=yes
-    if test "$GCC" = yes ; then
-    	output_verbose_link_cmd='echo'
-        archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs_F77=no
-          ;;
-      esac
+  { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+  test "$can_build_shared" = "no" && enable_shared=no
+
+  # On AIX, shared libraries and static libraries use the same namespace, and
+  # are all built from PIC.
+  case $host_os in
+  aix3*)
+    test "$enable_shared" = yes && enable_static=no
+    if test -n "$RANLIB"; then
+      archive_cmds="$archive_cmds~\$RANLIB \$lib"
+      postinstall_cmds='$RANLIB $lib'
     fi
-      ;;
+    ;;
 
-    dgux*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_shlibpath_var_F77=no
-      ;;
+  aix[4-9]*)
+    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+      test "$enable_shared" = yes && enable_static=no
+    fi
+    ;;
+  esac
+  { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
 
-    freebsd1*)
-      ld_shlibs_F77=no
-      ;;
+  { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+  # Make sure either enable_shared or enable_static is yes.
+  test "$enable_shared" = yes || enable_static=yes
+  { $as_echo "$as_me:$LINENO: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_F77=yes
-      hardcode_minus_L_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu | dragonfly*)
-      archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-	archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      hardcode_direct_F77=yes
+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
 
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-E'
-      ;;
+CC="$lt_save_CC"
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator_F77=:
 
-	hardcode_direct_F77=yes
-	export_dynamic_flag_spec_F77='${wl}-E'
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	hardcode_minus_L_F77=yes
-      fi
-      ;;
+archive_cmds_need_lc_CXX=no
+allow_undefined_flag_CXX=
+always_export_symbols_CXX=no
+archive_expsym_cmds_CXX=
+compiler_needs_object_CXX=no
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_direct_absolute_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_shlibpath_var_CXX=unsupported
+hardcode_automatic_CXX=no
+inherit_rpath_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
 
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      else
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator_F77=:
+# Source file extension for C++ test sources.
+ac_ext=cpp
 
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  hardcode_libdir_flag_spec_ld_F77='+b $libdir'
-	  hardcode_direct_F77=no
-	  hardcode_shlibpath_var_F77=no
-	  ;;
-	*)
-	  hardcode_direct_F77=yes
-	  export_dynamic_flag_spec_F77='${wl}-E'
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
 
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  hardcode_minus_L_F77=yes
-	  ;;
-	esac
-      fi
-      ;;
+# 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;"
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      link_all_deplibs_F77=yes
-      ;;
+  # Code to be used in simple link tests
+  lt_simple_link_test_code='int main(int, char *[]) { return(0); }'
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
-    newsos6)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_F77=yes
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    openbsd*)
-      hardcode_direct_F77=yes
-      hardcode_shlibpath_var_F77=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-	export_dynamic_flag_spec_F77='${wl}-E'
-      else
-       case $host_os in
-	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	   archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	   hardcode_libdir_flag_spec_F77='-R$libdir'
-	   ;;
-	 *)
-	   archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	   hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
-	   ;;
-       esac
-      fi
-      ;;
 
-    os2*)
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_minus_L_F77=yes
-      allow_undefined_flag_F77=unsupported
-      archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
 
-    osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	allow_undefined_flag_F77=' -expect_unresolved \*'
-	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_F77=:
-      ;;
 
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
-      else
-	allow_undefined_flag_F77=' -expect_unresolved \*'
-	archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
-	# Both c and cxx compiler support -rpath directly
-	hardcode_libdir_flag_spec_F77='-rpath $libdir'
-      fi
-      hardcode_libdir_separator_F77=:
-      ;;
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
-    solaris*)
-      no_undefined_flag_F77=' -z text'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-	wlarc=''
-	archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec_F77='-R$libdir'
-      hardcode_shlibpath_var_F77=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
- 	# The compiler driver will combine linker options so we
- 	# cannot just pass the convience library names through
- 	# without $wl, iff we do not link with $LD.
- 	# Luckily, gcc supports the same syntax we need for Sun Studio.
- 	# Supported since Solaris 2.6 (maybe 2.5.1?)
- 	case $wlarc in
- 	'')
- 	  whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
- 	*)
- 	  whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- 	esac ;;
-      esac
-      link_all_deplibs_F77=yes
-      ;;
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-	# Use $CC to link under sequent, because it throws in some extra .o
-	# files that make .init and .fini sections work.
-	archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_direct_F77=yes
-      hardcode_minus_L_F77=yes
-      hardcode_shlibpath_var_F77=no
-      ;;
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
-    sysv4)
-      case $host_vendor in
-	sni)
-	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct_F77=yes # is this really true???
+
+  # save warnings/boilerplate of simple test code
+  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*
+
+  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*
+
+
+  # Allow CC to be a program name with arguments.
+  lt_save_CC=$CC
+  lt_save_LD=$LD
+  lt_save_GCC=$GCC
+  GCC=$GXX
+  lt_save_with_gnu_ld=$with_gnu_ld
+  lt_save_path_LD=$lt_cv_path_LD
+  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+  else
+    $as_unset lt_cv_prog_gnu_ld
+  fi
+  if test -n "${lt_cv_path_LDCXX+set}"; then
+    lt_cv_path_LD=$lt_cv_path_LDCXX
+  else
+    $as_unset lt_cv_path_LD
+  fi
+  test -z "${LDCXX+set}" || LD=$LDCXX
+  CC=${CXX-"c++"}
+  compiler=$CC
+  compiler_CXX=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+  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_prog_compiler_no_builtin_flag_CXX=' -fno-builtin'
+    else
+      lt_prog_compiler_no_builtin_flag_CXX=
+    fi
+
+    if test "$GXX" = yes; then
+      # Set up default GNU C++ configuration
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  { $as_echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | ?:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the pathname of ld
+      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+  { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$LD"; then
+  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+  for ac_dir in $PATH; do
+    IFS="$lt_save_ifs"
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some variants of GNU ld only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+      *GNU* | *'with BFD'*)
+	test "$with_gnu_ld" != no && break
 	;;
-	siemens)
-	  ## LD is ld it makes a PLAMLIB
-	  ## CC just makes a GrossModule.
-	  archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  reload_cmds_F77='$CC -r -o $output$reload_objs'
-	  hardcode_direct_F77=no
-        ;;
-	motorola)
-	  archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+      *)
+	test "$with_gnu_ld" != yes && break
 	;;
       esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_F77=no
-      ;;
-
-    sysv4.3*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_F77=no
-      export_dynamic_flag_spec_F77='-Bexport'
-      ;;
+    fi
+  done
+  IFS="$lt_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
 
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_shlibpath_var_F77=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	ld_shlibs_F77=yes
-      fi
-      ;;
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+   { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+  lt_cv_prog_gnu_ld=yes
+  ;;
+*)
+  lt_cv_prog_gnu_ld=no
+  ;;
+esac
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
 
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      no_undefined_flag_F77='${wl}-z,text'
-      archive_cmds_need_lc_F77=no
-      hardcode_shlibpath_var_F77=no
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag_F77='${wl}-z,text'
-      allow_undefined_flag_F77='${wl}-z,nodefs'
-      archive_cmds_need_lc_F77=no
-      hardcode_shlibpath_var_F77=no
-      hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator_F77=':'
-      link_all_deplibs_F77=yes
-      export_dynamic_flag_spec_F77='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    uts4*)
-      archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_F77='-L$libdir'
-      hardcode_shlibpath_var_F77=no
-      ;;
 
-    *)
-      ld_shlibs_F77=no
-      ;;
-    esac
-  fi
 
-echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
-echo "${ECHO_T}$ld_shlibs_F77" >&6
-test "$ld_shlibs_F77" = no && can_build_shared=no
+      # Check if GNU C++ uses GNU ld as the underlying linker, since the
+      # archiving commands below assume that GNU ld is being used.
+      if test "$with_gnu_ld" = yes; then
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+        archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_F77" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_F77=yes
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_F77 in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+        # If 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}'
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_F77
-	pic_flag=$lt_prog_compiler_pic_F77
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_F77
-        allow_undefined_flag_F77=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-	  archive_cmds_need_lc_F77=no
+        # ancient GNU ld didn't support --whole-archive et. al.
+        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+	  $GREP 'no-whole-archive' > /dev/null; then
+          whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
         else
-	  archive_cmds_need_lc_F77=yes
+          whole_archive_flag_spec_CXX=
         fi
-        allow_undefined_flag_F77=$lt_save_allow_undefined_flag
       else
-        cat conftest.err 1>&5
+        with_gnu_ld=no
+        wlarc=
+
+        # A generic and very simple default shared library creation
+        # command for GNU C++ for the case where it uses the native
+        # linker, instead of GNU ld.  If possible, this setting should
+        # overridden to take advantage of the native linker features on
+        # the platform it is being used on.
+        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
       fi
-      $rm conftest*
-      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
-      ;;
-    esac
-  fi
-  ;;
-esac
 
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-need_lib_prefix=unknown
-hardcode_into_libs=no
+      # Commands to make compiler produce verbose output that lists
+      # what "hidden" libraries, object files and flags are used when
+      # linking a shared library.
+      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
 
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
+    else
+      GXX=no
+      with_gnu_ld=no
+      wlarc=
+    fi
 
-case $host_os in
-aix3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
-  shlibpath_var=LIBPATH
+    # PORTME: fill in a description of your system's C++ link characteristics
+    { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+    ld_shlibs_CXX=yes
+    case $host_os in
+      aix3*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=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
 
-  # AIX 3 has no versioning support, so we append a major version to the name.
-  soname_spec='${libname}${release}${shared_ext}$major'
-  ;;
+          exp_sym_flag='-bexport'
+          no_entry_flag='-bnoentry'
+        fi
 
-aix4* | aix5*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  hardcode_into_libs=yes
-  if test "$host_cpu" = ia64; then
-    # AIX 5 supports IA64
-    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
-    shlibpath_var=LD_LIBRARY_PATH
-  else
-    # With GCC up to 2.95.x, collect2 would create an import file
-    # for dependence libraries.  The import file would start with
-    # the line `#! .'.  This would cause the generated library to
-    # depend on `.', always an invalid library.  This was fixed in
-    # development snapshots of GCC prior to 3.0.
-    case $host_os in
-      aix4 | aix4.[01] | aix4.[01].*)
-      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
-	   echo ' yes '
-	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
-	:
-      else
-	can_build_shared=no
-      fi
-      ;;
-    esac
-    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
-    # soname into executable. Probably we can add versioning support to
-    # collect2, so additional links can be useful in future.
-    if test "$aix_use_runtimelinking" = yes; then
-      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
-      # instead of lib<name>.a to let people know that these are not
-      # typical AIX shared libraries.
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-    else
-      # We preserve .a as extension for shared libraries through AIX4.2
-      # and later when we are not doing run time linking.
-      library_names_spec='${libname}${release}.a $libname.a'
-      soname_spec='${libname}${release}${shared_ext}$major'
-    fi
-    shlibpath_var=LIBPATH
-  fi
-  ;;
+        # When large executables or shared objects are built, AIX ld can
+        # have problems creating the table of contents.  If linking a library
+        # or program results in "error TOC overflow" add -mminimal-toc to
+        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
+        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+        archive_cmds_CXX=''
+        hardcode_direct_CXX=yes
+        hardcode_direct_absolute_CXX=yes
+        hardcode_libdir_separator_CXX=':'
+        link_all_deplibs_CXX=yes
+        file_list_spec_CXX='${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
+	    hardcode_direct_CXX=unsupported
+	    # It fails to find uninstalled libraries when the uninstalled
+	    # path is not listed in the libpath.  Setting hardcode_minus_L
+	    # to unsupported forces relinking
+	    hardcode_minus_L_CXX=yes
+	    hardcode_libdir_flag_spec_CXX='-L$libdir'
+	    hardcode_libdir_separator_CXX=
+	  fi
+          esac
+          shared_flag='-shared'
+	  if test "$aix_use_runtimelinking" = yes; then
+	    shared_flag="$shared_flag "'${wl}-G'
+	  fi
+        else
+          # not using gcc
+          if test "$host_cpu" = ia64; then
+	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+	  # chokes on -Wl,-G. The following line is correct:
+	  shared_flag='-G'
+          else
+	    if test "$aix_use_runtimelinking" = yes; then
+	      shared_flag='${wl}-G'
+	    else
+	      shared_flag='${wl}-bM:SRE'
+	    fi
+          fi
+        fi
 
-amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
-  ;;
+        export_dynamic_flag_spec_CXX='${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.
+        always_export_symbols_CXX=yes
+        if test "$aix_use_runtimelinking" = yes; then
+          # Warning - without using the other runtime loading flags (-brtl),
+          # -berok will link without error, but may produce a broken library.
+          allow_undefined_flag_CXX='-berok'
+          # Determine the default libpath from the value encoded in an empty
+          # executable.
+          cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-beos*)
-  library_names_spec='${libname}${shared_ext}'
-  dynamic_linker="$host_os ld.so"
-  shlibpath_var=LIBRARY_PATH
-  ;;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
 
-bsdi[45]*)
-  version_type=linux
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
-  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
-  # the default ld.so.conf also contains /usr/contrib/lib and
-  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
-  # libtool to hard-code these into programs
-  ;;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`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 "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-cygwin* | mingw* | pw32*)
-  version_type=windows
-  shrext_cmds=".dll"
-  need_version=no
-  need_lib_prefix=no
 
-  case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
-    library_names_spec='$libname.dll.a'
-    # DLL is installed to $(libdir)/../bin by postinstall_cmds
-    postinstall_cmds='base_file=`basename \${file}`~
-      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
-      dldir=$destdir/`dirname \$dlpath`~
-      test -d \$dldir || mkdir -p \$dldir~
-      $install_prog $dir/$dlname \$dldir/$dlname~
-      chmod a+x \$dldir/$dlname'
-    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
-      dlpath=$dir/\$dldll~
-       $rm \$dlpath'
-    shlibpath_overrides_runpath=yes
+fi
 
-    case $host_os in
-    cygwin*)
-      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
-      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
-      ;;
-    mingw*)
-      # MinGW DLLs use traditional 'lib' prefix
-      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
-        # It is most probably a Windows format PATH printed by
-        # mingw gcc, but we are running on Cygwin. Gcc prints its search
-        # path with ; separators, and with drive letters. We can handle the
-        # drive letters (cygwin fileutils understands them), so leave them,
-        # especially as we might pass files found there to a mingw objdump,
-        # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-      else
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-      fi
-      ;;
-    pw32*)
-      # pw32 DLLs use 'pw' prefix rather than 'lib'
-      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      ;;
-    esac
-    ;;
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-  *)
-    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
-    ;;
+          hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+          archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+        else
+          if test "$host_cpu" = ia64; then
+	    hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib'
+	    allow_undefined_flag_CXX="-z nodefs"
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+          else
+	    # Determine the default libpath from the value encoded in an
+	    # empty executable.
+	    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`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 "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+	    # Warning - without using the other run time loading flags,
+	    # -berok will link without error, but may produce a broken library.
+	    no_undefined_flag_CXX=' ${wl}-bernotok'
+	    allow_undefined_flag_CXX=' ${wl}-berok'
+	    # Exported symbols can be pulled into shared objects from archives
+	    whole_archive_flag_spec_CXX='$convenience'
+	    archive_cmds_need_lc_CXX=yes
+	    # This is similar to how AIX traditionally builds its shared
+	    # libraries.
+	    archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+          fi
+        fi
+        ;;
+
+      beos*)
+	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	  allow_undefined_flag_CXX=unsupported
+	  # Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	  # support --undefined.  This deserves some investigation.  FIXME
+	  archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
+
+      chorus*)
+        case $cc_basename in
+          *)
+	  # FIXME: insert proper C++ library support
+	  ld_shlibs_CXX=no
+	  ;;
+        esac
+        ;;
+
+      cygwin* | mingw* | pw32* | cegcc*)
+        # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+        # as there is no search path for DLLs.
+        hardcode_libdir_flag_spec_CXX='-L$libdir'
+        allow_undefined_flag_CXX=unsupported
+        always_export_symbols_CXX=no
+        enable_shared_with_static_runtimes_CXX=yes
+
+        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+          archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+          # If the export-symbols file already is a .def file (1st line
+          # is EXPORTS), use it as is; otherwise, prepend...
+          archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	    cp $export_symbols $output_objdir/$soname.def;
+          else
+	    echo EXPORTS > $output_objdir/$soname.def;
+	    cat $export_symbols >> $output_objdir/$soname.def;
+          fi~
+          $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+        else
+          ld_shlibs_CXX=no
+        fi
+        ;;
+      darwin* | rhapsody*)
+
+
+  archive_cmds_need_lc_CXX=no
+  hardcode_direct_CXX=no
+  hardcode_automatic_CXX=yes
+  hardcode_shlibpath_var_CXX=unsupported
+  whole_archive_flag_spec_CXX=''
+  link_all_deplibs_CXX=yes
+  allow_undefined_flag_CXX="$_lt_dar_allow_undefined"
+  case $cc_basename in
+     ifort*) _lt_dar_can_shared=yes ;;
+     *) _lt_dar_can_shared=$GCC ;;
   esac
-  dynamic_linker='Win32 ld.exe'
-  # FIXME: first we should search . and the directory the executable is in
-  shlibpath_var=PATH
-  ;;
+  if test "$_lt_dar_can_shared" = "yes"; then
+    output_verbose_link_cmd=echo
+    archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_CXX="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}"
+    module_expsym_cmds_CXX="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}"
+       if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+      archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+      archive_expsym_cmds_CXX="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
 
-darwin* | rhapsody*)
-  dynamic_linker="$host_os dyld"
-  version_type=darwin
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
-  soname_spec='${libname}${release}${major}$shared_ext'
-  shlibpath_overrides_runpath=yes
-  shlibpath_var=DYLD_LIBRARY_PATH
-  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
   else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+  ld_shlibs_CXX=no
   fi
-  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
-  ;;
 
-dgux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
+	;;
 
-freebsd1*)
-  dynamic_linker=no
-  ;;
+      dgux*)
+        case $cc_basename in
+          ec++*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          ghcx*)
+	    # Green Hills C++ Compiler
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
+      freebsd[12]*)
+        # C++ shared libraries reported to be fairly broken before
+	# switch to ELF
+        ld_shlibs_CXX=no
+        ;;
 
-freebsd* | dragonfly*)
-  # DragonFly does not have aout.  When/if they implement a new
-  # versioning mechanism, adjust this.
-  if test -x /usr/bin/objformat; then
-    objformat=`/usr/bin/objformat`
-  else
-    case $host_os in
-    freebsd[123]*) objformat=aout ;;
-    *) objformat=elf ;;
-    esac
-  fi
-  version_type=freebsd-$objformat
-  case $version_type in
-    freebsd-elf*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-      need_version=no
-      need_lib_prefix=no
-      ;;
-    freebsd-*)
-      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
-      need_version=yes
-      ;;
-  esac
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_os in
-  freebsd2*)
-    shlibpath_overrides_runpath=yes
-    ;;
-  freebsd3.[01]* | freebsdelf3.[01]*)
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
-  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
-    shlibpath_overrides_runpath=no
-    hardcode_into_libs=yes
-    ;;
-  freebsd*) # from 4.6 on
-    shlibpath_overrides_runpath=yes
-    hardcode_into_libs=yes
-    ;;
-  esac
-  ;;
+      freebsd-elf*)
+        archive_cmds_need_lc_CXX=no
+        ;;
 
-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
-  ;;
+      freebsd* | dragonfly*)
+        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+        # conventions
+        ld_shlibs_CXX=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'
-  ;;
+      gnu*)
+        ;;
 
-interix3*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  ;;
+      hpux9*)
+        hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        export_dynamic_flag_spec_CXX='${wl}-E'
+        hardcode_direct_CXX=yes
+        hardcode_minus_L_CXX=yes # Not in the search PATH,
+				             # but as the default
+				             # location of the library.
+
+        case $cc_basename in
+          CC*)
+            # FIXME: insert proper C++ library support
+            ld_shlibs_CXX=no
+            ;;
+          aCC*)
+            archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            # Commands to make compiler produce verbose output that lists
+            # what "hidden" libraries, object files and flags are used when
+            # linking a shared library.
+            #
+            # There doesn't appear to be a way to prevent this compiler from
+            # explicitly linking system object files so we need to strip them
+            # from the output so that they don't get included in the library
+            # dependencies.
+            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+            ;;
+          *)
+            if test "$GXX" = yes; then
+              archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+            else
+              # FIXME: insert proper C++ library support
+              ld_shlibs_CXX=no
+            fi
+            ;;
+        esac
+        ;;
 
-irix5* | irix6* | nonstopux*)
-  case $host_os in
-    nonstopux*) version_type=nonstopux ;;
-    *)
-	if test "$lt_cv_prog_gnu_ld" = yes; then
-		version_type=linux
-	else
-		version_type=irix
-	fi ;;
-  esac
-  need_lib_prefix=no
-  need_version=no
-  soname_spec='${libname}${release}${shared_ext}$major'
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
-  case $host_os in
-  irix5* | nonstopux*)
-    libsuff= shlibsuff=
-    ;;
-  *)
-    case $LD in # libtool.m4 will add one of these switches to LD
-    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
-      libsuff= shlibsuff= libmagic=32-bit;;
-    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
-      libsuff=32 shlibsuff=N32 libmagic=N32;;
-    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
-      libsuff=64 shlibsuff=64 libmagic=64-bit;;
-    *) libsuff= shlibsuff= libmagic=never-match;;
-    esac
-    ;;
-  esac
-  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
-  shlibpath_overrides_runpath=no
-  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
-  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
-  hardcode_into_libs=yes
-  ;;
+      hpux10*|hpux11*)
+        if test $with_gnu_ld = no; then
+	  hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+	  hardcode_libdir_separator_CXX=:
 
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
-  dynamic_linker=no
-  ;;
+          case $host_cpu in
+            hppa*64*|ia64*)
+              ;;
+            *)
+	      export_dynamic_flag_spec_CXX='${wl}-E'
+              ;;
+          esac
+        fi
+        case $host_cpu in
+          hppa*64*|ia64*)
+            hardcode_direct_CXX=no
+            hardcode_shlibpath_var_CXX=no
+            ;;
+          *)
+            hardcode_direct_CXX=yes
+            hardcode_direct_absolute_CXX=yes
+            hardcode_minus_L_CXX=yes # Not in the search PATH,
+					         # but as the default
+					         # location of the library.
+            ;;
+        esac
 
-# This must be Linux ELF.
-linux*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  # This implies no fast_install, which is unacceptable.
-  # Some rework will be needed to allow for fast_install
-  # before this can be enabled.
-  hardcode_into_libs=yes
+        case $cc_basename in
+          CC*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          aCC*)
+	    case $host_cpu in
+	      hppa*64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      ia64*)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	      *)
+	        archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	        ;;
+	    esac
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test $with_gnu_ld = no; then
+	        case $host_cpu in
+	          hppa*64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          ia64*)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	          *)
+	            archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	            ;;
+	        esac
+	      fi
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 18212 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
+      interix[3-9]*)
+	hardcode_direct_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	export_dynamic_flag_spec_CXX='${wl}-E'
+	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+	# Instead, shared libraries are loaded at an image base (0x10000000 by
+	# default) and relocated if they conflict, which is a slow very memory
+	# consuming and fragmenting process.  To avoid this, we pick a random,
+	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+	archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+	;;
+      irix5* | irix6*)
+        case $cc_basename in
+          CC*)
+	    # SGI C++
+	    archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    if test "$GXX" = yes; then
+	      if test "$with_gnu_ld" = no; then
+	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	      else
+	        archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+	      fi
+	    fi
+	    link_all_deplibs_CXX=yes
+	    ;;
+        esac
+        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+        hardcode_libdir_separator_CXX=:
+        inherit_rpath_CXX=yes
         ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
 
-  # Append ld.so.conf contents to the search path
-  if test -f /etc/ld.so.conf; then
-    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
-  fi
+      linux* | k*bsd*-gnu)
+        case $cc_basename in
+          KCC*)
+	    # Kuck and Associates, Inc. (KAI) C++ Compiler
 
-  # 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'
-  ;;
+	    # KCC will only create a shared library if the output file
+	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
+	    # to its proper name (with version) after linking.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+	    archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+
+	    # Archives containing C++ object files must be created using
+	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+	    old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+	    ;;
+	  icpc* | 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."*)
+	        archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	      *)  # Version 8.0 or newer
+	        tmp_idyn=
+	        case $host_cpu in
+		  ia64*) tmp_idyn=' -i_dynamic';;
+		esac
+	        archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+		archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+		;;
+	    esac
+	    archive_cmds_need_lc_CXX=no
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+	    ;;
+          pgCC* | pgcpp*)
+            # Portland Group C++ compiler
+	    case `$CC -V` in
+	    *pgCC\ [1-5]* | *pgcpp\ [1-5]*)
+	      prelink_cmds_CXX='tpldir=Template.dir~
+		rm -rf $tpldir~
+		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+		compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+	      old_archive_cmds_CXX='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 | $NL2SP`~
+		$RANLIB $oldlib'
+	      archive_cmds_CXX='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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='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 | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    *) # Version 6 will use weak symbols
+	      archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+	      archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+	      ;;
+	    esac
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
+	    hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+            ;;
+	  cxx*)
+	    # Compaq C++
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
 
-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
-  ;;
+	    runpath_var=LD_RUN_PATH
+	    hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+	    hardcode_libdir_separator_CXX=:
 
-newsos6)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  xl*)
+	    # IBM XL 8.0 on PPC, with GNU ld
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	    export_dynamic_flag_spec_CXX='${wl}--export-dynamic'
+	    archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    if test "x$supports_anon_versioning" = xyes; then
+	      archive_expsym_cmds_CXX='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
+	      no_undefined_flag_CXX=' -zdefs'
+	      archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	      archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+	      hardcode_libdir_flag_spec_CXX='-R$libdir'
+	      whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	      compiler_needs_object_CXX=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='echo'
+
+	      # Archives containing C++ object files must be created using
+	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	      # necessary to make sure instantiated templates are included
+	      # in the archive.
+	      old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
 
-nto-qnx*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  ;;
+      lynxos*)
+        # FIXME: insert proper C++ library support
+	ld_shlibs_CXX=no
+	;;
 
-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
+      m88k*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
 	;;
-      *)
-	shlibpath_overrides_runpath=yes
+
+      mvs*)
+        case $cc_basename in
+          cxx*)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	  *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+	esac
 	;;
-      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
-  ;;
+      netbsd*)
+        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	  archive_cmds_CXX='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+	  wlarc=
+	  hardcode_libdir_flag_spec_CXX='-R$libdir'
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	fi
+	# Workaround some broken pre-1.5 toolchains
+	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+	;;
 
-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"
-  ;;
+      *nto* | *qnx*)
+        ld_shlibs_CXX=yes
+	;;
 
-solaris*)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=yes
-  hardcode_into_libs=yes
-  # ldd complains unless libraries are executable
-  postinstall_cmds='chmod +x $lib'
-  ;;
+      openbsd2*)
+        # C++ shared libraries are fairly broken
+	ld_shlibs_CXX=no
+	;;
 
-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
-  ;;
+      openbsd*)
+	if test -f /usr/libexec/ld.so; then
+	  hardcode_direct_CXX=yes
+	  hardcode_shlibpath_var_CXX=no
+	  hardcode_direct_absolute_CXX=yes
+	  archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+	  hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	    archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+	    export_dynamic_flag_spec_CXX='${wl}-E'
+	    whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+	  fi
+	  output_verbose_link_cmd=echo
+	else
+	  ld_shlibs_CXX=no
+	fi
+	;;
 
-sysv4 | sysv4.3*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  case $host_vendor in
-    sni)
-      shlibpath_overrides_runpath=no
-      need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
-      runpath_var=LD_RUN_PATH
-      ;;
-    siemens)
-      need_lib_prefix=no
-      ;;
-    motorola)
-      need_lib_prefix=no
-      need_version=no
-      shlibpath_overrides_runpath=no
-      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
-      ;;
-  esac
-  ;;
+      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.
+	    archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+	    hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir'
+	    hardcode_libdir_separator_CXX=:
+
+	    # Archives containing C++ object files must be created using
+	    # the KAI C++ compiler.
+	    case $host in
+	      osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;;
+	      *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;;
+	    esac
+	    ;;
+          RCC*)
+	    # Rational C++ 2.4.1
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          cxx*)
+	    case $host in
+	      osf3*)
+	        allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+		;;
+	      *)
+	        allow_undefined_flag_CXX=' -expect_unresolved \*'
+	        archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	        archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+	          echo "-hidden">> $lib.exp~
+	          $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp  `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+	          $RM $lib.exp'
+	        hardcode_libdir_flag_spec_CXX='-rpath $libdir'
+		;;
+	    esac
 
-sysv4*MP*)
-  if test -d /usr/nec ;then
-    version_type=linux
-    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
-    soname_spec='$libname${shared_ext}.$major'
-    shlibpath_var=LD_LIBRARY_PATH
-  fi
-  ;;
+	    hardcode_libdir_separator_CXX=:
 
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
-  version_type=freebsd-elf
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  hardcode_into_libs=yes
-  if test "$with_gnu_ld" = yes; then
-    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
-    shlibpath_overrides_runpath=no
-  else
-    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
-    case $host_os in
-      sco3.2v5*)
-        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
-	;;
-    esac
-  fi
-  sys_lib_dlsearch_path_spec='/usr/lib'
-  ;;
+	    # Commands to make compiler produce verbose output that lists
+	    # what "hidden" libraries, object files and flags are used when
+	    # linking a shared library.
+	    #
+	    # There doesn't appear to be a way to prevent this compiler from
+	    # explicitly linking system object files so we need to strip them
+	    # from the output so that they don't get included in the library
+	    # dependencies.
+	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+	    ;;
+	  *)
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+	      case $host in
+	        osf3*)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	        *)
+	          archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+		  ;;
+	      esac
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+	      hardcode_libdir_separator_CXX=:
+
+	      # Commands to make compiler produce verbose output that lists
+	      # what "hidden" libraries, object files and flags are used when
+	      # linking a shared library.
+	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+	    else
+	      # FIXME: insert proper C++ library support
+	      ld_shlibs_CXX=no
+	    fi
+	    ;;
+        esac
+        ;;
 
-uts4*)
-  version_type=linux
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  ;;
+      psos*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
 
-*)
-  dynamic_linker=no
-  ;;
-esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
-test "$dynamic_linker" = no && can_build_shared=no
+      sunos4*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.x
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          lcc*)
+	    # Lucid
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
 
-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
+      solaris*)
+        case $cc_basename in
+          CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+            archive_cmds_need_lc_CXX=yes
+	    no_undefined_flag_CXX=' -zdefs'
+	    archive_cmds_CXX='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+	    archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	      $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	    hardcode_libdir_flag_spec_CXX='-R$libdir'
+	    hardcode_shlibpath_var_CXX=no
+	    case $host_os in
+	      solaris2.[0-5] | solaris2.[0-5].*) ;;
+	      *)
+		# The compiler driver will combine and reorder linker options,
+		# but understands `-z linker_flag'.
+	        # Supported since Solaris 2.6 (maybe 2.5.1?)
+		whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract'
+	        ;;
+	    esac
+	    link_all_deplibs_CXX=yes
 
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action_F77=
-if test -n "$hardcode_libdir_flag_spec_F77" || \
-   test -n "$runpath_var_F77" || \
-   test "X$hardcode_automatic_F77" = "Xyes" ; then
+	    output_verbose_link_cmd='echo'
 
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_F77" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
-     test "$hardcode_minus_L_F77" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_F77=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_F77=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_F77=unsupported
-fi
-echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
-echo "${ECHO_T}$hardcode_action_F77" >&6
+	    # Archives containing C++ object files must be created using
+	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
+	    # necessary to make sure instantiated templates are included
+	    # in the archive.
+	    old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs'
+	    ;;
+          gcx*)
+	    # Green Hills C++ Compiler
+	    archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
 
-if test "$hardcode_action_F77" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
-fi
+	    # The C++ compiler must be used to create the archive.
+	    old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+	    ;;
+          *)
+	    # GNU C++ compiler with Solaris linker
+	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+	      no_undefined_flag_CXX=' ${wl}-z ${wl}defs'
+	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+	        archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      else
+	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
+	        # platform.
+	        archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+	        archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+	        # Commands to make compiler produce verbose output that lists
+	        # what "hidden" libraries, object files and flags are used when
+	        # linking a shared library.
+	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+	      fi
+
+	      hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+	      case $host_os in
+		solaris2.[0-5] | solaris2.[0-5].*) ;;
+		*)
+		  whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+		  ;;
+	      esac
+	    fi
+	    ;;
+        esac
+        ;;
 
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_CXX='${wl}-z,text'
+      archive_cmds_need_lc_CXX=no
+      hardcode_shlibpath_var_CXX=no
+      runpath_var='LD_RUN_PATH'
 
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_F77 \
-    CC_F77 \
-    LD_F77 \
-    lt_prog_compiler_wl_F77 \
-    lt_prog_compiler_pic_F77 \
-    lt_prog_compiler_static_F77 \
-    lt_prog_compiler_no_builtin_flag_F77 \
-    export_dynamic_flag_spec_F77 \
-    thread_safe_flag_spec_F77 \
-    whole_archive_flag_spec_F77 \
-    enable_shared_with_static_runtimes_F77 \
-    old_archive_cmds_F77 \
-    old_archive_from_new_cmds_F77 \
-    predep_objects_F77 \
-    postdep_objects_F77 \
-    predeps_F77 \
-    postdeps_F77 \
-    compiler_lib_search_path_F77 \
-    archive_cmds_F77 \
-    archive_expsym_cmds_F77 \
-    postinstall_cmds_F77 \
-    postuninstall_cmds_F77 \
-    old_archive_from_expsyms_cmds_F77 \
-    allow_undefined_flag_F77 \
-    no_undefined_flag_F77 \
-    export_symbols_cmds_F77 \
-    hardcode_libdir_flag_spec_F77 \
-    hardcode_libdir_flag_spec_ld_F77 \
-    hardcode_libdir_separator_F77 \
-    hardcode_automatic_F77 \
-    module_cmds_F77 \
-    module_expsym_cmds_F77 \
-    lt_cv_prog_compiler_c_o_F77 \
-    exclude_expsyms_F77 \
-    include_expsyms_F77; do
-
-    case $var in
-    old_archive_cmds_F77 | \
-    old_archive_from_new_cmds_F77 | \
-    archive_cmds_F77 | \
-    archive_expsym_cmds_F77 | \
-    module_cmds_F77 | \
-    module_expsym_cmds_F77 | \
-    old_archive_from_expsyms_cmds_F77 | \
-    export_symbols_cmds_F77 | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+      case $cc_basename in
+        CC*)
+	  archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+      esac
       ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+
+      sysv5* | sco3.2v5* | sco5v6*)
+	# Note: We can NOT use -z defs as we might desire, because we do not
+	# link with -lc, and that would cause any symbols used from libc to
+	# always be unresolved, which means just about no library would
+	# ever link correctly.  If we're not using GNU ld we use -z text
+	# though, which does catch some bad symbols but isn't as heavy-handed
+	# as -z defs.
+	no_undefined_flag_CXX='${wl}-z,text'
+	allow_undefined_flag_CXX='${wl}-z,nodefs'
+	archive_cmds_need_lc_CXX=no
+	hardcode_shlibpath_var_CXX=no
+	hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir'
+	hardcode_libdir_separator_CXX=':'
+	link_all_deplibs_CXX=yes
+	export_dynamic_flag_spec_CXX='${wl}-Bexport'
+	runpath_var='LD_RUN_PATH'
+
+	case $cc_basename in
+          CC*)
+	    archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	  *)
+	    archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	    ;;
+	esac
       ;;
-    esac
-  done
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
+      tandem*)
+        case $cc_basename in
+          NCC*)
+	    # NonStop-UX NCC 3.20
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+          *)
+	    # FIXME: insert proper C++ library support
+	    ld_shlibs_CXX=no
+	    ;;
+        esac
+        ;;
 
-cfgfile="$ofile"
+      vxworks*)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
 
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+      *)
+        # FIXME: insert proper C++ library support
+        ld_shlibs_CXX=no
+        ;;
+    esac
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+    { $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+    test "$ld_shlibs_CXX" = no && can_build_shared=no
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_F77
-
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A C compiler.
-LTCC=$lt_LTCC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
-
-# A language-specific compiler.
-CC=$lt_compiler_F77
-
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_F77
-
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# The linker used to build libraries.
-LD=$lt_LD_F77
-
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
-
-# A BSD-compatible nm program.
-NM=$lt_NM
-
-# A symbol stripping program
-STRIP=$lt_STRIP
-
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
-
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
-
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
-
-# Used on cygwin: assembler.
-AS="$AS"
+    GCC_CXX="$GXX"
+    LD_CXX="$LD"
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
+    ## 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...
+    # Dependencies to place before and after the object being linked:
+predep_objects_CXX=
+postdep_objects_CXX=
+predeps_CXX=
+postdeps_CXX=
+compiler_lib_search_path_CXX=
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
+cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+  Foo (void) { a = 0; }
+private:
+  int a;
+};
+_LT_EOF
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_F77
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
 
-# Old archive suffix (normally "a").
-libext="$libext"
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
 
-# Executable file suffix (normally "").
-exeext="$exeext"
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_CXX"; then
+	     compiler_lib_search_path_CXX="${prev}${p}"
+	   else
+	     compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_CXX"; then
+	   postdeps_CXX="${prev}${p}"
+	 else
+	   postdeps_CXX="${postdeps_CXX} ${prev}${p}"
+	 fi
+       fi
+       ;;
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_F77
-pic_mode=$pic_mode
+    *.$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
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_CXX"; then
+	   predep_objects_CXX="$p"
+	 else
+	   predep_objects_CXX="$predep_objects_CXX $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_CXX"; then
+	   postdep_objects_CXX="$p"
+	 else
+	   postdep_objects_CXX="$postdep_objects_CXX $p"
+	 fi
+       fi
+       ;;
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+    *) ;; # Ignore the rest.
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
+    esac
+  done
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling CXX test program"
+fi
 
-# Do we need a version for libraries?
-need_version=$need_version
+$RM -f confest.$objext
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+# PORTME: override above test on systems where it is broken
+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.
+  predep_objects_CXX=
+  postdep_objects_CXX=
+  postdeps_CXX=
+  ;;
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+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
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+    if test "$solaris_use_stlport4" != yes; then
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_F77
+solaris*)
+  case $cc_basename in
+  CC*)
+    # 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
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+    # 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
+      postdeps_CXX='-library=Cstd -library=Crun'
+    fi
+    ;;
+  esac
+  ;;
+esac
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+ compiler_lib_search_dirs_CXX=
+if test -n "${compiler_lib_search_path_CXX}"; then
+ compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
 
-# Library versioning type.
-version_type=$version_type
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_F77
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_F77
-archive_expsym_cmds=$lt_archive_expsym_cmds_F77
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_F77
-module_expsym_cmds=$lt_module_expsym_cmds_F77
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_F77
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_F77
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_F77
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_F77
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_F77
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77
+    lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+  # C++ specific cases for pic, static, wl, etc.
+  if test "$GXX" = yes; then
+    lt_prog_compiler_wl_CXX='-Wl,'
+    lt_prog_compiler_static_CXX='-static'
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_F77
+    case $host_os in
+    aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_CXX='-Bstatic'
+      fi
+      ;;
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_F77
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_CXX='-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_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
-
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_F77
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_F77
-
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
-
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_F77"
-
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_F77
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_F77
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_F77
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_F77
-
-# ### END LIBTOOL TAG CONFIG: $tagname
-
-__EOF__
-
-
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-	else
-	  tagname=""
-	fi
-	;;
-
-      GCJ)
-	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
-
-
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-objext_GCJ=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}\n"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
-
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
-
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${GCJ-"gcj"}
-compiler=$CC
-compiler_GCJ=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-archive_cmds_need_lc_GCJ=no
-
-old_archive_cmds_GCJ=$old_archive_cmds
-
-
-lt_prog_compiler_no_builtin_flag_GCJ=
-
-if test "$GCC" = yes; then
-  lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
-
-
-echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_cv_prog_compiler_rtti_exceptions=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="-fno-rtti -fno-exceptions"
-   # Insert the option either (1) after the last *FLAGS variable, or
-   # (2) before a word containing "conftest.", or (3) at the end.
-   # Note that $ac_compile itself does not contain backslashes and begins
-   # with a dollar sign (not a hyphen), so the echo should work correctly.
-   # The option is referenced via a variable to avoid confusing sed.
-   lt_compile=`echo "$ac_compile" | $SED \
-   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-   -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-   -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:18990: $lt_compile\"" >&5)
-   (eval "$lt_compile" 2>conftest.err)
-   ac_status=$?
-   cat conftest.err >&5
-   echo "$as_me:18994: \$? = $ac_status" >&5
-   if (exit $ac_status) && test -s "$ac_outfile"; then
-     # The compiler can only warn and ignore the option if not recognized
-     # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
-     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
-     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_rtti_exceptions=yes
-     fi
-   fi
-   $rm conftest*
-
-fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
-    lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
-else
-    :
-fi
-
-fi
-
-lt_prog_compiler_wl_GCJ=
-lt_prog_compiler_pic_GCJ=
-lt_prog_compiler_static_GCJ=
-
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-
-  if test "$GCC" = yes; then
-    lt_prog_compiler_wl_GCJ='-Wl,'
-    lt_prog_compiler_static_GCJ='-static'
-
-    case $host_os in
-      aix*)
-      # All AIX code is PIC.
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_GCJ='-Bstatic'
-      fi
-      ;;
-
-    amigaos*)
-      # FIXME: we need at least 68020 code to build shared libraries, but
-      # adding the `-m68020' flag to GCC prevents building anything better,
-      # like `-m68040'.
-      lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4'
-      ;;
-
-    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
       # PIC is the default for these OSes.
       ;;
-
-    mingw* | pw32* | os2*)
+    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).
-      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
+      # Although the cygwin gcc ignores -fPIC, still need this for old-style
+      # (--disable-auto-import) libraries
+      lt_prog_compiler_pic_CXX='-DDLL_EXPORT'
       ;;
-
     darwin* | rhapsody*)
       # PIC is the default on this platform
       # Common symbols not allowed in MH_DYLIB files
-      lt_prog_compiler_pic_GCJ='-fno-common'
+      lt_prog_compiler_pic_CXX='-fno-common'
       ;;
-
-    interix3*)
+    *djgpp*)
+      # DJGPP does not support shared libraries at all
+      lt_prog_compiler_pic_CXX=
+      ;;
+    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_prog_compiler_can_build_shared_GCJ=no
-      enable_shared=no
-      ;;
-
     sysv4*MP*)
       if test -d /usr/nec; then
-	lt_prog_compiler_pic_GCJ=-Kconform_pic
+	lt_prog_compiler_pic_CXX=-Kconform_pic
       fi
       ;;
-
     hpux*)
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
+      # 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*|ia64*)
-	# +Z the default
+      hppa*64*)
 	;;
       *)
-	lt_prog_compiler_pic_GCJ='-fPIC'
+	lt_prog_compiler_pic_CXX='-fPIC'
 	;;
       esac
       ;;
-
+    *qnx* | *nto*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_CXX='-fPIC -shared'
+      ;;
     *)
-      lt_prog_compiler_pic_GCJ='-fPIC'
+      lt_prog_compiler_pic_CXX='-fPIC'
       ;;
     esac
   else
-    # PORTME Check for flag to pass linker flags through the system compiler.
     case $host_os in
-    aix*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      if test "$host_cpu" = ia64; then
-	# AIX 5 now supports IA64 processor
-	lt_prog_compiler_static_GCJ='-Bstatic'
-      else
-	lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
-      fi
-      ;;
-      darwin*)
-        # PIC is the default on this platform
-        # Common symbols not allowed in MH_DYLIB files
-       case $cc_basename in
-         xlc*)
-         lt_prog_compiler_pic_GCJ='-qnocommon'
-         lt_prog_compiler_wl_GCJ='-Wl,'
-         ;;
-       esac
-       ;;
-
-    mingw* | pw32* | os2*)
-      # This hack is so that the source file can tell whether it is being
-      # built for inclusion in a dll (and should export symbols for example).
-      lt_prog_compiler_pic_GCJ='-DDLL_EXPORT'
-      ;;
-
-    hpux9* | hpux10* | hpux11*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
-      # not for PA HP-UX.
-      case $host_cpu in
-      hppa*64*|ia64*)
-	# +Z the default
+      aix[4-9]*)
+	# All AIX code is PIC.
+	if test "$host_cpu" = ia64; then
+	  # AIX 5 now supports IA64 processor
+	  lt_prog_compiler_static_CXX='-Bstatic'
+	else
+	  lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp'
+	fi
 	;;
-      *)
-	lt_prog_compiler_pic_GCJ='+Z'
+      chorus*)
+	case $cc_basename in
+	cxch68*)
+	  # Green Hills C++ Compiler
+	  # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+	  ;;
+	esac
+	;;
+      dgux*)
+	case $cc_basename in
+	  ec++*)
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  ghcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      freebsd* | dragonfly*)
+	# FreeBSD uses GNU C++
+	;;
+      hpux9* | hpux10* | hpux11*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    if test "$host_cpu" != ia64; then
+	      lt_prog_compiler_pic_CXX='+Z'
+	    fi
+	    ;;
+	  aCC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='${wl}-a ${wl}archive'
+	    case $host_cpu in
+	    hppa*64*|ia64*)
+	      # +Z the default
+	      ;;
+	    *)
+	      lt_prog_compiler_pic_CXX='+Z'
+	      ;;
+	    esac
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      interix*)
+	# This is c89, which is MS Visual C++ (no shared libs)
+	# Anyone wants to do a port?
+	;;
+      irix5* | irix6* | nonstopux*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    # CC pic flag -KPIC is the default.
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      linux* | k*bsd*-gnu)
+	case $cc_basename in
+	  KCC*)
+	    # KAI C++ Compiler
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    ;;
+	  ecpc* )
+	    # old Intel C++ for x86_64 which still supported -KPIC.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  icpc* )
+	    # Intel C++, used to be incompatible with GCC.
+	    # ICC 10 doesn't accept -KPIC any more.
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fPIC'
+	    lt_prog_compiler_static_CXX='-static'
+	    ;;
+	  pgCC* | pgcpp*)
+	    # Portland Group C++ compiler
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-fpic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  cxx*)
+	    # Compaq C++
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  xlc* | xlC*)
+	    # IBM XL 8.0 on PPC
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-qpic'
+	    lt_prog_compiler_static_CXX='-qstaticlink'
+	    ;;
+	  *)
+	    case `$CC -V 2>&1 | sed 5q` in
+	    *Sun\ C*)
+	      # Sun C++ 5.9
+	      lt_prog_compiler_pic_CXX='-KPIC'
+	      lt_prog_compiler_static_CXX='-Bstatic'
+	      lt_prog_compiler_wl_CXX='-Qoption ld '
+	      ;;
+	    esac
+	    ;;
+	esac
+	;;
+      lynxos*)
+	;;
+      m88k*)
+	;;
+      mvs*)
+	case $cc_basename in
+	  cxx*)
+	    lt_prog_compiler_pic_CXX='-W c,exportall'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      netbsd*)
+	;;
+      *qnx* | *nto*)
+        # QNX uses GNU C++, but need to define -shared option too, otherwise
+        # it will coredump.
+        lt_prog_compiler_pic_CXX='-fPIC -shared'
+        ;;
+      osf3* | osf4* | osf5*)
+	case $cc_basename in
+	  KCC*)
+	    lt_prog_compiler_wl_CXX='--backend -Wl,'
+	    ;;
+	  RCC*)
+	    # Rational C++ 2.4.1
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  cxx*)
+	    # Digital/Compaq C++
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    # Make sure the PIC flag is empty.  It appears that all Alpha
+	    # Linux and Compaq Tru64 Unix objects are PIC.
+	    lt_prog_compiler_pic_CXX=
+	    lt_prog_compiler_static_CXX='-non_shared'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      psos*)
+	;;
+      solaris*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.2, 5.x and Centerline C++
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    lt_prog_compiler_wl_CXX='-Qoption ld '
+	    ;;
+	  gcx*)
+	    # Green Hills C++ Compiler
+	    lt_prog_compiler_pic_CXX='-PIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sunos4*)
+	case $cc_basename in
+	  CC*)
+	    # Sun C++ 4.x
+	    lt_prog_compiler_pic_CXX='-pic'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	  lcc*)
+	    # Lucid
+	    lt_prog_compiler_pic_CXX='-pic'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+	case $cc_basename in
+	  CC*)
+	    lt_prog_compiler_wl_CXX='-Wl,'
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    lt_prog_compiler_static_CXX='-Bstatic'
+	    ;;
+	esac
+	;;
+      tandem*)
+	case $cc_basename in
+	  NCC*)
+	    # NonStop-UX NCC 3.20
+	    lt_prog_compiler_pic_CXX='-KPIC'
+	    ;;
+	  *)
+	    ;;
+	esac
+	;;
+      vxworks*)
+	;;
+      *)
+	lt_prog_compiler_can_build_shared_CXX=no
 	;;
-      esac
-      # Is there a better lt_prog_compiler_static that works with the bundled CC?
-      lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
-      ;;
-
-    irix5* | irix6* | nonstopux*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      # PIC (with -KPIC) is the default.
-      lt_prog_compiler_static_GCJ='-non_shared'
-      ;;
-
-    newsos6)
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    linux*)
-      case $cc_basename in
-      icc* | ecc*)
-	lt_prog_compiler_wl_GCJ='-Wl,'
-	lt_prog_compiler_pic_GCJ='-KPIC'
-	lt_prog_compiler_static_GCJ='-static'
-        ;;
-      pgcc* | pgf77* | pgf90* | pgf95*)
-        # Portland Group compilers (*not* the Pentium gcc compiler,
-	# which looks to be a dead project)
-	lt_prog_compiler_wl_GCJ='-Wl,'
-	lt_prog_compiler_pic_GCJ='-fpic'
-	lt_prog_compiler_static_GCJ='-Bstatic'
-        ;;
-      ccc*)
-        lt_prog_compiler_wl_GCJ='-Wl,'
-        # All Alpha code is PIC.
-        lt_prog_compiler_static_GCJ='-non_shared'
-        ;;
-      esac
-      ;;
-
-    osf3* | osf4* | osf5*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      # All OSF/1 code is PIC.
-      lt_prog_compiler_static_GCJ='-non_shared'
-      ;;
-
-    solaris*)
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      case $cc_basename in
-      f77* | f90* | f95*)
-	lt_prog_compiler_wl_GCJ='-Qoption ld ';;
-      *)
-	lt_prog_compiler_wl_GCJ='-Wl,';;
-      esac
-      ;;
-
-    sunos4*)
-      lt_prog_compiler_wl_GCJ='-Qoption ld '
-      lt_prog_compiler_pic_GCJ='-PIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    sysv4 | sysv4.2uw2* | sysv4.3*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec ;then
-	lt_prog_compiler_pic_GCJ='-Kconform_pic'
-	lt_prog_compiler_static_GCJ='-Bstatic'
-      fi
-      ;;
-
-    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_pic_GCJ='-KPIC'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    unicos*)
-      lt_prog_compiler_wl_GCJ='-Wl,'
-      lt_prog_compiler_can_build_shared_GCJ=no
-      ;;
-
-    uts4*)
-      lt_prog_compiler_pic_GCJ='-pic'
-      lt_prog_compiler_static_GCJ='-Bstatic'
-      ;;
-
-    *)
-      lt_prog_compiler_can_build_shared_GCJ=no
-      ;;
     esac
   fi
 
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_CXX=
+    ;;
+  *)
+    lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC"
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+$as_echo "$lt_prog_compiler_pic_CXX" >&6; }
+
+
 
 #
 # Check to make sure the PIC flag actually works.
 #
-if test -n "$lt_prog_compiler_pic_GCJ"; then
-
-echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
-if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  lt_prog_compiler_pic_works_GCJ=no
-  ac_outfile=conftest.$ac_objext
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
-   lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+if test -n "$lt_prog_compiler_pic_CXX"; then
+  { $as_echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_CXX=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC"
    # Insert the option either (1) after the last *FLAGS variable, or
    # (2) before a word containing "conftest.", or (3) at the end.
    # Note that $ac_compile itself does not contain backslashes and begins
@@ -19255,100 +18103,95 @@ else
    -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:19258: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18106: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:19262: \$? = $ac_status" >&5
+   echo "$as_me:18110: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
      $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
      if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
-       lt_prog_compiler_pic_works_GCJ=yes
+       lt_cv_prog_compiler_pic_works_CXX=yes
      fi
    fi
-   $rm conftest*
+   $RM conftest*
 
 fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; }
 
-if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
-    case $lt_prog_compiler_pic_GCJ in
+if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then
+    case $lt_prog_compiler_pic_CXX in
      "" | " "*) ;;
-     *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+     *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;;
      esac
 else
-    lt_prog_compiler_pic_GCJ=
-     lt_prog_compiler_can_build_shared_GCJ=no
+    lt_prog_compiler_pic_CXX=
+     lt_prog_compiler_can_build_shared_CXX=no
 fi
 
 fi
-case $host_os in
-  # For platforms which do not support PIC, -DPIC is meaningless:
-  *djgpp*)
-    lt_prog_compiler_pic_GCJ=
-    ;;
-  *)
-    lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
-    ;;
-esac
+
+
 
 #
 # Check to make sure the static flag actually works.
 #
-wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\"
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6
-if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\"
+{ $as_echo "$as_me:$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; }
+if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  lt_prog_compiler_static_works_GCJ=no
+  lt_cv_prog_compiler_static_works_CXX=no
    save_LDFLAGS="$LDFLAGS"
    LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
-   printf "$lt_simple_link_test_code" > conftest.$ac_ext
+   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>&5
-       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
        if diff conftest.exp conftest.er2 >/dev/null; then
-         lt_prog_compiler_static_works_GCJ=yes
+         lt_cv_prog_compiler_static_works_CXX=yes
        fi
      else
-       lt_prog_compiler_static_works_GCJ=yes
+       lt_cv_prog_compiler_static_works_CXX=yes
      fi
    fi
-   $rm conftest*
+   $RM -r conftest*
    LDFLAGS="$save_LDFLAGS"
 
 fi
-echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5
-echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; }
 
-if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then
+if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then
     :
 else
-    lt_prog_compiler_static_GCJ=
+    lt_prog_compiler_static_CXX=
 fi
 
 
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+    { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  lt_cv_prog_compiler_c_o_GCJ=no
-   $rm -r conftest 2>/dev/null
+  lt_cv_prog_compiler_c_o_CXX=no
+   $RM -r conftest 2>/dev/null
    mkdir conftest
    cd conftest
    mkdir out
-   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+   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
@@ -19359,1101 +18202,280 @@ else
    -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:19362: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:18205: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:19366: \$? = $ac_status" >&5
+   echo "$as_me:18209: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings
-     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
      $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
      if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
-       lt_cv_prog_compiler_c_o_GCJ=yes
+       lt_cv_prog_compiler_c_o_CXX=yes
      fi
    fi
    chmod u+w . 2>&5
-   $rm conftest*
+   $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
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
    cd ..
-   rmdir conftest
-   $rm conftest*
+   $RM -r conftest
+   $RM conftest*
 
 fi
-echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
-echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
 
 
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
-  # do not overwrite the value of need_locks provided by the user
-  echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6
-  hard_links=yes
-  $rm conftest*
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  touch conftest.a
-  ln conftest.a conftest.b 2>&5 || hard_links=no
-  ln conftest.a conftest.b 2>/dev/null && hard_links=no
-  echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
-  if test "$hard_links" = no; then
-    { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
-    need_locks=warn
-  fi
-else
-  need_locks=no
-fi
 
-echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+    { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_CXX=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:18257: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:18261: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_CXX=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; }
 
-  runpath_var=
-  allow_undefined_flag_GCJ=
-  enable_shared_with_static_runtimes_GCJ=no
-  archive_cmds_GCJ=
-  archive_expsym_cmds_GCJ=
-  old_archive_From_new_cmds_GCJ=
-  old_archive_from_expsyms_cmds_GCJ=
-  export_dynamic_flag_spec_GCJ=
-  whole_archive_flag_spec_GCJ=
-  thread_safe_flag_spec_GCJ=
-  hardcode_libdir_flag_spec_GCJ=
-  hardcode_libdir_flag_spec_ld_GCJ=
-  hardcode_libdir_separator_GCJ=
-  hardcode_direct_GCJ=no
-  hardcode_minus_L_GCJ=no
-  hardcode_shlibpath_var_GCJ=unsupported
-  link_all_deplibs_GCJ=unknown
-  hardcode_automatic_GCJ=no
-  module_cmds_GCJ=
-  module_expsym_cmds_GCJ=
-  always_export_symbols_GCJ=no
-  export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
-  # include_expsyms should be a list of space-separated symbols to be *always*
-  # included in the symbol list
-  include_expsyms_GCJ=
-  # exclude_expsyms can be an extended regexp of symbols to exclude
-  # it will be wrapped by ` (' and `)$', so one must not match beginning or
-  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
-  # as well as any symbol that contains `d'.
-  exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_"
-  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
-  # platforms (ab)use it in PIC code, but their linkers get confused if
-  # the symbol is explicitly referenced.  Since portable code cannot
-  # rely on this symbol name, it's probably fine to never include it in
-  # preloaded symbol tables.
-  extract_expsyms_cmds=
-  # Just being paranoid about ensuring that cc_basename is set.
-  for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
+
+
+
+    { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+  export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
   case $host_os in
-  cygwin* | mingw* | pw32*)
-    # FIXME: the MSVC++ port hasn't been tested in a loooong time
-    # When not using gcc, we currently assume that we are using
-    # Microsoft Visual C++.
-    if test "$GCC" != yes; then
-      with_gnu_ld=no
+  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
+    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+      export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+    else
+      export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
     fi
     ;;
-  interix*)
-    # we just hope/assume this is gcc and not c89 (= MSVC++)
-    with_gnu_ld=yes
-    ;;
-  openbsd*)
-    with_gnu_ld=no
-    ;;
+  pw32*)
+    export_symbols_cmds_CXX="$ltdll_cmds"
+  ;;
+  cygwin* | mingw* | cegcc*)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
+  *)
+    export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  ;;
   esac
+  exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
 
-  ld_shlibs_GCJ=yes
-  if test "$with_gnu_ld" = yes; then
-    # If archive_cmds runs LD, not CC, wlarc should be empty
-    wlarc='${wl}'
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+$as_echo "$ld_shlibs_CXX" >&6; }
+test "$ld_shlibs_CXX" = no && can_build_shared=no
 
-    # Set some defaults for GNU ld with shared library support. These
-    # are reset later if shared libraries are not supported. Putting them
-    # here allows them to be overridden if necessary.
-    runpath_var=LD_RUN_PATH
-    hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
-    export_dynamic_flag_spec_GCJ='${wl}--export-dynamic'
-    # ancient GNU ld didn't support --whole-archive et. al.
-    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
-	whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
-      else
-  	whole_archive_flag_spec_GCJ=
-    fi
-    supports_anon_versioning=no
-    case `$LD -v 2>/dev/null` in
-      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
-      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
-      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
-      *\ 2.11.*) ;; # other 2.11 versions
-      *) supports_anon_versioning=yes ;;
-    esac
+with_gnu_ld_CXX=$with_gnu_ld
 
-    # See if GNU ld supports shared libraries.
-    case $host_os in
-    aix3* | aix4* | aix5*)
-      # On AIX/PPC, the GNU linker is very broken
-      if test "$host_cpu" != ia64; then
-	ld_shlibs_GCJ=no
-	cat <<EOF 1>&2
 
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support.  If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
 
-EOF
-      fi
-      ;;
 
-    amigaos*)
-      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-
-      # Samuel A. Falvo II <kc5tja at dolphin.openprojects.net> reports
-      # that the semantics of dynamic libraries on AmigaOS, at least up
-      # to version 4, is to share data among multiple programs linked
-      # with the same dynamic library.  Since this doesn't match the
-      # behavior of shared libraries on other platforms, we can't use
-      # them.
-      ld_shlibs_GCJ=no
-      ;;
 
-    beos*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	allow_undefined_flag_GCJ=unsupported
-	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
-	# support --undefined.  This deserves some investigation.  FIXME
-	archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-      else
-	ld_shlibs_GCJ=no
-      fi
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_CXX" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_CXX=yes
+
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_CXX in
+    *'~'*)
+      # FIXME: we may have to deal with multi-command sequences.
       ;;
+    '$CC '*)
+      # Test whether the compiler implicitly links with -lc since on some
+      # systems, -lgcc has to come before -lc. If gcc already passes -lc
+      # to ld, don't add -lc before -lgcc.
+      { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-    cygwin* | mingw* | pw32*)
-      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
-      # as there is no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=no
-      enable_shared_with_static_runtimes_GCJ=yes
-      export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
-
-      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
-        archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
-	# If the export-symbols file already is a .def file (1st line
-	# is EXPORTS), use it as is; otherwise, prepend...
-	archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
-	  cp $export_symbols $output_objdir/$soname.def;
-	else
-	  echo EXPORTS > $output_objdir/$soname.def;
-	  cat $export_symbols >> $output_objdir/$soname.def;
-	fi~
-	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_CXX
+	pic_flag=$lt_prog_compiler_pic_CXX
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_CXX
+        allow_undefined_flag_CXX=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_CXX=no
+        else
+	  archive_cmds_need_lc_CXX=yes
+        fi
+        allow_undefined_flag_CXX=$lt_save_allow_undefined_flag
       else
-	ld_shlibs_GCJ=no
+        cat conftest.err 1>&5
       fi
+      $RM conftest*
+      { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+$as_echo "$archive_cmds_need_lc_CXX" >&6; }
       ;;
+    esac
+  fi
+  ;;
+esac
 
-    interix3*)
-      hardcode_direct_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-      export_dynamic_flag_spec_GCJ='${wl}-E'
-      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
-      # Instead, shared libraries are loaded at an image base (0x10000000 by
-      # default) and relocated if they conflict, which is a slow very memory
-      # consuming and fragmenting process.  To avoid this, we pick a random,
-      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
-      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
-      archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
-      ;;
 
-    linux*)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	tmp_addflag=
-	case $cc_basename,$host_cpu in
-	pgcc*)				# Portland Group C compiler
-	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag'
-	  ;;
-	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
-	  whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
-	  tmp_addflag=' $pic_flag -Mnomain' ;;
-	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
-	  tmp_addflag=' -i_dynamic' ;;
-	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
-	  tmp_addflag=' -i_dynamic -nofor_main' ;;
-	ifc* | ifort*)			# Intel Fortran compiler
-	  tmp_addflag=' -nofor_main' ;;
-	esac
-	archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-	if test $supports_anon_versioning = yes; then
-	  archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
-  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
-  $echo "local: *; };" >> $output_objdir/$libname.ver~
-	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
-	fi
-      else
-	ld_shlibs_GCJ=no
-      fi
-      ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
-	wlarc=
-      else
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      fi
-      ;;
 
-    solaris*)
-      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
-	ld_shlibs_GCJ=no
-	cat <<EOF 1>&2
 
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-EOF
-      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs_GCJ=no
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
-      case `$LD -v 2>&1` in
-        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
-	ld_shlibs_GCJ=no
-	cat <<_LT_EOF 1>&2
 
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems.  Therefore, libtool
-*** is disabling shared libraries support.  We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
 
-_LT_EOF
-	;;
-	*)
-	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	    hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
-	    archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
-	    archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
-	  else
-	    ld_shlibs_GCJ=no
-	  fi
-	;;
-      esac
-      ;;
 
-    sunos4*)
-      archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      wlarc=
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    *)
-      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-	archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-      else
-	ld_shlibs_GCJ=no
-      fi
-      ;;
-    esac
 
-    if test "$ld_shlibs_GCJ" = no; then
-      runpath_var=
-      hardcode_libdir_flag_spec_GCJ=
-      export_dynamic_flag_spec_GCJ=
-      whole_archive_flag_spec_GCJ=
-    fi
-  else
-    # PORTME fill in a description of your system's linker (not GNU ld)
-    case $host_os in
-    aix3*)
-      allow_undefined_flag_GCJ=unsupported
-      always_export_symbols_GCJ=yes
-      archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
-      # Note: this linker hardcodes the directories in LIBPATH if there
-      # are no directories specified by -L.
-      hardcode_minus_L_GCJ=yes
-      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
-	# Neither direct hardcoding nor static linking is supported with a
-	# broken collect2.
-	hardcode_direct_GCJ=unsupported
-      fi
-      ;;
 
-    aix4* | aix5*)
-      if test "$host_cpu" = ia64; then
-	# On IA64, the linker does run time linking by default, so we don't
-	# have to do anything special.
-	aix_use_runtimelinking=no
-	exp_sym_flag='-Bexport'
-	no_entry_flag=""
-      else
-	# If we're using GNU nm, then we don't want the "-C" option.
-	# -C means demangle to AIX nm, but means don't demangle with GNU nm
-	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
-	  export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-	else
-	  export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
-	fi
-	aix_use_runtimelinking=no
 
-	# Test if we are trying to use run time linking or normal
-	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
-	# need to do runtime linking.
-	case $host_os in aix4.[23]|aix4.[23].*|aix5*)
-	  for ld_flag in $LDFLAGS; do
-  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
-  	    aix_use_runtimelinking=yes
-  	    break
-  	  fi
-	  done
-	  ;;
-	esac
 
-	exp_sym_flag='-bexport'
-	no_entry_flag='-bnoentry'
-      fi
 
-      # When large executables or shared objects are built, AIX ld can
-      # have problems creating the table of contents.  If linking a library
-      # or program results in "error TOC overflow" add -mminimal-toc to
-      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
-      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 
-      archive_cmds_GCJ=''
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_separator_GCJ=':'
-      link_all_deplibs_GCJ=yes
 
-      if test "$GCC" = yes; then
-	case $host_os in aix4.[012]|aix4.[012].*)
-	# We only want to do this on AIX 4.2 and lower, the check
-	# below for broken collect2 doesn't work under 4.3+
-	  collect2name=`${CC} -print-prog-name=collect2`
-	  if test -f "$collect2name" && \
-  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
-	  then
-  	  # We have reworked collect2
-  	  hardcode_direct_GCJ=yes
-	  else
-  	  # We have old collect2
-  	  hardcode_direct_GCJ=unsupported
-  	  # It fails to find uninstalled libraries when the uninstalled
-  	  # path is not listed in the libpath.  Setting hardcode_minus_L
-  	  # to unsupported forces relinking
-  	  hardcode_minus_L_GCJ=yes
-  	  hardcode_libdir_flag_spec_GCJ='-L$libdir'
-  	  hardcode_libdir_separator_GCJ=
-	  fi
-	  ;;
-	esac
-	shared_flag='-shared'
-	if test "$aix_use_runtimelinking" = yes; then
-	  shared_flag="$shared_flag "'${wl}-G'
-	fi
-      else
-	# not using gcc
-	if test "$host_cpu" = ia64; then
-  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
-  	# chokes on -Wl,-G. The following line is correct:
-	  shared_flag='-G'
-	else
-	  if test "$aix_use_runtimelinking" = yes; then
-	    shared_flag='${wl}-G'
-	  else
-	    shared_flag='${wl}-bM:SRE'
-	  fi
-	fi
-      fi
 
-      # It seems that -bexpall does not export symbols beginning with
-      # underscore (_), so it is better to generate a list of symbols to export.
-      always_export_symbols_GCJ=yes
-      if test "$aix_use_runtimelinking" = yes; then
-	# Warning - without using the other runtime loading flags (-brtl),
-	# -berok will link without error, but may produce a broken library.
-	allow_undefined_flag_GCJ='-berok'
-       # Determine the default libpath from the value encoded in an empty executable.
-       cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-       hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
-	archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
-       else
-	if test "$host_cpu" = ia64; then
-	  hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
-	  allow_undefined_flag_GCJ="-z nodefs"
-	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
-	else
-	 # Determine the default libpath from the value encoded in an empty executable.
-	 cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
 
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
-}'`; fi
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-	 hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
-	  # Warning - without using the other run time loading flags,
-	  # -berok will link without error, but may produce a broken library.
-	  no_undefined_flag_GCJ=' ${wl}-bernotok'
-	  allow_undefined_flag_GCJ=' ${wl}-berok'
-	  # Exported symbols can be pulled into shared objects from archives
-	  whole_archive_flag_spec_GCJ='$convenience'
-	  archive_cmds_need_lc_GCJ=yes
-	  # This is similar to how AIX traditionally builds its shared libraries.
-	  archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
-	fi
-      fi
-      ;;
 
-    amigaos*)
-      archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-      # see comment about different semantics on the GNU ld section
-      ld_shlibs_GCJ=no
-      ;;
 
-    bsdi[45]*)
-      export_dynamic_flag_spec_GCJ=-rdynamic
-      ;;
 
-    cygwin* | mingw* | pw32*)
-      # When not using gcc, we currently assume that we are using
-      # Microsoft Visual C++.
-      # hardcode_libdir_flag_spec is actually meaningless, as there is
-      # no search path for DLLs.
-      hardcode_libdir_flag_spec_GCJ=' '
-      allow_undefined_flag_GCJ=unsupported
-      # Tell ltmain to make .lib files, not .a files.
-      libext=lib
-      # Tell ltmain to make .dll files, not .so files.
-      shrext_cmds=".dll"
-      # FIXME: Setting linknames here is a bad hack.
-      archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
-      # The linker will automatically build a .lib file if we build a DLL.
-      old_archive_From_new_cmds_GCJ='true'
-      # FIXME: Should let the user specify the lib program.
-      old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
-      fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`'
-      enable_shared_with_static_runtimes_GCJ=yes
-      ;;
 
-    darwin* | rhapsody*)
-      case $host_os in
-        rhapsody* | darwin1.[012])
-         allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress'
-         ;;
-       *) # Darwin 1.3 on
-         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
-           allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-         else
-           case ${MACOSX_DEPLOYMENT_TARGET} in
-             10.[012])
-               allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
-               ;;
-             10.*)
-               allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup'
-               ;;
-           esac
-         fi
-         ;;
-      esac
-      archive_cmds_need_lc_GCJ=no
-      hardcode_direct_GCJ=no
-      hardcode_automatic_GCJ=yes
-      hardcode_shlibpath_var_GCJ=unsupported
-      whole_archive_flag_spec_GCJ=''
-      link_all_deplibs_GCJ=yes
-    if test "$GCC" = yes ; then
-    	output_verbose_link_cmd='echo'
-        archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
-      module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-      archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-      module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-    else
-      case $cc_basename in
-        xlc*)
-         output_verbose_link_cmd='echo'
-         archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
-         module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
-          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
-         archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
-          ;;
-       *)
-         ld_shlibs_GCJ=no
-          ;;
-      esac
-    fi
-      ;;
 
-    dgux*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    freebsd1*)
-      ld_shlibs_GCJ=no
-      ;;
 
-    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
-    # support.  Future versions do this automatically, but an explicit c++rt0.o
-    # does not break anything, and helps significantly (at the cost of a little
-    # extra space).
-    freebsd2.2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
-    freebsd2*)
-      archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
-    freebsd* | kfreebsd*-gnu | dragonfly*)
-      archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    hpux9*)
-      if test "$GCC" = yes; then
-	archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      else
-	archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
-      fi
-      hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      hardcode_direct_GCJ=yes
 
-      # hardcode_minus_L: Not really in the search PATH,
-      # but as the default location of the library.
-      hardcode_minus_L_GCJ=yes
-      export_dynamic_flag_spec_GCJ='${wl}-E'
-      ;;
 
-    hpux10*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator_GCJ=:
 
-	hardcode_direct_GCJ=yes
-	export_dynamic_flag_spec_GCJ='${wl}-E'
 
-	# hardcode_minus_L: Not really in the search PATH,
-	# but as the default location of the library.
-	hardcode_minus_L_GCJ=yes
-      fi
-      ;;
 
-    hpux11*)
-      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      else
-	case $host_cpu in
-	hppa*64*)
-	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	ia64*)
-	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	*)
-	  archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
-	  ;;
-	esac
-      fi
-      if test "$with_gnu_ld" = no; then
-	hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
-	hardcode_libdir_separator_GCJ=:
 
-	case $host_cpu in
-	hppa*64*|ia64*)
-	  hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
-	  hardcode_direct_GCJ=no
-	  hardcode_shlibpath_var_GCJ=no
-	  ;;
-	*)
-	  hardcode_direct_GCJ=yes
-	  export_dynamic_flag_spec_GCJ='${wl}-E'
 
-	  # hardcode_minus_L: Not really in the search PATH,
-	  # but as the default location of the library.
-	  hardcode_minus_L_GCJ=yes
-	  ;;
-	esac
-      fi
-      ;;
 
-    irix5* | irix6* | nonstopux*)
-      if test "$GCC" = yes; then
-	archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
-      fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      link_all_deplibs_GCJ=yes
-      ;;
 
-    netbsd*)
-      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
-	archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
-      else
-	archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
-      fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    newsos6)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_direct_GCJ=yes
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    openbsd*)
-      hardcode_direct_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
-	archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
-	hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-	export_dynamic_flag_spec_GCJ='${wl}-E'
-      else
-       case $host_os in
-	 openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
-	   archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
-	   hardcode_libdir_flag_spec_GCJ='-R$libdir'
-	   ;;
-	 *)
-	   archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
-	   hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
-	   ;;
-       esac
-      fi
-      ;;
 
-    os2*)
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_minus_L_GCJ=yes
-      allow_undefined_flag_GCJ=unsupported
-      archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
-      old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
-      ;;
 
-    osf3*)
-      if test "$GCC" = yes; then
-	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-      else
-	allow_undefined_flag_GCJ=' -expect_unresolved \*'
-	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-      fi
-      hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      hardcode_libdir_separator_GCJ=:
-      ;;
 
-    osf4* | osf5*)	# as osf3* with the addition of -msym flag
-      if test "$GCC" = yes; then
-	allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
-	archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
-	hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
-      else
-	allow_undefined_flag_GCJ=' -expect_unresolved \*'
-	archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
-	archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
-	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
 
-	# Both c and cxx compiler support -rpath directly
-	hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
-      fi
-      hardcode_libdir_separator_GCJ=:
-      ;;
 
-    solaris*)
-      no_undefined_flag_GCJ=' -z text'
-      if test "$GCC" = yes; then
-	wlarc='${wl}'
-	archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
-      else
-	wlarc=''
-	archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
-  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
-      fi
-      hardcode_libdir_flag_spec_GCJ='-R$libdir'
-      hardcode_shlibpath_var_GCJ=no
-      case $host_os in
-      solaris2.[0-5] | solaris2.[0-5].*) ;;
-      *)
- 	# The compiler driver will combine linker options so we
- 	# cannot just pass the convience library names through
- 	# without $wl, iff we do not link with $LD.
- 	# Luckily, gcc supports the same syntax we need for Sun Studio.
- 	# Supported since Solaris 2.6 (maybe 2.5.1?)
- 	case $wlarc in
- 	'')
- 	  whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
- 	*)
- 	  whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
- 	esac ;;
-      esac
-      link_all_deplibs_GCJ=yes
-      ;;
-
-    sunos4*)
-      if test "x$host_vendor" = xsequent; then
-	# Use $CC to link under sequent, because it throws in some extra .o
-	# files that make .init and .fini sections work.
-	archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
-      fi
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_direct_GCJ=yes
-      hardcode_minus_L_GCJ=yes
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    sysv4)
-      case $host_vendor in
-	sni)
-	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct_GCJ=yes # is this really true???
-	;;
-	siemens)
-	  ## LD is ld it makes a PLAMLIB
-	  ## CC just makes a GrossModule.
-	  archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
-	  reload_cmds_GCJ='$CC -r -o $output$reload_objs'
-	  hardcode_direct_GCJ=no
-        ;;
-	motorola)
-	  archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	  hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
-	;;
-      esac
-      runpath_var='LD_RUN_PATH'
-      hardcode_shlibpath_var_GCJ=no
-      ;;
-
-    sysv4.3*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_shlibpath_var_GCJ=no
-      export_dynamic_flag_spec_GCJ='-Bexport'
-      ;;
-
-    sysv4*MP*)
-      if test -d /usr/nec; then
-	archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-	hardcode_shlibpath_var_GCJ=no
-	runpath_var=LD_RUN_PATH
-	hardcode_runpath_var=yes
-	ld_shlibs_GCJ=yes
-      fi
-      ;;
-
-    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
-      no_undefined_flag_GCJ='${wl}-z,text'
-      archive_cmds_need_lc_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      runpath_var='LD_RUN_PATH'
-
-      if test "$GCC" = yes; then
-	archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    sysv5* | sco3.2v5* | sco5v6*)
-      # Note: We can NOT use -z defs as we might desire, because we do not
-      # link with -lc, and that would cause any symbols used from libc to
-      # always be unresolved, which means just about no library would
-      # ever link correctly.  If we're not using GNU ld we use -z text
-      # though, which does catch some bad symbols but isn't as heavy-handed
-      # as -z defs.
-      no_undefined_flag_GCJ='${wl}-z,text'
-      allow_undefined_flag_GCJ='${wl}-z,nodefs'
-      archive_cmds_need_lc_GCJ=no
-      hardcode_shlibpath_var_GCJ=no
-      hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
-      hardcode_libdir_separator_GCJ=':'
-      link_all_deplibs_GCJ=yes
-      export_dynamic_flag_spec_GCJ='${wl}-Bexport'
-      runpath_var='LD_RUN_PATH'
 
-      if test "$GCC" = yes; then
-	archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      else
-	archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-	archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
-      fi
-      ;;
 
-    uts4*)
-      archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
-      hardcode_libdir_flag_spec_GCJ='-L$libdir'
-      hardcode_shlibpath_var_GCJ=no
-      ;;
 
-    *)
-      ld_shlibs_GCJ=no
-      ;;
-    esac
-  fi
 
-echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
-echo "${ECHO_T}$ld_shlibs_GCJ" >&6
-test "$ld_shlibs_GCJ" = no && can_build_shared=no
 
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc_GCJ" in
-x|xyes)
-  # Assume -lc should be added
-  archive_cmds_need_lc_GCJ=yes
 
-  if test "$enable_shared" = yes && test "$GCC" = yes; then
-    case $archive_cmds_GCJ in
-    *'~'*)
-      # FIXME: we may have to deal with multi-command sequences.
-      ;;
-    '$CC '*)
-      # Test whether the compiler implicitly links with -lc since on some
-      # systems, -lgcc has to come before -lc. If gcc already passes -lc
-      # to ld, don't add -lc before -lgcc.
-      echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
-      $rm conftest*
-      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } 2>conftest.err; then
-        soname=conftest
-        lib=conftest
-        libobjs=conftest.$ac_objext
-        deplibs=
-        wl=$lt_prog_compiler_wl_GCJ
-	pic_flag=$lt_prog_compiler_pic_GCJ
-        compiler_flags=-v
-        linker_flags=-v
-        verstring=
-        output_objdir=.
-        libname=conftest
-        lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
-        allow_undefined_flag_GCJ=
-        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
-  (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }
-        then
-	  archive_cmds_need_lc_GCJ=no
-        else
-	  archive_cmds_need_lc_GCJ=yes
-        fi
-        allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
-      else
-        cat conftest.err 1>&5
-      fi
-      $rm conftest*
-      echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
-echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
-      ;;
-    esac
-  fi
-  ;;
-esac
+    { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
 
-echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
-echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
 library_names_spec=
 libname_spec='lib$name'
 soname_spec=
@@ -20467,20 +18489,6 @@ shlibpath_overrides_runpath=unknown
 version_type=none
 dynamic_linker="$host_os ld.so"
 sys_lib_dlsearch_path_spec="/lib /usr/lib"
-if test "$GCC" = yes; then
-  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
-    # if the path contains ";" then we assume it to be the separator
-    # otherwise default to the standard path separator (i.e. ":") - it is
-    # assumed that no part of a normal pathname contains ";" but that should
-    # okay in the real world where ";" in dirpaths is itself problematic.
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
-  else
-    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
-  fi
-else
-  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
 need_lib_prefix=unknown
 hardcode_into_libs=no
 
@@ -20498,7 +18506,7 @@ aix3*)
   soname_spec='${libname}${release}${shared_ext}$major'
   ;;
 
-aix4* | aix5*)
+aix[4-9]*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -20517,7 +18525,7 @@ aix4* | aix5*)
       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
+	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
 	:
       else
 	can_build_shared=no
@@ -20543,9 +18551,18 @@ aix4* | aix5*)
   ;;
 
 amigaos*)
-  library_names_spec='$libname.ixlibrary $libname.a'
-  # Create ${libname}_ixlibrary.a entries in /sys/libs.
-  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+  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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
   ;;
 
 beos*)
@@ -20568,25 +18585,28 @@ bsdi[45]*)
   # libtool to hard-code these into programs
   ;;
 
-cygwin* | mingw* | pw32*)
+cygwin* | mingw* | pw32* | cegcc*)
   version_type=windows
   shrext_cmds=".dll"
   need_version=no
   need_lib_prefix=no
 
   case $GCC,$host_os in
-  yes,cygwin* | yes,mingw* | yes,pw32*)
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
     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'\''`~
+      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'
+      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'
+       $RM \$dlpath'
     shlibpath_overrides_runpath=yes
 
     case $host_os in
@@ -20595,20 +18615,20 @@ cygwin* | mingw* | pw32*)
       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
       ;;
-    mingw*)
+    mingw* | cegcc*)
       # MinGW DLLs use traditional 'lib' prefix
       soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
-      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
-      if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
         # It is most probably a Windows format PATH printed by
         # mingw gcc, but we are running on Cygwin. Gcc prints its search
         # path with ; separators, and with drive letters. We can handle the
         # drive letters (cygwin fileutils understands them), so leave them,
         # especially as we might pass files found there to a mingw objdump,
         # which wouldn't understand a cygwinified path. Ahh.
-        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+        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"`
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
       fi
       ;;
     pw32*)
@@ -20632,17 +18652,12 @@ darwin* | rhapsody*)
   version_type=darwin
   need_lib_prefix=no
   need_version=no
-  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+  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`'
-  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
-  if test "$GCC" = yes; then
-    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
-  else
-    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
-  fi
+
   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
   ;;
 
@@ -20659,18 +18674,6 @@ freebsd1*)
   dynamic_linker=no
   ;;
 
-kfreebsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
 freebsd* | dragonfly*)
   # DragonFly does not have aout.  When/if they implement a new
   # versioning mechanism, adjust this.
@@ -20708,7 +18711,7 @@ freebsd* | dragonfly*)
     shlibpath_overrides_runpath=no
     hardcode_into_libs=yes
     ;;
-  freebsd*) # from 4.6 on
+  *) # from 4.6 on, and DragonFly
     shlibpath_overrides_runpath=yes
     hardcode_into_libs=yes
     ;;
@@ -20747,18 +18750,18 @@ hpux9* | hpux10* | hpux11*)
     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
-     ;;
-   *)
+  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
@@ -20771,7 +18774,7 @@ hpux9* | hpux10* | hpux11*)
   postinstall_cmds='chmod 555 $lib'
   ;;
 
-interix3*)
+interix[3-9]*)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -20826,7 +18829,7 @@ linux*oldld* | linux*aout* | linux*coff*)
   ;;
 
 # This must be Linux ELF.
-linux*)
+linux* | k*bsd*-gnu)
   version_type=linux
   need_lib_prefix=no
   need_version=no
@@ -20835,36 +18838,84 @@ linux*)
   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
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\""
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+  shlibpath_overrides_runpath=yes
+fi
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
+
   # This implies no fast_install, which is unacceptable.
   # Some rework will be needed to allow for fast_install
   # before this can be enabled.
   hardcode_into_libs=yes
 
-  # find out which ABI we are using
-  libsuff=
-  case "$host_cpu" in
-  x86_64*|s390x*|powerpc64*)
-    echo '#line 20847 "configure"' > conftest.$ac_ext
-    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-      case `/usr/bin/file conftest.$ac_objext` in
-      *64-bit*)
-        libsuff=64
-        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
-        ;;
-      esac
-    fi
-    rm -rf conftest*
-    ;;
-  esac
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
 
   # 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/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
-    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
+    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;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
   fi
 
   # We used to test for /lib/ld.so.1 and disable shared libraries on
@@ -20876,23 +18927,11 @@ linux*)
   dynamic_linker='GNU/Linux ld.so'
   ;;
 
-knetbsd*-gnu)
-  version_type=linux
-  need_lib_prefix=no
-  need_version=no
-  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
-  soname_spec='${libname}${release}${shared_ext}$major'
-  shlibpath_var=LD_LIBRARY_PATH
-  shlibpath_overrides_runpath=no
-  hardcode_into_libs=yes
-  dynamic_linker='GNU ld.so'
-  ;;
-
 netbsd*)
   version_type=sunos
   need_lib_prefix=no
   need_version=no
-  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+  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'
@@ -20913,14 +18952,16 @@ newsos6)
   shlibpath_overrides_runpath=yes
   ;;
 
-nto-qnx*)
-  version_type=linux
+*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=yes
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  dynamic_linker='ldqnx.so'
   ;;
 
 openbsd*)
@@ -20929,13 +18970,13 @@ openbsd*)
   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  ;;
+    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
+  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
@@ -20969,6 +19010,10 @@ osf3* | osf4* | osf5*)
   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
   ;;
 
+rdos*)
+  dynamic_linker=no
+  ;;
+
 solaris*)
   version_type=linux
   need_lib_prefix=no
@@ -21003,7 +19048,6 @@ sysv4 | sysv4.3*)
     sni)
       shlibpath_overrides_runpath=no
       need_lib_prefix=no
-      export_dynamic_flag_spec='${wl}-Blargedynsym'
       runpath_var=LD_RUN_PATH
       ;;
     siemens)
@@ -21034,13 +19078,12 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   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'
-    shlibpath_overrides_runpath=no
   else
     sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
-    shlibpath_overrides_runpath=yes
     case $host_os in
       sco3.2v5*)
         sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
@@ -21050,6 +19093,17 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
   sys_lib_dlsearch_path_spec='/usr/lib'
   ;;
 
+tpf*)
+  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
 uts4*)
   version_type=linux
   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
@@ -21061,8 +19115,8 @@ uts4*)
   dynamic_linker=no
   ;;
 esac
-echo "$as_me:$LINENO: result: $dynamic_linker" >&5
-echo "${ECHO_T}$dynamic_linker" >&6
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
 test "$dynamic_linker" = no && can_build_shared=no
 
 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
@@ -21070,2135 +19124,2979 @@ if test "$GCC" = yes; then
   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
-echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
-echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action_GCJ=
-if test -n "$hardcode_libdir_flag_spec_GCJ" || \
-   test -n "$runpath_var_GCJ" || \
-   test "X$hardcode_automatic_GCJ" = "Xyes" ; then
-
-  # We can hardcode non-existant directories.
-  if test "$hardcode_direct_GCJ" != no &&
-     # If the only mechanism to avoid hardcoding is shlibpath_var, we
-     # have to relink, otherwise we might link with an installed library
-     # when we should be linking with a yet-to-be-installed one
-     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
-     test "$hardcode_minus_L_GCJ" != no; then
-    # Linking always hardcodes the temporary library directory.
-    hardcode_action_GCJ=relink
-  else
-    # We can link without hardcoding, and we can hardcode nonexisting dirs.
-    hardcode_action_GCJ=immediate
-  fi
-else
-  # We cannot hardcode anything, or else we can only hardcode existing
-  # directories.
-  hardcode_action_GCJ=unsupported
+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
-echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
-echo "${ECHO_T}$hardcode_action_GCJ" >&6
-
-if test "$hardcode_action_GCJ" = relink; then
-  # Fast installation is not supported
-  enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
-     test "$enable_shared" = no; then
-  # Fast installation is not necessary
-  enable_fast_install=needless
+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
 
 
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_GCJ \
-    CC_GCJ \
-    LD_GCJ \
-    lt_prog_compiler_wl_GCJ \
-    lt_prog_compiler_pic_GCJ \
-    lt_prog_compiler_static_GCJ \
-    lt_prog_compiler_no_builtin_flag_GCJ \
-    export_dynamic_flag_spec_GCJ \
-    thread_safe_flag_spec_GCJ \
-    whole_archive_flag_spec_GCJ \
-    enable_shared_with_static_runtimes_GCJ \
-    old_archive_cmds_GCJ \
-    old_archive_from_new_cmds_GCJ \
-    predep_objects_GCJ \
-    postdep_objects_GCJ \
-    predeps_GCJ \
-    postdeps_GCJ \
-    compiler_lib_search_path_GCJ \
-    archive_cmds_GCJ \
-    archive_expsym_cmds_GCJ \
-    postinstall_cmds_GCJ \
-    postuninstall_cmds_GCJ \
-    old_archive_from_expsyms_cmds_GCJ \
-    allow_undefined_flag_GCJ \
-    no_undefined_flag_GCJ \
-    export_symbols_cmds_GCJ \
-    hardcode_libdir_flag_spec_GCJ \
-    hardcode_libdir_flag_spec_ld_GCJ \
-    hardcode_libdir_separator_GCJ \
-    hardcode_automatic_GCJ \
-    module_cmds_GCJ \
-    module_expsym_cmds_GCJ \
-    lt_cv_prog_compiler_c_o_GCJ \
-    exclude_expsyms_GCJ \
-    include_expsyms_GCJ; do
-
-    case $var in
-    old_archive_cmds_GCJ | \
-    old_archive_from_new_cmds_GCJ | \
-    archive_cmds_GCJ | \
-    archive_expsym_cmds_GCJ | \
-    module_cmds_GCJ | \
-    module_expsym_cmds_GCJ | \
-    old_archive_from_expsyms_cmds_GCJ | \
-    export_symbols_cmds_GCJ | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
-      ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
-      ;;
-    esac
-  done
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
 
-cfgfile="$ofile"
 
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_GCJ
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
 
-# A C compiler.
-LTCC=$lt_LTCC
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
 
-# A language-specific compiler.
-CC=$lt_compiler_GCJ
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_GCJ
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
 
-# An ERE matcher.
-EGREP=$lt_EGREP
 
-# The linker used to build libraries.
-LD=$lt_LD_GCJ
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
 
-# A BSD-compatible nm program.
-NM=$lt_NM
 
-# A symbol stripping program
-STRIP=$lt_STRIP
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
 
-# Used on cygwin: assembler.
-AS="$AS"
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
 
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_GCJ
 
-# Object file suffix (normally "o").
-objext="$ac_objext"
 
-# Old archive suffix (normally "a").
-libext="$libext"
 
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
+    { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_CXX=
+if test -n "$hardcode_libdir_flag_spec_CXX" ||
+   test -n "$runpath_var_CXX" ||
+   test "X$hardcode_automatic_CXX" = "Xyes" ; then
 
-# Executable file suffix (normally "").
-exeext="$exeext"
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_CXX" != no &&
+     # If the only mechanism to avoid hardcoding is shlibpath_var, we
+     # have to relink, otherwise we might link with an installed library
+     # when we should be linking with a yet-to-be-installed one
+     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no &&
+     test "$hardcode_minus_L_CXX" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_CXX=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_CXX=immediate
+  fi
+else
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_CXX=unsupported
+fi
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+$as_echo "$hardcode_action_CXX" >&6; }
 
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_GCJ
-pic_mode=$pic_mode
+if test "$hardcode_action_CXX" = relink ||
+   test "$inherit_rpath_CXX" = 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
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
 
-# Do we need a version for libraries?
-need_version=$need_version
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
+  fi # test -n "$compiler"
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
+  CC=$lt_save_CC
+  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
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_GCJ
+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
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
 
-# Library versioning type.
-version_type=$version_type
+      ac_ext=${ac_fc_srcext-f}
+ac_compile='$FC -c $FCFLAGS $ac_fcflags_srcext conftest.$ac_ext >&5'
+ac_link='$FC -o conftest$ac_exeext $FCFLAGS $LDFLAGS $ac_fcflags_srcext conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_fc_compiler_gnu
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
+archive_cmds_need_lc_FC=no
+allow_undefined_flag_FC=
+always_export_symbols_FC=no
+archive_expsym_cmds_FC=
+export_dynamic_flag_spec_FC=
+hardcode_direct_FC=no
+hardcode_direct_absolute_FC=no
+hardcode_libdir_flag_spec_FC=
+hardcode_libdir_flag_spec_ld_FC=
+hardcode_libdir_separator_FC=
+hardcode_minus_L_FC=no
+hardcode_automatic_FC=no
+inherit_rpath_FC=no
+module_cmds_FC=
+module_expsym_cmds_FC=
+link_all_deplibs_FC=unknown
+old_archive_cmds_FC=$old_archive_cmds
+no_undefined_flag_FC=
+whole_archive_flag_spec_FC=
+enable_shared_with_static_runtimes_FC=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+objext_FC=$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
+"
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
+  # Code to be used in simple link tests
+  lt_simple_link_test_code="\
+      program t
+      end
+"
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_GCJ
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
+  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_GCJ
-archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_GCJ
-module_expsym_cmds=$lt_module_expsym_cmds_GCJ
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_GCJ
+# Allow CC to be a program name with arguments.
+compiler=$CC
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_GCJ
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+  # save warnings/boilerplate of simple test code
+  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*
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
+  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*
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+  # Allow CC to be a program name with arguments.
+  lt_save_CC="$CC"
+  lt_save_GCC=$GCC
+  CC=${FC-"f95"}
+  compiler=$CC
+  GCC=$ac_cv_fc_compiler_gnu
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_GCJ
+  compiler_FC=$CC
+  for cc_temp in $compiler""; do
+  case $cc_temp in
+    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+    \-*) ;;
+    *) break;;
+  esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
+  if test -n "$compiler"; then
+    { $as_echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+    { $as_echo "$as_me:$LINENO: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+    { $as_echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+    test "$can_build_shared" = "no" && enable_shared=no
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+    # 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
+    { $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+    { $as_echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+    # Make sure either enable_shared or enable_static is yes.
+    test "$enable_shared" = yes || enable_static=yes
+    { $as_echo "$as_me:$LINENO: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+    GCC_FC="$ac_cv_fc_compiler_gnu"
+    LD_FC="$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...
+    # Dependencies to place before and after the object being linked:
+predep_objects_FC=
+postdep_objects_FC=
+predeps_FC=
+postdeps_FC=
+compiler_lib_search_path_FC=
+
+cat > conftest.$ac_ext <<_LT_EOF
+      subroutine foo
+      implicit none
+      integer a
+      a=0
+      return
+      end
+_LT_EOF
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Parse the compiler output and extract the necessary
+  # objects, libraries and library flags.
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+  # Sentinel used to keep track of whether or not we are before
+  # the conftest object file.
+  pre_test_object_deps_done=no
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
+  for p in `eval "$output_verbose_link_cmd"`; do
+    case $p in
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+    -L* | -R* | -l*)
+       # Some compilers place space between "-{L,R}" and the path.
+       # Remove the space.
+       if test $p = "-L" ||
+          test $p = "-R"; then
+	 prev=$p
+	 continue
+       else
+	 prev=
+       fi
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_GCJ
+       if test "$pre_test_object_deps_done" = no; then
+	 case $p in
+	 -L* | -R*)
+	   # Internal compiler library paths should come after those
+	   # provided the user.  The postdeps already come after the
+	   # user supplied libs so there is no need to process them.
+	   if test -z "$compiler_lib_search_path_FC"; then
+	     compiler_lib_search_path_FC="${prev}${p}"
+	   else
+	     compiler_lib_search_path_FC="${compiler_lib_search_path_FC} ${prev}${p}"
+	   fi
+	   ;;
+	 # The "-l" case would never come before the object being
+	 # linked, so don't bother handling this case.
+	 esac
+       else
+	 if test -z "$postdeps_FC"; then
+	   postdeps_FC="${prev}${p}"
+	 else
+	   postdeps_FC="${postdeps_FC} ${prev}${p}"
+	 fi
+       fi
+       ;;
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
+    *.$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
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ
+       if test "$pre_test_object_deps_done" = no; then
+	 if test -z "$predep_objects_FC"; then
+	   predep_objects_FC="$p"
+	 else
+	   predep_objects_FC="$predep_objects_FC $p"
+	 fi
+       else
+	 if test -z "$postdep_objects_FC"; then
+	   postdep_objects_FC="$p"
+	 else
+	   postdep_objects_FC="$postdep_objects_FC $p"
+	 fi
+       fi
+       ;;
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+    *) ;; # Ignore the rest.
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+    esac
+  done
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_GCJ
+  # Clean up.
+  rm -f a.out a.exe
+else
+  echo "libtool.m4: error: problem compiling FC test program"
+fi
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_GCJ
+$RM -f confest.$objext
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+# PORTME: override above test on systems where it is broken
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_GCJ
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+case " $postdeps_FC " in
+*" -lc "*) archive_cmds_need_lc_FC=no ;;
+esac
+ compiler_lib_search_dirs_FC=
+if test -n "${compiler_lib_search_path_FC}"; then
+ compiler_lib_search_dirs_FC=`echo " ${compiler_lib_search_path_FC}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_GCJ
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_GCJ"
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_GCJ
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_GCJ
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_GCJ
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_GCJ
 
-# ### END LIBTOOL TAG CONFIG: $tagname
 
-__EOF__
 
 
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
+    lt_prog_compiler_wl_FC=
+lt_prog_compiler_pic_FC=
+lt_prog_compiler_static_FC=
 
+{ $as_echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&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
+  if test "$GCC" = yes; then
+    lt_prog_compiler_wl_FC='-Wl,'
+    lt_prog_compiler_static_FC='-static'
 
-CC="$lt_save_CC"
+    case $host_os in
+      aix*)
+      # All AIX code is PIC.
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_FC='-Bstatic'
+      fi
+      ;;
 
-	else
-	  tagname=""
-	fi
-	;;
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            lt_prog_compiler_pic_FC='-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_prog_compiler_pic_FC='-m68020 -resident32 -malways-restore-a4'
+        ;;
+      esac
+      ;;
 
-      RC)
+    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
+      lt_prog_compiler_pic_FC='-DDLL_EXPORT'
+      ;;
 
+    darwin* | rhapsody*)
+      # PIC is the default on this platform
+      # Common symbols not allowed in MH_DYLIB files
+      lt_prog_compiler_pic_FC='-fno-common'
+      ;;
 
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-objext_RC=$objext
+    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_prog_compiler_pic_FC='-fPIC'
+	;;
+      esac
+      ;;
 
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+    interix[3-9]*)
+      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+      # Instead, we relocate shared libraries at runtime.
+      ;;
 
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
+    msdosdjgpp*)
+      # Just because we use GCC doesn't mean we suddenly get shared libraries
+      # on systems that don't support them.
+      lt_prog_compiler_can_build_shared_FC=no
+      enable_shared=no
+      ;;
 
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_FC='-fPIC -shared'
+      ;;
 
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	lt_prog_compiler_pic_FC=-Kconform_pic
+      fi
+      ;;
 
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+    *)
+      lt_prog_compiler_pic_FC='-fPIC'
+      ;;
+    esac
+  else
+    # PORTME Check for flag to pass linker flags through the system compiler.
+    case $host_os in
+    aix*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      if test "$host_cpu" = ia64; then
+	# AIX 5 now supports IA64 processor
+	lt_prog_compiler_static_FC='-Bstatic'
+      else
+	lt_prog_compiler_static_FC='-bnso -bI:/lib/syscalls.exp'
+      fi
+      ;;
 
-# Allow CC to be a program name with arguments.
-compiler=$CC
+    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).
+      lt_prog_compiler_pic_FC='-DDLL_EXPORT'
+      ;;
 
+    hpux9* | hpux10* | hpux11*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+      # not for PA HP-UX.
+      case $host_cpu in
+      hppa*64*|ia64*)
+	# +Z the default
+	;;
+      *)
+	lt_prog_compiler_pic_FC='+Z'
+	;;
+      esac
+      # Is there a better lt_prog_compiler_static that works with the bundled CC?
+      lt_prog_compiler_static_FC='${wl}-a ${wl}archive'
+      ;;
 
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$rm conftest*
+    irix5* | irix6* | nonstopux*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      # PIC (with -KPIC) is the default.
+      lt_prog_compiler_static_FC='-non_shared'
+      ;;
 
-ac_outfile=conftest.$ac_objext
-printf "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$rm conftest*
+    linux* | k*bsd*-gnu)
+      case $cc_basename in
+      # old Intel for x86_64 which still supported -KPIC.
+      ecc*)
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='-KPIC'
+	lt_prog_compiler_static_FC='-static'
+        ;;
+      # icc used to be incompatible with GCC.
+      # ICC 10 doesn't accept -KPIC any more.
+      icc* | ifort*)
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='-fPIC'
+	lt_prog_compiler_static_FC='-static'
+        ;;
+      # Lahey Fortran 8.1.
+      lf95*)
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='--shared'
+	lt_prog_compiler_static_FC='--static'
+	;;
+      pgcc* | pgf77* | pgf90* | pgf95*)
+        # Portland Group compilers (*not* the Pentium gcc compiler,
+	# which looks to be a dead project)
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='-fpic'
+	lt_prog_compiler_static_FC='-Bstatic'
+        ;;
+      ccc*)
+        lt_prog_compiler_wl_FC='-Wl,'
+        # All Alpha code is PIC.
+        lt_prog_compiler_static_FC='-non_shared'
+        ;;
+      xl*)
+	# IBM XL C 8.0/Fortran 10.1 on PPC
+	lt_prog_compiler_wl_FC='-Wl,'
+	lt_prog_compiler_pic_FC='-qpic'
+	lt_prog_compiler_static_FC='-qstaticlink'
+	;;
+      *)
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)
+	  # Sun C 5.9
+	  lt_prog_compiler_pic_FC='-KPIC'
+	  lt_prog_compiler_static_FC='-Bstatic'
+	  lt_prog_compiler_wl_FC='-Wl,'
+	  ;;
+	*Sun\ F*)
+	  # 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=''
+	  ;;
+	esac
+	;;
+      esac
+      ;;
 
+    newsos6)
+      lt_prog_compiler_pic_FC='-KPIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
 
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-CC=${RC-"windres"}
-compiler=$CC
-compiler_RC=$CC
-for cc_temp in $compiler""; do
-  case $cc_temp in
-    compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
-    distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
-    \-*) ;;
-    *) break;;
-  esac
-done
-cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-lt_cv_prog_compiler_c_o_RC=yes
-
-# The else clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
-  # See if we are running on zsh, and set the options which allow our commands through
-  # without removal of \ escapes.
-  if test -n "${ZSH_VERSION+set}" ; then
-    setopt NO_GLOB_SUBST
-  fi
-  # Now quote all the things that may contain metacharacters while being
-  # careful not to overquote the AC_SUBSTed values.  We take copies of the
-  # variables and quote the copies for generation of the libtool script.
-  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
-    SED SHELL STRIP \
-    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
-    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
-    deplibs_check_method reload_flag reload_cmds need_locks \
-    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
-    lt_cv_sys_global_symbol_to_c_name_address \
-    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
-    old_postinstall_cmds old_postuninstall_cmds \
-    compiler_RC \
-    CC_RC \
-    LD_RC \
-    lt_prog_compiler_wl_RC \
-    lt_prog_compiler_pic_RC \
-    lt_prog_compiler_static_RC \
-    lt_prog_compiler_no_builtin_flag_RC \
-    export_dynamic_flag_spec_RC \
-    thread_safe_flag_spec_RC \
-    whole_archive_flag_spec_RC \
-    enable_shared_with_static_runtimes_RC \
-    old_archive_cmds_RC \
-    old_archive_from_new_cmds_RC \
-    predep_objects_RC \
-    postdep_objects_RC \
-    predeps_RC \
-    postdeps_RC \
-    compiler_lib_search_path_RC \
-    archive_cmds_RC \
-    archive_expsym_cmds_RC \
-    postinstall_cmds_RC \
-    postuninstall_cmds_RC \
-    old_archive_from_expsyms_cmds_RC \
-    allow_undefined_flag_RC \
-    no_undefined_flag_RC \
-    export_symbols_cmds_RC \
-    hardcode_libdir_flag_spec_RC \
-    hardcode_libdir_flag_spec_ld_RC \
-    hardcode_libdir_separator_RC \
-    hardcode_automatic_RC \
-    module_cmds_RC \
-    module_expsym_cmds_RC \
-    lt_cv_prog_compiler_c_o_RC \
-    exclude_expsyms_RC \
-    include_expsyms_RC; do
-
-    case $var in
-    old_archive_cmds_RC | \
-    old_archive_from_new_cmds_RC | \
-    archive_cmds_RC | \
-    archive_expsym_cmds_RC | \
-    module_cmds_RC | \
-    module_expsym_cmds_RC | \
-    old_archive_from_expsyms_cmds_RC | \
-    export_symbols_cmds_RC | \
-    extract_expsyms_cmds | reload_cmds | finish_cmds | \
-    postinstall_cmds | postuninstall_cmds | \
-    old_postinstall_cmds | old_postuninstall_cmds | \
-    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
-      # Double-quote double-evaled strings.
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+    *nto* | *qnx*)
+      # QNX uses GNU C++, but need to define -shared option too, otherwise
+      # it will coredump.
+      lt_prog_compiler_pic_FC='-fPIC -shared'
       ;;
-    *)
-      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+
+    osf3* | osf4* | osf5*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      # All OSF/1 code is PIC.
+      lt_prog_compiler_static_FC='-non_shared'
       ;;
-    esac
-  done
 
-  case $lt_echo in
-  *'\$0 --fallback-echo"')
-    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
-    ;;
-  esac
+    rdos*)
+      lt_prog_compiler_static_FC='-non_shared'
+      ;;
 
-cfgfile="$ofile"
+    solaris*)
+      lt_prog_compiler_pic_FC='-KPIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      case $cc_basename in
+      f77* | f90* | f95*)
+	lt_prog_compiler_wl_FC='-Qoption ld ';;
+      *)
+	lt_prog_compiler_wl_FC='-Wl,';;
+      esac
+      ;;
 
-  cat <<__EOF__ >> "$cfgfile"
-# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+    sunos4*)
+      lt_prog_compiler_wl_FC='-Qoption ld '
+      lt_prog_compiler_pic_FC='-PIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
 
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+    sysv4 | sysv4.2uw2* | sysv4.3*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      lt_prog_compiler_pic_FC='-KPIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
 
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
+    sysv4*MP*)
+      if test -d /usr/nec ;then
+	lt_prog_compiler_pic_FC='-Kconform_pic'
+	lt_prog_compiler_static_FC='-Bstatic'
+      fi
+      ;;
 
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
+    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      lt_prog_compiler_pic_FC='-KPIC'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
 
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
+    unicos*)
+      lt_prog_compiler_wl_FC='-Wl,'
+      lt_prog_compiler_can_build_shared_FC=no
+      ;;
 
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc_RC
+    uts4*)
+      lt_prog_compiler_pic_FC='-pic'
+      lt_prog_compiler_static_FC='-Bstatic'
+      ;;
 
-# Whether or not to disallow shared libs when runtime libs are static
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
+    *)
+      lt_prog_compiler_can_build_shared_FC=no
+      ;;
+    esac
+  fi
 
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
+case $host_os in
+  # For platforms which do not support PIC, -DPIC is meaningless:
+  *djgpp*)
+    lt_prog_compiler_pic_FC=
+    ;;
+  *)
+    lt_prog_compiler_pic_FC="$lt_prog_compiler_pic_FC"
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_FC" >&5
+$as_echo "$lt_prog_compiler_pic_FC" >&6; }
 
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
 
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
 
-# An echo program that does not interpret backslashes.
-echo=$lt_echo
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_FC"; then
+  { $as_echo "$as_me:$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; }
+if test "${lt_cv_prog_compiler_pic_works_FC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_pic_works_FC=no
+   ac_outfile=conftest.$ac_objext
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+   lt_compiler_flag="$lt_prog_compiler_pic_FC"
+   # 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:19809: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>conftest.err)
+   ac_status=$?
+   cat conftest.err >&5
+   echo "$as_me:19813: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s "$ac_outfile"; then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings other than the usual output.
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_pic_works_FC=yes
+     fi
+   fi
+   $RM conftest*
 
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_FC" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works_FC" >&6; }
 
-# A C compiler.
-LTCC=$lt_LTCC
+if test x"$lt_cv_prog_compiler_pic_works_FC" = xyes; then
+    case $lt_prog_compiler_pic_FC in
+     "" | " "*) ;;
+     *) lt_prog_compiler_pic_FC=" $lt_prog_compiler_pic_FC" ;;
+     esac
+else
+    lt_prog_compiler_pic_FC=
+     lt_prog_compiler_can_build_shared_FC=no
+fi
 
-# LTCC compiler flags.
-LTCFLAGS=$lt_LTCFLAGS
+fi
 
-# A language-specific compiler.
-CC=$lt_compiler_RC
 
-# Is the compiler the GNU C compiler?
-with_gcc=$GCC_RC
 
-gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
-gcc_ver=\`gcc -dumpversion\`
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl_FC eval lt_tmp_static_flag=\"$lt_prog_compiler_static_FC\"
+{ $as_echo "$as_me:$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; }
+if test "${lt_cv_prog_compiler_static_works_FC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_static_works_FC=no
+   save_LDFLAGS="$LDFLAGS"
+   LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+   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>&5
+       $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+       if diff conftest.exp conftest.er2 >/dev/null; then
+         lt_cv_prog_compiler_static_works_FC=yes
+       fi
+     else
+       lt_cv_prog_compiler_static_works_FC=yes
+     fi
+   fi
+   $RM -r conftest*
+   LDFLAGS="$save_LDFLAGS"
 
-# An ERE matcher.
-EGREP=$lt_EGREP
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_FC" >&5
+$as_echo "$lt_cv_prog_compiler_static_works_FC" >&6; }
 
-# The linker used to build libraries.
-LD=$lt_LD_RC
+if test x"$lt_cv_prog_compiler_static_works_FC" = xyes; then
+    :
+else
+    lt_prog_compiler_static_FC=
+fi
 
-# Whether we need hard or soft links.
-LN_S=$lt_LN_S
 
-# A BSD-compatible nm program.
-NM=$lt_NM
 
-# A symbol stripping program
-STRIP=$lt_STRIP
 
-# Used to examine libraries when file_magic_cmd begins "file"
-MAGIC_CMD=$MAGIC_CMD
+    { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_FC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_FC=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-# Used on cygwin: DLL creation program.
-DLLTOOL="$DLLTOOL"
+   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:19908: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:19912: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_FC=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
-# Used on cygwin: object dumper.
-OBJDUMP="$OBJDUMP"
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_FC" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; }
 
-# Used on cygwin: assembler.
-AS="$AS"
 
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
 
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl_RC
-
-# Object file suffix (normally "o").
-objext="$ac_objext"
-
-# Old archive suffix (normally "a").
-libext="$libext"
-
-# Shared library suffix (normally ".so").
-shrext_cmds='$shrext_cmds'
-
-# Executable file suffix (normally "").
-exeext="$exeext"
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic_RC
-pic_mode=$pic_mode
+    { $as_echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o_FC+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  lt_cv_prog_compiler_c_o_FC=no
+   $RM -r conftest 2>/dev/null
+   mkdir conftest
+   cd conftest
+   mkdir out
+   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-# What is the maximum length of a command?
-max_cmd_len=$lt_cv_sys_max_cmd_len
+   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:19960: $lt_compile\"" >&5)
+   (eval "$lt_compile" 2>out/conftest.err)
+   ac_status=$?
+   cat out/conftest.err >&5
+   echo "$as_me:19964: \$? = $ac_status" >&5
+   if (exit $ac_status) && test -s out/conftest2.$ac_objext
+   then
+     # The compiler can only warn and ignore the option if not recognized
+     # So say no if there are warnings
+     $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+       lt_cv_prog_compiler_c_o_FC=yes
+     fi
+   fi
+   chmod u+w . 2>&5
+   $RM conftest*
+   # SGI C++ compiler will create directory out/ii_files/ for
+   # template instantiation
+   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+   $RM out/* && rmdir out
+   cd ..
+   $RM -r conftest
+   $RM conftest*
 
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
+fi
+{ $as_echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_FC" >&5
+$as_echo "$lt_cv_prog_compiler_c_o_FC" >&6; }
 
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
 
-# Do we need the lib prefix for modules?
-need_lib_prefix=$need_lib_prefix
 
-# Do we need a version for libraries?
-need_version=$need_version
 
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_FC" = no && test "$need_locks" != no; then
+  # do not overwrite the value of need_locks provided by the user
+  { $as_echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+  hard_links=yes
+  $RM conftest*
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  touch conftest.a
+  ln conftest.a conftest.b 2>&5 || hard_links=no
+  ln conftest.a conftest.b 2>/dev/null && hard_links=no
+  { $as_echo "$as_me:$LINENO: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+  if test "$hard_links" = no; then
+    { $as_echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+    need_locks=warn
+  fi
+else
+  need_locks=no
+fi
 
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
 
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
 
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static_RC
+    { $as_echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
 
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
+  runpath_var=
+  allow_undefined_flag_FC=
+  always_export_symbols_FC=no
+  archive_cmds_FC=
+  archive_expsym_cmds_FC=
+  compiler_needs_object_FC=no
+  enable_shared_with_static_runtimes_FC=no
+  export_dynamic_flag_spec_FC=
+  export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+  hardcode_automatic_FC=no
+  hardcode_direct_FC=no
+  hardcode_direct_absolute_FC=no
+  hardcode_libdir_flag_spec_FC=
+  hardcode_libdir_flag_spec_ld_FC=
+  hardcode_libdir_separator_FC=
+  hardcode_minus_L_FC=no
+  hardcode_shlibpath_var_FC=unsupported
+  inherit_rpath_FC=no
+  link_all_deplibs_FC=unknown
+  module_cmds_FC=
+  module_expsym_cmds_FC=
+  old_archive_from_new_cmds_FC=
+  old_archive_from_expsyms_cmds_FC=
+  thread_safe_flag_spec_FC=
+  whole_archive_flag_spec_FC=
+  # include_expsyms should be a list of space-separated symbols to be *always*
+  # included in the symbol list
+  include_expsyms_FC=
+  # exclude_expsyms can be an extended regexp of symbols to exclude
+  # it will be wrapped by ` (' and `)$', so one must not match beginning or
+  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+  # as well as any symbol that contains `d'.
+  exclude_expsyms_FC='_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.
+  extract_expsyms_cmds=
 
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
+  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
+    ;;
+  esac
 
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
+  ld_shlibs_FC=yes
+  if test "$with_gnu_ld" = yes; then
+    # If archive_cmds runs LD, not CC, wlarc should be empty
+    wlarc='${wl}'
 
-# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
+    # Set some defaults for GNU ld with shared library support. These
+    # are reset later if shared libraries are not supported. Putting them
+    # here allows them to be overridden if necessary.
+    runpath_var=LD_RUN_PATH
+    hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+    export_dynamic_flag_spec_FC='${wl}--export-dynamic'
+    # ancient GNU ld didn't support --whole-archive et. al.
+    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+      whole_archive_flag_spec_FC="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+    else
+      whole_archive_flag_spec_FC=
+    fi
+    supports_anon_versioning=no
+    case `$LD -v 2>&1` in
+      *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+      *\ 2.11.*) ;; # other 2.11 versions
+      *) supports_anon_versioning=yes ;;
+    esac
 
-# Library versioning type.
-version_type=$version_type
+    # 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
+	ld_shlibs_FC=no
+	cat <<_LT_EOF 1>&2
 
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support.  If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
 
-# List of archive names.  First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME.
-library_names_spec=$lt_library_names_spec
+_LT_EOF
+      fi
+      ;;
 
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds_FC=''
+        ;;
+      m68k)
+            archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec_FC='-L$libdir'
+            hardcode_minus_L_FC=yes
+        ;;
+      esac
+      ;;
 
-# Commands used to build and install an old-style archive.
-RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds_RC
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
+    beos*)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	allow_undefined_flag_FC=unsupported
+	# Joseph Beckenbach <jrb3 at best.com> says some releases of gcc
+	# support --undefined.  This deserves some investigation.  FIXME
+	archive_cmds_FC='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
 
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
+    cygwin* | mingw* | pw32* | cegcc*)
+      # _LT_TAGVAR(hardcode_libdir_flag_spec, FC) is actually meaningless,
+      # as there is no search path for DLLs.
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      allow_undefined_flag_FC=unsupported
+      always_export_symbols_FC=no
+      enable_shared_with_static_runtimes_FC=yes
+      export_symbols_cmds_FC='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+        archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+	# If the export-symbols file already is a .def file (1st line
+	# is EXPORTS), use it as is; otherwise, prepend...
+	archive_expsym_cmds_FC='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+	  cp $export_symbols $output_objdir/$soname.def;
+	else
+	  echo EXPORTS > $output_objdir/$soname.def;
+	  cat $export_symbols >> $output_objdir/$soname.def;
+	fi~
+	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
 
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
+    interix[3-9]*)
+      hardcode_direct_FC=no
+      hardcode_shlibpath_var_FC=no
+      hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+      export_dynamic_flag_spec_FC='${wl}-E'
+      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+      # Instead, shared libraries are loaded at an image base (0x10000000 by
+      # default) and relocated if they conflict, which is a slow very memory
+      # consuming and fragmenting process.  To avoid this, we pick a random,
+      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
+      archive_cmds_FC='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+      archive_expsym_cmds_FC='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'
+      ;;
 
-# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds_RC
-archive_expsym_cmds=$lt_archive_expsym_cmds_RC
-postinstall_cmds=$lt_postinstall_cmds
-postuninstall_cmds=$lt_postuninstall_cmds
+    gnu* | linux* | tpf* | k*bsd*-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=
+	tmp_sharedflag='-shared'
+	case $cc_basename,$host_cpu in
+        pgcc*)				# Portland Group C compiler
+	  whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag'
+	  ;;
+	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
+	  whole_archive_flag_spec_FC='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  tmp_addflag=' $pic_flag -Mnomain' ;;
+	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
+	  tmp_addflag=' -i_dynamic' ;;
+	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
+	  tmp_addflag=' -i_dynamic -nofor_main' ;;
+	ifc* | ifort*)			# Intel Fortran compiler
+	  tmp_addflag=' -nofor_main' ;;
+	lf95*)				# Lahey Fortran 8.1
+	  whole_archive_flag_spec_FC=
+	  tmp_sharedflag='--shared' ;;
+	xl[cC]*)			# IBM XL C 8.0 on PPC (deal with xlf below)
+	  tmp_sharedflag='-qmkshrobj'
+	  tmp_addflag= ;;
+	esac
+	case `$CC -V 2>&1 | sed 5q` in
+	*Sun\ C*)			# Sun C 5.9
+	  whole_archive_flag_spec_FC='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+	  compiler_needs_object_FC=yes
+	  tmp_sharedflag='-G' ;;
+	*Sun\ F*)			# Sun Fortran 8.3
+	  tmp_sharedflag='-G' ;;
+	esac
+	archive_cmds_FC='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 
-# Commands used to build a loadable module (assumed same as above if empty)
-module_cmds=$lt_module_cmds_RC
-module_expsym_cmds=$lt_module_expsym_cmds_RC
+        if test "x$supports_anon_versioning" = xyes; then
+          archive_expsym_cmds_FC='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
 
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
+	case $cc_basename in
+	xlf*)
+	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+	  whole_archive_flag_spec_FC='--whole-archive$convenience --no-whole-archive'
+	  hardcode_libdir_flag_spec_FC=
+	  hardcode_libdir_flag_spec_ld_FC='-rpath $libdir'
+	  archive_cmds_FC='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+	  if test "x$supports_anon_versioning" = xyes; then
+	    archive_expsym_cmds_FC='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 $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+	  fi
+	  ;;
+	esac
+      else
+        ld_shlibs_FC=no
+      fi
+      ;;
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds_FC='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+	wlarc=
+      else
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      fi
+      ;;
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    solaris*)
+      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+	ld_shlibs_FC=no
+	cat <<_LT_EOF 1>&2
 
-# Dependencies to place before the objects being linked to create a
-# shared library.
-predeps=$lt_predeps_RC
+*** 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.
 
-# Dependencies to place after the objects being linked to create a
-# shared library.
-postdeps=$lt_postdeps_RC
+_LT_EOF
+      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
 
-# The library search path used internally by the compiler when linking
-# a shared library.
-compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+      case `$LD -v 2>&1` in
+        *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+	ld_shlibs_FC=no
+	cat <<_LT_EOF 1>&2
 
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
+*** 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.
 
-# Command to use when deplibs_check_method == file_magic.
-file_magic_cmd=$lt_file_magic_cmd
+_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
+	    hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+	    archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	    archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+	  else
+	    ld_shlibs_FC=no
+	  fi
+	;;
+      esac
+      ;;
 
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag_RC
+    sunos4*)
+      archive_cmds_FC='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      wlarc=
+      hardcode_direct_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
 
-# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag_RC
+    *)
+      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
+    esac
 
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
+    if test "$ld_shlibs_FC" = no; then
+      runpath_var=
+      hardcode_libdir_flag_spec_FC=
+      export_dynamic_flag_spec_FC=
+      whole_archive_flag_spec_FC=
+    fi
+  else
+    # PORTME fill in a description of your system's linker (not GNU ld)
+    case $host_os in
+    aix3*)
+      allow_undefined_flag_FC=unsupported
+      always_export_symbols_FC=yes
+      archive_expsym_cmds_FC='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+      # Note: this linker hardcodes the directories in LIBPATH if there
+      # are no directories specified by -L.
+      hardcode_minus_L_FC=yes
+      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+	# Neither direct hardcoding nor static linking is supported with a
+	# broken collect2.
+	hardcode_direct_FC=unsupported
+      fi
+      ;;
 
-# Same as above, but a single script fragment to be evaled but not shown.
-finish_eval=$lt_finish_eval
+    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
+	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+	  export_symbols_cmds_FC='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+	else
+	  export_symbols_cmds_FC='$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
 
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+	# 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
 
-# Transform the output of nm in a proper C declaration
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+	exp_sym_flag='-bexport'
+	no_entry_flag='-bnoentry'
+      fi
 
-# Transform the output of nm in a C name address pair
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+      # 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.
 
-# This is the shared library runtime path variable.
-runpath_var=$runpath_var
+      archive_cmds_FC=''
+      hardcode_direct_FC=yes
+      hardcode_direct_absolute_FC=yes
+      hardcode_libdir_separator_FC=':'
+      link_all_deplibs_FC=yes
+      file_list_spec_FC='${wl}-f,'
 
-# This is the shared library path variable.
-shlibpath_var=$shlibpath_var
+      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
+	  hardcode_direct_FC=unsupported
+	  # It fails to find uninstalled libraries when the uninstalled
+	  # path is not listed in the libpath.  Setting hardcode_minus_L
+	  # to unsupported forces relinking
+	  hardcode_minus_L_FC=yes
+	  hardcode_libdir_flag_spec_FC='-L$libdir'
+	  hardcode_libdir_separator_FC=
+	  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
 
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+      export_dynamic_flag_spec_FC='${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.
+      always_export_symbols_FC=yes
+      if test "$aix_use_runtimelinking" = yes; then
+	# Warning - without using the other runtime loading flags (-brtl),
+	# -berok will link without error, but may produce a broken library.
+	allow_undefined_flag_FC='-berok'
+        # Determine the default libpath from the value encoded in an
+        # empty executable.
+        cat >conftest.$ac_ext <<_ACEOF
+      program main
 
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action_RC
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`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 "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
 
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+fi
 
-# If ld is used when linking, flag to hardcode \$libdir into
-# a binary during linking. This must work even if \$libdir does
-# not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
+        hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath"
+        archive_expsym_cmds_FC='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+      else
+	if test "$host_cpu" = ia64; then
+	  hardcode_libdir_flag_spec_FC='${wl}-R $libdir:/usr/lib:/lib'
+	  allow_undefined_flag_FC="-z nodefs"
+	  archive_expsym_cmds_FC="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+	else
+	 # Determine the default libpath from the value encoded in an
+	 # empty executable.
+	 cat >conftest.$ac_ext <<_ACEOF
+      program main
 
-# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
-# resulting binary.
-hardcode_direct=$hardcode_direct_RC
+      end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+
+lt_aix_libpath_sed='
+    /Import File Strings/,/^$/ {
+	/^0/ {
+	    s/^0  *\(.*\)$/\1/
+	    p
+	}
+    }'
+aix_libpath=`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 "$aix_libpath"; then
+  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
-# resulting binary.
-hardcode_minus_L=$hardcode_minus_L_RC
 
-# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
-# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+fi
 
-# Set to yes if building a shared library automatically hardcodes DIR into the library
-# and all subsequent libraries and executables linked against it.
-hardcode_automatic=$hardcode_automatic_RC
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
 
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at relink time.
-variables_saved_for_relink="$variables_saved_for_relink"
+	 hardcode_libdir_flag_spec_FC='${wl}-blibpath:$libdir:'"$aix_libpath"
+	  # Warning - without using the other run time loading flags,
+	  # -berok will link without error, but may produce a broken library.
+	  no_undefined_flag_FC=' ${wl}-bernotok'
+	  allow_undefined_flag_FC=' ${wl}-berok'
+	  # Exported symbols can be pulled into shared objects from archives
+	  whole_archive_flag_spec_FC='$convenience'
+	  archive_cmds_need_lc_FC=yes
+	  # This is similar to how AIX traditionally builds its shared libraries.
+	  archive_expsym_cmds_FC="\$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
+      ;;
 
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs_RC
+    amigaos*)
+      case $host_cpu in
+      powerpc)
+            # see comment about AmigaOS4 .so support
+            archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+            archive_expsym_cmds_FC=''
+        ;;
+      m68k)
+            archive_cmds_FC='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+            hardcode_libdir_flag_spec_FC='-L$libdir'
+            hardcode_minus_L_FC=yes
+        ;;
+      esac
+      ;;
 
-# Compile-time system search path for libraries
-sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
+    bsdi[45]*)
+      export_dynamic_flag_spec_FC=-rdynamic
+      ;;
 
-# Run-time system search path for libraries
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+    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.
+      hardcode_libdir_flag_spec_FC=' '
+      allow_undefined_flag_FC=unsupported
+      # Tell ltmain to make .lib files, not .a files.
+      libext=lib
+      # Tell ltmain to make .dll files, not .so files.
+      shrext_cmds=".dll"
+      # FIXME: Setting linknames here is a bad hack.
+      archive_cmds_FC='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+      # The linker will automatically build a .lib file if we build a DLL.
+      old_archive_from_new_cmds_FC='true'
+      # FIXME: Should let the user specify the lib program.
+      old_archive_cmds_FC='lib -OUT:$oldlib$oldobjs$old_deplibs'
+      fix_srcfile_path_FC='`cygpath -w "$srcfile"`'
+      enable_shared_with_static_runtimes_FC=yes
+      ;;
 
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path_RC"
+    darwin* | rhapsody*)
 
-# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols_RC
 
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds_RC
+  archive_cmds_need_lc_FC=no
+  hardcode_direct_FC=no
+  hardcode_automatic_FC=yes
+  hardcode_shlibpath_var_FC=unsupported
+  whole_archive_flag_spec_FC=''
+  link_all_deplibs_FC=yes
+  allow_undefined_flag_FC="$_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=echo
+    archive_cmds_FC="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+    module_cmds_FC="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+    archive_expsym_cmds_FC="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}"
+    module_expsym_cmds_FC="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}"
 
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
+  else
+  ld_shlibs_FC=no
+  fi
 
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms_RC
+      ;;
 
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms_RC
+    dgux*)
+      archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      hardcode_shlibpath_var_FC=no
+      ;;
 
-# ### END LIBTOOL TAG CONFIG: $tagname
+    freebsd1*)
+      ld_shlibs_FC=no
+      ;;
 
-__EOF__
+    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+    # support.  Future versions do this automatically, but an explicit c++rt0.o
+    # does not break anything, and helps significantly (at the cost of a little
+    # extra space).
+    freebsd2.2*)
+      archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+      hardcode_libdir_flag_spec_FC='-R$libdir'
+      hardcode_direct_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
 
+    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+    freebsd2*)
+      archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_FC=yes
+      hardcode_minus_L_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
 
-else
-  # If there is no Makefile yet, we rely on a make rule to execute
-  # `config.status --recheck' to rerun these tests and create the
-  # libtool script then.
-  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
-  if test -f "$ltmain_in"; then
-    test -f Makefile && make "$ltmain"
-  fi
-fi
+    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+    freebsd* | dragonfly*)
+      archive_cmds_FC='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+      hardcode_libdir_flag_spec_FC='-R$libdir'
+      hardcode_direct_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
 
+    hpux9*)
+      if test "$GCC" = yes; then
+	archive_cmds_FC='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      else
+	archive_cmds_FC='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+      fi
+      hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
+      hardcode_libdir_separator_FC=:
+      hardcode_direct_FC=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
+      # hardcode_minus_L: Not really in the search PATH,
+      # but as the default location of the library.
+      hardcode_minus_L_FC=yes
+      export_dynamic_flag_spec_FC='${wl}-E'
+      ;;
 
-CC="$lt_save_CC"
+    hpux10*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_FC='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
+	hardcode_libdir_flag_spec_ld_FC='+b $libdir'
+	hardcode_libdir_separator_FC=:
+	hardcode_direct_FC=yes
+	hardcode_direct_absolute_FC=yes
+	export_dynamic_flag_spec_FC='${wl}-E'
+	# hardcode_minus_L: Not really in the search PATH,
+	# but as the default location of the library.
+	hardcode_minus_L_FC=yes
+      fi
+      ;;
 
-	;;
+    hpux11*)
+      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_FC='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_FC='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      else
+	case $host_cpu in
+	hppa*64*)
+	  archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	ia64*)
+	  archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	*)
+	  archive_cmds_FC='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+	  ;;
+	esac
+      fi
+      if test "$with_gnu_ld" = no; then
+	hardcode_libdir_flag_spec_FC='${wl}+b ${wl}$libdir'
+	hardcode_libdir_separator_FC=:
 
-      *)
-	{ { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
-echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
-   { (exit 1); exit 1; }; }
-	;;
-      esac
+	case $host_cpu in
+	hppa*64*|ia64*)
+	  hardcode_direct_FC=no
+	  hardcode_shlibpath_var_FC=no
+	  ;;
+	*)
+	  hardcode_direct_FC=yes
+	  hardcode_direct_absolute_FC=yes
+	  export_dynamic_flag_spec_FC='${wl}-E'
 
-      # Append the new tag name to the list of available tags.
-      if test -n "$tagname" ; then
-      available_tags="$available_tags $tagname"
-    fi
-    fi
-  done
-  IFS="$lt_save_ifs"
-
-  # Now substitute the updated list of available tags.
-  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
-    mv "${ofile}T" "$ofile"
-    chmod +x "$ofile"
-  else
-    rm -f "${ofile}T"
-    { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
-echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-fi
+	  # hardcode_minus_L: Not really in the search PATH,
+	  # but as the default location of the library.
+	  hardcode_minus_L_FC=yes
+	  ;;
+	esac
+      fi
+      ;;
 
+    irix5* | irix6* | nonstopux*)
+      if test "$GCC" = yes; then
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${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.
+        save_LDFLAGS="$LDFLAGS"
+        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+        cat >conftest.$ac_ext <<_ACEOF
+int foo(void) {}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
+fi
 
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        LDFLAGS="$save_LDFLAGS"
+      else
+	archive_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_FC='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+      fi
+      archive_cmds_need_lc_FC='no'
+      hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_FC=:
+      inherit_rpath_FC=yes
+      link_all_deplibs_FC=yes
+      ;;
 
-# Prevent multiple expansion
+    netbsd*)
+      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+	archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
+      else
+	archive_cmds_FC='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
+      fi
+      hardcode_libdir_flag_spec_FC='-R$libdir'
+      hardcode_direct_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
 
+    newsos6)
+      archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_direct_FC=yes
+      hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_FC=:
+      hardcode_shlibpath_var_FC=no
+      ;;
 
+    *nto* | *qnx*)
+      ;;
 
+    openbsd*)
+      if test -f /usr/libexec/ld.so; then
+	hardcode_direct_FC=yes
+	hardcode_shlibpath_var_FC=no
+	hardcode_direct_absolute_FC=yes
+	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+	  archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+	  hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+	  export_dynamic_flag_spec_FC='${wl}-E'
+	else
+	  case $host_os in
+	   openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+	     archive_cmds_FC='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+	     hardcode_libdir_flag_spec_FC='-R$libdir'
+	     ;;
+	   *)
+	     archive_cmds_FC='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+	     hardcode_libdir_flag_spec_FC='${wl}-rpath,$libdir'
+	     ;;
+	  esac
+	fi
+      else
+	ld_shlibs_FC=no
+      fi
+      ;;
 
+    os2*)
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      hardcode_minus_L_FC=yes
+      allow_undefined_flag_FC=unsupported
+      archive_cmds_FC='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+      old_archive_from_new_cmds_FC='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+      ;;
 
+    osf3*)
+      if test "$GCC" = yes; then
+	allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+      else
+	allow_undefined_flag_FC=' -expect_unresolved \*'
+	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+      fi
+      archive_cmds_need_lc_FC='no'
+      hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      hardcode_libdir_separator_FC=:
+      ;;
 
+    osf4* | osf5*)	# as osf3* with the addition of -msym flag
+      if test "$GCC" = yes; then
+	allow_undefined_flag_FC=' ${wl}-expect_unresolved ${wl}\*'
+	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+	hardcode_libdir_flag_spec_FC='${wl}-rpath ${wl}$libdir'
+      else
+	allow_undefined_flag_FC=' -expect_unresolved \*'
+	archive_cmds_FC='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+	archive_expsym_cmds_FC='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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
 
+	# Both c and cxx compiler support -rpath directly
+	hardcode_libdir_flag_spec_FC='-rpath $libdir'
+      fi
+      archive_cmds_need_lc_FC='no'
+      hardcode_libdir_separator_FC=:
+      ;;
 
+    solaris*)
+      no_undefined_flag_FC=' -z defs'
+      if test "$GCC" = yes; then
+	wlarc='${wl}'
+	archive_cmds_FC='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+	  $CC -shared ${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=''
+	  archive_cmds_FC='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  archive_expsym_cmds_FC='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}'
+	  archive_cmds_FC='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+	  archive_expsym_cmds_FC='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
+      hardcode_libdir_flag_spec_FC='-R$libdir'
+      hardcode_shlibpath_var_FC=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
+	  whole_archive_flag_spec_FC='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+	else
+	  whole_archive_flag_spec_FC='-z allextract$convenience -z defaultextract'
+	fi
+	;;
+      esac
+      link_all_deplibs_FC=yes
+      ;;
 
+    sunos4*)
+      if test "x$host_vendor" = xsequent; then
+	# Use $CC to link under sequent, because it throws in some extra .o
+	# files that make .init and .fini sections work.
+	archive_cmds_FC='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_FC='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+      fi
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      hardcode_direct_FC=yes
+      hardcode_minus_L_FC=yes
+      hardcode_shlibpath_var_FC=no
+      ;;
 
+    sysv4)
+      case $host_vendor in
+	sni)
+	  archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_FC=yes # is this really true???
+	;;
+	siemens)
+	  ## LD is ld it makes a PLAMLIB
+	  ## CC just makes a GrossModule.
+	  archive_cmds_FC='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+	  reload_cmds_FC='$CC -r -o $output$reload_objs'
+	  hardcode_direct_FC=no
+        ;;
+	motorola)
+	  archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	  hardcode_direct_FC=no #Motorola manual says yes, but my tests say they lie
+	;;
+      esac
+      runpath_var='LD_RUN_PATH'
+      hardcode_shlibpath_var_FC=no
+      ;;
 
+    sysv4.3*)
+      archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_shlibpath_var_FC=no
+      export_dynamic_flag_spec_FC='-Bexport'
+      ;;
 
+    sysv4*MP*)
+      if test -d /usr/nec; then
+	archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+	hardcode_shlibpath_var_FC=no
+	runpath_var=LD_RUN_PATH
+	hardcode_runpath_var=yes
+	ld_shlibs_FC=yes
+      fi
+      ;;
 
+    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+      no_undefined_flag_FC='${wl}-z,text'
+      archive_cmds_need_lc_FC=no
+      hardcode_shlibpath_var_FC=no
+      runpath_var='LD_RUN_PATH'
 
+      if test "$GCC" = yes; then
+	archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
 
+    sysv5* | sco3.2v5* | sco5v6*)
+      # Note: We can NOT use -z defs as we might desire, because we do not
+      # link with -lc, and that would cause any symbols used from libc to
+      # always be unresolved, which means just about no library would
+      # ever link correctly.  If we're not using GNU ld we use -z text
+      # though, which does catch some bad symbols but isn't as heavy-handed
+      # as -z defs.
+      no_undefined_flag_FC='${wl}-z,text'
+      allow_undefined_flag_FC='${wl}-z,nodefs'
+      archive_cmds_need_lc_FC=no
+      hardcode_shlibpath_var_FC=no
+      hardcode_libdir_flag_spec_FC='${wl}-R,$libdir'
+      hardcode_libdir_separator_FC=':'
+      link_all_deplibs_FC=yes
+      export_dynamic_flag_spec_FC='${wl}-Bexport'
+      runpath_var='LD_RUN_PATH'
 
+      if test "$GCC" = yes; then
+	archive_cmds_FC='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      else
+	archive_cmds_FC='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+	archive_expsym_cmds_FC='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+      fi
+      ;;
 
+    uts4*)
+      archive_cmds_FC='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+      hardcode_libdir_flag_spec_FC='-L$libdir'
+      hardcode_shlibpath_var_FC=no
+      ;;
 
+    *)
+      ld_shlibs_FC=no
+      ;;
+    esac
 
+    if test x$host_vendor = xsni; then
+      case $host in
+      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+	export_dynamic_flag_spec_FC='${wl}-Blargedynsym'
+	;;
+      esac
+    fi
+  fi
 
-#LT_INIT([disable-shared])
+{ $as_echo "$as_me:$LINENO: result: $ld_shlibs_FC" >&5
+$as_echo "$ld_shlibs_FC" >&6; }
+test "$ld_shlibs_FC" = no && can_build_shared=no
 
+with_gnu_ld_FC=$with_gnu_ld
 
 
 
 
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
-acx_pthread_ok=no
 
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_FC" in
+x|xyes)
+  # Assume -lc should be added
+  archive_cmds_need_lc_FC=yes
 
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+  if test "$enable_shared" = yes && test "$GCC" = yes; then
+    case $archive_cmds_FC 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.
+      { $as_echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+      $RM conftest*
+      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char pthread_join ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-pthread_join ();
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+      if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } 2>conftest.err; then
+        soname=conftest
+        lib=conftest
+        libobjs=conftest.$ac_objext
+        deplibs=
+        wl=$lt_prog_compiler_wl_FC
+	pic_flag=$lt_prog_compiler_pic_FC
+        compiler_flags=-v
+        linker_flags=-v
+        verstring=
+        output_objdir=.
+        libname=conftest
+        lt_save_allow_undefined_flag=$allow_undefined_flag_FC
+        allow_undefined_flag_FC=
+        if { (eval echo "$as_me:$LINENO: \"$archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\"") >&5
+  (eval $archive_cmds_FC 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  acx_pthread_ok=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-        echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-echo "${ECHO_T}$acx_pthread_ok" >&6
-        if test x"$acx_pthread_ok" = xno; then
-                PTHREAD_LIBS=""
-                PTHREAD_CFLAGS=""
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+        then
+	  archive_cmds_need_lc_FC=no
+        else
+	  archive_cmds_need_lc_FC=yes
         fi
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
-fi
+        allow_undefined_flag_FC=$lt_save_allow_undefined_flag
+      else
+        cat conftest.err 1>&5
+      fi
+      $RM conftest*
+      { $as_echo "$as_me:$LINENO: result: $archive_cmds_need_lc_FC" >&5
+$as_echo "$archive_cmds_need_lc_FC" >&6; }
+      ;;
+    esac
+  fi
+  ;;
+esac
 
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
 
-# Create a list of thread flags to try.  Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all.
 
-#acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
-acx_pthread_flags="pthreads none -Kthread -kthread lthread pthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
 
-# The ordering *is* (sometimes) important.  Some notes on the
-# individual items follow:
 
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-#       other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-#      doesn't hurt to check since this sometimes defines pthreads too;
-#      also defines -D_REENTRANT)
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
 
-case "${host_cpu}-${host_os}" in
-        *solaris*)
 
-        # On Solaris (at least, for some versions), libc contains stubbed
-        # (non-functional) versions of the pthreads routines, so link-based
-        # tests will erroneously succeed.  (We need to link with -pthread or
-        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
-        # a function called by this macro, so we could check for that, but
-        # who knows whether they'll stub that too in a future libc.)  So,
-        # we'll just look for -pthreads and -lpthread first:
 
-        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
-        ;;
-esac
 
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
 
-        case $flag in
-                none)
-                echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
-echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
-                ;;
 
-                -*)
-                echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
-echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
-                PTHREAD_CFLAGS="$flag"
-                ;;
 
-                *)
-                echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
-echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
-                PTHREAD_LIBS="-l$flag"
-                ;;
-        esac
 
-        save_LIBS="$LIBS"
-        save_CFLAGS="$CFLAGS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-        # Check for various functions.  We must include pthread.h,
-        # since some functions may be macros.  (On the Sequent, we
-        # need a special flag -Kthread to make this header compile.)
-        # We check for pthread_join because it is in -lpthread on IRIX
-        # while pthread_create is in libc.  We check for pthread_attr_init
-        # due to DEC craziness with -lpthreads.  We check for
-        # pthread_cleanup_push because it is one of the few pthread
-        # functions on Solaris that doesn't have a non-functional libc stub.
-        # We try pthread_create on general principles.
-	                                	cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <pthread.h>
-		     void *start(void *arg){return NULL;}
 
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-pthread_attr_t attr;
-		     pthread_t th;
-		     pthread_join(th, 0);
-		     pthread_attr_init(&attr);
-		     pthread_cleanup_push(NULL, NULL);
-		     pthread_create(&th,&attr,start,0);
-		     pthread_cleanup_pop(0);
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  acx_pthread_ok=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
 
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
 
-        echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-echo "${ECHO_T}$acx_pthread_ok" >&6
-        if test "x$acx_pthread_ok" = xyes; then
-                break;
-        fi
 
-        PTHREAD_LIBS=""
-        PTHREAD_CFLAGS=""
-done
-fi
 
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
-        save_LIBS="$LIBS"
-        LIBS="$PTHREAD_LIBS $LIBS"
-        save_CFLAGS="$CFLAGS"
-        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-        # Detect AIX lossage: threads are created detached by default
-        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
-        echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
-echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <pthread.h>
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-int attr; attr=PTHREAD_CREATE_JOINABLE;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ok=PTHREAD_CREATE_JOINABLE
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ok=unknown
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-        if test x"$ok" = xunknown; then
-                cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <pthread.h>
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-int attr; attr=PTHREAD_CREATE_UNDETACHED;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ok=PTHREAD_CREATE_UNDETACHED
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ok=unknown
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-        fi
-        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
 
-cat >>confdefs.h <<\_ACEOF
-#define PTHREAD_CREATE_JOINABLE $ok
-_ACEOF
 
-        fi
-        echo "$as_me:$LINENO: result: ${ok}" >&5
-echo "${ECHO_T}${ok}" >&6
-        if test x"$ok" = xunknown; then
-                { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
-echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
-        fi
 
-        echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
-echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
-        flag=no
-        case "${host_cpu}-${host_os}" in
-                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
-                *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-        esac
-        echo "$as_me:$LINENO: result: ${flag}" >&5
-echo "${ECHO_T}${flag}" >&6
-        if test "x$flag" != xno; then
-                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
-        fi
 
-        LIBS="$save_LIBS"
-        CFLAGS="$save_CFLAGS"
 
-        # More AIX lossage: must compile with cc_r
-        # Extract the first word of "cc_r", so it can be a program name with args.
-set dummy cc_r; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$PTHREAD_CC"; then
-  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_PTHREAD_CC="cc_r"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
 
-  test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
-  echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
-echo "${ECHO_T}$PTHREAD_CC" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
 
-else
-        PTHREAD_CC="$CC"
-fi
 
 
 
 
 
-if test x"$acx_pthread_ok" = xyes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTHREAD 1
-_ACEOF
 
-fi
 
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTHREAD 1
-_ACEOF
 
-        :
-else
-        acx_pthread_ok=no
 
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
 
 
 
-if true; then
-  HAVE_MXML_TRUE=
-  HAVE_MXML_FALSE='#'
-else
-  HAVE_MXML_TRUE='#'
-  HAVE_MXML_FALSE=
-fi
 
 
 
-# Check whether --with-mxml or --without-mxml was given.
-if test "${with_mxml+set}" = set; then
-  withval="$with_mxml"
-  MXML_LDFLAGS="-L$withval/lib";
-         MXML_CPPFLAGS="-I$withval/include";
-fi;
 
-save_CPPFLAGS="$CPPFLAGS"
-save_LIBS="$LIBS"
-save_LDFLAGS="$LDFLAGS"
-LIBS="$LIBS -lmxml"
-if test -n "$MXML_LDFLAGS"; then
-    LDFLAGS="$LDFLAGS $MXML_LDFLAGS"
-elif test -n "$MXML_LIB"; then
-    LDFLAGS="$LDFLAGS $MXML_LIB"
-    MXML_LDFLAGS="$MXML_LIB"
-fi
-if test -n "$MXML_CPPFLAGS"; then
-    CPPFLAGS="$CPPFLAGS $MXML_CPPFLAGS"
-elif test -n "$MXML_INC"; then
-    CPPFLAGS="$CPPFLAGS $MXML_INC"
-    MXML_CPPFLAGS="$MXML_INC"
-fi
 
-if test -z "${HAVE_MXML_TRUE}"; then
 
-for ac_header in mxml.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-else
 
 
-if false; then
-  HAVE_MXML_TRUE=
-  HAVE_MXML_FALSE='#'
-else
-  HAVE_MXML_TRUE='#'
-  HAVE_MXML_FALSE=
-fi
 
-fi
 
-done
+    { $as_echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
 
-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
 
-if test -z "${HAVE_MXML_TRUE}"; then
-    # Check for the Mini-XML library and headers
-    echo "$as_me:$LINENO: checking if mxml code can be linked" >&5
-echo $ECHO_N "checking if mxml code can be linked... $ECHO_C" >&6
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include "mxml.h"
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-mxml_node_t * n;
-         char *buffer;
-         char *value;
-         n = mxmlLoadString (0, buffer, MXML_TEXT_CALLBACK);
-         mxmlWalkNext (n, n, MXML_DESCEND);
-         value = mxmlElementGetAttr (n, "value");
-         mxmlRelease (n);
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  MXML_LIBS="-lmxml"
-         echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+case $host_os in
+aix3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+  shlibpath_var=LIBPATH
 
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  # 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
+  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=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+    ;;
+  esac
+  ;;
 
-if false; then
-  HAVE_MXML_TRUE=
-  HAVE_MXML_FALSE='#'
-else
-  HAVE_MXML_TRUE='#'
-  HAVE_MXML_FALSE=
-fi
+beos*)
+  library_names_spec='${libname}${shared_ext}'
+  dynamic_linker="$host_os ld.so"
+  shlibpath_var=LIBRARY_PATH
+  ;;
 
-         echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+bsdi[45]*)
+  version_type=linux
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+  # the default ld.so.conf also contains /usr/contrib/lib and
+  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+  # libtool to hard-code these into programs
+  ;;
 
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+cygwin* | mingw* | pw32* | cegcc*)
+  version_type=windows
+  shrext_cmds=".dll"
+  need_version=no
+  need_lib_prefix=no
 
-            if test -z "${HAVE_MXML_FALSE}"; then
-        # Check for the Mini-XML library and headers
+  case $GCC,$host_os in
+  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+    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
 
-        LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS $PTHREAD_LIBS"
-        echo "$as_me:$LINENO: checking if mxml code can be linked using pthreads" >&5
-echo $ECHO_N "checking if mxml code can be linked using pthreads... $ECHO_C" >&6
-        cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include "mxml.h"
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-mxml_node_t * n;
-             char *buffer;
-             char *value;
-             n = mxmlLoadString (0, buffer, MXML_TEXT_CALLBACK);
-             mxmlWalkNext (n, n, MXML_DESCEND);
-             value = mxmlElementGetAttr (n, "value");
-             mxmlRelease (n);
+    case $host_os in
+    cygwin*)
+      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+      ;;
+    mingw* | cegcc*)
+      # MinGW DLLs use traditional 'lib' prefix
+      soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+      if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+        # It is most probably a Windows format PATH printed by
+        # mingw gcc, but we are running on Cygwin. Gcc prints its search
+        # path with ; separators, and with drive letters. We can handle the
+        # drive letters (cygwin fileutils understands them), so leave them,
+        # especially as we might pass files found there to a mingw objdump,
+        # which wouldn't understand a cygwinified path. Ahh.
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+      else
+        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
+      fi
+      ;;
+    pw32*)
+      # pw32 DLLs use 'pw' prefix rather than 'lib'
+      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+      ;;
+    esac
+    ;;
 
-  ;
-  return 0;
-}
+  *)
+    library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+    ;;
+  esac
+  dynamic_linker='Win32 ld.exe'
+  # FIXME: first we should search . and the directory the executable is in
+  shlibpath_var=PATH
+  ;;
+
+darwin* | rhapsody*)
+  dynamic_linker="$host_os dyld"
+  version_type=darwin
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${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`'
+
+  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+  ;;
+
+dgux*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  ;;
+
+freebsd1*)
+  dynamic_linker=no
+  ;;
+
+freebsd* | dragonfly*)
+  # DragonFly does not have aout.  When/if they implement a new
+  # versioning mechanism, adjust this.
+  if test -x /usr/bin/objformat; then
+    objformat=`/usr/bin/objformat`
+  else
+    case $host_os in
+    freebsd[123]*) objformat=aout ;;
+    *) objformat=elf ;;
+    esac
+  fi
+  version_type=freebsd-$objformat
+  case $version_type in
+    freebsd-elf*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+      need_version=no
+      need_lib_prefix=no
+      ;;
+    freebsd-*)
+      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+      need_version=yes
+      ;;
+  esac
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_os in
+  freebsd2*)
+    shlibpath_overrides_runpath=yes
+    ;;
+  freebsd3.[01]* | freebsdelf3.[01]*)
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+  freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+    shlibpath_overrides_runpath=no
+    hardcode_into_libs=yes
+    ;;
+  *) # from 4.6 on, and DragonFly
+    shlibpath_overrides_runpath=yes
+    hardcode_into_libs=yes
+    ;;
+  esac
+  ;;
+
+gnu*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  hardcode_into_libs=yes
+  ;;
+
+hpux9* | hpux10* | hpux11*)
+  # Give a soname corresponding to the major version so that dld.sl refuses to
+  # link against other versions.
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  case $host_cpu in
+  ia64*)
+    shrext_cmds='.so'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.so"
+    shlibpath_var=LD_LIBRARY_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    if test "X$HPUX_IA64_MODE" = X32; then
+      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+    else
+      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+    fi
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  hppa*64*)
+    shrext_cmds='.sl'
+    hardcode_into_libs=yes
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+    ;;
+  *)
+    shrext_cmds='.sl'
+    dynamic_linker="$host_os dld.sl"
+    shlibpath_var=SHLIB_PATH
+    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    ;;
+  esac
+  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  postinstall_cmds='chmod 555 $lib'
+  ;;
+
+interix[3-9]*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=no
+  hardcode_into_libs=yes
+  ;;
+
+irix5* | irix6* | nonstopux*)
+  case $host_os in
+    nonstopux*) version_type=nonstopux ;;
+    *)
+	if test "$lt_cv_prog_gnu_ld" = yes; then
+		version_type=linux
+	else
+		version_type=irix
+	fi ;;
+  esac
+  need_lib_prefix=no
+  need_version=no
+  soname_spec='${libname}${release}${shared_ext}$major'
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+  case $host_os in
+  irix5* | nonstopux*)
+    libsuff= shlibsuff=
+    ;;
+  *)
+    case $LD in # libtool.m4 will add one of these switches to LD
+    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+      libsuff= shlibsuff= libmagic=32-bit;;
+    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+      libsuff=32 shlibsuff=N32 libmagic=N32;;
+    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+      libsuff=64 shlibsuff=64 libmagic=64-bit;;
+    *) libsuff= shlibsuff= libmagic=never-match;;
+    esac
+    ;;
+  esac
+  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+  shlibpath_overrides_runpath=no
+  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+  hardcode_into_libs=yes
+  ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+  dynamic_linker=no
+  ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-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'
+  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
+  save_LDFLAGS=$LDFLAGS
+  save_libdir=$libdir
+  eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_FC\"; \
+       LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_FC\""
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  MXML_LDFLAGS="$MXML_LDFLAGS $PTHREAD_LDFLAGS"
-             MXML_LIBS="-lmxml $PTHREAD_LIBS"
-
-
-if true; then
-  HAVE_MXML_TRUE=
-  HAVE_MXML_FALSE='#'
-else
-  HAVE_MXML_TRUE='#'
-  HAVE_MXML_FALSE=
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_fc_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  if  ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then
+  shlibpath_overrides_runpath=yes
 fi
 
-             echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-
-if false; then
-  HAVE_MXML_TRUE=
-  HAVE_MXML_FALSE='#'
-else
-  HAVE_MXML_TRUE='#'
-  HAVE_MXML_FALSE=
 fi
 
-             echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-fi
-rm -f conftest.err conftest.$ac_objext \
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-    fi
-fi
+  LDFLAGS=$save_LDFLAGS
+  libdir=$save_libdir
 
+  # 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
 
-LIBS="$save_LIBS"
-LDFLAGS="$save_LDFLAGS"
-CPPFLAGS="$save_CPPFLAGS"
+  # Add ABI-specific directories to the system library path.
+  sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib"
 
+  # 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;/^$/d' | tr '\n' ' '`
+    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $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'
+  ;;
 
+netbsd*)
+  version_type=sunos
+  need_lib_prefix=no
+  need_version=no
+  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+    dynamic_linker='NetBSD (a.out) ld.so'
+  else
+    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+    soname_spec='${libname}${release}${shared_ext}$major'
+    dynamic_linker='NetBSD ld.elf_so'
+  fi
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  ;;
 
+newsos6)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  ;;
 
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test -z "${HAVE_MXML_TRUE}"; then
+*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'
+  ;;
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MXML 1
-_ACEOF
+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
+  ;;
 
-        :
-else
+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
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  hardcode_into_libs=yes
+  # ldd complains unless libraries are executable
+  postinstall_cmds='chmod +x $lib'
+  ;;
+
+sunos4*)
+  version_type=sunos
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  if test "$with_gnu_ld" = yes; then
+    need_lib_prefix=no
+  fi
+  need_version=yes
+  ;;
+
+sysv4 | sysv4.3*)
+  version_type=linux
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  case $host_vendor in
+    sni)
+      shlibpath_overrides_runpath=no
+      need_lib_prefix=no
+      runpath_var=LD_RUN_PATH
+      ;;
+    siemens)
+      need_lib_prefix=no
+      ;;
+    motorola)
+      need_lib_prefix=no
+      need_version=no
+      shlibpath_overrides_runpath=no
+      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+      ;;
+  esac
+  ;;
+
+sysv4*MP*)
+  if test -d /usr/nec ;then
+    version_type=linux
+    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+    soname_spec='$libname${shared_ext}.$major'
+    shlibpath_var=LD_LIBRARY_PATH
+  fi
+  ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+  version_type=freebsd-elf
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+  soname_spec='${libname}${release}${shared_ext}$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  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
+  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
+  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
+{ $as_echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 fi
 
+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
 
 
 
 
 
-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_infiniband_hdr_ok=no
-ac_infiniband_lib_ok=no
-ac_with_infiniband=no
 
 
-INFINIBAND_CFLAGS=""
-INFINIBAND_CPPFLAGS=""
-INFINIBAND_LDFLAGS=""
-INFINIBAND_LIBS=""
 
 
-# Check whether --with-infiniband or --without-infiniband was given.
-if test "${with_infiniband+set}" = set; then
-  withval="$with_infiniband"
-   ac_with_infiniband=yes;
-fi;
 
 
 
-if test x"$withval" = xno; then
 
-        ac_with_infiniband=no;
 
-elif test x"$withval" = xyes -o x"$withval" = x; then
 
-        INFINIBAND_CPPFLAGS="";
-        INFINIBAND_LDFLAGS="";
-        ac_with_infiniband=yes;
 
-else
 
-        INFINIBAND_CPPFLAGS="-I$withval/include";
-        INFINIBAND_LDFLAGS="-L$withval/lib64 -L$withval/lib";
-        ac_with_infiniband=yes;
 
-fi
 
 
 
-if test x$ac_with_infiniband = xyes; then
-  HAVE_INFINIBAND_TRUE=
-  HAVE_INFINIBAND_FALSE='#'
-else
-  HAVE_INFINIBAND_TRUE='#'
-  HAVE_INFINIBAND_FALSE=
-fi
 
 
 
-if test x"$ac_with_infiniband" = xyes; then
 
-                save_CPPFLAGS=$CPPFLAGS;
-        CPPFLAGS="$CPPFLAGS $INFINIBAND_CPPFLAGS"
-        LDFLAGS="$LDFLAGS $INFINIBAND_LDFLAGS"
 
 
-        if test x"$ac_infiniband_hdr_ok" = xno; then
-                if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5
-echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6
-if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5
-echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking infiniband/verbs.h usability" >&5
-echo $ECHO_N "checking infiniband/verbs.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <infiniband/verbs.h>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action_FC=
+if test -n "$hardcode_libdir_flag_spec_FC" ||
+   test -n "$runpath_var_FC" ||
+   test "X$hardcode_automatic_FC" = "Xyes" ; then
+
+  # We can hardcode non-existent directories.
+  if test "$hardcode_direct_FC" != 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, FC)" != no &&
+     test "$hardcode_minus_L_FC" != no; then
+    # Linking always hardcodes the temporary library directory.
+    hardcode_action_FC=relink
+  else
+    # We can link without hardcoding, and we can hardcode nonexisting dirs.
+    hardcode_action_FC=immediate
+  fi
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  # We cannot hardcode anything, or else we can only hardcode existing
+  # directories.
+  hardcode_action_FC=unsupported
+fi
+{ $as_echo "$as_me:$LINENO: result: $hardcode_action_FC" >&5
+$as_echo "$hardcode_action_FC" >&6; }
 
-ac_header_compiler=no
+if test "$hardcode_action_FC" = relink ||
+   test "$inherit_rpath_FC" = 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
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
-# Is the header present?
-echo "$as_me:$LINENO: checking infiniband/verbs.h presence" >&5
-echo $ECHO_N "checking infiniband/verbs.h presence... $ECHO_C" >&6
+
+
+
+
+
+
+  fi # test -n "$compiler"
+
+  GCC=$lt_save_GCC
+  CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != 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
+
+
+
+
+
+
+
+
+
+        ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+#LT_INIT([disable-shared])
+
+{ $as_echo "$as_me:$LINENO: checking for library containing nanosleep" >&5
+$as_echo_n "checking for library containing nanosleep... " >&6; }
+if test "${ac_cv_search_nanosleep+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <infiniband/verbs.h>
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char nanosleep ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return nanosleep ();
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+for ac_lib in '' rt; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_nanosleep=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+
 fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: infiniband/verbs.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: infiniband/verbs.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: infiniband/verbs.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5
-echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6
-if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_nanosleep+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_nanosleep+set}" = set; then
+  :
 else
-  ac_cv_header_infiniband_verbs_h=$ac_header_preproc
+  ac_cv_search_nanosleep=no
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5
-echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6
-
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
 fi
-if test $ac_cv_header_infiniband_verbs_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IBVERBS_H 1
-_ACEOF
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5
+$as_echo "$ac_cv_search_nanosleep" >&6; }
+ac_res=$ac_cv_search_nanosleep
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-                         ac_infiniband_hdr_ok=yes;
-                         INFINIBAND_CFLAGS="$INFINIBAND_CFLAGS $EXTRA_CFLAGS";
-                         INFINIBAND_CPPFLAGS="$INFINIBAND_CPPFLAGS $EXTRA_CFLAGS"
-else
-  ac_infiniband_hdr_ok=no
 fi
 
 
-        fi
 
-        if test x"$ac_infiniband_hdr_ok" = xno; then
-                CPPFLAGS=$save_CPPFLAGS
-        fi
 
-                if test x"$ac_infiniband_lib_ok" = xno -a x$ac_infiniband_hdr_ok = xyes; then
-            save_LIBS=$LIBS;
-            LIBS=""
-            echo "$as_me:$LINENO: checking for library containing ibv_alloc_pd" >&5
-echo $ECHO_N "checking for library containing ibv_alloc_pd... $ECHO_C" >&6
-if test "${ac_cv_search_ibv_alloc_pd+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+for ac_func in nanosleep strncpy strerror gettimeofday
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_ibv_alloc_pd=no
-cat >conftest.$ac_ext <<_ACEOF
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char ibv_alloc_pd ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -23210,58 +22108,97 @@ char ibv_alloc_pd ();
 int
 main ()
 {
-ibv_alloc_pd ();
+return $ac_func ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_ibv_alloc_pd="none required"
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+	eval "$as_ac_var=no"
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_ibv_alloc_pd" = no; then
-  for ac_lib in ibverbs; do
-    LIBS="-l$ac_lib $save_LIBS $PTHREAD_LDFLAGS $PTHREAD_LIBS $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char ibv_alloc_pd ();
+char pthread_join ();
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -23273,372 +22210,496 @@ char ibv_alloc_pd ();
 int
 main ()
 {
-ibv_alloc_pd ();
+return pthread_join ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_ibv_alloc_pd="-l$ac_lib"
-break
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  acx_pthread_ok=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_search_ibv_alloc_pd" >&5
-echo "${ECHO_T}$ac_cv_search_ibv_alloc_pd" >&6
-if test "$ac_cv_search_ibv_alloc_pd" != no; then
-  test "$ac_cv_search_ibv_alloc_pd" = "none required" || LIBS="$ac_cv_search_ibv_alloc_pd $LIBS"
-  ac_infiniband_lib_ok=yes
-else
-  ac_infiniband_lib_ok=no
+        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
 fi
 
-            if test -n $LIBS; then
-                INFINIBAND_LIBS="$INFINIBAND_LIBS $LIBS";
-            fi
-            LIBS=$save_LIBS;
-        fi
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
 
-        if test x"$ac_infiniband_hdr_ok" = xno -o x$ac_infiniband_lib_ok = xno; then
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all.
 
+#acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
+acx_pthread_flags="pthreads none -Kthread -kthread lthread pthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
 
-if false; then
-  HAVE_INFINIBAND_TRUE=
-  HAVE_INFINIBAND_FALSE='#'
-else
-  HAVE_INFINIBAND_TRUE='#'
-  HAVE_INFINIBAND_FALSE=
-fi
-
-            INFINIBAND_CFLAGS=""
-            INFINIBAND_CPPFLAGS=""
-            INFINIBAND_LDFLAGS=""
-            INFINIBAND_LIBS=""
-            ac_with_infiniband=no
-        else
-
-
-if true; then
-  HAVE_INFINIBAND_TRUE=
-  HAVE_INFINIBAND_FALSE='#'
-else
-  HAVE_INFINIBAND_TRUE='#'
-  HAVE_INFINIBAND_FALSE=
-fi
-
-        fi
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
 
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
 
+case "${host_cpu}-${host_os}" in
+        *solaris*)
 
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthread or
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
 
+        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        ;;
+esac
 
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
 
+        case $flag in
+                none)
+                { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+                ;;
 
+                -*)
+                { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+                PTHREAD_CFLAGS="$flag"
+                ;;
 
+                *)
+                { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
 
-        # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-        if test x"$ac_infiniband_lib_ok" = xyes; then
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INFINIBAND 1
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+	                                	cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+		     void *start(void *arg){return NULL;}
 
-                :
-        else
-
-                :
-        fi
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-
-
-
-
-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_portals_hdr_ok=no
-ac_portals_lib_ok=no
-ac_with_portals=no
-
-
-
-if true; then
-  HAVE_PORTALS_TRUE=
-  HAVE_PORTALS_FALSE='#'
-else
-  HAVE_PORTALS_TRUE='#'
-  HAVE_PORTALS_FALSE=
-fi
-
-
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+pthread_attr_t attr;
+		     pthread_t th;
+		     pthread_join(th, 0);
+		     pthread_attr_init(&attr);
+		     pthread_cleanup_push(NULL, NULL);
+		     pthread_create(&th,&attr,start,0);
+		     pthread_cleanup_pop(0);
 
-if false; then
-  NEED_DARWIN_SINGLE_MODULE_TRUE=
-  NEED_DARWIN_SINGLE_MODULE_FALSE='#'
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  acx_pthread_ok=yes
 else
-  NEED_DARWIN_SINGLE_MODULE_TRUE='#'
-  NEED_DARWIN_SINGLE_MODULE_FALSE=
-fi
-
-
-PORTALS_CFLAGS=""
-PORTALS_CPPFLAGS=""
-PORTALS_LDFLAGS=""
-PORTALS_LIBS=""
-
-
-
-# Check whether --with-portals or --without-portals was given.
-if test "${with_portals+set}" = set; then
-  withval="$with_portals"
-   ac_with_portals=yes;
-fi;
-
-if test x"$withval" = xno; then
-
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
-if false; then
-  HAVE_PORTALS_TRUE=
-  HAVE_PORTALS_FALSE='#'
-else
-  HAVE_PORTALS_TRUE='#'
-  HAVE_PORTALS_FALSE=
 fi
 
-        ac_with_portals=no;
-
-elif test x"$withval" = xyes -o x"$withval" = x; then
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-        PORTALS_LDFLAGS="";
-        PORTALS_CPPFLAGS="";
-        ac_with_portals=yes;
 
-else
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
 
-        PORTALS_LDFLAGS="-L$withval/lib";
-        PORTALS_CPPFLAGS="-I$withval/include";
-        ac_with_portals=yes;
+        { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
 
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
 fi
 
-if test x"$ac_with_portals" = xyes; then
-
-                save_CPPFLAGS=$CPPFLAGS;
-        CPPFLAGS="$CPPFLAGS $PORTALS_CPPFLAGS"
-        LDFLAGS="$LDFLAGS $PORTALS_LDFLAGS"
-
-
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
 
-        if test x"$ac_portals_hdr_ok" = xno; then
-                if test "${ac_cv_header_portals3_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for portals3.h" >&5
-echo $ECHO_N "checking for portals3.h... $ECHO_C" >&6
-if test "${ac_cv_header_portals3_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_portals3_h" >&5
-echo "${ECHO_T}$ac_cv_header_portals3_h" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking portals3.h usability" >&5
-echo $ECHO_N "checking portals3.h usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+        # Detect AIX lossage: threads are created detached by default
+        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
+        { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <portals3.h>
+#include <pthread.h>
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+int attr; attr=PTHREAD_CREATE_JOINABLE;
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ok=PTHREAD_CREATE_JOINABLE
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ok=unknown
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
-# Is the header present?
-echo "$as_me:$LINENO: checking portals3.h presence" >&5
-echo $ECHO_N "checking portals3.h presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        if test x"$ok" = xunknown; then
+                cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <portals3.h>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+#include <pthread.h>
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+int attr; attr=PTHREAD_CREATE_UNDETACHED;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ok=PTHREAD_CREATE_UNDETACHED
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-  ac_header_preproc=no
+	ok=unknown
 fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: portals3.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: portals3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals3.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: portals3.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: portals3.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: portals3.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals3.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: portals3.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals3.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: portals3.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals3.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: portals3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals3.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: portals3.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals3.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: portals3.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for portals3.h" >&5
-echo $ECHO_N "checking for portals3.h... $ECHO_C" >&6
-if test "${ac_cv_header_portals3_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+        fi
+        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<\_ACEOF
+#define PTHREAD_CREATE_JOINABLE $ok
+_ACEOF
+
+        fi
+        { $as_echo "$as_me:$LINENO: result: ${ok}" >&5
+$as_echo "${ok}" >&6; }
+        if test x"$ok" = xunknown; then
+                { $as_echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
+$as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
+        fi
+
+        { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+        flag=no
+        case "${host_cpu}-${host_os}" in
+                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
+                *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
+$as_echo "${flag}" >&6; }
+        if test "x$flag" != xno; then
+                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        # Extract the first word of "cc_r", so it can be a program name with args.
+set dummy cc_r; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_portals3_h=$ac_header_preproc
+  if test -n "$PTHREAD_CC"; then
+  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_PTHREAD_CC="cc_r"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+  { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+else
+        PTHREAD_CC="$CC"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_portals3_h" >&5
-echo "${ECHO_T}$ac_cv_header_portals3_h" >&6
+
+
+
+
+
+if test x"$acx_pthread_ok" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD 1
+_ACEOF
 
 fi
-if test $ac_cv_header_portals3_h = yes; then
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_PORTALS3_H 1
+#define HAVE_PTHREAD 1
 _ACEOF
 
-                         ac_portals_hdr_ok=yes;
-                         PORTALS_CFLAGS="$PORTALS_CFLAGS $EXTRA_CFLAGS";
-                         PORTALS_CPPFLAGS="$PORTALS_CPPFLAGS $EXTRA_CFLAGS"
+        :
 else
-  ac_portals_hdr_ok=no
+        acx_pthread_ok=no
+
 fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-        fi
 
-        if test x"$ac_portals_hdr_ok" = xno; then
-                if test "${ac_cv_header_portals_portals3_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for portals/portals3.h" >&5
-echo $ECHO_N "checking for portals/portals3.h... $ECHO_C" >&6
-if test "${ac_cv_header_portals_portals3_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+ if true; then
+  HAVE_MXML_TRUE=
+  HAVE_MXML_FALSE='#'
+else
+  HAVE_MXML_TRUE='#'
+  HAVE_MXML_FALSE=
+fi
+
+
+
+# Check whether --with-mxml was given.
+if test "${with_mxml+set}" = set; then
+  withval=$with_mxml; MXML_LDFLAGS="-L$withval/lib";
+         MXML_CPPFLAGS="-I$withval/include";
+fi
+
+
+save_CPPFLAGS="$CPPFLAGS"
+save_LIBS="$LIBS"
+save_LDFLAGS="$LDFLAGS"
+LIBS="$LIBS -lmxml"
+if test -n "$MXML_LDFLAGS"; then
+    LDFLAGS="$LDFLAGS $MXML_LDFLAGS"
+elif test -n "$MXML_LIB"; then
+    LDFLAGS="$LDFLAGS $MXML_LIB"
+    MXML_LDFLAGS="$MXML_LIB"
+fi
+if test -n "$MXML_CPPFLAGS"; then
+    CPPFLAGS="$CPPFLAGS $MXML_CPPFLAGS"
+elif test -n "$MXML_INC"; then
+    CPPFLAGS="$CPPFLAGS $MXML_INC"
+    MXML_CPPFLAGS="$MXML_INC"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_portals_portals3_h" >&5
-echo "${ECHO_T}$ac_cv_header_portals_portals3_h" >&6
+
+if test -z "${HAVE_MXML_TRUE}"; then
+
+for ac_header in mxml.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking portals/portals3.h usability" >&5
-echo $ECHO_N "checking portals/portals3.h usability... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -23646,238 +22707,231 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <portals/portals3.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-echo "$as_me:$LINENO: checking portals/portals3.h presence" >&5
-echo $ECHO_N "checking portals/portals3.h presence... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <portals/portals3.h>
+#include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: portals/portals3.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: portals/portals3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals/portals3.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: portals/portals3.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: portals/portals3.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: portals/portals3.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals/portals3.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: portals/portals3.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals/portals3.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: portals/portals3.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals/portals3.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: portals/portals3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals/portals3.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: portals/portals3.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: portals/portals3.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: portals/portals3.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
     ;;
 esac
-echo "$as_me:$LINENO: checking for portals/portals3.h" >&5
-echo $ECHO_N "checking for portals/portals3.h... $ECHO_C" >&6
-if test "${ac_cv_header_portals_portals3_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_portals_portals3_h=$ac_header_preproc
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_portals_portals3_h" >&5
-echo "${ECHO_T}$ac_cv_header_portals_portals3_h" >&6
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
-if test $ac_cv_header_portals_portals3_h = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PORTALS_PORTALS3_H 1
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-                          ac_portals_hdr_ok=yes;
-                         PORTALS_CFLAGS="$PORTALS_CFLAGS $EXTRA_CFLAGS";
-                         PORTALS_CPPFLAGS="$PORTALS_CPPFLAGS $EXTRA_CFLAGS"
 else
-  ac_portals_hdr_ok=no
+   if false; then
+  HAVE_MXML_TRUE=
+  HAVE_MXML_FALSE='#'
+else
+  HAVE_MXML_TRUE='#'
+  HAVE_MXML_FALSE=
 fi
 
+fi
 
-        fi
-
+done
 
+fi
 
-for ac_header in p3nal_utcp.h p3rt/p3rt.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+if test -z "${HAVE_MXML_TRUE}"; then
+    # Check for the Mini-XML library and headers
+    { $as_echo "$as_me:$LINENO: checking if mxml code can be linked" >&5
+$as_echo_n "checking if mxml code can be linked... " >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
+#include "mxml.h"
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+mxml_node_t * n;
+         char *buffer;
+         char *value;
+         n = mxmlLoadString (0, buffer, MXML_TEXT_CALLBACK);
+         mxmlWalkNext (n, n, MXML_DESCEND);
+         value = mxmlElementGetAttr (n, "value");
+         mxmlRelease (n);
 
-                        #if defined(HAVE_PORTALS3_H)
-                         #include <portals3.h>
-                         #elif defined(HAVE_PORTALS_PORTALS3_H)
-                         #include <portals/portals3.h>
-                         #endif
-
-
-#include <$ac_header>
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_Header=yes"
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  MXML_LIBS="-lmxml"
+         { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_Header=no"
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
+	 if false; then
+  HAVE_MXML_TRUE=
+  HAVE_MXML_FALSE='#'
+else
+  HAVE_MXML_TRUE='#'
+  HAVE_MXML_FALSE=
 fi
 
-done
+         { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
+fi
 
-        if test x"$ac_portals_hdr_ok" = xno; then
-                CPPFLAGS=$save_CPPFLAGS
-        fi
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
+            if test -z "${HAVE_MXML_FALSE}"; then
+        # Check for the Mini-XML library and headers
 
-                if test x"$ac_portals_lib_ok" = xno -a x$ac_portals_hdr_ok = xyes; then
-            save_LIBS=$LIBS;
-            LIBS=""
-            echo "$as_me:$LINENO: checking for library containing PtlInit" >&5
-echo $ECHO_N "checking for library containing PtlInit... $ECHO_C" >&6
-if test "${ac_cv_search_PtlInit+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-ac_cv_search_PtlInit=no
-cat >conftest.$ac_ext <<_ACEOF
+        LDFLAGS="$LDFLAGS $PTHREAD_LDFLAGS $PTHREAD_LIBS"
+        { $as_echo "$as_me:$LINENO: checking if mxml code can be linked using pthreads" >&5
+$as_echo_n "checking if mxml code can be linked using pthreads... " >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char PtlInit ();
+#include "mxml.h"
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -23889,261 +22943,333 @@ char PtlInit ();
 int
 main ()
 {
-PtlInit ();
+mxml_node_t * n;
+             char *buffer;
+             char *value;
+             n = mxmlLoadString (0, buffer, MXML_TEXT_CALLBACK);
+             mxmlWalkNext (n, n, MXML_DESCEND);
+             value = mxmlElementGetAttr (n, "value");
+             mxmlRelease (n);
+
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_PtlInit="none required"
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  MXML_LDFLAGS="$MXML_LDFLAGS $PTHREAD_LDFLAGS"
+             MXML_LIBS="-lmxml $PTHREAD_LIBS"
+              if true; then
+  HAVE_MXML_TRUE=
+  HAVE_MXML_FALSE='#'
+else
+  HAVE_MXML_TRUE='#'
+  HAVE_MXML_FALSE=
+fi
+
+             { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+	 if false; then
+  HAVE_MXML_TRUE=
+  HAVE_MXML_FALSE='#'
+else
+  HAVE_MXML_TRUE='#'
+  HAVE_MXML_FALSE=
+fi
+
+             { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+
 fi
-rm -f conftest.err conftest.$ac_objext \
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-if test "$ac_cv_search_PtlInit" = no; then
-  for ac_lib in portals; do
-    LIBS="-l$ac_lib $save_LIBS $PTHREAD_LDFLAGS $PTHREAD_LIBS $ac_func_search_save_LIBS"
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
+    fi
+fi
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char PtlInit ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-PtlInit ();
-  ;
-  return 0;
-}
+
+LIBS="$save_LIBS"
+LDFLAGS="$save_LDFLAGS"
+CPPFLAGS="$save_CPPFLAGS"
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test -z "${HAVE_MXML_TRUE}"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MXML 1
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_search_PtlInit="-l$ac_lib"
-break
+
+        :
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
+        :
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-  done
-fi
-LIBS=$ac_func_search_save_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_infiniband_hdr_ok=no
+ac_infiniband_lib_ok=no
+ac_with_infiniband=no
+
+
+INFINIBAND_CFLAGS=""
+INFINIBAND_CPPFLAGS=""
+INFINIBAND_LDFLAGS=""
+INFINIBAND_LIBS=""
+
+
+# Check whether --with-infiniband was given.
+if test "${with_infiniband+set}" = set; then
+  withval=$with_infiniband;  ac_with_infiniband=yes;
 fi
-echo "$as_me:$LINENO: result: $ac_cv_search_PtlInit" >&5
-echo "${ECHO_T}$ac_cv_search_PtlInit" >&6
-if test "$ac_cv_search_PtlInit" != no; then
-  test "$ac_cv_search_PtlInit" = "none required" || LIBS="$ac_cv_search_PtlInit $LIBS"
-  ac_portals_lib_ok=yes
+
+
+
+
+if test x"$withval" = xno; then
+
+        ac_with_infiniband=no;
+
+elif test x"$withval" = xyes -o x"$withval" = x; then
+
+        INFINIBAND_CPPFLAGS="";
+        INFINIBAND_LDFLAGS="";
+        ac_with_infiniband=yes;
+
 else
-  ac_portals_lib_ok=no
+
+        INFINIBAND_CPPFLAGS="-I$withval/include";
+        INFINIBAND_LDFLAGS="-L$withval/lib64 -L$withval/lib";
+        ac_with_infiniband=yes;
+
 fi
 
-            if test -n $LIBS; then
-                PORTALS_LIBS=$LIBS;
-            fi
-            LIBS=$save_LIBS;
-        fi
+ if test x$ac_with_infiniband = xyes; then
+  HAVE_INFINIBAND_TRUE=
+  HAVE_INFINIBAND_FALSE='#'
+else
+  HAVE_INFINIBAND_TRUE='#'
+  HAVE_INFINIBAND_FALSE=
+fi
 
-                        if test x"$ac_portals_lib_ok" = xno -a x$ac_portals_hdr_ok = xyes; then
-            save_LIBS=$LIBS;
-            save_LDFLAGS=$LDFLAGS;
-            save_CFLAGS=$CFLAGS;
 
-            extra_LIBS="-lp3api -lp3lib -lp3rt -lp3utcp"
 
+if test x"$ac_with_infiniband" = xyes; then
 
-            LDFLAGS="$LDFLAGS $PORTALS_LDFLAGS"
-            LIBS="$LIBS $extra_LIBS $PTHREAD_LIBS"
-            CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+                save_CPPFLAGS=$CPPFLAGS;
+        save_LDFLAGS=$LDFLAGS;
+        CPPFLAGS="$CPPFLAGS $INFINIBAND_CPPFLAGS"
+        LDFLAGS="$LDFLAGS $INFINIBAND_LDFLAGS"
 
-            echo "$as_me:$LINENO: checking if portals links with $LDFLAGS $LIBS" >&5
-echo $ECHO_N "checking if portals links with $LDFLAGS $LIBS... $ECHO_C" >&6
 
-            cat >conftest.$ac_ext <<_ACEOF
+        if test x"$ac_infiniband_hdr_ok" = xno; then
+                if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5
+$as_echo_n "checking for infiniband/verbs.h... " >&6; }
+if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5
+$as_echo "$ac_cv_header_infiniband_verbs_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking infiniband/verbs.h usability" >&5
+$as_echo_n "checking infiniband/verbs.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char PtlInit ();
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-PtlInit ();
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <infiniband/verbs.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  PORTALS_LIBS=$extra_LIBS;
-                        ac_portals_lib_ok=yes;
-                        echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_portals_lib_ok=no;
-                         echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
 
-            LIBS=$save_LIBS;
-            LDFLAGS=$save_LDFLAGS;
-            CDFLAGS=$save_CFLAGS;
-        fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-                if test x"$ac_portals_lib_ok" = xyes; then
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking infiniband/verbs.h presence" >&5
+$as_echo_n "checking infiniband/verbs.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <infiniband/verbs.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-            ac_portals_flags="none ${PTHREAD_CFLAGS} ${PTHREAD_LIBS}"
-            ac_portals_lib_ok=no
+  ac_header_preproc=no
+fi
 
-            for flag in $ac_portals_flags; do
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-                case $flag in
-                    none)
-                        echo "$as_me:$LINENO: checking whether portals works without any additional flags" >&5
-echo $ECHO_N "checking whether portals works without any additional flags... $ECHO_C" >&6
-                    ;;
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: infiniband/verbs.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: infiniband/verbs.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: infiniband/verbs.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&2;}
 
-                    -l*)
-                        echo "$as_me:$LINENO: checking whether portals works with library $flag" >&5
-echo $ECHO_N "checking whether portals works with library $flag... $ECHO_C" >&6
-                        EXTRA_LIBS="$flag"
-                        ;;
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5
+$as_echo_n "checking for infiniband/verbs.h... " >&6; }
+if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_infiniband_verbs_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5
+$as_echo "$ac_cv_header_infiniband_verbs_h" >&6; }
 
-                    -*)
-                        echo "$as_me:$LINENO: checking whether portals works with library -l$flag" >&5
-echo $ECHO_N "checking whether portals works with library -l$flag... $ECHO_C" >&6
-                        EXTRA_LIBS="$flag"
-                        ;;
-                esac
+fi
+if test "x$ac_cv_header_infiniband_verbs_h" = x""yes; then
 
-                save_LIBS="$LIBS"
-                save_CFLAGS="$CFLAGS"
-                save_CPPFLAGS="$CPPFLAGS"
-                save_LDFLAGS="$LDFLAGS"
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_IBVERBS_H 1
+_ACEOF
 
-                LIBS="$LIBS $PORTALS_LIBS $EXTRA_LIBS"
-                CFLAGS="$CFLAGS $PORTALS_CFLAGS $EXTRA_CFLAGS"
-                CPPFLAGS="$CPPFLAGS $PORTALS_CPPFLAGS"
-                LDFLAGS="$LDFLAGS $PORTALS_LDFLAGS"
+                         ac_infiniband_hdr_ok=yes;
+                         INFINIBAND_CFLAGS="$INFINIBAND_CFLAGS $EXTRA_CFLAGS";
+                         INFINIBAND_CPPFLAGS="$INFINIBAND_CPPFLAGS $EXTRA_CFLAGS"
+else
+  ac_infiniband_hdr_ok=no
+fi
 
-                                cat >conftest.$ac_ext <<_ACEOF
+
+        fi
+
+        if test x"$ac_infiniband_hdr_ok" = xno; then
+                CPPFLAGS=$save_CPPFLAGS
+        fi
+
+                if test x"$ac_infiniband_lib_ok" = xno -a x$ac_infiniband_hdr_ok = xyes; then
+            save_LIBS=$LIBS;
+            LIBS=""
+            { $as_echo "$as_me:$LINENO: checking for library containing ibv_alloc_pd" >&5
+$as_echo_n "checking for library containing ibv_alloc_pd... " >&6; }
+if test "${ac_cv_search_ibv_alloc_pd+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-/* Override any gcc2 internal prototype to avoid an error.  */
+/* 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
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char PtlInit ();
+char ibv_alloc_pd ();
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -24155,80 +23281,149 @@ char PtlInit ();
 int
 main ()
 {
-PtlInit ();
+return ibv_alloc_pd ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+for ac_lib in '' ibverbs; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $save_LIBS $PTHREAD_LDFLAGS $PTHREAD_LIBS $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  PORTALS_CFLAGS="$PORTALS_CFLAGS $EXTRA_CFLAGS";
-                        PORTALS_CPPFLAGS="$PORTALS_CPPFLAGS $EXTRA_CPPFLAGS";
-                        PORTALS_LIBS="$PORTALS_LIBS $EXTRA_LIBS";
-                        ac_portals_lib_ok=yes
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_ibv_alloc_pd=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_portals_lib_ok=no
+
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-                echo "$as_me:$LINENO: result: $ac_portals_lib_ok" >&5
-echo "${ECHO_T}$ac_portals_lib_ok" >&6
 
-                if test "x$ac_portals_lib_ok" = xyes; then
-                        PORTALS_LIBS="$PORTALS_LIBS $EXTRA_LIBS";
-                        PORTALS_CFLAGS="$PORTALS_CFLAGS $EXTRA_CFLAGS";
-                        PORTALS_CPPFLAGS="$PORTALS_CPPFLAGS $EXTRA_CFLAGS";
-                        if test `uname -s` = "Darwin"; then
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_ibv_alloc_pd+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_ibv_alloc_pd+set}" = set; then
+  :
+else
+  ac_cv_search_ibv_alloc_pd=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_ibv_alloc_pd" >&5
+$as_echo "$ac_cv_search_ibv_alloc_pd" >&6; }
+ac_res=$ac_cv_search_ibv_alloc_pd
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_infiniband_lib_ok=yes
+else
+  ac_infiniband_lib_ok=no
+fi
 
+            if test -n $LIBS; then
+                INFINIBAND_LIBS="$INFINIBAND_LIBS $LIBS";
+            fi
+            LIBS=$save_LIBS;
+        fi
 
-if true; then
-  NEED_DARWIN_SINGLE_MODULE_TRUE=
-  NEED_DARWIN_SINGLE_MODULE_FALSE='#'
+        if test x"$ac_infiniband_hdr_ok" = xno -o x$ac_infiniband_lib_ok = xno; then
+             if false; then
+  HAVE_INFINIBAND_TRUE=
+  HAVE_INFINIBAND_FALSE='#'
 else
-  NEED_DARWIN_SINGLE_MODULE_TRUE='#'
-  NEED_DARWIN_SINGLE_MODULE_FALSE=
+  HAVE_INFINIBAND_TRUE='#'
+  HAVE_INFINIBAND_FALSE=
 fi
 
-                        fi
-                fi
+            INFINIBAND_CFLAGS=""
+            INFINIBAND_CPPFLAGS=""
+            INFINIBAND_LDFLAGS=""
+            INFINIBAND_LIBS=""
+            ac_with_infiniband=no
+        else
+             if true; then
+  HAVE_INFINIBAND_TRUE=
+  HAVE_INFINIBAND_FALSE='#'
+else
+  HAVE_INFINIBAND_TRUE='#'
+  HAVE_INFINIBAND_FALSE=
+fi
 
+        fi
 
-                                LIBS="$save_LIBS"
-                CFLAGS="$save_CFLAGS"
-                CPPFLAGS="$save_CPPFLAGS"
-                LDFLAGS="$save_LDFLAGS"
+        CPPFLAGS=$save_CPPFLAGS;
+        LDFLAGS=$save_LDFLAGS;
 
-            done
+
+
+
+
+
+
+        # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+        if test x"$ac_infiniband_lib_ok" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INFINIBAND 1
+_ACEOF
+
+                :
+        else
+
+                :
         fi
 
+fi
 
-        if test x"$ac_portals_hdr_ok" = xno -o x$ac_portals_lib_ok = xno; then
+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=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_portals_hdr_ok=no
+ac_portals_lib_ok=no
+ac_with_portals=no
 
-if false; then
+ if true; then
   HAVE_PORTALS_TRUE=
   HAVE_PORTALS_FALSE='#'
 else
@@ -24236,15 +23431,31 @@ else
   HAVE_PORTALS_FALSE=
 fi
 
-            PORTALS_CFLAGS=""
-            PORTALS_CPPFLAGS=""
-            PORTALS_LDFLAGS=""
-            PORTALS_LIBS=""
-        else
-            ac_portals_lib_ok=yes;
+ if false; then
+  NEED_DARWIN_SINGLE_MODULE_TRUE=
+  NEED_DARWIN_SINGLE_MODULE_FALSE='#'
+else
+  NEED_DARWIN_SINGLE_MODULE_TRUE='#'
+  NEED_DARWIN_SINGLE_MODULE_FALSE=
+fi
+
+
+PORTALS_CFLAGS=""
+PORTALS_CPPFLAGS=""
+PORTALS_LDFLAGS=""
+PORTALS_LIBS=""
 
 
-if true; then
+
+# Check whether --with-portals was given.
+if test "${with_portals+set}" = set; then
+  withval=$with_portals;  ac_with_portals=yes;
+fi
+
+
+if test x"$withval" = xno; then
+
+         if false; then
   HAVE_PORTALS_TRUE=
   HAVE_PORTALS_FALSE='#'
 else
@@ -24252,175 +23463,327 @@ else
   HAVE_PORTALS_FALSE=
 fi
 
-        fi
+        ac_with_portals=no;
 
+elif test x"$withval" = xyes -o x"$withval" = x; then
 
+        PORTALS_LDFLAGS="";
+        PORTALS_CPPFLAGS="";
+        ac_with_portals=yes;
 
-                if test x"$ac_portals_lib_ok" = xyes; then
+else
 
-                save_CFLAGS=$CFLAGS
-                save_CPPFLAGS=$CPPFLAGS
-                save_LDFLAGS=$LDFLAGS
-                save_LIBS=$LIBS
+        PORTALS_LDFLAGS="-L$withval/lib";
+        PORTALS_CPPFLAGS="-I$withval/include";
+        ac_with_portals=yes;
 
-                CFLAGS="$CFLAGS $PORTALS_CFLAGS"
-                CPPFLAGS="$CPPFLAGS $PORTALS_CPPFLAGS"
-                LDFLAGS="$LDFLAGS $PORTALS_LDFLAGS"
-                LIBS="$LIBS $PORTALS_LIBS"
+fi
 
-                                echo "$as_me:$LINENO: checking whether portals uses PTL_NO_ACK_REQ" >&5
-echo $ECHO_N "checking whether portals uses PTL_NO_ACK_REQ... $ECHO_C" >&6
-                cat >conftest.$ac_ext <<_ACEOF
+if test x"$ac_with_portals" = xyes; then
+
+                save_CPPFLAGS=$CPPFLAGS;
+        CPPFLAGS="$CPPFLAGS $PORTALS_CPPFLAGS"
+        LDFLAGS="$LDFLAGS $PORTALS_LDFLAGS"
+
+
+
+        if test x"$ac_portals_hdr_ok" = xno; then
+                if test "${ac_cv_header_portals3_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for portals3.h" >&5
+$as_echo_n "checking for portals3.h... " >&6; }
+if test "${ac_cv_header_portals3_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_portals3_h" >&5
+$as_echo "$ac_cv_header_portals3_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking portals3.h usability" >&5
+$as_echo_n "checking portals3.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#if defined(HAVE_PORTALS3_H)
-                         #include <portals3.h>
-                         #elif defined(HAVE_PORTALS_PORTALS3_H)
-                         #include <portals/portals3.h>
-                         #else
-                         #error Cound not find include file
-                         #endif
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-int a = PTL_NO_ACK_REQ;
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <portals3.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking portals3.h presence" >&5
+$as_echo_n "checking portals3.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <portals3.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  # Success
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: portals3.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: portals3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals3.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: portals3.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: portals3.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: portals3.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals3.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: portals3.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals3.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: portals3.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals3.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: portals3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals3.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: portals3.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals3.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: portals3.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for portals3.h" >&5
+$as_echo_n "checking for portals3.h... " >&6; }
+if test "${ac_cv_header_portals3_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_portals3_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_portals3_h" >&5
+$as_echo "$ac_cv_header_portals3_h" >&6; }
+
+fi
+if test "x$ac_cv_header_portals3_h" = x""yes; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTL_NO_ACK_REQ 1
+#define HAVE_PORTALS3_H 1
 _ACEOF
 
-                  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-
+                         ac_portals_hdr_ok=yes;
+                         PORTALS_CFLAGS="$PORTALS_CFLAGS $EXTRA_CFLAGS";
+                         PORTALS_CPPFLAGS="$PORTALS_CPPFLAGS $EXTRA_CFLAGS"
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  ac_portals_hdr_ok=no
+fi
 
 
-                  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-                  echo "$as_me:$LINENO: checking whether portals uses PTL_NOACK_REQ" >&5
-echo $ECHO_N "checking whether portals uses PTL_NOACK_REQ... $ECHO_C" >&6
-                  cat >conftest.$ac_ext <<_ACEOF
+        fi
+
+        if test x"$ac_portals_hdr_ok" = xno; then
+                if test "${ac_cv_header_portals_portals3_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for portals/portals3.h" >&5
+$as_echo_n "checking for portals/portals3.h... " >&6; }
+if test "${ac_cv_header_portals_portals3_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_portals_portals3_h" >&5
+$as_echo "$ac_cv_header_portals_portals3_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking portals/portals3.h usability" >&5
+$as_echo_n "checking portals/portals3.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#if defined(HAVE_PORTALS3_H)
-                               #include <portals3.h>
-                               #elif defined(HAVE_PORTALS_PORTALS3_H)
-                               #include <portals/portals3.h>
-                               #else
-                               #error Cound not find include file
-                               #endif
-
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-int a = PTL_NOACK_REQ;
-  ;
-  return 0;
-}
+$ac_includes_default
+#include <portals/portals3.h>
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  # Success
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTL_NOACK_REQ 1
-_ACEOF
+	ac_header_compiler=no
+fi
 
-                        echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking portals/portals3.h presence" >&5
+$as_echo_n "checking portals/portals3.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <portals/portals3.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: portals/portals3.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: portals/portals3.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals/portals3.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: portals/portals3.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: portals/portals3.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: portals/portals3.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals/portals3.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: portals/portals3.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals/portals3.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: portals/portals3.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals/portals3.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: portals/portals3.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals/portals3.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: portals/portals3.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: portals/portals3.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: portals/portals3.h: in the future, the compiler will take precedence" >&2;}
 
-                        echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for portals/portals3.h" >&5
+$as_echo_n "checking for portals/portals3.h... " >&6; }
+if test "${ac_cv_header_portals_portals3_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_portals_portals3_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_portals_portals3_h" >&5
+$as_echo "$ac_cv_header_portals_portals3_h" >&6; }
 
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+if test "x$ac_cv_header_portals_portals3_h" = x""yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PORTALS_PORTALS3_H 1
+_ACEOF
 
+                          ac_portals_hdr_ok=yes;
+                         PORTALS_CFLAGS="$PORTALS_CFLAGS $EXTRA_CFLAGS";
+                         PORTALS_CPPFLAGS="$PORTALS_CPPFLAGS $EXTRA_CFLAGS"
+else
+  ac_portals_hdr_ok=no
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
 
-                echo "$as_me:$LINENO: checking for ptl_time_t" >&5
-echo $ECHO_N "checking for ptl_time_t... $ECHO_C" >&6
-if test "${ac_cv_type_ptl_time_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+        fi
+
+
+
+for ac_header in p3nal_utcp.h p3rt/p3rt.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
@@ -24428,89 +23791,88 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#if defined(HAVE_PORTALS3_H)
+
+                        #if defined(HAVE_PORTALS3_H)
                          #include <portals3.h>
                          #elif defined(HAVE_PORTALS_PORTALS3_H)
                          #include <portals/portals3.h>
                          #endif
 
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-if ((ptl_time_t *) 0)
-  return 0;
-if (sizeof (ptl_time_t))
-  return 0;
-  ;
-  return 0;
-}
+
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_ptl_time_t=yes
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  eval "$as_ac_Header=yes"
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_ptl_time_t=no
+	eval "$as_ac_Header=no"
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_ptl_time_t" >&5
-echo "${ECHO_T}$ac_cv_type_ptl_time_t" >&6
-if test $ac_cv_type_ptl_time_t = yes; then
 
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTL_TIME_T 1
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
-
 fi
-echo "$as_me:$LINENO: checking for ptl_eq_handler_t" >&5
-echo $ECHO_N "checking for ptl_eq_handler_t... $ECHO_C" >&6
-if test "${ac_cv_type_ptl_eq_handler_t+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+done
+
+
+        if test x"$ac_portals_hdr_ok" = xno; then
+                CPPFLAGS=$save_CPPFLAGS
+        fi
+
+
+                if test x"$ac_portals_lib_ok" = xno -a x$ac_portals_hdr_ok = xyes; then
+            save_LIBS=$LIBS;
+            LIBS=""
+            { $as_echo "$as_me:$LINENO: checking for library containing PtlInit" >&5
+$as_echo_n "checking for library containing PtlInit... " >&6; }
+if test "${ac_cv_search_PtlInit+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  cat >conftest.$ac_ext <<_ACEOF
+  ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#if defined(HAVE_PORTALS3_H)
-                         #include <portals3.h>
-                         #elif defined(HAVE_PORTALS_PORTALS3_H)
-                         #include <portals/portals3.h>
-                         #endif
 
+/* 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 PtlInit ();
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -24522,117 +23884,107 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-if ((ptl_eq_handler_t *) 0)
-  return 0;
-if (sizeof (ptl_eq_handler_t))
-  return 0;
+return PtlInit ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+for ac_lib in '' portals; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $save_LIBS $PTHREAD_LDFLAGS $PTHREAD_LIBS $ac_func_search_save_LIBS"
+  fi
+  rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_type_ptl_eq_handler_t=yes
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_search_PtlInit=$ac_res
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_type_ptl_eq_handler_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ac_cv_type_ptl_eq_handler_t" >&5
-echo "${ECHO_T}$ac_cv_type_ptl_eq_handler_t" >&6
-if test $ac_cv_type_ptl_eq_handler_t = yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_PTL_EQ_HANDLER_T 1
-_ACEOF
-
 
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext
+  if test "${ac_cv_search_PtlInit+set}" = set; then
+  break
+fi
+done
+if test "${ac_cv_search_PtlInit+set}" = set; then
+  :
+else
+  ac_cv_search_PtlInit=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_PtlInit" >&5
+$as_echo "$ac_cv_search_PtlInit" >&6; }
+ac_res=$ac_cv_search_PtlInit
+if test "$ac_res" != no; then
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  ac_portals_lib_ok=yes
+else
+  ac_portals_lib_ok=no
+fi
 
+            if test -n $LIBS; then
+                PORTALS_LIBS=$LIBS;
+            fi
+            LIBS=$save_LIBS;
+        fi
 
+                        if test x"$ac_portals_lib_ok" = xno -a x$ac_portals_hdr_ok = xyes; then
+            save_LIBS=$LIBS;
+            save_LDFLAGS=$LDFLAGS;
+            save_CFLAGS=$CFLAGS;
 
-
-
-
-for ac_func in PtlErrorStr \
-                        PtlNIFailStr \
-                        PtlEventKindStr \
-                        PtlGetJid \
-                        PtlACEntry
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
+            extra_LIBS="-lp3api -lp3lib -lp3rt -lp3utcp"
+
+
+            LDFLAGS="$LDFLAGS $PORTALS_LDFLAGS"
+            LIBS="$LIBS $extra_LIBS $PTHREAD_LIBS"
+            CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+            { $as_echo "$as_me:$LINENO: checking if portals links with $LDFLAGS $LIBS" >&5
+$as_echo_n "checking if portals links with $LDFLAGS $LIBS... " >&6; }
+
+            cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
 
-#undef $ac_func
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
+/* 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.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
 #ifdef __cplusplus
-}
+extern "C"
 #endif
-
+char PtlInit ();
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -24644,242 +23996,104 @@ char (*f) () = $ac_func;
 int
 main ()
 {
-return f != $ac_func;
+return PtlInit ();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  PORTALS_LIBS=$extra_LIBS;
+                        ac_portals_lib_ok=yes;
+                        { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_var=no"
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-                CFLAGS=$save_CFLAGS
-                CPPFLAGS=$save_CPPFLAGS
-                LDFLAGS=$save_LDFLAGS
-                LIBS=$save_LIBS
-        fi
-
-
-        # This is a big hack.  This is fragile.  Try to determine if we are
-        # using Cray Portals.  Cray Portals generates more data movement
-        # events than Schutt (standard) Portals.  This requires a memory
-        # descriptor threshold adjustment.  Cannot be determined at runtime.
-        #
-        # This test relies on a priori knowledge of specific types and
-        # functions that are (un)defined.  If this list changes, this
-        # test will quickly crumble.
-        #
-        if test x"$ac_cv_func_PtlErrorStr" = xno -a \
-                x"$ac_cv_type_ptl_eq_handler_t" = xyes -a \
-                x"$ac_cv_func_PtlNIFailStr" = xno -a \
-                x"$ac_cv_func_PtlEventKindStr" = xno -a \
-                x"$ac_cv_func_PtlGetJid" = xyes -a \
-                x"$ac_cv_func_PtlACEntry" = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_CRAY_PORTALS 1
-_ACEOF
-
-        fi
-
-
-
-
-
-
-
-
-
-
-        # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-        if test x"$ac_portals_lib_ok" = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PORTALS 1
-_ACEOF
-
-                :
-        else
-
-                :
-        fi
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-{ echo "$as_me:$LINENO: === checking for HDF5 ===" >&5
-echo "$as_me: === checking for HDF5 ===" >&6;}
-
-
-
-if true; then
-  HAVE_HDF5_TRUE=
-  HAVE_HDF5_FALSE='#'
-else
-  HAVE_HDF5_TRUE='#'
-  HAVE_HDF5_FALSE=
-fi
-
-
-
-# Check whether --with-hdf5 or --without-hdf5 was given.
-if test "${with_hdf5+set}" = set; then
-  withval="$with_hdf5"
-  HDF5_DIR=$withval
-else
-  with_hdf5=no
-fi;
-
-
-# Check whether --with-hdf5-incdir or --without-hdf5-incdir was given.
-if test "${with_hdf5_incdir+set}" = set; then
-  withval="$with_hdf5_incdir"
-  HDF5_INCDIR=$withval
-             with_hdf5=detailed
-fi;
-
-
-# Check whether --with-hdf5-libdir or --without-hdf5-libdir was given.
-if test "${with_hdf5_libdir+set}" = set; then
-  withval="$with_hdf5_libdir"
-  HDF5_LIBDIR=$withval
-              with_hdf5=detailed
-fi;
-
-
-# Check whether --with-hdf5-libs or --without-hdf5-libs was given.
-if test "${with_hdf5_libs+set}" = set; then
-  withval="$with_hdf5_libs"
-  HDF5_LIBS=$withval
-              with_hdf5=detailed
-fi;
-
-
-if test "x$with_hdf5" == "xno"; then
-
-
-
-if false; then
-  HAVE_HDF5_TRUE=
-  HAVE_HDF5_FALSE='#'
-else
-  HAVE_HDF5_TRUE='#'
-  HAVE_HDF5_FALSE=
+	ac_portals_lib_ok=no;
+                         { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-else
-
-            if test -z "${HDF5_INCDIR}"; then
-        if test -n "${HDF5_DIR}"; then
-            HDF5_INCDIR="${HDF5_DIR}/include";
-        fi
-    fi
-
-            if test -z "${HDF5_LIBDIR}"; then
-        if test -n "${HDF5_DIR}"; then
-            HDF5_LIBDIR="${HDF5_DIR}/lib";
+            LIBS=$save_LIBS;
+            LDFLAGS=$save_LDFLAGS;
+            CDFLAGS=$save_CFLAGS;
         fi
-    fi
 
-        HDF5_CPPFLAGS="-I${HDF5_INCDIR}"
+                if test x"$ac_portals_lib_ok" = xyes; then
 
-        HDF5_LDFLAGS="-L${HDF5_LIBDIR}"
+            ac_portals_flags="none ${PTHREAD_CFLAGS} ${PTHREAD_LIBS}"
+            ac_portals_lib_ok=no
 
-        if test -z "${HDF5_LIBS}"; then
-                HDF5_LIBS="-lhdf5_hl -lhdf5 -lz"
-    fi
+            for flag in $ac_portals_flags; do
 
-    save_CC="$CC"
-    save_CPPFLAGS="$CPPFLAGS"
-    save_LIBS="$LIBS"
-    save_LDFLAGS="$LDFLAGS"
-    LIBS="$LIBS $HDF5_LIBS"
-    LDFLAGS="$LDFLAGS $HDF5_LDFLAGS"
-    CPPFLAGS="$CPPFLAGS $HDF5_CPPFLAGS"
-    CC="$MPICC"
+                case $flag in
+                    none)
+                        { $as_echo "$as_me:$LINENO: checking whether portals works without any additional flags" >&5
+$as_echo_n "checking whether portals works without any additional flags... " >&6; }
+                    ;;
 
-    if test -z "${HAVE_HDF5_TRUE}"; then
-                                                        echo "$as_me:$LINENO: checking for hdf5.h" >&5
-echo $ECHO_N "checking for hdf5.h... $ECHO_C" >&6
-        if test -f ${HDF5_INCDIR}/hdf5.h; then
-            echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-        else
+                    -l*)
+                        { $as_echo "$as_me:$LINENO: checking whether portals works with library $flag" >&5
+$as_echo_n "checking whether portals works with library $flag... " >&6; }
+                        EXTRA_LIBS="$flag"
+                        ;;
 
+                    -*)
+                        { $as_echo "$as_me:$LINENO: checking whether portals works with library -l$flag" >&5
+$as_echo_n "checking whether portals works with library -l$flag... " >&6; }
+                        EXTRA_LIBS="$flag"
+                        ;;
+                esac
 
-if false; then
-  HAVE_HDF5_TRUE=
-  HAVE_HDF5_FALSE='#'
-else
-  HAVE_HDF5_TRUE='#'
-  HAVE_HDF5_FALSE=
-fi
+                save_LIBS="$LIBS"
+                save_CFLAGS="$CFLAGS"
+                save_CPPFLAGS="$CPPFLAGS"
+                save_LDFLAGS="$LDFLAGS"
 
-            echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-            { { echo "$as_me:$LINENO: error: --with-hdf5 was given, but test for ${HDF5_INCDIR}/hdf5.h failed
-See \`config.log' for more details." >&5
-echo "$as_me: error: --with-hdf5 was given, but test for ${HDF5_INCDIR}/hdf5.h failed
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-        fi
-    fi
+                LIBS="$LIBS $PORTALS_LIBS $EXTRA_LIBS"
+                CFLAGS="$CFLAGS $PORTALS_CFLAGS $EXTRA_CFLAGS"
+                CPPFLAGS="$CPPFLAGS $PORTALS_CPPFLAGS"
+                LDFLAGS="$LDFLAGS $PORTALS_LDFLAGS"
 
-    if test -z "${HAVE_HDF5_TRUE}"; then
-        echo "$as_me:$LINENO: checking if hdf5 code can be compiled" >&5
-echo $ECHO_N "checking if hdf5 code can be compiled... $ECHO_C" >&6
-        cat >conftest.$ac_ext <<_ACEOF
+                                cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include "hdf5.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 PtlInit ();
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -24891,385 +24105,283 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-hid_t file_id;
-             herr_t status;
-             file_id = H5Fcreate("a.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-             status = H5Fclose(file_id);
-
+return PtlInit ();
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  PORTALS_CFLAGS="$PORTALS_CFLAGS $EXTRA_CFLAGS";
+                        PORTALS_CPPFLAGS="$PORTALS_CPPFLAGS $EXTRA_CPPFLAGS";
+                        PORTALS_LIBS="$PORTALS_LIBS $EXTRA_LIBS";
+                        ac_portals_lib_ok=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-             if test "x$with_hdf5" != xcheck; then
-                { { echo "$as_me:$LINENO: error: --with-hdf5 was given, but compile test failed
-See \`config.log' for more details." >&5
-echo "$as_me: error: --with-hdf5 was given, but compile test failed
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-             fi
-
-
-if false; then
-  HAVE_HDF5_TRUE=
-  HAVE_HDF5_FALSE='#'
-else
-  HAVE_HDF5_TRUE='#'
-  HAVE_HDF5_FALSE=
-fi
-
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-
-
-    fi
-
-    LIBS="$save_LIBS"
-    LDFLAGS="$save_LDFLAGS"
-    CPPFLAGS="$save_CPPFLAGS"
-    CC="$save_CC"
-
-    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-    if test -z "${HAVE_HDF5_TRUE}"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HDF5 1
-_ACEOF
-
-            :
-    else
-
-            :
-    fi
-
+	ac_portals_lib_ok=no
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+                { $as_echo "$as_me:$LINENO: result: $ac_portals_lib_ok" >&5
+$as_echo "$ac_portals_lib_ok" >&6; }
 
-
-{ echo "$as_me:$LINENO: === checking for Parallel HDF5 ===" >&5
-echo "$as_me: === checking for Parallel HDF5 ===" >&6;}
-
-
-
-if true; then
-  HAVE_PHDF5_TRUE=
-  HAVE_PHDF5_FALSE='#'
+                if test "x$ac_portals_lib_ok" = xyes; then
+                        PORTALS_LIBS="$PORTALS_LIBS $EXTRA_LIBS";
+                        PORTALS_CFLAGS="$PORTALS_CFLAGS $EXTRA_CFLAGS";
+                        PORTALS_CPPFLAGS="$PORTALS_CPPFLAGS $EXTRA_CFLAGS";
+                        if test `uname -s` = "Darwin"; then
+                               if true; then
+  NEED_DARWIN_SINGLE_MODULE_TRUE=
+  NEED_DARWIN_SINGLE_MODULE_FALSE='#'
 else
-  HAVE_PHDF5_TRUE='#'
-  HAVE_PHDF5_FALSE=
+  NEED_DARWIN_SINGLE_MODULE_TRUE='#'
+  NEED_DARWIN_SINGLE_MODULE_FALSE=
 fi
 
+                        fi
+                fi
 
 
-# Check whether --with-phdf5 or --without-phdf5 was given.
-if test "${with_phdf5+set}" = set; then
-  withval="$with_phdf5"
-  PHDF5_DIR=$withval
-else
-  with_phdf5=check
-fi;
-
-
-
-# Check whether --with-phdf5-incdir or --without-phdf5-incdir was given.
-if test "${with_phdf5_incdir+set}" = set; then
-  withval="$with_phdf5_incdir"
-  PHDF5_INCDIR=$withval
-    with_phdf5=detailed
-fi;
-
-
-# Check whether --with-phdf5-libdir or --without-phdf5-libdir was given.
-if test "${with_phdf5_libdir+set}" = set; then
-  withval="$with_phdf5_libdir"
-  PHDF5_LIBDIR=$withval
-    with_phdf5=detailed
-fi;
-
-
-# Check whether --with-phdf5-libs or --without-phdf5-libs was given.
-if test "${with_phdf5_libs+set}" = set; then
-  withval="$with_phdf5_libs"
-  PHDF5_LIBS=$withval
-    with_phdf5=detailed
-fi;
-
-if test "x$with_phdf5" == "xno"; then
+                                LIBS="$save_LIBS"
+                CFLAGS="$save_CFLAGS"
+                CPPFLAGS="$save_CPPFLAGS"
+                LDFLAGS="$save_LDFLAGS"
 
+            done
+        fi
 
 
-if false; then
-  HAVE_PHDF5_TRUE=
-  HAVE_PHDF5_FALSE='#'
+        if test x"$ac_portals_hdr_ok" = xno -o x$ac_portals_lib_ok = xno; then
+             if false; then
+  HAVE_PORTALS_TRUE=
+  HAVE_PORTALS_FALSE='#'
 else
-  HAVE_PHDF5_TRUE='#'
-  HAVE_PHDF5_FALSE=
+  HAVE_PORTALS_TRUE='#'
+  HAVE_PORTALS_FALSE=
 fi
 
-
+            PORTALS_CFLAGS=""
+            PORTALS_CPPFLAGS=""
+            PORTALS_LDFLAGS=""
+            PORTALS_LIBS=""
+        else
+            ac_portals_lib_ok=yes;
+             if true; then
+  HAVE_PORTALS_TRUE=
+  HAVE_PORTALS_FALSE='#'
 else
+  HAVE_PORTALS_TRUE='#'
+  HAVE_PORTALS_FALSE=
+fi
 
-    ac_use_cray_hdf5=no
-                if test -z "${PHDF5_INCDIR}"; then
-        if test -n "${CRAY_HDF5_DIR}"; then
-            PHDF5_INCDIR="";
-            ac_use_cray_hdf5=yes
-        elif test -n "${PHDF5_DIR}"; then
-            PHDF5_INCDIR="${PHDF5_DIR}/include";
-                    else
-            ac_phdf5_ok=no
-        fi
-    fi
-
-                if test -z "${PHDF5_LIBDIR}"; then
-        if test -n "${CRAY_HDF5_DIR}"; then
-            PHDF5_LIBDIR="";
-            ac_use_cray_hdf5=yes
-        elif test -n "${PHDF5_DIR}"; then
-            PHDF5_LIBDIR="${PHDF5_DIR}/lib";
-                    else
-            ac_phdf5_ok=no
         fi
-    fi
-
-    if test -n "${PHDF5_INCDIR}"; then
-                PHDF5_CPPFLAGS="-I${PHDF5_INCDIR}"
-    else
-        ac_use_cray_hdf5=no
-    fi
-
-    if test -n "${PHDF5_LIBDIR}"; then
-                PHDF5_LDFLAGS="-L${PHDF5_LIBDIR}"
-    else
-        ac_use_cray_hdf5=no
-    fi
 
 
-        if test -z "${PHDF5_LIBS}"; then
-        if test "${ac_use_cray_hdf5}" != "yes"; then
-                        PHDF5_LIBS="-lhdf5_hl -lhdf5 -lz"
-        else
-            { echo "$as_me:$LINENO: Environment CRAY_HDF5_DIR defined, so we use Cray's settings" >&5
-echo "$as_me: Environment CRAY_HDF5_DIR defined, so we use Cray's settings" >&6;}
-        fi
-    fi
 
-    save_CC="$CC"
-    save_CPPFLAGS="$CPPFLAGS"
-    save_LIBS="$LIBS"
-    save_LDFLAGS="$LDFLAGS"
-    LIBS="$LIBS $PHDF5_LIBS"
-    LDFLAGS="$LDFLAGS $PHDF5_LDFLAGS"
-    CPPFLAGS="$CPPFLAGS $PHDF5_CPPFLAGS"
-    CC="$MPICC"
+                if test x"$ac_portals_lib_ok" = xyes; then
 
+                save_CFLAGS=$CFLAGS
+                save_CPPFLAGS=$CPPFLAGS
+                save_LDFLAGS=$LDFLAGS
+                save_LIBS=$LIBS
 
-    if test -z "${HAVE_PHDF5_TRUE}"; then
+                CFLAGS="$CFLAGS $PORTALS_CFLAGS"
+                CPPFLAGS="$CPPFLAGS $PORTALS_CPPFLAGS"
+                LDFLAGS="$LDFLAGS $PORTALS_LDFLAGS"
+                LIBS="$LIBS $PORTALS_LIBS"
 
-for ac_header in hdf5.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+                                { $as_echo "$as_me:$LINENO: checking whether portals uses PTL_NO_ACK_REQ" >&5
+$as_echo_n "checking whether portals uses PTL_NO_ACK_REQ... " >&6; }
+                cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+#if defined(HAVE_PORTALS3_H)
+                         #include <portals3.h>
+                         #elif defined(HAVE_PORTALS_PORTALS3_H)
+                         #include <portals/portals3.h>
+                         #else
+                         #error Cound not find include file
+                         #endif
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+int a = PTL_NO_ACK_REQ;
+  ;
+  return 0;
+}
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  # Success
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTL_NO_ACK_REQ 1
+_ACEOF
+
+                  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
+                  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+                  { $as_echo "$as_me:$LINENO: checking whether portals uses PTL_NOACK_REQ" >&5
+$as_echo_n "checking whether portals uses PTL_NOACK_REQ... " >&6; }
+                  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+#if defined(HAVE_PORTALS3_H)
+                               #include <portals3.h>
+                               #elif defined(HAVE_PORTALS_PORTALS3_H)
+                               #include <portals/portals3.h>
+                               #else
+                               #error Cound not find include file
+                               #endif
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+int a = PTL_NOACK_REQ;
+  ;
+  return 0;
+}
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  # Success
 
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTL_NOACK_REQ 1
 _ACEOF
 
+                        { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
-if false; then
-  HAVE_PHDF5_TRUE=
-  HAVE_PHDF5_FALSE='#'
-else
-  HAVE_PHDF5_TRUE='#'
-  HAVE_PHDF5_FALSE=
-fi
+                        { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 
 fi
 
-done
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-    fi
+fi
 
-    if test -z "${HAVE_PHDF5_TRUE}"; then
-        echo "$as_me:$LINENO: checking if phdf5 code can be compiled" >&5
-echo $ECHO_N "checking if phdf5 code can be compiled... $ECHO_C" >&6
-        cat >conftest.$ac_ext <<_ACEOF
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+
+                { $as_echo "$as_me:$LINENO: checking for ptl_time_t" >&5
+$as_echo_n "checking for ptl_time_t... " >&6; }
+if test "${ac_cv_type_ptl_time_t+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_ptl_time_t=no
+cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include "hdf5.h"
+#if defined(HAVE_PORTALS3_H)
+                         #include <portals3.h>
+                         #elif defined(HAVE_PORTALS_PORTALS3_H)
+                         #include <portals/portals3.h>
+                         #endif
+
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -25281,383 +24393,540 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-hid_t file_id;
-             herr_t status;
-#ifdef H5_HAVE_PARALLEL
-             file_id = H5Fcreate("a.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-             status = H5Fclose(file_id);
-#else
-             /* This must deliberately fail */
-             file_id = THE_HDF5_INSTALLATION_FOUND_IS_NOT_PARALLEL_HDF5
-#endif
-
+if (sizeof (ptl_time_t))
+       return 0;
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if defined(HAVE_PORTALS3_H)
+                         #include <portals3.h>
+                         #elif defined(HAVE_PORTALS_PORTALS3_H)
+                         #include <portals/portals3.h>
+                         #endif
+
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+if (sizeof ((ptl_time_t)))
+	  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
+	ac_cv_type_ptl_time_t=yes
+fi
 
-if false; then
-  HAVE_PHDF5_TRUE=
-  HAVE_PHDF5_FALSE='#'
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 else
-  HAVE_PHDF5_TRUE='#'
-  HAVE_PHDF5_FALSE=
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
 
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-
-
 
-    fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptl_time_t" >&5
+$as_echo "$ac_cv_type_ptl_time_t" >&6; }
+if test "x$ac_cv_type_ptl_time_t" = x""yes; then
 
-    LIBS="$save_LIBS"
-    LDFLAGS="$save_LDFLAGS"
-    CPPFLAGS="$save_CPPFLAGS"
-    CC="$save_CC"
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTL_TIME_T 1
+_ACEOF
 
-    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-    if test -z "${HAVE_PHDF5_TRUE}"; then
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PHDF5 1
+fi
+{ $as_echo "$as_me:$LINENO: checking for ptl_eq_handler_t" >&5
+$as_echo_n "checking for ptl_eq_handler_t... " >&6; }
+if test "${ac_cv_type_ptl_eq_handler_t+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_type_ptl_eq_handler_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if defined(HAVE_PORTALS3_H)
+                         #include <portals3.h>
+                         #elif defined(HAVE_PORTALS_PORTALS3_H)
+                         #include <portals/portals3.h>
+                         #endif
 
-            :
-    else
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+if (sizeof (ptl_eq_handler_t))
+       return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#if defined(HAVE_PORTALS3_H)
+                         #include <portals3.h>
+                         #elif defined(HAVE_PORTALS_PORTALS3_H)
+                         #include <portals/portals3.h>
+                         #endif
 
-            :
-    fi
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+if (sizeof ((ptl_eq_handler_t)))
+	  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  :
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_cv_type_ptl_eq_handler_t=yes
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
 
+fi
 
-{ echo "$as_me:$LINENO: === checking for NetCDF ===" >&5
-echo "$as_me: === checking for NetCDF ===" >&6;}
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptl_eq_handler_t" >&5
+$as_echo "$ac_cv_type_ptl_eq_handler_t" >&6; }
+if test "x$ac_cv_type_ptl_eq_handler_t" = x""yes; then
 
+cat >>confdefs.h <<_ACEOF
+#define HAVE_PTL_EQ_HANDLER_T 1
+_ACEOF
 
 
-if true; then
-  HAVE_NETCDF_TRUE=
-  HAVE_NETCDF_FALSE='#'
-else
-  HAVE_NETCDF_TRUE='#'
-  HAVE_NETCDF_FALSE=
 fi
 
 
 
-# Check whether --with-netcdf or --without-netcdf was given.
-if test "${with_netcdf+set}" = set; then
-  withval="$with_netcdf"
-  NETCDF_DIR=$withval
-else
-  with_netcdf=check
-fi;
 
-if test "x$with_netcdf" == "xno"; then
 
 
 
-if false; then
-  HAVE_NETCDF_TRUE=
-  HAVE_NETCDF_FALSE='#'
+for ac_func in PtlErrorStr \
+                        PtlNIFailStr \
+                        PtlEventKindStr \
+                        PtlGetJid \
+                        PtlACEntry
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-  HAVE_NETCDF_TRUE='#'
-  HAVE_NETCDF_FALSE=
-fi
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-else
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
-    ac_use_cray_netcdf=no
+#undef $ac_func
 
+/* 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 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
-# Check whether --with-netcdf-incdir or --without-netcdf-incdir was given.
-if test "${with_netcdf_incdir+set}" = set; then
-  withval="$with_netcdf_incdir"
-  NETCDF_INCDIR=$withval
-                 with_netcdf=detailed
-fi;
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	eval "$as_ac_var=no"
+fi
 
-# Check whether --with-netcdf-libdir or --without-netcdf-libdir was given.
-if test "${with_netcdf_libdir+set}" = set; then
-  withval="$with_netcdf_libdir"
-  NETCDF_LIBDIR=$withval
-                 with_netcdf=detailed
-fi;
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
 
+fi
+done
 
-# Check whether --with-netcdf-libs or --without-netcdf-libs was given.
-if test "${with_netcdf_libs+set}" = set; then
-  withval="$with_netcdf_libs"
-  NETCDF_LIBS=$withval
-                 with_netcdf=detailed
-fi;
 
-                    if test -z "${NETCDF_INCDIR}"; then
-        if test -n "${NETCDF_DIR}"; then
-            NETCDF_INCDIR="${NETCDF_DIR}/include";
-        elif test -n "${CRAY_NETCDF_DIR}"; then
-            NETCDF_INCDIR="";
-            ac_use_cray_netcdf=yes
-        elif test -n "${NETCDF}" -a -d "${NETCDF}"; then
-            NETCDF_INCDIR="${NETCDF}/include"
+                CFLAGS=$save_CFLAGS
+                CPPFLAGS=$save_CPPFLAGS
+                LDFLAGS=$save_LDFLAGS
+                LIBS=$save_LIBS
         fi
-    fi
 
-                    if test -z "${NETCDF_LIBDIR}"; then
-        if test -n "${NETCDF_DIR}"; then
-            NETCDF_LIBDIR="${NETCDF_DIR}/lib";
-        elif test -n "${CRAY_NETCDF_DIR}"; then
-            NETCDF_LIBDIR="";
-            ac_use_cray_netcdf=yes
-        elif test -n "${NETCDF}" -a -d "${NETCDF}"; then
-            NETCDF_LIBDIR="${NETCDF}/lib"
-        fi
-    fi
 
-        if test -n "${NETCDF_INCDIR}"; then
-            NETCDF_CPPFLAGS="-I${NETCDF_INCDIR}"
-    else
-            ac_netcdf_ok=no
-    fi
+        # This is a big hack.  This is fragile.  Try to determine if we are
+        # using Cray Portals.  Cray Portals generates more data movement
+        # events than Schutt (standard) Portals.  This requires a memory
+        # descriptor threshold adjustment.  Cannot be determined at runtime.
+        #
+        # This test relies on a priori knowledge of specific types and
+        # functions that are (un)defined.  If this list changes, this
+        # test will quickly crumble.
+        #
+        if test x"$ac_cv_func_PtlErrorStr" = xno -a \
+                x"$ac_cv_type_ptl_eq_handler_t" = xyes -a \
+                x"$ac_cv_func_PtlNIFailStr" = xno -a \
+                x"$ac_cv_func_PtlEventKindStr" = xno -a \
+                x"$ac_cv_func_PtlGetJid" = xyes -a \
+                x"$ac_cv_func_PtlACEntry" = xyes; then
 
-        if test -n "${NETCDF_LIBDIR}"; then
-            NETCDF_LDFLAGS="-L${NETCDF_LIBDIR}"
-    else
-            ac_netcdf_ok=no
-    fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CRAY_PORTALS 1
+_ACEOF
 
-        if test -z "${NETCDF_LIBS}"; then
-        if test "${ac_use_cray_netcdf}" != "yes"; then
-            NETCDF_LIBS="-lnetcdf"
         fi
-    fi
 
-    save_CPPFLAGS="$CPPFLAGS"
-    save_LIBS="$LIBS"
-    save_LDFLAGS="$LDFLAGS"
-    LIBS="$LIBS $NETCDF_LDFLAGS"
-    LDFLAGS="$LDFLAGS $NETCDF_LDFLAGS"
-    CPPFLAGS="$CPPFLAGS $NETCDF_CPPFLAGS"
 
-    if test -z "${HAVE_NETCDF_TRUE}"; then
 
-for ac_header in netcdf.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
+
+
+
+
+
+
+
+        # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+        if test x"$ac_portals_lib_ok" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PORTALS 1
 _ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+                :
+        else
+
+                :
+        fi
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+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
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
+
+
+
+ac_cray_pmi_lib_ok=no
+
+{ $as_echo "$as_me:$LINENO: === checking for CRAY PMI ===" >&5
+$as_echo "$as_me: === checking for CRAY PMI ===" >&6;}
+
+ if true; then
+  HAVE_CRAY_PMI_TRUE=
+  HAVE_CRAY_PMI_FALSE='#'
 else
-  ac_cpp_err=yes
+  HAVE_CRAY_PMI_TRUE='#'
+  HAVE_CRAY_PMI_FALSE=
 fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
+
+
+
+# Check whether --with-cray-pmi was given.
+if test "${with_cray_pmi+set}" = set; then
+  withval=$with_cray_pmi; CRAY_PMI_DIR=$withval
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+  with_cray_pmi=no
+fi
 
-  ac_header_preproc=no
+
+
+# Check whether --with-cray-pmi-incdir was given.
+if test "${with_cray_pmi_incdir+set}" = set; then
+  withval=$with_cray_pmi_incdir; CRAY_PMI_INCDIR=$withval
+             with_cray_pmi=detailed
 fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
+
+
+# Check whether --with-cray-pmi-libdir was given.
+if test "${with_cray_pmi_libdir+set}" = set; then
+  withval=$with_cray_pmi_libdir; CRAY_PMI_LIBDIR=$withval
+              with_cray_pmi=detailed
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
+
+
+# Check whether --with-cray-pmi-libs was given.
+if test "${with_cray_pmi_libs+set}" = set; then
+  withval=$with_cray_pmi_libs; CRAY_PMI_LIBS=$withval
+              with_cray_pmi=detailed
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-else
-  if test "x$with_netcdf" != xcheck; then
-              { { echo "$as_me:$LINENO: error: --with-netcdf was given, but test for netcdf.h failed
-See \`config.log' for more details." >&5
-echo "$as_me: error: --with-netcdf was given, but test for netcdf.h failed
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-            fi
 
 
-if false; then
-  HAVE_NETCDF_TRUE=
-  HAVE_NETCDF_FALSE='#'
+if test "x$with_cray_pmi" == "xno"; then
+
+    if false; then
+  HAVE_CRAY_PMI_TRUE=
+  HAVE_CRAY_PMI_FALSE='#'
 else
-  HAVE_NETCDF_TRUE='#'
-  HAVE_NETCDF_FALSE=
+  HAVE_CRAY_PMI_TRUE='#'
+  HAVE_CRAY_PMI_FALSE=
 fi
 
-fi
 
-done
+else
+
+            if test -z "${CRAY_PMI_INCDIR}"; then
+        if test -n "${CRAY_PMI_DIR}"; then
+            CRAY_PMI_INCDIR="${CRAY_PMI_DIR}/include";
+        fi
+    fi
 
+            if test -z "${CRAY_PMI_LIBDIR}"; then
+        if test -n "${CRAY_PMI_DIR}"; then
+            CRAY_PMI_LIBDIR="${CRAY_PMI_DIR}/lib";
+        fi
     fi
 
-    if test -z "${HAVE_NETCDF_TRUE}"; then
-        echo "$as_me:$LINENO: checking if netcdf code can be compiled" >&5
-echo $ECHO_N "checking if netcdf code can be compiled... $ECHO_C" >&6
+        CRAY_PMI_CPPFLAGS="-I${CRAY_PMI_INCDIR}"
+
+        CRAY_PMI_LDFLAGS="-L${CRAY_PMI_LIBDIR}"
+
+        if test -z "${CRAY_PMI_LIBS}"; then
+                CRAY_PMI_LIBS="-lpmi"
+    fi
+
+    save_CC="$CC"
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    LIBS="$LIBS $CRAY_PMI_LIBS"
+    LDFLAGS="$LDFLAGS $CRAY_PMI_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $CRAY_PMI_CPPFLAGS"
+    CC="$MPICC"
+
+    if test -z "${HAVE_CRAY_PMI_TRUE}"; then
+                                                        { $as_echo "$as_me:$LINENO: checking for Cray's pmi.h" >&5
+$as_echo_n "checking for Cray's pmi.h... " >&6; }
+        if test -f ${CRAY_PMI_INCDIR}/pmi.h; then
+            { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+        else
+             if false; then
+  HAVE_CRAY_PMI_TRUE=
+  HAVE_CRAY_PMI_FALSE='#'
+else
+  HAVE_CRAY_PMI_TRUE='#'
+  HAVE_CRAY_PMI_FALSE=
+fi
+
+            { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+            { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-cray-pmi was given, but test for ${CRAY_PMI_INCDIR}/pmi.h failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-cray-pmi was given, but test for ${CRAY_PMI_INCDIR}/pmi.h failed
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+        fi
+    fi
+
+    if test -z "${HAVE_CRAY_PMI_TRUE}"; then
+        { $as_echo "$as_me:$LINENO: checking if pmi code can be compiled" >&5
+$as_echo_n "checking if pmi code can be compiled... " >&6; }
         cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include "netcdf.h"
+#include "pmi.h"
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -25669,64 +24938,63 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int ncid;
-             nc_create("a.nc", NC_CLOBBER, &ncid);
-             nc_close(ncid);
+int size;
+             int rank;
+             PMI_Get_size(&size);
+             PMI_Get_rank(&rank);
 
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+             ac_cray_pmi_lib_ok=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-             if test "x$with_netcdf" != xcheck; then
-                 { { echo "$as_me:$LINENO: error: --with-netcdf was given, but compile test failed
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+             if test "x$with_cray_pmi" != xcheck; then
+                { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-cray-pmi was given, but compile test failed
 See \`config.log' for more details." >&5
-echo "$as_me: error: --with-netcdf was given, but compile test failed
+$as_echo "$as_me: error: --with-cray-pmi was given, but compile test failed
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
              fi
-
-
-if false; then
-  HAVE_NETCDF_TRUE=
-  HAVE_NETCDF_FALSE='#'
+              if false; then
+  HAVE_CRAY_PMI_TRUE=
+  HAVE_CRAY_PMI_FALSE='#'
 else
-  HAVE_NETCDF_TRUE='#'
-  HAVE_NETCDF_FALSE=
+  HAVE_CRAY_PMI_TRUE='#'
+  HAVE_CRAY_PMI_FALSE=
 fi
 
 
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 
@@ -25736,12 +25004,13 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     LIBS="$save_LIBS"
     LDFLAGS="$save_LDFLAGS"
     CPPFLAGS="$save_CPPFLAGS"
+    CC="$save_CC"
 
     # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-    if test -z "${HAVE_NETCDF_TRUE}"; then
+    if test -z "${HAVE_CRAY_PMI_TRUE}"; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_NETCDF 1
+#define HAVE_CRAY_PMI 1
 _ACEOF
 
             :
@@ -25754,301 +25023,137 @@ fi
 
 
 
-{ echo "$as_me:$LINENO: === checking NetCDF 4 Parallel ===" >&5
-echo "$as_me: === checking NetCDF 4 Parallel ===" >&6;}
 
+ac_cray_ugni_lib_ok=no
 
+{ $as_echo "$as_me:$LINENO: === checking for CRAY UGNI ===" >&5
+$as_echo "$as_me: === checking for CRAY UGNI ===" >&6;}
 
-if true; then
-  HAVE_NC4PAR_TRUE=
-  HAVE_NC4PAR_FALSE='#'
+ if true; then
+  HAVE_CRAY_UGNI_TRUE=
+  HAVE_CRAY_UGNI_FALSE='#'
 else
-  HAVE_NC4PAR_TRUE='#'
-  HAVE_NC4PAR_FALSE=
+  HAVE_CRAY_UGNI_TRUE='#'
+  HAVE_CRAY_UGNI_FALSE=
 fi
 
 
 
-# Check whether --with-nc4par or --without-nc4par was given.
-if test "${with_nc4par+set}" = set; then
-  withval="$with_nc4par"
-  NC4PAR_DIR=$withval
+# Check whether --with-cray-ugni was given.
+if test "${with_cray_ugni+set}" = set; then
+  withval=$with_cray_ugni; CRAY_UGNI_DIR=$withval
 else
-  with_nc4par=check
-fi;
-
-if test "x$with_nc4par" == "xno"; then
+  with_cray_ugni=no
+fi
 
 
 
-if false; then
-  HAVE_NC4PAR_TRUE=
-  HAVE_NC4PAR_FALSE='#'
-else
-  HAVE_NC4PAR_TRUE='#'
-  HAVE_NC4PAR_FALSE=
+# Check whether --with-cray-ugni-incdir was given.
+if test "${with_cray_ugni_incdir+set}" = set; then
+  withval=$with_cray_ugni_incdir; CRAY_UGNI_INCDIR=$withval
+             with_cray_ugni=detailed
 fi
 
 
-else
 
-    ac_use_cray_netcdf=no
+# Check whether --with-cray-ugni-libdir was given.
+if test "${with_cray_ugni_libdir+set}" = set; then
+  withval=$with_cray_ugni_libdir; CRAY_UGNI_LIBDIR=$withval
+              with_cray_ugni=detailed
+fi
 
 
-# Check whether --with-nc4par-incdir or --without-nc4par-incdir was given.
-if test "${with_nc4par_incdir+set}" = set; then
-  withval="$with_nc4par_incdir"
-  NC4PAR_INCDIR=$withval
-                 with_nc4par=detailed
-fi;
 
+# Check whether --with-cray-ugni-libs was given.
+if test "${with_cray_ugni_libs+set}" = set; then
+  withval=$with_cray_ugni_libs; CRAY_UGNI_LIBS=$withval
+              with_cray_ugni=detailed
+fi
 
-# Check whether --with-nc4par-libdir or --without-nc4par-libdir was given.
-if test "${with_nc4par_libdir+set}" = set; then
-  withval="$with_nc4par_libdir"
-  NC4PAR_LIBDIR=$withval
-                 with_nc4par=detailed
-fi;
 
 
-# Check whether --with-nc4par-libs or --without-nc4par-libs was given.
-if test "${with_nc4par_libs+set}" = set; then
-  withval="$with_nc4par_libs"
-  NC4PAR_LIBS=$withval
-                 with_nc4par=detailed
-fi;
+if test "x$with_cray_ugni" == "xno"; then
 
+    if false; then
+  HAVE_CRAY_UGNI_TRUE=
+  HAVE_CRAY_UGNI_FALSE='#'
+else
+  HAVE_CRAY_UGNI_TRUE='#'
+  HAVE_CRAY_UGNI_FALSE=
+fi
 
-                    if test -z "${NC4PAR_INCDIR}"; then
-        if test -n "${NC4PAR_DIR}"; then
-            NC4PAR_INCDIR="${NC4PAR_DIR}/include";
-        elif test -n "${CRAY_NETCDF_DIR}"; then
-            NC4PAR_INCDIR="";
-            ac_use_cray_netcdf=yes
-        elif test -n "${NETCDF_DIR}"; then
-            NC4PAR_INCDIR="${NETCDF_DIR}/include";
+
+else
+
+            if test -z "${CRAY_UGNI_INCDIR}"; then
+        if test -n "${CRAY_UGNI_DIR}"; then
+            CRAY_UGNI_INCDIR="${CRAY_UGNI_DIR}/include";
         fi
     fi
 
-                    if test -z "${NC4PAR_LIBDIR}"; then
-        if test -n "${NC4PAR_DIR}"; then
-            NC4PAR_LIBDIR="${NC4PAR_DIR}/lib";
-        elif test -n "${CRAY_NETCDF_DIR}"; then
-            NC4PAR_LIBDIR="";
-            ac_use_cray_netcdf=yes
-        elif test -n "${NETCDF_DIR}"; then
-            NC4PAR_LIBDIR="${NETCDF_DIR}/lib"
+            if test -z "${CRAY_UGNI_LIBDIR}"; then
+        if test -n "${CRAY_UGNI_DIR}"; then
+            CRAY_UGNI_LIBDIR="${CRAY_UGNI_DIR}/lib";
         fi
     fi
 
-        if test -n "${NC4PAR_INCDIR}"; then
-            NC4PAR_CPPFLAGS="-I${NC4PAR_INCDIR}"
-    else
-            ac_nc4par=no
-    fi
+        CRAY_UGNI_CPPFLAGS="-I${CRAY_UGNI_INCDIR}"
 
-        if test -n "${NC4PAR_LIBDIR}"; then
-            NC4PAR_LDFLAGS="-L${NC4PAR_LIBDIR}"
-    else
-            ac_nc4par=no
-    fi
+        CRAY_UGNI_LDFLAGS="-L${CRAY_UGNI_LIBDIR}"
 
-        if test -z "${NC4PAR_LIBS}"; then
-        if test "${ac_use_cray_netcdf}" != "yes"; then
-            NC4PAR_LIBS="-lnetcdf"
-        fi
+        if test -z "${CRAY_UGNI_LIBS}"; then
+                CRAY_UGNI_LIBS="-lugni"
     fi
 
     save_CC="$CC"
     save_CPPFLAGS="$CPPFLAGS"
     save_LIBS="$LIBS"
     save_LDFLAGS="$LDFLAGS"
-    LIBS="$LIBS $NC4PAR_LIBS"
-    LDFLAGS="$LDFLAGS $NC4PAR_LDFLAGS"
-    CPPFLAGS="$CPPFLAGS $NC4PAR_CPPFLAGS"
+    LIBS="$LIBS $CRAY_UGNI_LIBS"
+    LDFLAGS="$LDFLAGS $CRAY_UGNI_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $CRAY_UGNI_CPPFLAGS"
     CC="$MPICC"
 
-    if test -z "${HAVE_NC4PAR_TRUE}"; then
-
-for ac_header in netcdf.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+    if test -z "${HAVE_CRAY_UGNI_TRUE}"; then
+                                                        { $as_echo "$as_me:$LINENO: checking for Cray's ugni.h" >&5
+$as_echo_n "checking for Cray's ugni.h... " >&6; }
+        if test -f ${CRAY_UGNI_INCDIR}/gni_pub.h; then
+            { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+        else
+             if false; then
+  HAVE_CRAY_UGNI_TRUE=
+  HAVE_CRAY_UGNI_FALSE='#'
 else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-
+  HAVE_CRAY_UGNI_TRUE='#'
+  HAVE_CRAY_UGNI_FALSE=
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
 
-else
-  if test "x$with_nc4par" != xcheck; then
-              { { echo "$as_me:$LINENO: error: --with-nc4par was given, but test for netcdf.h failed
+            { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+            { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-cray-ugni was given, but test for ${CRAY_UGNI_INCDIR}/gni_pub.h failed
 See \`config.log' for more details." >&5
-echo "$as_me: error: --with-nc4par was given, but test for netcdf.h failed
+$as_echo "$as_me: error: --with-cray-ugni was given, but test for ${CRAY_UGNI_INCDIR}/gni_pub.h failed
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-            fi
-
-
-if false; then
-  HAVE_NC4PAR_TRUE=
-  HAVE_NC4PAR_FALSE='#'
-else
-  HAVE_NC4PAR_TRUE='#'
-  HAVE_NC4PAR_FALSE=
-fi
-
-fi
-
-done
-
+   { (exit 1); exit 1; }; }; }
+        fi
     fi
 
-    if test -z "${HAVE_NC4PAR_TRUE}"; then
-        echo "$as_me:$LINENO: checking if nc4 parallel code can be compiled" >&5
-echo $ECHO_N "checking if nc4 parallel code can be compiled... $ECHO_C" >&6
+    if test -z "${HAVE_CRAY_UGNI_TRUE}"; then
+        { $as_echo "$as_me:$LINENO: checking if ugni code can be compiled" >&5
+$as_echo_n "checking if ugni code can be compiled... " >&6; }
         cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include "netcdf.h"
+#include <stdlib.h>
+             #include <stdint.h>
+             #include "gni_pub.h"
+
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -26060,66 +25165,66 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int ncid;
-             MPI_Info info;
-             MPI_Comm comm;
-             nc_create_par("a.nc", NC_NOCLOBBER|NC_MPIIO|NC_NETCDF4, comm, info, ncid);
-             nc_close(ncid);
+uint32_t inst_id;
+             uint8_t ptag;
+             uint32_t cookie;
+             uint32_t  modes;
+             gni_cdm_handle_t * cdm_hndl;
+             gni_return_t status;
+             status = GNI_CdmCreate(inst_id, ptag, cookie, modes, cdm_hndl);
 
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+             ac_cray_ugni_lib_ok=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-             if test "x$with_nc4par" != xcheck; then
-                 { { echo "$as_me:$LINENO: error: --with-nc4par was given, but compile test failed
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+             if test "x$with_cray_ugni" != xcheck; then
+                { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-cray-ugni was given, but compile test failed
 See \`config.log' for more details." >&5
-echo "$as_me: error: --with-nc4par was given, but compile test failed
+$as_echo "$as_me: error: --with-cray-ugni was given, but compile test failed
 See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+   { (exit 1); exit 1; }; }; }
              fi
-
-
-if false; then
-  HAVE_NC4PAR_TRUE=
-  HAVE_NC4PAR_FALSE='#'
+              if false; then
+  HAVE_CRAY_UGNI_TRUE=
+  HAVE_CRAY_UGNI_FALSE='#'
 else
-  HAVE_NC4PAR_TRUE='#'
-  HAVE_NC4PAR_FALSE=
+  HAVE_CRAY_UGNI_TRUE='#'
+  HAVE_CRAY_UGNI_FALSE=
 fi
 
 
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 
@@ -26132,10 +25237,10 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
     CC="$save_CC"
 
     # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-    if test -z "${HAVE_NC4PAR_TRUE}"; then
+    if test -z "${HAVE_CRAY_UGNI_TRUE}"; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_NC4PAR 1
+#define HAVE_CRAY_UGNI 1
 _ACEOF
 
             :
@@ -26148,206 +25253,131 @@ fi
 
 
 
+{ $as_echo "$as_me:$LINENO: === checking for HDF5 ===" >&5
+$as_echo "$as_me: === checking for HDF5 ===" >&6;}
+
+ if true; then
+  HAVE_HDF5_TRUE=
+  HAVE_HDF5_FALSE='#'
+else
+  HAVE_HDF5_TRUE='#'
+  HAVE_HDF5_FALSE=
+fi
 
 
 
-if true; then
-  HAVE_PABLO_TRUE=
-  HAVE_PABLO_FALSE='#'
+# Check whether --with-hdf5 was given.
+if test "${with_hdf5+set}" = set; then
+  withval=$with_hdf5; HDF5_DIR=$withval
 else
-  HAVE_PABLO_TRUE='#'
-  HAVE_PABLO_FALSE=
+  with_hdf5=no
 fi
 
 
 
-# Check whether --with-pablo or --without-pablo was given.
-if test "${with_pablo+set}" = set; then
-  withval="$with_pablo"
-  PABLO_LDFLAGS="-L$withval/lib";
-	 PABLO_CPPFLAGS="-I$withval/include";
-fi;
+# Check whether --with-hdf5-incdir was given.
+if test "${with_hdf5_incdir+set}" = set; then
+  withval=$with_hdf5_incdir; HDF5_INCDIR=$withval
+             with_hdf5=detailed
+fi
 
 
-save_CPPFLAGS="$CPPFLAGS"
-save_LIBS="$LIBS"
-save_LDFLAGS="$LDFLAGS"
-LIBS="$LIBS -lPablo"
-LDFLAGS="$LDFLAGS $PABLO_LDFLAGS"
-CPPFLAGS="$CPPFLAGS $PABLO_CPPFLAGS"
 
-if test -z "${HAVE_PABLO_TRUE}"; then
+# Check whether --with-hdf5-libdir was given.
+if test "${with_hdf5_libdir+set}" = set; then
+  withval=$with_hdf5_libdir; HDF5_LIBDIR=$withval
+              with_hdf5=detailed
+fi
 
-for ac_header in Attributes.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
+
+# Check whether --with-hdf5-libs was given.
+if test "${with_hdf5_libs+set}" = set; then
+  withval=$with_hdf5_libs; HDF5_LIBS=$withval
+              with_hdf5=detailed
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+
+
+if test "x$with_hdf5" == "xno"; then
+
+    if false; then
+  HAVE_HDF5_TRUE=
+  HAVE_HDF5_FALSE='#'
 else
-  # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_header_compiler=yes
+  HAVE_HDF5_TRUE='#'
+  HAVE_HDF5_FALSE=
+fi
+
+
 else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+            if test -z "${HDF5_INCDIR}"; then
+        if test -n "${HDF5_DIR}"; then
+            HDF5_INCDIR="${HDF5_DIR}/include";
+        fi
+    fi
 
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
-  ac_header_preproc=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+            if test -z "${HDF5_LIBDIR}"; then
+        if test -n "${HDF5_DIR}"; then
+            HDF5_LIBDIR="${HDF5_DIR}/lib";
+        fi
+    fi
 
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
-  yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  eval "$as_ac_Header=\$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+        HDF5_CPPFLAGS="-I${HDF5_INCDIR}"
 
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
+        HDF5_LDFLAGS="-L${HDF5_LIBDIR}"
 
-else
+        if test -z "${HDF5_LIBS}"; then
+                HDF5_LIBS="-lhdf5_hl -lhdf5 -lz"
+    fi
 
+    save_CC="$CC"
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    LIBS="$LIBS $HDF5_LIBS"
+    LDFLAGS="$LDFLAGS $HDF5_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $HDF5_CPPFLAGS"
+    CC="$MPICC"
 
-if false; then
-  HAVE_PABLO_TRUE=
-  HAVE_PABLO_FALSE='#'
+    if test -z "${HAVE_HDF5_TRUE}"; then
+                                                        { $as_echo "$as_me:$LINENO: checking for hdf5.h" >&5
+$as_echo_n "checking for hdf5.h... " >&6; }
+        if test -f ${HDF5_INCDIR}/hdf5.h; then
+            { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+        else
+             if false; then
+  HAVE_HDF5_TRUE=
+  HAVE_HDF5_FALSE='#'
 else
-  HAVE_PABLO_TRUE='#'
-  HAVE_PABLO_FALSE=
-fi
-
+  HAVE_HDF5_TRUE='#'
+  HAVE_HDF5_FALSE=
 fi
 
-done
-
-fi
+            { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+            { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-hdf5 was given, but test for ${HDF5_INCDIR}/hdf5.h failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-hdf5 was given, but test for ${HDF5_INCDIR}/hdf5.h failed
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+        fi
+    fi
 
-# Check for the Pablo library and headers for SDDF
-cat >conftest.$ac_ext <<_ACEOF
+    if test -z "${HAVE_HDF5_TRUE}"; then
+        { $as_echo "$as_me:$LINENO: checking if hdf5 code can be compiled" >&5
+$as_echo_n "checking if hdf5 code can be compiled... " >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <Attributes.h>
+#include "hdf5.h"
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -26359,134 +25389,223 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-Attributes attr;attr.clearEntries();
+hid_t file_id;
+             herr_t status;
+             file_id = H5Fcreate("a.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+             status = H5Fclose(file_id);
+
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  PABLO_LIBS="-lPablo"
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-
-if false; then
-  HAVE_PABLO_TRUE=
-  HAVE_PABLO_FALSE='#'
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+             if test "x$with_hdf5" != xcheck; then
+                { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-hdf5 was given, but compile test failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-hdf5 was given, but compile test failed
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+             fi
+              if false; then
+  HAVE_HDF5_TRUE=
+  HAVE_HDF5_FALSE='#'
 else
-  HAVE_PABLO_TRUE='#'
-  HAVE_PABLO_FALSE=
+  HAVE_HDF5_TRUE='#'
+  HAVE_HDF5_FALSE=
 fi
 
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
-LIBS="$save_LIBS"
-LDFLAGS="$save_LDFLAGS"
-CPPFLAGS="$save_CPPFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 
 
+    fi
 
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
+    CC="$save_CC"
 
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test -z "${HAVE_PABLO_TRUE}"; then
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_HDF5_TRUE}"; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_PABLO 1
+#define HAVE_HDF5 1
 _ACEOF
 
-        :
-else
+            :
+    else
+
+            :
+    fi
 
-        :
 fi
 
 
 
+{ $as_echo "$as_me:$LINENO: === checking for Parallel HDF5 ===" >&5
+$as_echo "$as_me: === checking for Parallel HDF5 ===" >&6;}
+
+ if true; then
+  HAVE_PHDF5_TRUE=
+  HAVE_PHDF5_FALSE='#'
+else
+  HAVE_PHDF5_TRUE='#'
+  HAVE_PHDF5_FALSE=
+fi
+
+
 
+# Check whether --with-phdf5 was given.
+if test "${with_phdf5+set}" = set; then
+  withval=$with_phdf5; PHDF5_DIR=$withval
+else
+  with_phdf5=check
+fi
 
 
 
 
-ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+# Check whether --with-phdf5-incdir was given.
+if test "${with_phdf5_incdir+set}" = set; then
+  withval=$with_phdf5_incdir; PHDF5_INCDIR=$withval
+    with_phdf5=detailed
+fi
 
 
 
-ac_nssi_ok=yes
-ac_nssi_path="."
+# Check whether --with-phdf5-libdir was given.
+if test "${with_phdf5_libdir+set}" = set; then
+  withval=$with_phdf5_libdir; PHDF5_LIBDIR=$withval
+    with_phdf5=detailed
+fi
 
 
 
+# Check whether --with-phdf5-libs was given.
+if test "${with_phdf5_libs+set}" = set; then
+  withval=$with_phdf5_libs; PHDF5_LIBS=$withval
+    with_phdf5=detailed
+fi
 
-if false; then
-  HAVE_NSSI_TRUE=
-  HAVE_NSSI_FALSE='#'
+
+if test "x$with_phdf5" == "xno"; then
+
+    if false; then
+  HAVE_PHDF5_TRUE=
+  HAVE_PHDF5_FALSE='#'
 else
-  HAVE_NSSI_TRUE='#'
-  HAVE_NSSI_FALSE=
+  HAVE_PHDF5_TRUE='#'
+  HAVE_PHDF5_FALSE=
 fi
 
 
-NSSI_SRCDIR=""
-NSSI_BUILDDIR=""
-NSSI_CPPFLAGS=""
-NSSI_LDFLAGS=""
-NSSI_LIBS="-lnssi_client -lnssi_support"
-NSSI_SERVER_LIBS="-lnssi_server -lnssi_support"
+else
+
+    ac_use_cray_hdf5=no
+                if test -z "${PHDF5_INCDIR}"; then
+        if test -n "${CRAY_HDF5_DIR}"; then
+            PHDF5_INCDIR="";
+            ac_use_cray_hdf5=yes
+        elif test -n "${PHDF5_DIR}"; then
+            PHDF5_INCDIR="${PHDF5_DIR}/include";
+                    else
+            ac_phdf5_ok=no
+        fi
+    fi
 
+                if test -z "${PHDF5_LIBDIR}"; then
+        if test -n "${CRAY_HDF5_DIR}"; then
+            PHDF5_LIBDIR="";
+            ac_use_cray_hdf5=yes
+        elif test -n "${PHDF5_DIR}"; then
+            PHDF5_LIBDIR="${PHDF5_DIR}/lib";
+                    else
+            ac_phdf5_ok=no
+        fi
+    fi
 
-# Check whether --with-nssi or --without-nssi was given.
-if test "${with_nssi+set}" = set; then
-  withval="$with_nssi"
-  NSSI_LDFLAGS="-L$withval/lib";
-         NSSI_CPPFLAGS="-I$withval/include";
-         ac_nssi_path=$withval
-fi;
+    if test -n "${PHDF5_INCDIR}"; then
+                PHDF5_CPPFLAGS="-I${PHDF5_INCDIR}"
+    else
+        ac_use_cray_hdf5=no
+    fi
 
-if test x"$ac_nssi_ok" = xyes; then
-        save_CPPFLAGS="$CPPFLAGS"
-        CPPFLAGS="${CPPFLAGS} ${NSSI_CPPFLAGS}"
-        if test "${ac_cv_header_nssi_client_h+set}" = set; then
-  echo "$as_me:$LINENO: checking for nssi_client.h" >&5
-echo $ECHO_N "checking for nssi_client.h... $ECHO_C" >&6
-if test "${ac_cv_header_nssi_client_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: $ac_cv_header_nssi_client_h" >&5
-echo "${ECHO_T}$ac_cv_header_nssi_client_h" >&6
+    if test -n "${PHDF5_LIBDIR}"; then
+                PHDF5_LDFLAGS="-L${PHDF5_LIBDIR}"
+    else
+        ac_use_cray_hdf5=no
+    fi
+
+
+        if test -z "${PHDF5_LIBS}"; then
+        if test "${ac_use_cray_hdf5}" != "yes"; then
+                        PHDF5_LIBS="-lhdf5_hl -lhdf5 -lz"
+        else
+            { $as_echo "$as_me:$LINENO: Environment CRAY_HDF5_DIR defined, so we use Cray's settings" >&5
+$as_echo "$as_me: Environment CRAY_HDF5_DIR defined, so we use Cray's settings" >&6;}
+        fi
+    fi
+
+    save_CC="$CC"
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    LIBS="$LIBS $PHDF5_LIBS"
+    LDFLAGS="$LDFLAGS $PHDF5_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $PHDF5_CPPFLAGS"
+    CC="$MPICC"
+
+
+    if test -z "${HAVE_PHDF5_TRUE}"; then
+
+for ac_header in hdf5.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking nssi_client.h usability" >&5
-echo $ECHO_N "checking nssi_client.h usability... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -26494,158 +25613,148 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <nssi_client.h>
+#include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-echo "$as_me:$LINENO: checking nssi_client.h presence" >&5
-echo $ECHO_N "checking nssi_client.h presence... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <nssi_client.h>
+#include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_cxx_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
 # So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: nssi_client.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: nssi_client.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: nssi_client.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: nssi_client.h: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: nssi_client.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: nssi_client.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: nssi_client.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: nssi_client.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: nssi_client.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: nssi_client.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: nssi_client.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: nssi_client.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: nssi_client.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: nssi_client.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: nssi_client.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: nssi_client.h: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
     ;;
 esac
-echo "$as_me:$LINENO: checking for nssi_client.h" >&5
-echo $ECHO_N "checking for nssi_client.h... $ECHO_C" >&6
-if test "${ac_cv_header_nssi_client_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-  ac_cv_header_nssi_client_h=$ac_header_preproc
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: $ac_cv_header_nssi_client_h" >&5
-echo "${ECHO_T}$ac_cv_header_nssi_client_h" >&6
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
-if test $ac_cv_header_nssi_client_h = yes; then
-  :
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
 else
-  ac_nssi_ok=no
+    if false; then
+  HAVE_PHDF5_TRUE=
+  HAVE_PHDF5_FALSE='#'
+else
+  HAVE_PHDF5_TRUE='#'
+  HAVE_PHDF5_FALSE=
 fi
 
-
-        CPPFLAGS="$save_CPPFLAGS"
 fi
 
-if test x"$ac_nssi_ok" = xyes; then
+done
 
+    fi
 
-echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
-echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
-if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+    if test -z "${HAVE_PHDF5_TRUE}"; then
+        { $as_echo "$as_me:$LINENO: checking if phdf5 code can be compiled" >&5
+$as_echo_n "checking if phdf5 code can be compiled... " >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char clock_gettime ();
+#include "hdf5.h"
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -26657,459 +25766,212 @@ char clock_gettime ();
 int
 main ()
 {
-clock_gettime ();
+hid_t file_id;
+             herr_t status;
+#ifdef H5_HAVE_PARALLEL
+             file_id = H5Fcreate("a.h5", H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
+             status = H5Fclose(file_id);
+#else
+             /* This must deliberately fail */
+             file_id = THE_HDF5_INSTALLATION_FOUND_IS_NOT_PARALLEL_HDF5
+#endif
+
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_rt_clock_gettime=yes
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_cv_lib_rt_clock_gettime=no
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+              if false; then
+  HAVE_PHDF5_TRUE=
+  HAVE_PHDF5_FALSE='#'
+else
+  HAVE_PHDF5_TRUE='#'
+  HAVE_PHDF5_FALSE=
 fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
-echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
-if test $ac_cv_lib_rt_clock_gettime = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
-_ACEOF
 
-  LIBS="-lrt $LIBS"
 
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 
 
 
+    fi
 
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
+    CC="$save_CC"
 
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_PHDF5_TRUE}"; then
 
-for ac_func in clock_gettime gettimeofday fdatasync pthread_yield sched_yield
-do
-as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
-echo "$as_me:$LINENO: checking for $ac_func" >&5
-echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
-if eval "test \"\${$as_ac_var+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PHDF5 1
 _ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $ac_func innocuous_$ac_func
 
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
+            :
+    else
 
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+            :
+    fi
 
-#undef $ac_func
+fi
 
-/* Override any gcc2 internal prototype to avoid an error.  */
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-/* We use char because int might match the return type of a gcc2
-   builtin and then its argument prototype would still apply.  */
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-char (*f) () = $ac_func;
-#endif
-#ifdef __cplusplus
-}
-#endif
 
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-return f != $ac_func;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  eval "$as_ac_var=yes"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
 
-eval "$as_ac_var=no"
+{ $as_echo "$as_me:$LINENO: === checking for NetCDF ===" >&5
+$as_echo "$as_me: === checking for NetCDF ===" >&6;}
+
+ if true; then
+  HAVE_NETCDF_TRUE=
+  HAVE_NETCDF_FALSE='#'
+else
+  HAVE_NETCDF_TRUE='#'
+  HAVE_NETCDF_FALSE=
 fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
+
+
+
+# Check whether --with-netcdf was given.
+if test "${with_netcdf+set}" = set; then
+  withval=$with_netcdf; NETCDF_DIR=$withval
+else
+  with_netcdf=check
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
-if test `eval echo '${'$as_ac_var'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
 
+
+if test "x$with_netcdf" == "xno"; then
+
+    if false; then
+  HAVE_NETCDF_TRUE=
+  HAVE_NETCDF_FALSE='#'
+else
+  HAVE_NETCDF_TRUE='#'
+  HAVE_NETCDF_FALSE=
 fi
-done
 
 
-        ac_nssi_ok=no
+else
 
-                ac_nssi_flags="none"
-        if test x"$ac_with_portals" = xyes; then
-                ac_nssi_flags="$ac_nssi_flags all_portals portals_plus_libcpp portals_plus_pablo"
-        fi
-        if test x"$ac_with_infiniband" = xyes; then
-                ac_nssi_flags="$ac_nssi_flags infiniband"
-        fi
+    ac_use_cray_netcdf=no
 
-        for flag in $ac_nssi_flags; do
 
-                case $flag in
-                        none)
-                        echo "$as_me:$LINENO: checking whether nssi works without any additional flags" >&5
-echo $ECHO_N "checking whether nssi works without any additional flags... $ECHO_C" >&6
-                        ;;
+# Check whether --with-netcdf-incdir was given.
+if test "${with_netcdf_incdir+set}" = set; then
+  withval=$with_netcdf_incdir; NETCDF_INCDIR=$withval
+                 with_netcdf=detailed
+fi
 
-                        -l*)
-                        echo "$as_me:$LINENO: checking whether nssi works with library $flag" >&5
-echo $ECHO_N "checking whether nssi works with library $flag... $ECHO_C" >&6
-                        EXTRA_LIBS="$flag"
-                        ;;
 
-                        -*)
-                        echo "$as_me:$LINENO: checking whether nssi works with $flag" >&5
-echo $ECHO_N "checking whether nssi works with $flag... $ECHO_C" >&6
-                        EXTRA_LIBS="$flag"
-                        ;;
 
-                        all_portals)
-                        echo "$as_me:$LINENO: checking whether nssi works with ${PORTALS_LIBS}" >&5
-echo $ECHO_N "checking whether nssi works with ${PORTALS_LIBS}... $ECHO_C" >&6
-                        EXTRA_LIBS="${PORTALS_LIBS}"
-                        ;;
+# Check whether --with-netcdf-libdir was given.
+if test "${with_netcdf_libdir+set}" = set; then
+  withval=$with_netcdf_libdir; NETCDF_LIBDIR=$withval
+                 with_netcdf=detailed
+fi
 
-                        portals_plus_libcpp)
-                        echo "$as_me:$LINENO: checking whether nssi works with ${PORTALS_LIBS}" >&5
-echo $ECHO_N "checking whether nssi works with ${PORTALS_LIBS}... $ECHO_C" >&6
-                        EXTRA_LIBS="${PORTALS_LIBS}"
-                        ;;
 
-                        portals_plus_pablo)
-                        echo "$as_me:$LINENO: checking whether nssi works with ${PORTALS_LIBS} ${PABLO_LIBS}" >&5
-echo $ECHO_N "checking whether nssi works with ${PORTALS_LIBS} ${PABLO_LIBS}... $ECHO_C" >&6
-                        EXTRA_LIBS="${PORTALS_LIBS} ${PABLO_LIBS}"
-                        ;;
 
-                        infiniband)
-                        echo "$as_me:$LINENO: checking whether nssi works with ${INFINIBAND_LIBS}" >&5
-echo $ECHO_N "checking whether nssi works with ${INFINIBAND_LIBS}... $ECHO_C" >&6
-                        EXTRA_LIBS="${INFINIBAND_LIBS}"
-                        ;;
-                esac
+# Check whether --with-netcdf-libs was given.
+if test "${with_netcdf_libs+set}" = set; then
+  withval=$with_netcdf_libs; NETCDF_LIBS=$withval
+                 with_netcdf=detailed
+fi
 
 
-                save_LDFLAGS="$LDFLAGS"
-                save_LIBS="$LIBS"
-                save_CPPFLAGS="$CPPFLAGS"
-                save_CFLAGS="$CFLAGS"
-                LDFLAGS="$LDFLAGS $NSSI_LDFLAGS"
-                LIBS="$LIBS $NSSI_LIBS $EXTRA_LIBS"
-                CPPFLAGS="$CPPFLAGS $NSSI_CPPFLAGS"
-                CFLAGS="$CFLAGS $NSSI_CFLAGS $EXTRA_FLAGS"
+                    if test -z "${NETCDF_INCDIR}"; then
+        if test -n "${NETCDF_DIR}"; then
+            NETCDF_INCDIR="${NETCDF_DIR}/include";
+        elif test -n "${CRAY_NETCDF_DIR}"; then
+            NETCDF_INCDIR="";
+            ac_use_cray_netcdf=yes
+        elif test -n "${NETCDF}" -a -d "${NETCDF}"; then
+            NETCDF_INCDIR="${NETCDF}/include"
+        fi
+    fi
 
+                    if test -z "${NETCDF_LIBDIR}"; then
+        if test -n "${NETCDF_DIR}"; then
+            NETCDF_LIBDIR="${NETCDF_DIR}/lib";
+        elif test -n "${CRAY_NETCDF_DIR}"; then
+            NETCDF_LIBDIR="";
+            ac_use_cray_netcdf=yes
+        elif test -n "${NETCDF}" -a -d "${NETCDF}"; then
+            NETCDF_LIBDIR="${NETCDF}/lib"
+        fi
+    fi
 
-                                cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include "nssi_client.h"
-#ifdef FC_DUMMY_MAIN
-#ifndef FC_DUMMY_MAIN_EQ_F77
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int FC_DUMMY_MAIN() { return 1; }
-#endif
-#endif
-int
-main ()
-{
-nssi_remote_pid server_id;
-                             uint64_t timeout;
-                             nssi_service svc;
-                             nssi_get_service(server_id, timeout, &svc);
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_cxx_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_nssi_ok=yes;
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_nssi_ok=no;
-fi
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-
-
-                LDFLAGS="$save_LDFLAGS"
-                LIBS="$save_LIBS"
-                CFLAGS="$save_CFLAGS"
-                CPPFLAGS="$save_CPPFLAGS"
-
-                echo "$as_me:$LINENO: result: $ac_nssi_ok" >&5
-echo "${ECHO_T}$ac_nssi_ok" >&6
-                if test "x$ac_nssi_ok" = xyes; then
-                        NSSI_LIBS="$NSSI_LIBS $EXTRA_LIBS";
-                        NSSI_SERVER_LIBS="$NSSI_SERVER_LIBS $EXTRA_LIBS"
-                        NSSI_CFLAGS="$NSSI_CFLAGS $EXTRA_CFLAGS";
-                        break;
-                fi
-
-                EXTRA_LIBS=""
-                EXTRA_CFLAGS=""
-        done
-fi
-
-
-
-if test x$ac_nssi_ok = xyes; then
-  HAVE_NSSI_TRUE=
-  HAVE_NSSI_FALSE='#'
-else
-  HAVE_NSSI_TRUE='#'
-  HAVE_NSSI_FALSE=
-fi
-
-
-
-
-
-
-
-
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$ac_nssi_ok" = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NSSI 1
-_ACEOF
-
-        :
-else
-
-        :
-fi
-
-
-
-
-
-
-
-if true; then
-  HAVE_DART_TRUE=
-  HAVE_DART_FALSE='#'
-else
-  HAVE_DART_TRUE='#'
-  HAVE_DART_FALSE=
-fi
-
-
-
-# Check whether --with-dart or --without-dart was given.
-if test "${with_dart+set}" = set; then
-  withval="$with_dart"
-  DART_LDFLAGS="-L$withval/lib";
-         DART_CPPFLAGS="-I$withval/include";
-else
-  with_dart=check
-fi;
-
-if test "x$with_dart" == "xno"; then
-
-
-
-if false; then
-  HAVE_DART_TRUE=
-  HAVE_DART_FALSE='#'
-else
-  HAVE_DART_TRUE='#'
-  HAVE_DART_FALSE=
-fi
-
-
-else
-
-
-# Check whether --with-dart-incdir or --without-dart-incdir was given.
-if test "${with_dart_incdir+set}" = set; then
-  withval="$with_dart_incdir"
-  DART_INCDIR=$withval
-                 with_dart=detailed
-fi;
-
-
-# Check whether --with-dart-libdir or --without-dart-libdir was given.
-if test "${with_dart_libdir+set}" = set; then
-  withval="$with_dart_libdir"
-  DART_LIBDIR=$withval
-                 with_dart=detailed
-fi;
-
-
-            if test -n "${DART_DIR}" -a -z "${DART_INCDIR}"; then
-            DART_INCDIR="${DART_DIR}/include";
-        elif test -n "${DART}" -a -d "${DART}"; then
-            DART_INCDIR="${DART}/include"
-    fi
-
-            if test -n "${DART_DIR}" -a -z "${DART_LIBDIR}"; then
-            DART_LIBDIR="${DART_DIR}/lib";
-        elif test -n "${DART}" -a -d "${DART}"; then
-            DART_LIBDIR="${DART}/lib"
+        if test -n "${NETCDF_INCDIR}"; then
+            NETCDF_CPPFLAGS="-I${NETCDF_INCDIR}"
+    else
+            ac_netcdf_ok=no
     fi
 
-        if test -n "${DART_INCDIR}"; then
-            DART_CPPFLAGS="-I${DART_INCDIR}"
+        if test -n "${NETCDF_LIBDIR}"; then
+            NETCDF_LDFLAGS="-L${NETCDF_LIBDIR}"
     else
-            ac_dart_ok=no
+            ac_netcdf_ok=no
     fi
 
-        if test -n "${DART_LIBDIR}"; then
-            DART_LDFLAGS="-L${DART_LIBDIR}"
-    else
-            ac_dart_ok=no
+        if test -z "${NETCDF_LIBS}"; then
+        if test "${ac_use_cray_netcdf}" != "yes"; then
+            NETCDF_LIBS="-lnetcdf"
+        fi
     fi
 
     save_CPPFLAGS="$CPPFLAGS"
     save_LIBS="$LIBS"
     save_LDFLAGS="$LDFLAGS"
-    LIBS="$LIBS -ldart2 -lspaces"
-    LDFLAGS="$LDFLAGS $DART_LDFLAGS"
-    CPPFLAGS="$CPPFLAGS $DART_CPPFLAGS"
+    LIBS="$LIBS $NETCDF_LDFLAGS"
+    LDFLAGS="$LDFLAGS $NETCDF_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $NETCDF_CPPFLAGS"
 
-    if test -z "${HAVE_DART_TRUE}"; then
+    if test -z "${HAVE_NETCDF_TRUE}"; then
 
-for ac_header in dart.h
+for ac_header in netcdf.h
 do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -27120,41 +25982,38 @@ $ac_includes_default
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -27163,92 +26022,96 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 else
-
-
-if false; then
-  HAVE_DART_TRUE=
-  HAVE_DART_FALSE='#'
+  if test "x$with_netcdf" != xcheck; then
+              { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-netcdf was given, but test for netcdf.h failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-netcdf was given, but test for netcdf.h failed
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+            fi
+             if false; then
+  HAVE_NETCDF_TRUE=
+  HAVE_NETCDF_FALSE='#'
 else
-  HAVE_DART_TRUE='#'
-  HAVE_DART_FALSE=
+  HAVE_NETCDF_TRUE='#'
+  HAVE_NETCDF_FALSE=
 fi
 
 fi
@@ -27257,14 +26120,16 @@ done
 
     fi
 
-    # Check for the Mini-XML library and headers
-    cat >conftest.$ac_ext <<_ACEOF
+    if test -z "${HAVE_NETCDF_TRUE}"; then
+        { $as_echo "$as_me:$LINENO: checking if netcdf code can be compiled" >&5
+$as_echo_n "checking if netcdf code can be compiled... " >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include "dart.h"
+#include "netcdf.h"
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -27276,64 +26141,76 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int err; err = dart_init(1,1);
+int ncid;
+             nc_create("a.nc", NC_CLOBBER, &ncid);
+             nc_close(ncid);
+
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  DART_LIBS="-ldart2 -lspaces"
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-
-if false; then
-  HAVE_DART_TRUE=
-  HAVE_DART_FALSE='#'
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+             if test "x$with_netcdf" != xcheck; then
+                 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-netcdf was given, but compile test failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-netcdf was given, but compile test failed
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+             fi
+              if false; then
+  HAVE_NETCDF_TRUE=
+  HAVE_NETCDF_FALSE='#'
 else
-  HAVE_DART_TRUE='#'
-  HAVE_DART_FALSE=
+  HAVE_NETCDF_TRUE='#'
+  HAVE_NETCDF_FALSE=
 fi
 
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
-    LIBS="$save_LIBS"
-    LDFLAGS="$save_LDFLAGS"
-    CPPFLAGS="$save_CPPFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 
 
 
+    fi
+
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
 
     # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-    if test -z "${HAVE_DART_TRUE}"; then
+    if test -z "${HAVE_NETCDF_TRUE}"; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_DART 1
+#define HAVE_NETCDF 1
 _ACEOF
 
             :
@@ -27346,107 +26223,135 @@ fi
 
 
 
+{ $as_echo "$as_me:$LINENO: === checking NetCDF 4 Parallel ===" >&5
+$as_echo "$as_me: === checking NetCDF 4 Parallel ===" >&6;}
 
-
-if true; then
-  HAVE_DIMES_TRUE=
-  HAVE_DIMES_FALSE='#'
+ if true; then
+  HAVE_NC4PAR_TRUE=
+  HAVE_NC4PAR_FALSE='#'
 else
-  HAVE_DIMES_TRUE='#'
-  HAVE_DIMES_FALSE=
+  HAVE_NC4PAR_TRUE='#'
+  HAVE_NC4PAR_FALSE=
 fi
 
 
 
-# Check whether --with-dimes or --without-dimes was given.
-if test "${with_dimes+set}" = set; then
-  withval="$with_dimes"
-  DIMES_LDFLAGS="-L$withval/lib";
-         DIMES_CPPFLAGS="-I$withval/include";
+# Check whether --with-nc4par was given.
+if test "${with_nc4par+set}" = set; then
+  withval=$with_nc4par; NC4PAR_DIR=$withval
 else
-  with_dimes=check
-fi;
-
-if test "x$with_dimes" == "xno"; then
+  with_nc4par=check
+fi
 
 
+if test "x$with_nc4par" == "xno"; then
 
-if false; then
-  HAVE_DIMES_TRUE=
-  HAVE_DIMES_FALSE='#'
+    if false; then
+  HAVE_NC4PAR_TRUE=
+  HAVE_NC4PAR_FALSE='#'
 else
-  HAVE_DIMES_TRUE='#'
-  HAVE_DIMES_FALSE=
+  HAVE_NC4PAR_TRUE='#'
+  HAVE_NC4PAR_FALSE=
 fi
 
 
 else
 
+    ac_use_cray_netcdf=no
 
-# Check whether --with-dimes-incdir or --without-dimes-incdir was given.
-if test "${with_dimes_incdir+set}" = set; then
-  withval="$with_dimes_incdir"
-  DIMES_INCDIR=$withval
-                 with_dimes=detailed
-fi;
 
+# Check whether --with-nc4par-incdir was given.
+if test "${with_nc4par_incdir+set}" = set; then
+  withval=$with_nc4par_incdir; NC4PAR_INCDIR=$withval
+                 with_nc4par=detailed
+fi
 
-# Check whether --with-dimes-libdir or --without-dimes-libdir was given.
-if test "${with_dimes_libdir+set}" = set; then
-  withval="$with_dimes_libdir"
-  DIMES_LIBDIR=$withval
-                 with_dimes=detailed
-fi;
 
 
-            if test -n "${DIMES_DIR}" -a -z "${DIMES_INCDIR}"; then
-            DIMES_INCDIR="${DIMES_DIR}/include";
-        elif test -n "${DIMES}" -a -d "${DIMES}"; then
-            DIMES_INCDIR="${DIMES}/include"
-    fi
+# Check whether --with-nc4par-libdir was given.
+if test "${with_nc4par_libdir+set}" = set; then
+  withval=$with_nc4par_libdir; NC4PAR_LIBDIR=$withval
+                 with_nc4par=detailed
+fi
 
-            if test -n "${DIMES_DIR}" -a -z "${DIMES_LIBDIR}"; then
-            DIMES_LIBDIR="${DIMES_DIR}/lib";
-        elif test -n "${DIMES}" -a -d "${DIMES}"; then
-            DIMES_LIBDIR="${DIMES}/lib"
-    fi
 
-        if test -n "${DIMES_INCDIR}"; then
-            DIMES_CPPFLAGS="-I${DIMES_INCDIR}"
-    else
-            ac_dimes_ok=no
-    fi
 
-        if test -n "${DIMES_LIBDIR}"; then
-            DIMES_LDFLAGS="-L${DIMES_LIBDIR}"
+# Check whether --with-nc4par-libs was given.
+if test "${with_nc4par_libs+set}" = set; then
+  withval=$with_nc4par_libs; NC4PAR_LIBS=$withval
+                 with_nc4par=detailed
+fi
+
+
+
+                    if test -z "${NC4PAR_INCDIR}"; then
+        if test -n "${NC4PAR_DIR}"; then
+            NC4PAR_INCDIR="${NC4PAR_DIR}/include";
+        elif test -n "${CRAY_NETCDF_DIR}"; then
+            NC4PAR_INCDIR="";
+            ac_use_cray_netcdf=yes
+        elif test -n "${NETCDF_DIR}"; then
+            NC4PAR_INCDIR="${NETCDF_DIR}/include";
+        fi
+    fi
+
+                    if test -z "${NC4PAR_LIBDIR}"; then
+        if test -n "${NC4PAR_DIR}"; then
+            NC4PAR_LIBDIR="${NC4PAR_DIR}/lib";
+        elif test -n "${CRAY_NETCDF_DIR}"; then
+            NC4PAR_LIBDIR="";
+            ac_use_cray_netcdf=yes
+        elif test -n "${NETCDF_DIR}"; then
+            NC4PAR_LIBDIR="${NETCDF_DIR}/lib"
+        fi
+    fi
+
+        if test -n "${NC4PAR_INCDIR}"; then
+            NC4PAR_CPPFLAGS="-I${NC4PAR_INCDIR}"
     else
-            ac_dimes_ok=no
+            ac_nc4par=no
+    fi
+
+        if test -n "${NC4PAR_LIBDIR}"; then
+            NC4PAR_LDFLAGS="-L${NC4PAR_LIBDIR}"
+    else
+            ac_nc4par=no
+    fi
+
+        if test -z "${NC4PAR_LIBS}"; then
+        if test "${ac_use_cray_netcdf}" != "yes"; then
+            NC4PAR_LIBS="-lnetcdf"
+        fi
     fi
 
+    save_CC="$CC"
     save_CPPFLAGS="$CPPFLAGS"
     save_LIBS="$LIBS"
     save_LDFLAGS="$LDFLAGS"
-    LIBS="$LIBS -ldimes_portals -lspaces"
-    LDFLAGS="$LDFLAGS $DIMES_LDFLAGS"
-    CPPFLAGS="$CPPFLAGS $DIMES_CPPFLAGS"
+    LIBS="$LIBS $NC4PAR_LIBS"
+    LDFLAGS="$LDFLAGS $NC4PAR_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $NC4PAR_CPPFLAGS"
+    CC="$MPICC"
 
-    if test -z "${HAVE_DIMES_TRUE}"; then
+    if test -z "${HAVE_NC4PAR_TRUE}"; then
 
-for ac_header in dimes.h
+for ac_header in netcdf.h
 do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -27457,41 +26362,38 @@ $ac_includes_default
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -27500,92 +26402,96 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 else
-
-
-if false; then
-  HAVE_DIMES_TRUE=
-  HAVE_DIMES_FALSE='#'
+  if test "x$with_nc4par" != xcheck; then
+              { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-nc4par was given, but test for netcdf.h failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-nc4par was given, but test for netcdf.h failed
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+            fi
+             if false; then
+  HAVE_NC4PAR_TRUE=
+  HAVE_NC4PAR_FALSE='#'
 else
-  HAVE_DIMES_TRUE='#'
-  HAVE_DIMES_FALSE=
+  HAVE_NC4PAR_TRUE='#'
+  HAVE_NC4PAR_FALSE=
 fi
 
 fi
@@ -27594,14 +26500,18 @@ done
 
     fi
 
-    # Check for the Mini-XML library and headers
-    cat >conftest.$ac_ext <<_ACEOF
+    if test -z "${HAVE_NC4PAR_TRUE}"; then
+        { $as_echo "$as_me:$LINENO: checking if nc4 parallel code can be compiled" >&5
+$as_echo_n "checking if nc4 parallel code can be compiled... " >&6; }
+        cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include "dimes.h"
+#include "mpi.h"
+             #include "netcdf.h"
+
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -27613,64 +26523,79 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-int err; err = dimes_init(1,1,1);
+int ncid;
+             MPI_Info info;
+             MPI_Comm comm;
+             nc_create_par("a.nc", NC_NOCLOBBER|NC_MPIIO|NC_NETCDF4, comm, info, ncid);
+             nc_close(ncid);
+
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  DIMES_LIBS="-ldimes_portals -lspaces"
-else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-
-if false; then
-  HAVE_DIMES_TRUE=
-  HAVE_DIMES_FALSE='#'
+	{ $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+             if test "x$with_nc4par" != xcheck; then
+                 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: --with-nc4par was given, but compile test failed
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: --with-nc4par was given, but compile test failed
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }; }
+             fi
+              if false; then
+  HAVE_NC4PAR_TRUE=
+  HAVE_NC4PAR_FALSE='#'
 else
-  HAVE_DIMES_TRUE='#'
-  HAVE_DIMES_FALSE=
+  HAVE_NC4PAR_TRUE='#'
+  HAVE_NC4PAR_FALSE=
 fi
 
+
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 
-    LIBS="$save_LIBS"
-    LDFLAGS="$save_LDFLAGS"
-    CPPFLAGS="$save_CPPFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
 
 
 
+    fi
 
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
+    CC="$save_CC"
 
     # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-    if test -z "${HAVE_DIMES_TRUE}"; then
+    if test -z "${HAVE_NC4PAR_TRUE}"; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_DIMES 1
+#define HAVE_NC4PAR 1
 _ACEOF
 
             :
@@ -27684,48 +26609,50 @@ fi
 
 
 
-
-if true; then
-  HAVE_DMALLOC_TRUE=
-  HAVE_DMALLOC_FALSE='#'
+ if true; then
+  HAVE_PABLO_TRUE=
+  HAVE_PABLO_FALSE='#'
 else
-  HAVE_DMALLOC_TRUE='#'
-  HAVE_DMALLOC_FALSE=
+  HAVE_PABLO_TRUE='#'
+  HAVE_PABLO_FALSE=
 fi
 
 
 
-# Check whether --with-dmalloc or --without-dmalloc was given.
-if test "${with_dmalloc+set}" = set; then
-  withval="$with_dmalloc"
-  DMALLOC_LDFLAGS="-L$withval/lib";
-         DMALLOC_CPPFLAGS="-I$withval/include";
-fi;
+# Check whether --with-pablo was given.
+if test "${with_pablo+set}" = set; then
+  withval=$with_pablo; PABLO_LDFLAGS="-L$withval/lib";
+	 PABLO_CPPFLAGS="-I$withval/include";
+fi
+
+
 
 save_CPPFLAGS="$CPPFLAGS"
 save_LIBS="$LIBS"
 save_LDFLAGS="$LDFLAGS"
-LIBS="$LIBS -ldmalloc"
-LDFLAGS="$LDFLAGS $DMALLOC_LDFLAGS"
-CPPFLAGS="$CPPFLAGS $DMALLOC_CPPFLAGS"
+LIBS="$LIBS -lPablo"
+LDFLAGS="$LDFLAGS $PABLO_LDFLAGS"
+CPPFLAGS="$CPPFLAGS $PABLO_CPPFLAGS"
 
-if test -z "${HAVE_DMALLOC_TRUE}"; then
+if test -z "${HAVE_PABLO_TRUE}"; then
 
-for ac_header in dmalloc.h
+for ac_header in Attributes.h
 do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -27736,41 +26663,38 @@ $ac_includes_default
 #include <$ac_header>
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
   ac_header_compiler=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-ac_header_compiler=no
+	ac_header_compiler=no
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -27779,92 +26703,87 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <$ac_header>
 _ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
-  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } >/dev/null; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
   ac_header_preproc=yes
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
   ac_header_preproc=no
 fi
+
 rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
   yes:no: )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
     ac_header_preproc=yes
     ;;
   no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
-    (
-      cat <<\_ASBOX
-## ------------------------------------------ ##
-## Report this to the AC_PACKAGE_NAME lists.  ##
-## ------------------------------------------ ##
-_ASBOX
-    ) |
-      sed "s/^/$as_me: WARNING:     /" >&2
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
   eval "$as_ac_Header=\$ac_header_preproc"
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
   cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
 
 else
-
-
-if false; then
-  HAVE_DMALLOC_TRUE=
-  HAVE_DMALLOC_FALSE='#'
+   if false; then
+  HAVE_PABLO_TRUE=
+  HAVE_PABLO_FALSE='#'
 else
-  HAVE_DMALLOC_TRUE='#'
-  HAVE_DMALLOC_FALSE=
+  HAVE_PABLO_TRUE='#'
+  HAVE_PABLO_FALSE=
 fi
 
 fi
@@ -27873,14 +26792,14 @@ done
 
 fi
 
-# Check for the dmalloc library and headers
+# Check for the Pablo library and headers for SDDF
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include "dmalloc.h"
+#include <Attributes.h>
 #ifdef FC_DUMMY_MAIN
 #ifndef FC_DUMMY_MAIN_EQ_F77
 #  ifdef __cplusplus
@@ -27892,50 +26811,45 @@ cat >>conftest.$ac_ext <<_ACEOF
 int
 main ()
 {
-char * s; s=malloc(sizeof(char)*10); free(s);
+Attributes attr;attr.clearEntries();
   ;
   return 0;
 }
 _ACEOF
 rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
   rm -f conftest.er1
   cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  DMALLOC_LIBS="-ldmallocth"
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  PABLO_LIBS="-lPablo"
 else
-  echo "$as_me: failed program was:" >&5
+  $as_echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-
-
-if false; then
-  HAVE_DMALLOC_TRUE=
-  HAVE_DMALLOC_FALSE='#'
+	 if false; then
+  HAVE_PABLO_TRUE=
+  HAVE_PABLO_FALSE='#'
 else
-  HAVE_DMALLOC_TRUE='#'
-  HAVE_DMALLOC_FALSE=
+  HAVE_PABLO_TRUE='#'
+  HAVE_PABLO_FALSE=
 fi
 
 fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 LIBS="$save_LIBS"
 LDFLAGS="$save_LDFLAGS"
@@ -27945,11 +26859,12 @@ CPPFLAGS="$save_CPPFLAGS"
 
 
 
+
 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test -z "${HAVE_DMALLOC_TRUE}"; then
+if test -z "${HAVE_PABLO_TRUE}"; then
 
 cat >>confdefs.h <<\_ACEOF
-#define HAVE_DMALLOC 1
+#define HAVE_PABLO 1
 _ACEOF
 
         :
@@ -27960,1261 +26875,1862 @@ fi
 
 
 
-{ echo "$as_me:$LINENO: === checking for Lustre ===" >&5
-echo "$as_me: === checking for Lustre ===" >&6;}
 
 
 
-if true; then
-  HAVE_LUSTRE_TRUE=
-  HAVE_LUSTRE_FALSE='#'
-else
-  HAVE_LUSTRE_TRUE='#'
-  HAVE_LUSTRE_FALSE=
-fi
 
 
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
-# Check whether --with-lustre or --without-lustre was given.
-if test "${with_lustre+set}" = set; then
-  withval="$with_lustre"
-  LUSTRE_LDFLAGS="-L$withval/lib";
-         LUSTRE_LIBS="-llustreapi";
-         LUSTRE_CPPFLAGS="-I$withval/include";
-else
-  with_lustre=no
-fi;
 
-if test "x$with_lustre" == "xno"; then
 
+ac_nssi_ok=yes
+ac_nssi_path="."
 
 
-if false; then
-  HAVE_LUSTRE_TRUE=
-  HAVE_LUSTRE_FALSE='#'
+ if false; then
+  HAVE_NSSI_TRUE=
+  HAVE_NSSI_FALSE='#'
 else
-  HAVE_LUSTRE_TRUE='#'
-  HAVE_LUSTRE_FALSE=
+  HAVE_NSSI_TRUE='#'
+  HAVE_NSSI_FALSE=
 fi
 
 
-else
+NSSI_SRCDIR=""
+NSSI_BUILDDIR=""
+NSSI_CPPFLAGS=""
+NSSI_LDFLAGS=""
+NSSI_LIBS="-lnssi_client -lnssi_support"
+NSSI_SERVER_LIBS="-lnssi_server -lnssi_support"
 
-    save_CPPFLAGS="$CPPFLAGS"
-    save_LIBS="$LIBS"
-    save_LDFLAGS="$LDFLAGS"
-    LIBS="$LIBS -llustreapi"
-    LDFLAGS="$LDFLAGS $LUSTRE_LDFLAGS"
-    CPPFLAGS="$CPPFLAGS $LUSTRE_CPPFLAGS"
-
-
-    # Check for the lustre library and headers
-
-    LIBS="$save_LIBS"
-    LDFLAGS="$save_LDFLAGS"
-    CPPFLAGS="$save_CPPFLAGS"
 
+# Check whether --with-nssi was given.
+if test "${with_nssi+set}" = set; then
+  withval=$with_nssi; NSSI_LDFLAGS="-L$withval/lib";
+         NSSI_CPPFLAGS="-I$withval/include";
+         ac_nssi_path=$withval
+fi
 
 
+if test x"$ac_nssi_ok" = xyes; then
+        save_CPPFLAGS="$CPPFLAGS"
+        CPPFLAGS="${CPPFLAGS} ${NSSI_CPPFLAGS}"
+        if test "${ac_cv_header_nssi_client_h+set}" = set; then
+  { $as_echo "$as_me:$LINENO: checking for nssi_client.h" >&5
+$as_echo_n "checking for nssi_client.h... " >&6; }
+if test "${ac_cv_header_nssi_client_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_nssi_client_h" >&5
+$as_echo "$ac_cv_header_nssi_client_h" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking nssi_client.h usability" >&5
+$as_echo_n "checking nssi_client.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <nssi_client.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_header_compiler=no
+fi
 
-    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-    if test -z "${HAVE_LUSTRE_TRUE}"; then
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LUSTRE 1
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking nssi_client.h presence" >&5
+$as_echo_n "checking nssi_client.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <nssi_client.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-            :
-    else
-
-            :
-    fi
+  ac_header_preproc=no
 fi
 
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-# Check whether --with-installed or --without-installed was given.
-if test "${with_installed+set}" = set; then
-  withval="$with_installed"
-  with_installed_specified=1
-fi;
-
-# Check whether --with-local or --without-local was given.
-if test "${with_local+set}" = set; then
-  withval="$with_local"
-  with_local_specified=1
-fi;
-# Extract the first word of "csh", so it can be a program name with args.
-set dummy csh; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_CSH+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $CSH in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_CSH="$CSH" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_CSH="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: nssi_client.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: nssi_client.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: nssi_client.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: nssi_client.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: nssi_client.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: nssi_client.h: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: nssi_client.h:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: nssi_client.h:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: nssi_client.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: nssi_client.h: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: nssi_client.h:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: nssi_client.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: nssi_client.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: nssi_client.h: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: nssi_client.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: nssi_client.h: in the future, the compiler will take precedence" >&2;}
 
-  ;;
+    ;;
 esac
+{ $as_echo "$as_me:$LINENO: checking for nssi_client.h" >&5
+$as_echo_n "checking for nssi_client.h... " >&6; }
+if test "${ac_cv_header_nssi_client_h+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_header_nssi_client_h=$ac_header_preproc
 fi
-CSH=$ac_cv_path_CSH
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_nssi_client_h" >&5
+$as_echo "$ac_cv_header_nssi_client_h" >&6; }
 
-if test -n "$CSH"; then
-  echo "$as_me:$LINENO: result: $CSH" >&5
-echo "${ECHO_T}$CSH" >&6
+fi
+if test "x$ac_cv_header_nssi_client_h" = x""yes; then
+  :
 else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+  ac_nssi_ok=no
 fi
 
 
+        CPPFLAGS="$save_CPPFLAGS"
+fi
 
+if test x"$ac_nssi_ok" = xyes; then
 
 
-CHAOS_HOMEDIR=""
-if test -n "$CSH"; then
-CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
-fi
-if test "$cross_compiling" = yes ; then
-  cpu=$host_cpu
-  vendor=$host_vendot
-  os=$host_os
-else
-  cpu=
-  vendor=
-  os=
-fi
-if test -x $CHAOS_HOMEDIR/bin/cercs_arch; then
-cercs_cv_archive=`$CHAOS_HOMEDIR/bin/cercs_arch "$cpu" "$vendor" "$os"`
+{ $as_echo "$as_me:$LINENO: checking for clock_gettime in -lrt" >&5
+$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
+if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-cercs_cv_archive=${cercs_cv_archive-`cercs_arch 2>/dev/null`} || cercs_cv_archive=""
-fi
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-# Extract the first word of "cygpath", so it can be a program name with args.
-set dummy cygpath; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_prog_PATHPROG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if test -n "$PATHPROG"; then
-  ac_cv_prog_PATHPROG="$PATHPROG" # Let the user override the test.
+/* 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 clock_gettime ();
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_cv_lib_rt_clock_gettime=yes
 else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_PATHPROG="cygpath -w"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-  test -z "$ac_cv_prog_PATHPROG" && ac_cv_prog_PATHPROG="echo"
-fi
-fi
-PATHPROG=$ac_cv_prog_PATHPROG
-if test -n "$PATHPROG"; then
-  echo "$as_me:$LINENO: result: $PATHPROG" >&5
-echo "${ECHO_T}$PATHPROG" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
+	ac_cv_lib_rt_clock_gettime=no
 fi
 
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_rt_clock_gettime" >&5
+$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
+if test "x$ac_cv_lib_rt_clock_gettime" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
 
+  LIBS="-lrt $LIBS"
 
+fi
 
 
 
 
-DT_SRCDIR=""
-DT_CPPFLAGS=""
-DT_LDFLAGS=""
-DT_LIBS=""
-
-datatap=disable
-
-temptest=enable
-
-datatap_dir=""
 
 
 
-# Check whether --with-datatap or --without-datatap was given.
-if test "${with_datatap+set}" = set; then
-  withval="$with_datatap"
-   ac_with_datatap=$withval
+for ac_func in clock_gettime gettimeofday fdatasync pthread_yield sched_yield
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-  with_datatap=no
-fi;
-
-if test "x$with_datatap" = "xno"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_DATATAP 1
-_ACEOF
-
-	datatap=disable
-	temptest=disable
-
-elif test x"$with_datatap" = xyes -o x"$with_datatap" = xcheck; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_DATATAP 0
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
 _ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $ac_func innocuous_$ac_func
 
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
 
-	if test x"$ac_with_infiniband" = xyes; then
-
-
-
-if test -z "$with_local_specified"; then
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
 
+#undef $ac_func
 
+/* 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 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
 
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+return $ac_func ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  eval "$as_ac_var=yes"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-# Check whether --with-ibpbio or --without-ibpbio was given.
-if test "${with_ibpbio+set}" = set; then
-  withval="$with_ibpbio"
-
-fi;
+	eval "$as_ac_var=no"
+fi
 
-if test -n "$with_ibpbio"; then
-unset cercs_cv_ibpbio_include_arg
-unset cercs_cv_ibpbio_link_arg
-if test `echo $with_ibpbio | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ibpbio=`pwd`/$with_ibpbio
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
 fi
-echo "$as_me:$LINENO: checking needed include args for ibpbio package" >&5
-echo $ECHO_N "checking needed include args for ibpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ibpbio_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+done
 
 
+        ac_nssi_ok=no
 
+                ac_nssi_flags="none"
+        if test x"$ac_with_portals" = xyes; then
+                ac_nssi_flags="$ac_nssi_flags all_portals portals_plus_libcpp portals_plus_pablo"
+        fi
+        if test x"$ac_with_infiniband" = xyes; then
+                ac_nssi_flags="$ac_nssi_flags infiniband"
+        fi
 
-cercs_tmp=""
-search_list="./thin_ib.h"
-CHAOS_HOMEDIR=""
-if test -n "$CSH"; then
-CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
-fi
-if test -n "$with_ibpbio"; then
-if test `echo $with_ibpbio | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ibpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+        for flag in $ac_nssi_flags; do
+
+                case $flag in
+                        none)
+                        { $as_echo "$as_me:$LINENO: checking whether nssi works without any additional flags" >&5
+$as_echo_n "checking whether nssi works without any additional flags... " >&6; }
+                        ;;
+
+                        -l*)
+                        { $as_echo "$as_me:$LINENO: checking whether nssi works with library $flag" >&5
+$as_echo_n "checking whether nssi works with library $flag... " >&6; }
+                        EXTRA_LIBS="$flag"
+                        ;;
+
+                        -*)
+                        { $as_echo "$as_me:$LINENO: checking whether nssi works with $flag" >&5
+$as_echo_n "checking whether nssi works with $flag... " >&6; }
+                        EXTRA_LIBS="$flag"
+                        ;;
+
+                        all_portals)
+                        { $as_echo "$as_me:$LINENO: checking whether nssi works with ${PORTALS_LIBS}" >&5
+$as_echo_n "checking whether nssi works with ${PORTALS_LIBS}... " >&6; }
+                        EXTRA_LIBS="${PORTALS_LIBS}"
+                        ;;
+
+                        portals_plus_libcpp)
+                        { $as_echo "$as_me:$LINENO: checking whether nssi works with ${PORTALS_LIBS}" >&5
+$as_echo_n "checking whether nssi works with ${PORTALS_LIBS}... " >&6; }
+                        EXTRA_LIBS="${PORTALS_LIBS}"
+                        ;;
+
+                        portals_plus_pablo)
+                        { $as_echo "$as_me:$LINENO: checking whether nssi works with ${PORTALS_LIBS} ${PABLO_LIBS}" >&5
+$as_echo_n "checking whether nssi works with ${PORTALS_LIBS} ${PABLO_LIBS}... " >&6; }
+                        EXTRA_LIBS="${PORTALS_LIBS} ${PABLO_LIBS}"
+                        ;;
+
+                        infiniband)
+                        { $as_echo "$as_me:$LINENO: checking whether nssi works with ${INFINIBAND_LIBS}" >&5
+$as_echo_n "checking whether nssi works with ${INFINIBAND_LIBS}... " >&6; }
+                        EXTRA_LIBS="${INFINIBAND_LIBS}"
+                        ;;
+                esac
+
+
+                save_LDFLAGS="$LDFLAGS"
+                save_LIBS="$LIBS"
+                save_CPPFLAGS="$CPPFLAGS"
+                save_CFLAGS="$CFLAGS"
+                LDFLAGS="$LDFLAGS $NSSI_LDFLAGS"
+                LIBS="$LIBS $NSSI_LIBS $EXTRA_LIBS"
+                CPPFLAGS="$CPPFLAGS $NSSI_CPPFLAGS"
+                CFLAGS="$CFLAGS $NSSI_CFLAGS $EXTRA_FLAGS"
+
+
+                                cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "nssi_client.h"
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+nssi_remote_pid server_id;
+                             uint64_t timeout;
+                             nssi_service svc;
+                             nssi_get_service(server_id, timeout, &svc);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 $as_test_x conftest$ac_exeext
+       }; then
+  ac_nssi_ok=yes;
 else
-EXPANDED=$with_ibpbio
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_nssi_ok=no;
 fi
 
-echo "Datatap = $datatap_dir"
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
 
-search_list="$datatap_dir/thin_ib.h $datatap_dir/lib/thin_ib.h $datatap_dir/include/thin_ib.h $search_list $EXPANDED/thin_ib.h $EXPANDED/include/thin_ib.h $EXPANDED/share/thin_ib.h $EXPANDED/$cercs_cv_archive/thin_ib.h $EXPANDED/$cercs_cv_archive/include/thin_ib.h $EXPANDED/ibpbio/thin_ib.h $EXPANDED/ibpbio/$cercs_cv_archive/thin_ib.h $EXPANDED/ibpbio/include/thin_ib.h $EXPANDED/ibpbio/include/$cercs_cv_archive/thin_ib.h"
-fi
-if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ibpbio/thin_ib.h `pwd`/../include/thin_ib.h `pwd`/../share/thin_ib.h"
-if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ibpbio/thin_ib.h $HOME/$cercs_cv_archive/include/thin_ib.h $HOME/include/thin_ib.h"
-fi
-fi
-if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ibpbio/include/thin_ib.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/thin_ib.h $CHAOS_HOMEDIR/ibpbio/$cercs_cv_archive/include/thin_ib.h $CHAOS_HOMEDIR/ibpbio/include/thin_ib.h $CHAOS_HOMEDIR/include/thin_ib.h"
-fi
-if test "$libdir" != '${exec_prefix}/lib'; then
-tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/thin_ib.h $search_list"
-fi
-if test "$exec_prefix" != "NONE"; then
-tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/thin_ib.h $search_list"
-fi
-if test "$includedir" != '${prefix}/include'; then
-tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/thin_ib.h $search_list"
-fi
-if test "$prefix" != "NONE"; then
-tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/include/thin_ib.h $search_list"
-fi
-if test "include" == "lib"; then
-  for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/thin_ib.h"
-  done
-fi
 
-search_list="$datatap_dir/thin_ib.h $datatap_dir/lib/thin_ib.h $datatap_dir/include/thin_ib.h $search_list /usr/include/thin_ib.h /usr/local/include/thin_ib.h /opt/ibpbio/include/thin_ib.h /opt/misc/include/thin_ib.h /opt/misc/include/$cercs_cv_archive/thin_ib.h"
-tmp_search_results=""
-echo "configure:28270: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:28274: first found $tmp_search_results " >&5
-	break
-   fi
-done
+                LDFLAGS="$save_LDFLAGS"
+                LIBS="$save_LIBS"
+                CFLAGS="$save_CFLAGS"
+                CPPFLAGS="$save_CPPFLAGS"
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
+                { $as_echo "$as_me:$LINENO: result: $ac_nssi_ok" >&5
+$as_echo "$ac_nssi_ok" >&6; }
+                if test "x$ac_nssi_ok" = xyes; then
+                        NSSI_LIBS="$NSSI_LIBS $EXTRA_LIBS";
+                        NSSI_SERVER_LIBS="$NSSI_SERVER_LIBS $EXTRA_LIBS"
+                        NSSI_CFLAGS="$NSSI_CFLAGS $EXTRA_CFLAGS";
+                        break;
+                fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_ib.h"; then
-cercs_cv_ibpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_ib.h##g"`
+                EXTRA_LIBS=""
+                EXTRA_CFLAGS=""
+        done
 fi
 
+ if test x$ac_nssi_ok = xyes; then
+  HAVE_NSSI_TRUE=
+  HAVE_NSSI_FALSE='#'
+else
+  HAVE_NSSI_TRUE='#'
+  HAVE_NSSI_FALSE=
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ibpbio_include_arg" >&6
-if test -n "$cercs_cv_ibpbio_include_arg"; then
-arg="$cercs_cv_ibpbio_include_arg"
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ibpbio"` -eq 0; then
-DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+
+
+
+
+
+
+
+
+
+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
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$ac_nssi_ok" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NSSI 1
+_ACEOF
+
+        :
 else
-DT_CPPFLAGS="$arg $DT_CPPFLAGS"
-fi
-fi
+
+        :
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ibpbio package" >&5
-echo $ECHO_N "checking needed link args for ibpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ibpbio_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
 
 
 
-cercs_tmp=""
-search_list="./libibclient.la"
-CHAOS_HOMEDIR=""
-if test -n "$CSH"; then
-CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
+
+
+
+ if true; then
+  HAVE_DATASPACES_TRUE=
+  HAVE_DATASPACES_FALSE='#'
+else
+  HAVE_DATASPACES_TRUE='#'
+  HAVE_DATASPACES_FALSE=
 fi
-if test -n "$with_ibpbio"; then
-if test `echo $with_ibpbio | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ibpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+
+
+
+# Check whether --with-dataspaces was given.
+if test "${with_dataspaces+set}" = set; then
+  withval=$with_dataspaces; DATASPACES_LDFLAGS="-L$withval/lib";
+         DATASPACES_CPPFLAGS="-I$withval/include";
 else
-EXPANDED=$with_ibpbio
+  with_dataspaces=check
 fi
 
-echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/libibclient.la $datatap_dir/lib/libibclient.la $datatap_dir/include/libibclient.la $search_list $EXPANDED/libibclient.la $EXPANDED/lib/libibclient.la $EXPANDED/share/libibclient.la $EXPANDED/$cercs_cv_archive/libibclient.la $EXPANDED/$cercs_cv_archive/lib/libibclient.la $EXPANDED/ibpbio/libibclient.la $EXPANDED/ibpbio/$cercs_cv_archive/libibclient.la $EXPANDED/ibpbio/lib/libibclient.la $EXPANDED/ibpbio/lib/$cercs_cv_archive/libibclient.la"
+if test "x$with_dataspaces" == "xno"; then
+
+    if false; then
+  HAVE_DATASPACES_TRUE=
+  HAVE_DATASPACES_FALSE='#'
+else
+  HAVE_DATASPACES_TRUE='#'
+  HAVE_DATASPACES_FALSE=
 fi
-if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ibpbio/libibclient.la `pwd`/../lib/libibclient.la `pwd`/../share/libibclient.la"
-if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ibpbio/libibclient.la $HOME/$cercs_cv_archive/lib/libibclient.la $HOME/lib/libibclient.la"
-fi
-fi
-if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ibpbio/lib/libibclient.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libibclient.la $CHAOS_HOMEDIR/ibpbio/$cercs_cv_archive/lib/libibclient.la $CHAOS_HOMEDIR/ibpbio/lib/libibclient.la $CHAOS_HOMEDIR/lib/libibclient.la"
-fi
-if test "$libdir" != '${exec_prefix}/lib'; then
-tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/libibclient.la $search_list"
-fi
-if test "$exec_prefix" != "NONE"; then
-tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libibclient.la $search_list"
-fi
-if test "$includedir" != '${prefix}/include'; then
-tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/libibclient.la $search_list"
-fi
-if test "$prefix" != "NONE"; then
-tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libibclient.la $search_list"
-fi
-if test "lib" == "lib"; then
-  for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/libibclient.la"
-  done
-fi
-
-search_list="$datatap_dir/libibclient.la $datatap_dir/lib/libibclient.la $datatap_dir/include/libibclient.la $search_list /usr/lib/libibclient.la /usr/local/lib/libibclient.la /opt/ibpbio/lib/libibclient.la /opt/misc/lib/libibclient.la /opt/misc/lib/$cercs_cv_archive/libibclient.la"
-tmp_search_results=""
-echo "configure:28362: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:28366: first found $tmp_search_results " >&5
-	break
-   fi
-done
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libibclient.la"; then
-cercs_cv_ibpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libibclient.la//g"`
 else
-cercs_cv_ibpbio_link_dir=""
-fi
 
-fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ibpbio_link_dir" >&6
-ld_arg="-L"
-new_flags=$LDFLAGS
-cercs_cv_ibpbio_link_arg=`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ibpbio_link_arg"; then
-arg=$cercs_cv_ibpbio_link_arg
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libibclient.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_ibpbio_link_dir/$root.la; then
-if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ibpbio_link_arg "`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/-R/1"`
-fi
-fi
-if test `echo $arg | grep -c "ibpbio"` -eq 0; then
-new_flags="$new_flags $arg"
-else
-new_flags="$arg $new_flags"
-fi
-fi
-DT_LDFLAGS=$new_flags
+# Check whether --with-dataspaces-incdir was given.
+if test "${with_dataspaces_incdir+set}" = set; then
+  withval=$with_dataspaces_incdir; DATASPACES_INCDIR=$withval
+                 with_dataspaces=detailed
 fi
 
 
-else
 
+# Check whether --with-dataspaces-libdir was given.
+if test "${with_dataspaces_libdir+set}" = set; then
+  withval=$with_dataspaces_libdir; DATASPACES_LIBDIR=$withval
+                 with_dataspaces=detailed
+fi
 
 
 
-# Check whether --with-ibpbio or --without-ibpbio was given.
-if test "${with_ibpbio+set}" = set; then
-  withval="$with_ibpbio"
+            if test -n "${DATASPACES_DIR}" -a -z "${DATASPACES_INCDIR}"; then
+            DATASPACES_INCDIR="${DATASPACES_DIR}/include";
+        elif test -n "${DATASPACES}" -a -d "${DATASPACES}"; then
+            DATASPACES_INCDIR="${DATASPACES}/include"
+    fi
 
-fi;
+            if test -n "${DATASPACES_DIR}" -a -z "${DATASPACES_LIBDIR}"; then
+            DATASPACES_LIBDIR="${DATASPACES_DIR}/lib";
+        elif test -n "${DATASPACES}" -a -d "${DATASPACES}"; then
+            DATASPACES_LIBDIR="${DATASPACES}/lib"
+    fi
 
-if test -n "$with_ibpbio"; then
-unset cercs_cv_ibpbio_include_arg
-unset cercs_cv_ibpbio_link_arg
-if test `echo $with_ibpbio | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ibpbio=`pwd`/$with_ibpbio
-fi
-fi
-echo "$as_me:$LINENO: checking needed include args for ibpbio package" >&5
-echo $ECHO_N "checking needed include args for ibpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ibpbio_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+        if test -n "${DATASPACES_INCDIR}"; then
+            DATASPACES_CPPFLAGS="-I${DATASPACES_INCDIR}"
+    else
+            ac_dataspaces_ok=no
+    fi
 
+        if test -n "${DATASPACES_LIBDIR}"; then
+            DATASPACES_LDFLAGS="-L${DATASPACES_LIBDIR}"
+    else
+            ac_dataspaces_ok=no
+    fi
 
-search_list="$PWD/../ibpbio $PWD/../../ibpbio $PWD/../../../ibpbio"
-tmp_search_results=""
-echo "configure:28435: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:28439: first found $tmp_search_results " >&5
-	break
-   fi
-done
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    if test "x${ac_infiniband_lib_ok}" == "xyes"; then
+                LIBS="$LIBS -ldspaces -ldscommon -ldart"
+    elif test "x${ac_portals_lib_ok}" == "xyes"; then
+        LIBS="$LIBS -ldart2 -lspaces"
+    else
+        LIBS="$LIBS -ldspaces -ldscommon -ldart"
+    fi
+        LDFLAGS="$LDFLAGS $DATASPACES_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $DATASPACES_CPPFLAGS"
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
+    if test -z "${HAVE_DATASPACES_TRUE}"; then
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_ib.h"; then
-cercs_cv_ibpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_ib.h##g"`
-fi
+for ac_header in dataspaces.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	ac_header_compiler=no
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ibpbio_include_arg" >&6
-if test -n "$cercs_cv_ibpbio_include_arg"; then
-arg="$cercs_cv_ibpbio_include_arg"
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ibpbio"` -eq 0; then
-DT_CPPFLAGS="$DT_CPPFLAGS $arg";
-else
-DT_CPPFLAGS="$arg $DT_CPPFLAGS"
-fi
-fi
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
 
-echo "$as_me:$LINENO: checking needed link args for ibpbio package" >&5
-echo $ECHO_N "checking needed link args for ibpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ibpbio_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
+fi
 
-search_list="$PWD/../ibpbio $PWD/../../ibpbio $PWD/../../../ibpbio"
-tmp_search_results=""
-echo "configure:28477: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:28481: first found $tmp_search_results " >&5
-	break
-   fi
-done
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libibclient.la"; then
-cercs_cv_ibpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libibclient.la//g"`
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-cercs_cv_ibpbio_link_dir=""
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ibpbio_link_dir" >&6
-ld_arg="-L"
-new_flags=$LDFLAGS
-cercs_cv_ibpbio_link_arg=`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ibpbio_link_arg"; then
-arg=$cercs_cv_ibpbio_link_arg
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libibclient.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_ibpbio_link_dir/$root.la; then
-if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ibpbio_link_arg "`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/-R/1"`
-fi
-fi
-if test `echo $arg | grep -c "ibpbio"` -eq 0; then
-new_flags="$new_flags $arg"
 else
-new_flags="$arg $new_flags"
-fi
-fi
-DT_LDFLAGS=$new_flags
+   if false; then
+  HAVE_DATASPACES_TRUE=
+  HAVE_DATASPACES_FALSE='#'
+else
+  HAVE_DATASPACES_TRUE='#'
+  HAVE_DATASPACES_FALSE=
 fi
 
-
 fi
 
+done
 
+    fi
 
+    if test -z "${HAVE_DATASPACES_TRUE}"; then
+        # Check for the DataSpaces library and headers
+        if test "x${ac_portals_lib_ok}" == "xyes"; then
+            cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "dataspaces.h"
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+int err; err = dspaces_init(1,1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  DATASPACES_LIBS="-ldart2 -lspaces"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-if test -z "$with_local_specified"; then
-
-
-
-
-# Check whether --with-ffs or --without-ffs was given.
-if test "${with_ffs+set}" = set; then
-  withval="$with_ffs"
-
-fi;
-
-if test -n "$with_ffs"; then
-unset cercs_cv_ffs_include_arg
-unset cercs_cv_ffs_link_arg
-if test `echo $with_ffs | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ffs=`pwd`/$with_ffs
-fi
-fi
-echo "$as_me:$LINENO: checking needed include args for ffs package" >&5
-echo $ECHO_N "checking needed include args for ffs package... $ECHO_C" >&6
-if test "${cercs_cv_ffs_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+	 if false; then
+  HAVE_DATASPACES_TRUE=
+  HAVE_DATASPACES_FALSE='#'
 else
+  HAVE_DATASPACES_TRUE='#'
+  HAVE_DATASPACES_FALSE=
+fi
 
+fi
 
-
-
-cercs_tmp=""
-search_list="./ffs.h"
-CHAOS_HOMEDIR=""
-if test -n "$CSH"; then
-CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
-fi
-if test -n "$with_ffs"; then
-if test `echo $with_ffs | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ffs" | csh -sf 2>/dev/null` || EXPANDED=""
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        elif test "x${ac_infiniband_lib_ok}" == "xyes"; then
+            cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "dataspaces.h"
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+int err; err = dspaces_init(1,1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  DATASPACES_LIBS="-ldspaces -ldscommon -ldart -lrdmacm"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	 if false; then
+  HAVE_DATASPACES_TRUE=
+  HAVE_DATASPACES_FALSE='#'
 else
-EXPANDED=$with_ffs
+  HAVE_DATASPACES_TRUE='#'
+  HAVE_DATASPACES_FALSE=
 fi
 
-echo "Datatap = $datatap_dir"
-
-search_list="$datatap_dir/ffs.h $datatap_dir/lib/ffs.h $datatap_dir/include/ffs.h $search_list $EXPANDED/ffs.h $EXPANDED/include/ffs.h $EXPANDED/share/ffs.h $EXPANDED/$cercs_cv_archive/ffs.h $EXPANDED/$cercs_cv_archive/include/ffs.h $EXPANDED/ffs/ffs.h $EXPANDED/ffs/$cercs_cv_archive/ffs.h $EXPANDED/ffs/include/ffs.h $EXPANDED/ffs/include/$cercs_cv_archive/ffs.h"
-fi
-if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ffs/ffs.h `pwd`/../include/ffs.h `pwd`/../share/ffs.h"
-if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ffs/ffs.h $HOME/$cercs_cv_archive/include/ffs.h $HOME/include/ffs.h"
-fi
-fi
-if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ffs/include/ffs.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/ffs.h $CHAOS_HOMEDIR/ffs/$cercs_cv_archive/include/ffs.h $CHAOS_HOMEDIR/ffs/include/ffs.h $CHAOS_HOMEDIR/include/ffs.h"
-fi
-if test "$libdir" != '${exec_prefix}/lib'; then
-tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/ffs.h $search_list"
-fi
-if test "$exec_prefix" != "NONE"; then
-tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/ffs.h $search_list"
-fi
-if test "$includedir" != '${prefix}/include'; then
-tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/ffs.h $search_list"
-fi
-if test "$prefix" != "NONE"; then
-tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/include/ffs.h $search_list"
-fi
-if test "include" == "lib"; then
-  for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/ffs.h"
-  done
 fi
 
-search_list="$datatap_dir/ffs.h $datatap_dir/lib/ffs.h $datatap_dir/include/ffs.h $search_list /usr/include/ffs.h /usr/local/include/ffs.h /opt/ffs/include/ffs.h /opt/misc/include/ffs.h /opt/misc/include/$cercs_cv_archive/ffs.h"
-tmp_search_results=""
-echo "configure:28605: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:28609: first found $tmp_search_results " >&5
-	break
-   fi
-done
-
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        elif test -z "${HAVE_CRAY_PMI_TRUE}" -a -z "${HAVE_CRAY_UGNI_TRUE}"; then
+            cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "dataspaces.h"
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+int err; err = dspaces_init(1,1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  DATASPACES_LIBS="-ldspaces -ldscommon -ldart"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/ffs.h"; then
-cercs_cv_ffs_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.ffs.h##g"`
+	 if false; then
+  HAVE_DATASPACES_TRUE=
+  HAVE_DATASPACES_FALSE='#'
+else
+  HAVE_DATASPACES_TRUE='#'
+  HAVE_DATASPACES_FALSE=
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ffs_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ffs_include_arg" >&6
-if test -n "$cercs_cv_ffs_include_arg"; then
-arg="$cercs_cv_ffs_include_arg"
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ffs"` -eq 0; then
-DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+        else
+             if false; then
+  HAVE_DATASPACES_TRUE=
+  HAVE_DATASPACES_FALSE='#'
 else
-DT_CPPFLAGS="$arg $DT_CPPFLAGS"
-fi
-fi
+  HAVE_DATASPACES_TRUE='#'
+  HAVE_DATASPACES_FALSE=
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ffs package" >&5
-echo $ECHO_N "checking needed link args for ffs package... $ECHO_C" >&6
-if test "${cercs_cv_ffs_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+        fi
+    fi
+
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
 
 
 
 
-cercs_tmp=""
-search_list="./libffs.la"
-CHAOS_HOMEDIR=""
-if test -n "$CSH"; then
-CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
-fi
-if test -n "$with_ffs"; then
-if test `echo $with_ffs | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ffs" | csh -sf 2>/dev/null` || EXPANDED=""
-else
-EXPANDED=$with_ffs
-fi
 
-echo "Datatap = $datatap_dir"
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_DATASPACES_TRUE}"; then
 
-search_list="$datatap_dir/libffs.la $datatap_dir/lib/libffs.la $datatap_dir/include/libffs.la $search_list $EXPANDED/libffs.la $EXPANDED/lib/libffs.la $EXPANDED/share/libffs.la $EXPANDED/$cercs_cv_archive/libffs.la $EXPANDED/$cercs_cv_archive/lib/libffs.la $EXPANDED/ffs/libffs.la $EXPANDED/ffs/$cercs_cv_archive/libffs.la $EXPANDED/ffs/lib/libffs.la $EXPANDED/ffs/lib/$cercs_cv_archive/libffs.la"
-fi
-if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ffs/libffs.la `pwd`/../lib/libffs.la `pwd`/../share/libffs.la"
-if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ffs/libffs.la $HOME/$cercs_cv_archive/lib/libffs.la $HOME/lib/libffs.la"
-fi
-fi
-if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ffs/lib/libffs.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libffs.la $CHAOS_HOMEDIR/ffs/$cercs_cv_archive/lib/libffs.la $CHAOS_HOMEDIR/ffs/lib/libffs.la $CHAOS_HOMEDIR/lib/libffs.la"
-fi
-if test "$libdir" != '${exec_prefix}/lib'; then
-tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/libffs.la $search_list"
-fi
-if test "$exec_prefix" != "NONE"; then
-tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libffs.la $search_list"
-fi
-if test "$includedir" != '${prefix}/include'; then
-tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/libffs.la $search_list"
-fi
-if test "$prefix" != "NONE"; then
-tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libffs.la $search_list"
-fi
-if test "lib" == "lib"; then
-  for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/libffs.la"
-  done
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DATASPACES 1
+_ACEOF
 
-search_list="$datatap_dir/libffs.la $datatap_dir/lib/libffs.la $datatap_dir/include/libffs.la $search_list /usr/lib/libffs.la /usr/local/lib/libffs.la /opt/ffs/lib/libffs.la /opt/misc/lib/libffs.la /opt/misc/lib/$cercs_cv_archive/libffs.la"
-tmp_search_results=""
-echo "configure:28697: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:28701: first found $tmp_search_results " >&5
-	break
-   fi
-done
+            :
+    else
+
+            :
+    fi
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libffs.la"; then
-cercs_cv_ffs_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libffs.la//g"`
+
+
+ if true; then
+  HAVE_DIMES_TRUE=
+  HAVE_DIMES_FALSE='#'
 else
-cercs_cv_ffs_link_dir=""
+  HAVE_DIMES_TRUE='#'
+  HAVE_DIMES_FALSE=
 fi
 
-fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ffs_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ffs_link_dir" >&6
-ld_arg="-L"
-new_flags=$LDFLAGS
-cercs_cv_ffs_link_arg=`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ffs_link_arg"; then
-arg=$cercs_cv_ffs_link_arg
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libffs.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_ffs_link_dir/$root.la; then
-if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ffs_link_arg "`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/-R/1"`
-fi
-fi
-if test `echo $arg | grep -c "ffs"` -eq 0; then
-new_flags="$new_flags $arg"
+
+# Check whether --with-dimes was given.
+if test "${with_dimes+set}" = set; then
+  withval=$with_dimes; DIMES_LDFLAGS="-L$withval/lib";
+         DIMES_CPPFLAGS="-I$withval/include";
 else
-new_flags="$arg $new_flags"
-fi
-fi
-DT_LDFLAGS=$new_flags
+  with_dimes=check
 fi
 
 
+if test "x$with_dimes" == "xno"; then
+
+    if false; then
+  HAVE_DIMES_TRUE=
+  HAVE_DIMES_FALSE='#'
 else
+  HAVE_DIMES_TRUE='#'
+  HAVE_DIMES_FALSE=
+fi
 
 
+else
 
 
-# Check whether --with-ffs or --without-ffs was given.
-if test "${with_ffs+set}" = set; then
-  withval="$with_ffs"
+# Check whether --with-dimes-incdir was given.
+if test "${with_dimes_incdir+set}" = set; then
+  withval=$with_dimes_incdir; DIMES_INCDIR=$withval
+                 with_dimes=detailed
+fi
 
-fi;
 
-if test -n "$with_ffs"; then
-unset cercs_cv_ffs_include_arg
-unset cercs_cv_ffs_link_arg
-if test `echo $with_ffs | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ffs=`pwd`/$with_ffs
-fi
+
+# Check whether --with-dimes-libdir was given.
+if test "${with_dimes_libdir+set}" = set; then
+  withval=$with_dimes_libdir; DIMES_LIBDIR=$withval
+                 with_dimes=detailed
 fi
-echo "$as_me:$LINENO: checking needed include args for ffs package" >&5
-echo $ECHO_N "checking needed include args for ffs package... $ECHO_C" >&6
-if test "${cercs_cv_ffs_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
 
-search_list="$PWD/../ffs $PWD/../../ffs $PWD/../../../ffs"
-tmp_search_results=""
-echo "configure:28770: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:28774: first found $tmp_search_results " >&5
-	break
-   fi
-done
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
+            if test -n "${DIMES_DIR}" -a -z "${DIMES_INCDIR}"; then
+            DIMES_INCDIR="${DIMES_DIR}/include";
+        elif test -n "${DIMES}" -a -d "${DIMES}"; then
+            DIMES_INCDIR="${DIMES}/include"
+    fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/ffs.h"; then
-cercs_cv_ffs_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.ffs.h##g"`
-fi
+            if test -n "${DIMES_DIR}" -a -z "${DIMES_LIBDIR}"; then
+            DIMES_LIBDIR="${DIMES_DIR}/lib";
+        elif test -n "${DIMES}" -a -d "${DIMES}"; then
+            DIMES_LIBDIR="${DIMES}/lib"
+    fi
 
-fi
+        if test -n "${DIMES_INCDIR}"; then
+            DIMES_CPPFLAGS="-I${DIMES_INCDIR}"
+    else
+            ac_dimes_ok=no
+    fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ffs_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ffs_include_arg" >&6
-if test -n "$cercs_cv_ffs_include_arg"; then
-arg="$cercs_cv_ffs_include_arg"
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ffs"` -eq 0; then
-DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+        if test -n "${DIMES_LIBDIR}"; then
+            DIMES_LDFLAGS="-L${DIMES_LIBDIR}"
+    else
+            ac_dimes_ok=no
+    fi
+
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    LIBS="$LIBS -ldimes_portals -lspaces"
+    LDFLAGS="$LDFLAGS $DIMES_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $DIMES_CPPFLAGS"
+
+    if test -z "${HAVE_DIMES_TRUE}"; then
+
+for ac_header in dimes.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 else
-DT_CPPFLAGS="$arg $DT_CPPFLAGS"
-fi
-fi
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ffs package" >&5
-echo $ECHO_N "checking needed link args for ffs package... $ECHO_C" >&6
-if test "${cercs_cv_ffs_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+  ac_header_preproc=no
+fi
 
-search_list="$PWD/../ffs $PWD/../../ffs $PWD/../../../ffs"
-tmp_search_results=""
-echo "configure:28812: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:28816: first found $tmp_search_results " >&5
-	break
-   fi
-done
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libffs.la"; then
-cercs_cv_ffs_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libffs.la//g"`
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
 else
-cercs_cv_ffs_link_dir=""
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
 
 fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-echo "$as_me:$LINENO: result: $cercs_cv_ffs_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ffs_link_dir" >&6
-ld_arg="-L"
-new_flags=$LDFLAGS
-cercs_cv_ffs_link_arg=`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ffs_link_arg"; then
-arg=$cercs_cv_ffs_link_arg
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libffs.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_ffs_link_dir/$root.la; then
-if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ffs_link_arg "`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/-R/1"`
-fi
-fi
-if test `echo $arg | grep -c "ffs"` -eq 0; then
-new_flags="$new_flags $arg"
 else
-new_flags="$arg $new_flags"
-fi
+   if false; then
+  HAVE_DIMES_TRUE=
+  HAVE_DIMES_FALSE='#'
+else
+  HAVE_DIMES_TRUE='#'
+  HAVE_DIMES_FALSE=
 fi
-DT_LDFLAGS=$new_flags
+
 fi
 
+done
 
-fi
+    fi
 
+    # Check for the Mini-XML library and headers
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "dimes.h"
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+int err; err = dimes_init(1,1,1);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  DIMES_LIBS="-ldimes_portals -lspaces"
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
+	 if false; then
+  HAVE_DIMES_TRUE=
+  HAVE_DIMES_FALSE='#'
+else
+  HAVE_DIMES_TRUE='#'
+  HAVE_DIMES_FALSE=
+fi
 
+fi
 
-if test -z "$with_local_specified"; then
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
 
 
 
-# Check whether --with-gen_thread or --without-gen_thread was given.
-if test "${with_gen_thread+set}" = set; then
-  withval="$with_gen_thread"
 
-fi;
 
-if test -n "$with_gen_thread"; then
-unset cercs_cv_gen_thread_include_arg
-unset cercs_cv_gen_thread_link_arg
-if test `echo $with_gen_thread | sed 's/\(.\).*/\1/g'` != "/"; then
-with_gen_thread=`pwd`/$with_gen_thread
-fi
-fi
-echo "$as_me:$LINENO: checking needed include args for gen_thread package" >&5
-echo $ECHO_N "checking needed include args for gen_thread package... $ECHO_C" >&6
-if test "${cercs_cv_gen_thread_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_DIMES_TRUE}"; then
 
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DIMES 1
+_ACEOF
 
+            :
+    else
 
+            :
+    fi
 
-cercs_tmp=""
-search_list="./gen_thread.h"
-CHAOS_HOMEDIR=""
-if test -n "$CSH"; then
-CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_gen_thread"; then
-if test `echo $with_gen_thread | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_gen_thread" | csh -sf 2>/dev/null` || EXPANDED=""
+
+
+
+ if true; then
+  HAVE_DMALLOC_TRUE=
+  HAVE_DMALLOC_FALSE='#'
 else
-EXPANDED=$with_gen_thread
+  HAVE_DMALLOC_TRUE='#'
+  HAVE_DMALLOC_FALSE=
 fi
 
-echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/gen_thread.h $datatap_dir/lib/gen_thread.h $datatap_dir/include/gen_thread.h $search_list $EXPANDED/gen_thread.h $EXPANDED/include/gen_thread.h $EXPANDED/share/gen_thread.h $EXPANDED/$cercs_cv_archive/gen_thread.h $EXPANDED/$cercs_cv_archive/include/gen_thread.h $EXPANDED/gen_thread/gen_thread.h $EXPANDED/gen_thread/$cercs_cv_archive/gen_thread.h $EXPANDED/gen_thread/include/gen_thread.h $EXPANDED/gen_thread/include/$cercs_cv_archive/gen_thread.h"
-fi
-if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../gen_thread/gen_thread.h `pwd`/../include/gen_thread.h `pwd`/../share/gen_thread.h"
-if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/gen_thread/gen_thread.h $HOME/$cercs_cv_archive/include/gen_thread.h $HOME/include/gen_thread.h"
-fi
-fi
-if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/gen_thread/include/gen_thread.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/gen_thread.h $CHAOS_HOMEDIR/gen_thread/$cercs_cv_archive/include/gen_thread.h $CHAOS_HOMEDIR/gen_thread/include/gen_thread.h $CHAOS_HOMEDIR/include/gen_thread.h"
-fi
-if test "$libdir" != '${exec_prefix}/lib'; then
-tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/gen_thread.h $search_list"
-fi
-if test "$exec_prefix" != "NONE"; then
-tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/gen_thread.h $search_list"
-fi
-if test "$includedir" != '${prefix}/include'; then
-tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/gen_thread.h $search_list"
-fi
-if test "$prefix" != "NONE"; then
-tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/include/gen_thread.h $search_list"
-fi
-if test "include" == "lib"; then
-  for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/gen_thread.h"
-  done
+
+# Check whether --with-dmalloc was given.
+if test "${with_dmalloc+set}" = set; then
+  withval=$with_dmalloc; DMALLOC_LDFLAGS="-L$withval/lib";
+         DMALLOC_CPPFLAGS="-I$withval/include";
+else
+  with_dmalloc=no
 fi
 
-search_list="$datatap_dir/gen_thread.h $datatap_dir/lib/gen_thread.h $datatap_dir/include/gen_thread.h $search_list /usr/include/gen_thread.h /usr/local/include/gen_thread.h /opt/gen_thread/include/gen_thread.h /opt/misc/include/gen_thread.h /opt/misc/include/$cercs_cv_archive/gen_thread.h"
-tmp_search_results=""
-echo "configure:28940: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:28944: first found $tmp_search_results " >&5
-	break
-   fi
-done
-
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
-
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/gen_thread.h"; then
-cercs_cv_gen_thread_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.gen_thread.h##g"`
-fi
 
-fi
+if test "x$with_dmalloc" == "xno"; then
 
-echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_gen_thread_include_arg" >&6
-if test -n "$cercs_cv_gen_thread_include_arg"; then
-arg="$cercs_cv_gen_thread_include_arg"
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "gen_thread"` -eq 0; then
-DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+     if false; then
+  HAVE_DMALLOC_TRUE=
+  HAVE_DMALLOC_FALSE='#'
 else
-DT_CPPFLAGS="$arg $DT_CPPFLAGS"
-fi
-fi
+  HAVE_DMALLOC_TRUE='#'
+  HAVE_DMALLOC_FALSE=
 fi
 
-echo "$as_me:$LINENO: checking needed link args for gen_thread package" >&5
-echo $ECHO_N "checking needed link args for gen_thread package... $ECHO_C" >&6
-if test "${cercs_cv_gen_thread_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
 else
 
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    LIBS="$LIBS -ldmalloc"
+    LDFLAGS="$LDFLAGS $DMALLOC_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $DMALLOC_CPPFLAGS"
 
+    if test -z "${HAVE_DMALLOC_TRUE}"; then
 
+for ac_header in dmalloc.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-cercs_tmp=""
-search_list="./libgen_thread.la"
-CHAOS_HOMEDIR=""
-if test -n "$CSH"; then
-CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
+	ac_header_compiler=no
 fi
-if test -n "$with_gen_thread"; then
-if test `echo $with_gen_thread | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_gen_thread" | csh -sf 2>/dev/null` || EXPANDED=""
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
 else
-EXPANDED=$with_gen_thread
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
 fi
 
-echo "Datatap = $datatap_dir"
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
 
-search_list="$datatap_dir/libgen_thread.la $datatap_dir/lib/libgen_thread.la $datatap_dir/include/libgen_thread.la $search_list $EXPANDED/libgen_thread.la $EXPANDED/lib/libgen_thread.la $EXPANDED/share/libgen_thread.la $EXPANDED/$cercs_cv_archive/libgen_thread.la $EXPANDED/$cercs_cv_archive/lib/libgen_thread.la $EXPANDED/gen_thread/libgen_thread.la $EXPANDED/gen_thread/$cercs_cv_archive/libgen_thread.la $EXPANDED/gen_thread/lib/libgen_thread.la $EXPANDED/gen_thread/lib/$cercs_cv_archive/ [...]
-fi
-if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../gen_thread/libgen_thread.la `pwd`/../lib/libgen_thread.la `pwd`/../share/libgen_thread.la"
-if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/gen_thread/libgen_thread.la $HOME/$cercs_cv_archive/lib/libgen_thread.la $HOME/lib/libgen_thread.la"
-fi
-fi
-if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/gen_thread/lib/libgen_thread.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libgen_thread.la $CHAOS_HOMEDIR/gen_thread/$cercs_cv_archive/lib/libgen_thread.la $CHAOS_HOMEDIR/gen_thread/lib/libgen_thread.la $CHAOS_HOMEDIR/lib/libgen_thread.la"
-fi
-if test "$libdir" != '${exec_prefix}/lib'; then
-tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/libgen_thread.la $search_list"
-fi
-if test "$exec_prefix" != "NONE"; then
-tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libgen_thread.la $search_list"
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  $as_echo_n "(cached) " >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
 fi
-if test "$includedir" != '${prefix}/include'; then
-tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/libgen_thread.la $search_list"
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+	       { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
 fi
-if test "$prefix" != "NONE"; then
-tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libgen_thread.la $search_list"
+as_val=`eval 'as_val=${'$as_ac_Header'}
+		 $as_echo "$as_val"'`
+   if test "x$as_val" = x""yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+   if false; then
+  HAVE_DMALLOC_TRUE=
+  HAVE_DMALLOC_FALSE='#'
+else
+  HAVE_DMALLOC_TRUE='#'
+  HAVE_DMALLOC_FALSE=
 fi
-if test "lib" == "lib"; then
-  for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/libgen_thread.la"
-  done
+
 fi
 
-search_list="$datatap_dir/libgen_thread.la $datatap_dir/lib/libgen_thread.la $datatap_dir/include/libgen_thread.la $search_list /usr/lib/libgen_thread.la /usr/local/lib/libgen_thread.la /opt/gen_thread/lib/libgen_thread.la /opt/misc/lib/libgen_thread.la /opt/misc/lib/$cercs_cv_archive/libgen_thread.la"
-tmp_search_results=""
-echo "configure:29032: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:29036: first found $tmp_search_results " >&5
-	break
-   fi
 done
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
+    fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libgen_thread.la"; then
-cercs_cv_gen_thread_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libgen_thread.la//g"`
+    # Check for the dmalloc library and headers
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include "dmalloc.h"
+#ifdef FC_DUMMY_MAIN
+#ifndef FC_DUMMY_MAIN_EQ_F77
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int FC_DUMMY_MAIN() { return 1; }
+#endif
+#endif
+int
+main ()
+{
+char * s; s=malloc(sizeof(char)*10); free(s);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  DMALLOC_LIBS="-ldmallocth"
 else
-cercs_cv_gen_thread_link_dir=""
-fi
-
-fi
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_gen_thread_link_dir" >&6
-ld_arg="-L"
-new_flags=$LDFLAGS
-cercs_cv_gen_thread_link_arg=`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_gen_thread_link_arg"; then
-arg=$cercs_cv_gen_thread_link_arg
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libgen_thread.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_gen_thread_link_dir/$root.la; then
-if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_gen_thread_link_arg "`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/-R/1"`
-fi
-fi
-if test `echo $arg | grep -c "gen_thread"` -eq 0; then
-new_flags="$new_flags $arg"
+	 if false; then
+  HAVE_DMALLOC_TRUE=
+  HAVE_DMALLOC_FALSE='#'
 else
-new_flags="$arg $new_flags"
-fi
+  HAVE_DMALLOC_TRUE='#'
+  HAVE_DMALLOC_FALSE=
 fi
-DT_LDFLAGS=$new_flags
+
 fi
 
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
-else
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
 
 
 
 
-# Check whether --with-gen_thread or --without-gen_thread was given.
-if test "${with_gen_thread+set}" = set; then
-  withval="$with_gen_thread"
 
-fi;
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_DMALLOC_TRUE}"; then
 
-if test -n "$with_gen_thread"; then
-unset cercs_cv_gen_thread_include_arg
-unset cercs_cv_gen_thread_link_arg
-if test `echo $with_gen_thread | sed 's/\(.\).*/\1/g'` != "/"; then
-with_gen_thread=`pwd`/$with_gen_thread
-fi
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DMALLOC 1
+_ACEOF
+
+            :
+    else
+
+            :
+    fi
 fi
-echo "$as_me:$LINENO: checking needed include args for gen_thread package" >&5
-echo $ECHO_N "checking needed include args for gen_thread package... $ECHO_C" >&6
-if test "${cercs_cv_gen_thread_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
 
 
-search_list="$PWD/../gen_thread $PWD/../../gen_thread $PWD/../../../gen_thread"
-tmp_search_results=""
-echo "configure:29105: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:29109: first found $tmp_search_results " >&5
-	break
-   fi
-done
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
-fi
+{ $as_echo "$as_me:$LINENO: === checking for Lustre ===" >&5
+$as_echo "$as_me: === checking for Lustre ===" >&6;}
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/gen_thread.h"; then
-cercs_cv_gen_thread_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.gen_thread.h##g"`
+ if true; then
+  HAVE_LUSTRE_TRUE=
+  HAVE_LUSTRE_FALSE='#'
+else
+  HAVE_LUSTRE_TRUE='#'
+  HAVE_LUSTRE_FALSE=
 fi
 
-fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_gen_thread_include_arg" >&6
-if test -n "$cercs_cv_gen_thread_include_arg"; then
-arg="$cercs_cv_gen_thread_include_arg"
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "gen_thread"` -eq 0; then
-DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+
+# Check whether --with-lustre was given.
+if test "${with_lustre+set}" = set; then
+  withval=$with_lustre; LUSTRE_LDFLAGS="-L$withval/lib";
+         LUSTRE_LIBS="-llustreapi";
+         LUSTRE_CPPFLAGS="-I$withval/include";
 else
-DT_CPPFLAGS="$arg $DT_CPPFLAGS"
-fi
+  with_lustre=no
 fi
+
+
+if test "x$with_lustre" == "xno"; then
+
+    if false; then
+  HAVE_LUSTRE_TRUE=
+  HAVE_LUSTRE_FALSE='#'
+else
+  HAVE_LUSTRE_TRUE='#'
+  HAVE_LUSTRE_FALSE=
 fi
 
-echo "$as_me:$LINENO: checking needed link args for gen_thread package" >&5
-echo $ECHO_N "checking needed link args for gen_thread package... $ECHO_C" >&6
-if test "${cercs_cv_gen_thread_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+
 else
 
+    save_CPPFLAGS="$CPPFLAGS"
+    save_LIBS="$LIBS"
+    save_LDFLAGS="$LDFLAGS"
+    LIBS="$LIBS -llustreapi"
+    LDFLAGS="$LDFLAGS $LUSTRE_LDFLAGS"
+    CPPFLAGS="$CPPFLAGS $LUSTRE_CPPFLAGS"
 
-search_list="$PWD/../gen_thread $PWD/../../gen_thread $PWD/../../../gen_thread"
-tmp_search_results=""
-echo "configure:29147: searching for $search_list " >&5
-for tmp_search_value in $search_list; do
-   if test -r $tmp_search_value; then
-	tmp_search_results=$tmp_search_value
-	echo "configure:29151: first found $tmp_search_results " >&5
-	break
-   fi
-done
 
-if test -n "$tmp_search_results"; then
-cercs_tmp=$tmp_search_results
+    # Check for the lustre library and headers
+
+    LIBS="$save_LIBS"
+    LDFLAGS="$save_LDFLAGS"
+    CPPFLAGS="$save_CPPFLAGS"
+
+
+
+
+
+    # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+    if test -z "${HAVE_LUSTRE_TRUE}"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LUSTRE 1
+_ACEOF
+
+            :
+    else
+
+            :
+    fi
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libgen_thread.la"; then
-cercs_cv_gen_thread_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libgen_thread.la//g"`
-else
-cercs_cv_gen_thread_link_dir=""
+
+# Check whether --with-installed was given.
+if test "${with_installed+set}" = set; then
+  withval=$with_installed; with_installed_specified=1
 fi
 
+
+# Check whether --with-local was given.
+if test "${with_local+set}" = set; then
+  withval=$with_local; with_local_specified=1
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_gen_thread_link_dir" >&6
-ld_arg="-L"
-new_flags=$LDFLAGS
-cercs_cv_gen_thread_link_arg=`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_gen_thread_link_arg"; then
-arg=$cercs_cv_gen_thread_link_arg
-no_dash_arg=`echo $arg | sed 's/^-//g'`
-if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libgen_thread.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_gen_thread_link_dir/$root.la; then
-if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_gen_thread_link_arg "`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/-R/1"`
+# Extract the first word of "csh", so it can be a program name with args.
+set dummy csh; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_CSH+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  case $CSH in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_CSH="$CSH" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_CSH="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  ;;
+esac
 fi
+CSH=$ac_cv_path_CSH
+if test -n "$CSH"; then
+  { $as_echo "$as_me:$LINENO: result: $CSH" >&5
+$as_echo "$CSH" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
-if test `echo $arg | grep -c "gen_thread"` -eq 0; then
-new_flags="$new_flags $arg"
+
+
+
+
+
+
+CHAOS_HOMEDIR=""
+if test -n "$CSH"; then
+CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
+fi
+if test "$cross_compiling" = yes ; then
+  cpu=$host_cpu
+  vendor=$host_vendot
+  os=$host_os
 else
-new_flags="$arg $new_flags"
+  cpu=
+  vendor=
+  os=
 fi
+if test -x $CHAOS_HOMEDIR/bin/cercs_arch; then
+cercs_cv_archive=`$CHAOS_HOMEDIR/bin/cercs_arch "$cpu" "$vendor" "$os"`
+else
+cercs_cv_archive=${cercs_cv_archive-`cercs_arch 2>/dev/null`} || cercs_cv_archive=""
 fi
-DT_LDFLAGS=$new_flags
+
+# Extract the first word of "cygpath", so it can be a program name with args.
+set dummy cygpath; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PATHPROG+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$PATHPROG"; then
+  ac_cv_prog_PATHPROG="$PATHPROG" # 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_PATHPROG="cygpath -w"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_prog_PATHPROG" && ac_cv_prog_PATHPROG="echo"
+fi
+fi
+PATHPROG=$ac_cv_prog_PATHPROG
+if test -n "$PATHPROG"; then
+  { $as_echo "$as_me:$LINENO: result: $PATHPROG" >&5
+$as_echo "$PATHPROG" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
 fi
 
 
+
+
+
+
+
+
+DT_SRCDIR=""
+DT_CPPFLAGS=""
+DT_LDFLAGS=""
+DT_LIBS=""
+
+datatap=disable
+
+temptest=enable
+
+datatap_dir=""
+
+
+
+# Check whether --with-datatap was given.
+if test "${with_datatap+set}" = set; then
+  withval=$with_datatap;  ac_with_datatap=$withval
+else
+  with_datatap=no
 fi
 
-		if test -n "$cercs_cv_ibpbio_link_dir";then
-			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ibpbio_link_dir"
-			DT_LIBS="$DT_LIBS -libclient"
-			datatap=ibverbs
-		else
-			temptest=disable
-		fi
-		if test -n "$cercs_cv_ffs_link_dir";then
-                   	DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ffs_link_dir"
-			DT_LIBS="$DT_LIBS -lgen_thread"
-			datatap=ibverbs
-		else
-			temptest=disable
-		fi
-		if test -n "$cercs_cv_gen_thread_link_dir";then
-			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_gen_thread_link_dir"
-			DT_LIBS="$DT_LIBS -lgen_thread"
-			datatap=ibverbs
-		else
-			temptest=disable
-		fi
 
-        elif test x"$ac_with_portals" = xyes; then
+if test "x$with_datatap" = "xno"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DATATAP 1
+_ACEOF
+
+	datatap=disable
+	temptest=disable
+
+elif test x"$with_datatap" = xyes -o x"$with_datatap" = xcheck; then
+
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DATATAP 0
+_ACEOF
+
+
+	if test x"$ac_with_infiniband" = xyes; then
 
 
 
@@ -29223,83 +28739,83 @@ if test -z "$with_local_specified"; then
 
 
 
-# Check whether --with-ptlpbio or --without-ptlpbio was given.
-if test "${with_ptlpbio+set}" = set; then
-  withval="$with_ptlpbio"
+# Check whether --with-ibpbio was given.
+if test "${with_ibpbio+set}" = set; then
+  withval=$with_ibpbio;
+fi
 
-fi;
 
-if test -n "$with_ptlpbio"; then
-unset cercs_cv_ptlpbio_include_arg
-unset cercs_cv_ptlpbio_link_arg
-if test `echo $with_ptlpbio | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ptlpbio=`pwd`/$with_ptlpbio
+if test -n "$with_ibpbio"; then
+unset cercs_cv_ibpbio_include_arg
+unset cercs_cv_ibpbio_link_arg
+if test `echo $with_ibpbio | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ibpbio=`pwd`/$with_ibpbio
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for ptlpbio package" >&5
-echo $ECHO_N "checking needed include args for ptlpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ptlpbio_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for ibpbio package" >&5
+$as_echo_n "checking needed include args for ibpbio package... " >&6; }
+if test "${cercs_cv_ibpbio_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./thin_portal.h"
+search_list="./thin_ib.h"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_ptlpbio"; then
-if test `echo $with_ptlpbio | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ptlpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_ibpbio"; then
+if test `echo $with_ibpbio | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ibpbio" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_ptlpbio
+EXPANDED=$with_ibpbio
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/thin_portal.h $datatap_dir/lib/thin_portal.h $datatap_dir/include/thin_portal.h $search_list $EXPANDED/thin_portal.h $EXPANDED/include/thin_portal.h $EXPANDED/share/thin_portal.h $EXPANDED/$cercs_cv_archive/thin_portal.h $EXPANDED/$cercs_cv_archive/include/thin_portal.h $EXPANDED/ptlpbio/thin_portal.h $EXPANDED/ptlpbio/$cercs_cv_archive/thin_portal.h $EXPANDED/ptlpbio/include/thin_portal.h $EXPANDED/ptlpbio/include/$cercs_cv_archive/thin_portal.h"
+search_list="$datatap_dir/thin_ib.h $datatap_dir/lib/thin_ib.h $datatap_dir/include/thin_ib.h $search_list $EXPANDED/thin_ib.h $EXPANDED/include/thin_ib.h $EXPANDED/share/thin_ib.h $EXPANDED/$cercs_cv_archive/thin_ib.h $EXPANDED/$cercs_cv_archive/include/thin_ib.h $EXPANDED/ibpbio/thin_ib.h $EXPANDED/ibpbio/$cercs_cv_archive/thin_ib.h $EXPANDED/ibpbio/include/thin_ib.h $EXPANDED/ibpbio/include/$cercs_cv_archive/thin_ib.h"
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ptlpbio/thin_portal.h `pwd`/../include/thin_portal.h `pwd`/../share/thin_portal.h"
+search_list="$search_list `pwd`/../ibpbio/thin_ib.h `pwd`/../include/thin_ib.h `pwd`/../share/thin_ib.h"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ptlpbio/thin_portal.h $HOME/$cercs_cv_archive/include/thin_portal.h $HOME/include/thin_portal.h"
+search_list="$search_list $HOME/ibpbio/thin_ib.h $HOME/$cercs_cv_archive/include/thin_ib.h $HOME/include/thin_ib.h"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ptlpbio/include/thin_portal.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/thin_portal.h $CHAOS_HOMEDIR/ptlpbio/$cercs_cv_archive/include/thin_portal.h $CHAOS_HOMEDIR/ptlpbio/include/thin_portal.h $CHAOS_HOMEDIR/include/thin_portal.h"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ibpbio/include/thin_ib.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/thin_ib.h $CHAOS_HOMEDIR/ibpbio/$cercs_cv_archive/include/thin_ib.h $CHAOS_HOMEDIR/ibpbio/include/thin_ib.h $CHAOS_HOMEDIR/include/thin_ib.h"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/thin_portal.h $search_list"
+search_list="$tmpdir/thin_ib.h $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/thin_portal.h $search_list"
+search_list="$tmpdir/lib/thin_ib.h $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/thin_portal.h $search_list"
+search_list="$tmpdir/thin_ib.h $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/include/thin_portal.h $search_list"
+search_list="$tmpdir/include/thin_ib.h $search_list"
 fi
 if test "include" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/thin_portal.h"
+     search_list="$search_list $tmp_lib_value/thin_ib.h"
   done
 fi
 
-search_list="$datatap_dir/thin_portal.h $datatap_dir/lib/thin_portal.h $datatap_dir/include/thin_portal.h $search_list /usr/include/thin_portal.h /usr/local/include/thin_portal.h /opt/ptlpbio/include/thin_portal.h /opt/misc/include/thin_portal.h /opt/misc/include/$cercs_cv_archive/thin_portal.h"
+search_list="$datatap_dir/thin_ib.h $datatap_dir/lib/thin_ib.h $datatap_dir/include/thin_ib.h $search_list /usr/include/thin_ib.h /usr/local/include/thin_ib.h /opt/ibpbio/include/thin_ib.h /opt/misc/include/thin_ib.h /opt/misc/include/$cercs_cv_archive/thin_ib.h"
 tmp_search_results=""
-echo "configure:29298: searching for $search_list " >&5
+echo "configure:28814: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:29302: first found $tmp_search_results " >&5
+	echo "configure:28818: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -29308,19 +28824,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_portal.h"; then
-cercs_cv_ptlpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_portal.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_ib.h"; then
+cercs_cv_ibpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_ib.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ptlpbio_include_arg" >&6
-if test -n "$cercs_cv_ptlpbio_include_arg"; then
-arg="$cercs_cv_ptlpbio_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_include_arg" >&5
+$as_echo "$cercs_cv_ibpbio_include_arg" >&6; }
+if test -n "$cercs_cv_ibpbio_include_arg"; then
+arg="$cercs_cv_ibpbio_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+if test `echo $arg | grep -c "ibpbio"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -29328,70 +28844,70 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ptlpbio package" >&5
-echo $ECHO_N "checking needed link args for ptlpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ptlpbio_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for ibpbio package" >&5
+$as_echo_n "checking needed link args for ibpbio package... " >&6; }
+if test "${cercs_cv_ibpbio_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./libptlclient.a"
+search_list="./libibclient.la"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_ptlpbio"; then
-if test `echo $with_ptlpbio | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ptlpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_ibpbio"; then
+if test `echo $with_ibpbio | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ibpbio" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_ptlpbio
+EXPANDED=$with_ibpbio
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/libptlclient.a $datatap_dir/lib/libptlclient.a $datatap_dir/include/libptlclient.a $search_list $EXPANDED/libptlclient.a $EXPANDED/lib/libptlclient.a $EXPANDED/share/libptlclient.a $EXPANDED/$cercs_cv_archive/libptlclient.a $EXPANDED/$cercs_cv_archive/lib/libptlclient.a $EXPANDED/ptlpbio/libptlclient.a $EXPANDED/ptlpbio/$cercs_cv_archive/libptlclient.a $EXPANDED/ptlpbio/lib/libptlclient.a $EXPANDED/ptlpbio/lib/$cercs_cv_archive/libptlclient.a"
+search_list="$datatap_dir/libibclient.la $datatap_dir/lib/libibclient.la $datatap_dir/include/libibclient.la $search_list $EXPANDED/libibclient.la $EXPANDED/lib/libibclient.la $EXPANDED/share/libibclient.la $EXPANDED/$cercs_cv_archive/libibclient.la $EXPANDED/$cercs_cv_archive/lib/libibclient.la $EXPANDED/ibpbio/libibclient.la $EXPANDED/ibpbio/$cercs_cv_archive/libibclient.la $EXPANDED/ibpbio/lib/libibclient.la $EXPANDED/ibpbio/lib/$cercs_cv_archive/libibclient.la"
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ptlpbio/libptlclient.a `pwd`/../lib/libptlclient.a `pwd`/../share/libptlclient.a"
+search_list="$search_list `pwd`/../ibpbio/libibclient.la `pwd`/../lib/libibclient.la `pwd`/../share/libibclient.la"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ptlpbio/libptlclient.a $HOME/$cercs_cv_archive/lib/libptlclient.a $HOME/lib/libptlclient.a"
+search_list="$search_list $HOME/ibpbio/libibclient.la $HOME/$cercs_cv_archive/lib/libibclient.la $HOME/lib/libibclient.la"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ptlpbio/lib/libptlclient.a $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libptlclient.a $CHAOS_HOMEDIR/ptlpbio/$cercs_cv_archive/lib/libptlclient.a $CHAOS_HOMEDIR/ptlpbio/lib/libptlclient.a $CHAOS_HOMEDIR/lib/libptlclient.a"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ibpbio/lib/libibclient.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libibclient.la $CHAOS_HOMEDIR/ibpbio/$cercs_cv_archive/lib/libibclient.la $CHAOS_HOMEDIR/ibpbio/lib/libibclient.la $CHAOS_HOMEDIR/lib/libibclient.la"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/libptlclient.a $search_list"
+search_list="$tmpdir/libibclient.la $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libptlclient.a $search_list"
+search_list="$tmpdir/lib/libibclient.la $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/libptlclient.a $search_list"
+search_list="$tmpdir/libibclient.la $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libptlclient.a $search_list"
+search_list="$tmpdir/lib/libibclient.la $search_list"
 fi
 if test "lib" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/libptlclient.a"
+     search_list="$search_list $tmp_lib_value/libibclient.la"
   done
 fi
 
-search_list="$datatap_dir/libptlclient.a $datatap_dir/lib/libptlclient.a $datatap_dir/include/libptlclient.a $search_list /usr/lib/libptlclient.a /usr/local/lib/libptlclient.a /opt/ptlpbio/lib/libptlclient.a /opt/misc/lib/libptlclient.a /opt/misc/lib/$cercs_cv_archive/libptlclient.a"
+search_list="$datatap_dir/libibclient.la $datatap_dir/lib/libibclient.la $datatap_dir/include/libibclient.la $search_list /usr/lib/libibclient.la /usr/local/lib/libibclient.la /opt/ibpbio/lib/libibclient.la /opt/misc/lib/libibclient.la /opt/misc/lib/$cercs_cv_archive/libibclient.la"
 tmp_search_results=""
-echo "configure:29390: searching for $search_list " >&5
+echo "configure:28906: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:29394: first found $tmp_search_results " >&5
+	echo "configure:28910: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -29400,30 +28916,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libptlclient.a"; then
-cercs_cv_ptlpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libptlclient.a//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libibclient.la"; then
+cercs_cv_ibpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libibclient.la//g"`
 else
-cercs_cv_ptlpbio_link_dir=""
+cercs_cv_ibpbio_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ptlpbio_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_link_dir" >&5
+$as_echo "$cercs_cv_ibpbio_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_ptlpbio_link_arg=`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ptlpbio_link_arg"; then
-arg=$cercs_cv_ptlpbio_link_arg
+cercs_cv_ibpbio_link_arg=`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ibpbio_link_arg"; then
+arg=$cercs_cv_ibpbio_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libptlclient.a | sed 's/\..*//'`
-if test ! -r $cercs_cv_ptlpbio_link_dir/$root.la; then
+root=`echo libibclient.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_ibpbio_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ptlpbio_link_arg "`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_ibpbio_link_arg "`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+if test `echo $arg | grep -c "ibpbio"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -29438,33 +28954,33 @@ else
 
 
 
-# Check whether --with-ptlpbio or --without-ptlpbio was given.
-if test "${with_ptlpbio+set}" = set; then
-  withval="$with_ptlpbio"
+# Check whether --with-ibpbio was given.
+if test "${with_ibpbio+set}" = set; then
+  withval=$with_ibpbio;
+fi
 
-fi;
 
-if test -n "$with_ptlpbio"; then
-unset cercs_cv_ptlpbio_include_arg
-unset cercs_cv_ptlpbio_link_arg
-if test `echo $with_ptlpbio | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ptlpbio=`pwd`/$with_ptlpbio
+if test -n "$with_ibpbio"; then
+unset cercs_cv_ibpbio_include_arg
+unset cercs_cv_ibpbio_link_arg
+if test `echo $with_ibpbio | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ibpbio=`pwd`/$with_ibpbio
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for ptlpbio package" >&5
-echo $ECHO_N "checking needed include args for ptlpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ptlpbio_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for ibpbio package" >&5
+$as_echo_n "checking needed include args for ibpbio package... " >&6; }
+if test "${cercs_cv_ibpbio_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../ptlpbio $PWD/../../ptlpbio $PWD/../../../ptlpbio"
+search_list="$PWD/../ibpbio $PWD/../../ibpbio $PWD/../../../ibpbio"
 tmp_search_results=""
-echo "configure:29463: searching for $search_list " >&5
+echo "configure:28979: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:29467: first found $tmp_search_results " >&5
+	echo "configure:28983: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -29473,19 +28989,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_portal.h"; then
-cercs_cv_ptlpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_portal.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_ib.h"; then
+cercs_cv_ibpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_ib.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ptlpbio_include_arg" >&6
-if test -n "$cercs_cv_ptlpbio_include_arg"; then
-arg="$cercs_cv_ptlpbio_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_include_arg" >&5
+$as_echo "$cercs_cv_ibpbio_include_arg" >&6; }
+if test -n "$cercs_cv_ibpbio_include_arg"; then
+arg="$cercs_cv_ibpbio_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+if test `echo $arg | grep -c "ibpbio"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -29493,20 +29009,20 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ptlpbio package" >&5
-echo $ECHO_N "checking needed link args for ptlpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ptlpbio_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for ibpbio package" >&5
+$as_echo_n "checking needed link args for ibpbio package... " >&6; }
+if test "${cercs_cv_ibpbio_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../ptlpbio $PWD/../../ptlpbio $PWD/../../../ptlpbio"
+search_list="$PWD/../ibpbio $PWD/../../ibpbio $PWD/../../../ibpbio"
 tmp_search_results=""
-echo "configure:29505: searching for $search_list " >&5
+echo "configure:29021: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:29509: first found $tmp_search_results " >&5
+	echo "configure:29025: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -29515,30 +29031,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libptlclient.a"; then
-cercs_cv_ptlpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libptlclient.a//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libibclient.la"; then
+cercs_cv_ibpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libibclient.la//g"`
 else
-cercs_cv_ptlpbio_link_dir=""
+cercs_cv_ibpbio_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ptlpbio_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_link_dir" >&5
+$as_echo "$cercs_cv_ibpbio_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_ptlpbio_link_arg=`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ptlpbio_link_arg"; then
-arg=$cercs_cv_ptlpbio_link_arg
+cercs_cv_ibpbio_link_arg=`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ibpbio_link_arg"; then
+arg=$cercs_cv_ibpbio_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libptlclient.a | sed 's/\..*//'`
-if test ! -r $cercs_cv_ptlpbio_link_dir/$root.la; then
+root=`echo libibclient.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_ibpbio_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ptlpbio_link_arg "`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_ibpbio_link_arg "`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+if test `echo $arg | grep -c "ibpbio"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -29551,38 +29067,6 @@ fi
 fi
 
 
-		if test -n "$cercs_cv_ptlpbio_link_dir";then
-			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ptlpbio_link_dir"
-			DT_LIBS="$DT_LIBS -lptlclient -lptlserver -lbench -ldl"
-			datatap=portals
-		else
-			temptest=disable
-		fi
-
-	else
-		echo "Neither portals nor infiniband found. Disabling datatap"
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_DATATAP 1
-_ACEOF
-
-		datatap=disable
-		temptest=disable
-	fi
-else
-	{ echo "$as_me:$LINENO: Datatap with custom library path: $withval" >&5
-echo "$as_me: Datatap with custom library path: $withval" >&6;}
-
-	datatap_dir=$withval
-
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_DATATAP 0
-_ACEOF
-
-
-	if test x"$ac_with_infiniband" = xyes; then
-
 
 
 if test -z "$with_local_specified"; then
@@ -29590,83 +29074,83 @@ if test -z "$with_local_specified"; then
 
 
 
-# Check whether --with-ibpbio or --without-ibpbio was given.
-if test "${with_ibpbio+set}" = set; then
-  withval="$with_ibpbio"
+# Check whether --with-ffs was given.
+if test "${with_ffs+set}" = set; then
+  withval=$with_ffs;
+fi
 
-fi;
 
-if test -n "$with_ibpbio"; then
-unset cercs_cv_ibpbio_include_arg
-unset cercs_cv_ibpbio_link_arg
-if test `echo $with_ibpbio | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ibpbio=`pwd`/$with_ibpbio
+if test -n "$with_ffs"; then
+unset cercs_cv_ffs_include_arg
+unset cercs_cv_ffs_link_arg
+if test `echo $with_ffs | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ffs=`pwd`/$with_ffs
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for ibpbio package" >&5
-echo $ECHO_N "checking needed include args for ibpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ibpbio_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for ffs package" >&5
+$as_echo_n "checking needed include args for ffs package... " >&6; }
+if test "${cercs_cv_ffs_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./thin_ib.h"
+search_list="./ffs.h"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_ibpbio"; then
-if test `echo $with_ibpbio | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ibpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_ffs"; then
+if test `echo $with_ffs | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ffs" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_ibpbio
+EXPANDED=$with_ffs
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/thin_ib.h $datatap_dir/lib/thin_ib.h $datatap_dir/include/thin_ib.h $search_list $EXPANDED/thin_ib.h $EXPANDED/include/thin_ib.h $EXPANDED/share/thin_ib.h $EXPANDED/$cercs_cv_archive/thin_ib.h $EXPANDED/$cercs_cv_archive/include/thin_ib.h $EXPANDED/ibpbio/thin_ib.h $EXPANDED/ibpbio/$cercs_cv_archive/thin_ib.h $EXPANDED/ibpbio/include/thin_ib.h $EXPANDED/ibpbio/include/$cercs_cv_archive/thin_ib.h"
+search_list="$datatap_dir/ffs.h $datatap_dir/lib/ffs.h $datatap_dir/include/ffs.h $search_list $EXPANDED/ffs.h $EXPANDED/include/ffs.h $EXPANDED/share/ffs.h $EXPANDED/$cercs_cv_archive/ffs.h $EXPANDED/$cercs_cv_archive/include/ffs.h $EXPANDED/ffs/ffs.h $EXPANDED/ffs/$cercs_cv_archive/ffs.h $EXPANDED/ffs/include/ffs.h $EXPANDED/ffs/include/$cercs_cv_archive/ffs.h"
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ibpbio/thin_ib.h `pwd`/../include/thin_ib.h `pwd`/../share/thin_ib.h"
+search_list="$search_list `pwd`/../ffs/ffs.h `pwd`/../include/ffs.h `pwd`/../share/ffs.h"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ibpbio/thin_ib.h $HOME/$cercs_cv_archive/include/thin_ib.h $HOME/include/thin_ib.h"
+search_list="$search_list $HOME/ffs/ffs.h $HOME/$cercs_cv_archive/include/ffs.h $HOME/include/ffs.h"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ibpbio/include/thin_ib.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/thin_ib.h $CHAOS_HOMEDIR/ibpbio/$cercs_cv_archive/include/thin_ib.h $CHAOS_HOMEDIR/ibpbio/include/thin_ib.h $CHAOS_HOMEDIR/include/thin_ib.h"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ffs/include/ffs.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/ffs.h $CHAOS_HOMEDIR/ffs/$cercs_cv_archive/include/ffs.h $CHAOS_HOMEDIR/ffs/include/ffs.h $CHAOS_HOMEDIR/include/ffs.h"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/thin_ib.h $search_list"
+search_list="$tmpdir/ffs.h $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/thin_ib.h $search_list"
+search_list="$tmpdir/lib/ffs.h $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/thin_ib.h $search_list"
+search_list="$tmpdir/ffs.h $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/include/thin_ib.h $search_list"
+search_list="$tmpdir/include/ffs.h $search_list"
 fi
 if test "include" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/thin_ib.h"
+     search_list="$search_list $tmp_lib_value/ffs.h"
   done
 fi
 
-search_list="$datatap_dir/thin_ib.h $datatap_dir/lib/thin_ib.h $datatap_dir/include/thin_ib.h $search_list /usr/include/thin_ib.h /usr/local/include/thin_ib.h /opt/ibpbio/include/thin_ib.h /opt/misc/include/thin_ib.h /opt/misc/include/$cercs_cv_archive/thin_ib.h"
+search_list="$datatap_dir/ffs.h $datatap_dir/lib/ffs.h $datatap_dir/include/ffs.h $search_list /usr/include/ffs.h /usr/local/include/ffs.h /opt/ffs/include/ffs.h /opt/misc/include/ffs.h /opt/misc/include/$cercs_cv_archive/ffs.h"
 tmp_search_results=""
-echo "configure:29665: searching for $search_list " >&5
+echo "configure:29149: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:29669: first found $tmp_search_results " >&5
+	echo "configure:29153: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -29675,19 +29159,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_ib.h"; then
-cercs_cv_ibpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_ib.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/ffs.h"; then
+cercs_cv_ffs_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.ffs.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ibpbio_include_arg" >&6
-if test -n "$cercs_cv_ibpbio_include_arg"; then
-arg="$cercs_cv_ibpbio_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ffs_include_arg" >&5
+$as_echo "$cercs_cv_ffs_include_arg" >&6; }
+if test -n "$cercs_cv_ffs_include_arg"; then
+arg="$cercs_cv_ffs_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ibpbio"` -eq 0; then
+if test `echo $arg | grep -c "ffs"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -29695,70 +29179,70 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ibpbio package" >&5
-echo $ECHO_N "checking needed link args for ibpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ibpbio_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for ffs package" >&5
+$as_echo_n "checking needed link args for ffs package... " >&6; }
+if test "${cercs_cv_ffs_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./libibclient.la"
+search_list="./libffs.la"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_ibpbio"; then
-if test `echo $with_ibpbio | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ibpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_ffs"; then
+if test `echo $with_ffs | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ffs" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_ibpbio
+EXPANDED=$with_ffs
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/libibclient.la $datatap_dir/lib/libibclient.la $datatap_dir/include/libibclient.la $search_list $EXPANDED/libibclient.la $EXPANDED/lib/libibclient.la $EXPANDED/share/libibclient.la $EXPANDED/$cercs_cv_archive/libibclient.la $EXPANDED/$cercs_cv_archive/lib/libibclient.la $EXPANDED/ibpbio/libibclient.la $EXPANDED/ibpbio/$cercs_cv_archive/libibclient.la $EXPANDED/ibpbio/lib/libibclient.la $EXPANDED/ibpbio/lib/$cercs_cv_archive/libibclient.la"
+search_list="$datatap_dir/libffs.la $datatap_dir/lib/libffs.la $datatap_dir/include/libffs.la $search_list $EXPANDED/libffs.la $EXPANDED/lib/libffs.la $EXPANDED/share/libffs.la $EXPANDED/$cercs_cv_archive/libffs.la $EXPANDED/$cercs_cv_archive/lib/libffs.la $EXPANDED/ffs/libffs.la $EXPANDED/ffs/$cercs_cv_archive/libffs.la $EXPANDED/ffs/lib/libffs.la $EXPANDED/ffs/lib/$cercs_cv_archive/libffs.la"
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ibpbio/libibclient.la `pwd`/../lib/libibclient.la `pwd`/../share/libibclient.la"
+search_list="$search_list `pwd`/../ffs/libffs.la `pwd`/../lib/libffs.la `pwd`/../share/libffs.la"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ibpbio/libibclient.la $HOME/$cercs_cv_archive/lib/libibclient.la $HOME/lib/libibclient.la"
+search_list="$search_list $HOME/ffs/libffs.la $HOME/$cercs_cv_archive/lib/libffs.la $HOME/lib/libffs.la"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ibpbio/lib/libibclient.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libibclient.la $CHAOS_HOMEDIR/ibpbio/$cercs_cv_archive/lib/libibclient.la $CHAOS_HOMEDIR/ibpbio/lib/libibclient.la $CHAOS_HOMEDIR/lib/libibclient.la"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ffs/lib/libffs.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libffs.la $CHAOS_HOMEDIR/ffs/$cercs_cv_archive/lib/libffs.la $CHAOS_HOMEDIR/ffs/lib/libffs.la $CHAOS_HOMEDIR/lib/libffs.la"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/libibclient.la $search_list"
+search_list="$tmpdir/libffs.la $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libibclient.la $search_list"
+search_list="$tmpdir/lib/libffs.la $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/libibclient.la $search_list"
+search_list="$tmpdir/libffs.la $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libibclient.la $search_list"
+search_list="$tmpdir/lib/libffs.la $search_list"
 fi
 if test "lib" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/libibclient.la"
+     search_list="$search_list $tmp_lib_value/libffs.la"
   done
 fi
 
-search_list="$datatap_dir/libibclient.la $datatap_dir/lib/libibclient.la $datatap_dir/include/libibclient.la $search_list /usr/lib/libibclient.la /usr/local/lib/libibclient.la /opt/ibpbio/lib/libibclient.la /opt/misc/lib/libibclient.la /opt/misc/lib/$cercs_cv_archive/libibclient.la"
+search_list="$datatap_dir/libffs.la $datatap_dir/lib/libffs.la $datatap_dir/include/libffs.la $search_list /usr/lib/libffs.la /usr/local/lib/libffs.la /opt/ffs/lib/libffs.la /opt/misc/lib/libffs.la /opt/misc/lib/$cercs_cv_archive/libffs.la"
 tmp_search_results=""
-echo "configure:29757: searching for $search_list " >&5
+echo "configure:29241: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:29761: first found $tmp_search_results " >&5
+	echo "configure:29245: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -29767,30 +29251,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libibclient.la"; then
-cercs_cv_ibpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libibclient.la//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libffs.la"; then
+cercs_cv_ffs_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libffs.la//g"`
 else
-cercs_cv_ibpbio_link_dir=""
+cercs_cv_ffs_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ibpbio_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ffs_link_dir" >&5
+$as_echo "$cercs_cv_ffs_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_ibpbio_link_arg=`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ibpbio_link_arg"; then
-arg=$cercs_cv_ibpbio_link_arg
+cercs_cv_ffs_link_arg=`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ffs_link_arg"; then
+arg=$cercs_cv_ffs_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libibclient.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_ibpbio_link_dir/$root.la; then
+root=`echo libffs.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_ffs_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ibpbio_link_arg "`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_ffs_link_arg "`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "ibpbio"` -eq 0; then
+if test `echo $arg | grep -c "ffs"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -29805,33 +29289,33 @@ else
 
 
 
-# Check whether --with-ibpbio or --without-ibpbio was given.
-if test "${with_ibpbio+set}" = set; then
-  withval="$with_ibpbio"
+# Check whether --with-ffs was given.
+if test "${with_ffs+set}" = set; then
+  withval=$with_ffs;
+fi
 
-fi;
 
-if test -n "$with_ibpbio"; then
-unset cercs_cv_ibpbio_include_arg
-unset cercs_cv_ibpbio_link_arg
-if test `echo $with_ibpbio | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ibpbio=`pwd`/$with_ibpbio
+if test -n "$with_ffs"; then
+unset cercs_cv_ffs_include_arg
+unset cercs_cv_ffs_link_arg
+if test `echo $with_ffs | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ffs=`pwd`/$with_ffs
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for ibpbio package" >&5
-echo $ECHO_N "checking needed include args for ibpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ibpbio_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for ffs package" >&5
+$as_echo_n "checking needed include args for ffs package... " >&6; }
+if test "${cercs_cv_ffs_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../ibpbio $PWD/../../ibpbio $PWD/../../../ibpbio"
+search_list="$PWD/../ffs $PWD/../../ffs $PWD/../../../ffs"
 tmp_search_results=""
-echo "configure:29830: searching for $search_list " >&5
+echo "configure:29314: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:29834: first found $tmp_search_results " >&5
+	echo "configure:29318: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -29840,19 +29324,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_ib.h"; then
-cercs_cv_ibpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_ib.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/ffs.h"; then
+cercs_cv_ffs_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.ffs.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ibpbio_include_arg" >&6
-if test -n "$cercs_cv_ibpbio_include_arg"; then
-arg="$cercs_cv_ibpbio_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ffs_include_arg" >&5
+$as_echo "$cercs_cv_ffs_include_arg" >&6; }
+if test -n "$cercs_cv_ffs_include_arg"; then
+arg="$cercs_cv_ffs_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ibpbio"` -eq 0; then
+if test `echo $arg | grep -c "ffs"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -29860,20 +29344,20 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ibpbio package" >&5
-echo $ECHO_N "checking needed link args for ibpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ibpbio_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for ffs package" >&5
+$as_echo_n "checking needed link args for ffs package... " >&6; }
+if test "${cercs_cv_ffs_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../ibpbio $PWD/../../ibpbio $PWD/../../../ibpbio"
+search_list="$PWD/../ffs $PWD/../../ffs $PWD/../../../ffs"
 tmp_search_results=""
-echo "configure:29872: searching for $search_list " >&5
+echo "configure:29356: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:29876: first found $tmp_search_results " >&5
+	echo "configure:29360: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -29882,30 +29366,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libibclient.la"; then
-cercs_cv_ibpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libibclient.la//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libffs.la"; then
+cercs_cv_ffs_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libffs.la//g"`
 else
-cercs_cv_ibpbio_link_dir=""
+cercs_cv_ffs_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ibpbio_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ffs_link_dir" >&5
+$as_echo "$cercs_cv_ffs_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_ibpbio_link_arg=`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ibpbio_link_arg"; then
-arg=$cercs_cv_ibpbio_link_arg
+cercs_cv_ffs_link_arg=`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ffs_link_arg"; then
+arg=$cercs_cv_ffs_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libibclient.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_ibpbio_link_dir/$root.la; then
+root=`echo libffs.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_ffs_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ibpbio_link_arg "`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_ffs_link_arg "`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "ibpbio"` -eq 0; then
+if test `echo $arg | grep -c "ffs"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -29925,83 +29409,83 @@ if test -z "$with_local_specified"; then
 
 
 
-# Check whether --with-ffs or --without-ffs was given.
-if test "${with_ffs+set}" = set; then
-  withval="$with_ffs"
+# Check whether --with-gen_thread was given.
+if test "${with_gen_thread+set}" = set; then
+  withval=$with_gen_thread;
+fi
 
-fi;
 
-if test -n "$with_ffs"; then
-unset cercs_cv_ffs_include_arg
-unset cercs_cv_ffs_link_arg
-if test `echo $with_ffs | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ffs=`pwd`/$with_ffs
+if test -n "$with_gen_thread"; then
+unset cercs_cv_gen_thread_include_arg
+unset cercs_cv_gen_thread_link_arg
+if test `echo $with_gen_thread | sed 's/\(.\).*/\1/g'` != "/"; then
+with_gen_thread=`pwd`/$with_gen_thread
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for ffs package" >&5
-echo $ECHO_N "checking needed include args for ffs package... $ECHO_C" >&6
-if test "${cercs_cv_ffs_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for gen_thread package" >&5
+$as_echo_n "checking needed include args for gen_thread package... " >&6; }
+if test "${cercs_cv_gen_thread_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./ffs.h"
+search_list="./gen_thread.h"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_ffs"; then
-if test `echo $with_ffs | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ffs" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_gen_thread"; then
+if test `echo $with_gen_thread | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_gen_thread" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_ffs
+EXPANDED=$with_gen_thread
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/ffs.h $datatap_dir/lib/ffs.h $datatap_dir/include/ffs.h $search_list $EXPANDED/ffs.h $EXPANDED/include/ffs.h $EXPANDED/share/ffs.h $EXPANDED/$cercs_cv_archive/ffs.h $EXPANDED/$cercs_cv_archive/include/ffs.h $EXPANDED/ffs/ffs.h $EXPANDED/ffs/$cercs_cv_archive/ffs.h $EXPANDED/ffs/include/ffs.h $EXPANDED/ffs/include/$cercs_cv_archive/ffs.h"
+search_list="$datatap_dir/gen_thread.h $datatap_dir/lib/gen_thread.h $datatap_dir/include/gen_thread.h $search_list $EXPANDED/gen_thread.h $EXPANDED/include/gen_thread.h $EXPANDED/share/gen_thread.h $EXPANDED/$cercs_cv_archive/gen_thread.h $EXPANDED/$cercs_cv_archive/include/gen_thread.h $EXPANDED/gen_thread/gen_thread.h $EXPANDED/gen_thread/$cercs_cv_archive/gen_thread.h $EXPANDED/gen_thread/include/gen_thread.h $EXPANDED/gen_thread/include/$cercs_cv_archive/gen_thread.h"
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ffs/ffs.h `pwd`/../include/ffs.h `pwd`/../share/ffs.h"
+search_list="$search_list `pwd`/../gen_thread/gen_thread.h `pwd`/../include/gen_thread.h `pwd`/../share/gen_thread.h"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ffs/ffs.h $HOME/$cercs_cv_archive/include/ffs.h $HOME/include/ffs.h"
+search_list="$search_list $HOME/gen_thread/gen_thread.h $HOME/$cercs_cv_archive/include/gen_thread.h $HOME/include/gen_thread.h"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ffs/include/ffs.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/ffs.h $CHAOS_HOMEDIR/ffs/$cercs_cv_archive/include/ffs.h $CHAOS_HOMEDIR/ffs/include/ffs.h $CHAOS_HOMEDIR/include/ffs.h"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/gen_thread/include/gen_thread.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/gen_thread.h $CHAOS_HOMEDIR/gen_thread/$cercs_cv_archive/include/gen_thread.h $CHAOS_HOMEDIR/gen_thread/include/gen_thread.h $CHAOS_HOMEDIR/include/gen_thread.h"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/ffs.h $search_list"
+search_list="$tmpdir/gen_thread.h $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/ffs.h $search_list"
+search_list="$tmpdir/lib/gen_thread.h $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/ffs.h $search_list"
+search_list="$tmpdir/gen_thread.h $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/include/ffs.h $search_list"
+search_list="$tmpdir/include/gen_thread.h $search_list"
 fi
 if test "include" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/ffs.h"
+     search_list="$search_list $tmp_lib_value/gen_thread.h"
   done
 fi
 
-search_list="$datatap_dir/ffs.h $datatap_dir/lib/ffs.h $datatap_dir/include/ffs.h $search_list /usr/include/ffs.h /usr/local/include/ffs.h /opt/ffs/include/ffs.h /opt/misc/include/ffs.h /opt/misc/include/$cercs_cv_archive/ffs.h"
+search_list="$datatap_dir/gen_thread.h $datatap_dir/lib/gen_thread.h $datatap_dir/include/gen_thread.h $search_list /usr/include/gen_thread.h /usr/local/include/gen_thread.h /opt/gen_thread/include/gen_thread.h /opt/misc/include/gen_thread.h /opt/misc/include/$cercs_cv_archive/gen_thread.h"
 tmp_search_results=""
-echo "configure:30000: searching for $search_list " >&5
+echo "configure:29484: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30004: first found $tmp_search_results " >&5
+	echo "configure:29488: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30010,19 +29494,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/ffs.h"; then
-cercs_cv_ffs_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.ffs.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/gen_thread.h"; then
+cercs_cv_gen_thread_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.gen_thread.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ffs_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ffs_include_arg" >&6
-if test -n "$cercs_cv_ffs_include_arg"; then
-arg="$cercs_cv_ffs_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_include_arg" >&5
+$as_echo "$cercs_cv_gen_thread_include_arg" >&6; }
+if test -n "$cercs_cv_gen_thread_include_arg"; then
+arg="$cercs_cv_gen_thread_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ffs"` -eq 0; then
+if test `echo $arg | grep -c "gen_thread"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -30030,70 +29514,70 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ffs package" >&5
-echo $ECHO_N "checking needed link args for ffs package... $ECHO_C" >&6
-if test "${cercs_cv_ffs_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for gen_thread package" >&5
+$as_echo_n "checking needed link args for gen_thread package... " >&6; }
+if test "${cercs_cv_gen_thread_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./libffs.la"
+search_list="./libgen_thread.la"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_ffs"; then
-if test `echo $with_ffs | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ffs" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_gen_thread"; then
+if test `echo $with_gen_thread | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_gen_thread" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_ffs
+EXPANDED=$with_gen_thread
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/libffs.la $datatap_dir/lib/libffs.la $datatap_dir/include/libffs.la $search_list $EXPANDED/libffs.la $EXPANDED/lib/libffs.la $EXPANDED/share/libffs.la $EXPANDED/$cercs_cv_archive/libffs.la $EXPANDED/$cercs_cv_archive/lib/libffs.la $EXPANDED/ffs/libffs.la $EXPANDED/ffs/$cercs_cv_archive/libffs.la $EXPANDED/ffs/lib/libffs.la $EXPANDED/ffs/lib/$cercs_cv_archive/libffs.la"
+search_list="$datatap_dir/libgen_thread.la $datatap_dir/lib/libgen_thread.la $datatap_dir/include/libgen_thread.la $search_list $EXPANDED/libgen_thread.la $EXPANDED/lib/libgen_thread.la $EXPANDED/share/libgen_thread.la $EXPANDED/$cercs_cv_archive/libgen_thread.la $EXPANDED/$cercs_cv_archive/lib/libgen_thread.la $EXPANDED/gen_thread/libgen_thread.la $EXPANDED/gen_thread/$cercs_cv_archive/libgen_thread.la $EXPANDED/gen_thread/lib/libgen_thread.la $EXPANDED/gen_thread/lib/$cercs_cv_archive/ [...]
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ffs/libffs.la `pwd`/../lib/libffs.la `pwd`/../share/libffs.la"
+search_list="$search_list `pwd`/../gen_thread/libgen_thread.la `pwd`/../lib/libgen_thread.la `pwd`/../share/libgen_thread.la"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ffs/libffs.la $HOME/$cercs_cv_archive/lib/libffs.la $HOME/lib/libffs.la"
+search_list="$search_list $HOME/gen_thread/libgen_thread.la $HOME/$cercs_cv_archive/lib/libgen_thread.la $HOME/lib/libgen_thread.la"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ffs/lib/libffs.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libffs.la $CHAOS_HOMEDIR/ffs/$cercs_cv_archive/lib/libffs.la $CHAOS_HOMEDIR/ffs/lib/libffs.la $CHAOS_HOMEDIR/lib/libffs.la"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/gen_thread/lib/libgen_thread.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libgen_thread.la $CHAOS_HOMEDIR/gen_thread/$cercs_cv_archive/lib/libgen_thread.la $CHAOS_HOMEDIR/gen_thread/lib/libgen_thread.la $CHAOS_HOMEDIR/lib/libgen_thread.la"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/libffs.la $search_list"
+search_list="$tmpdir/libgen_thread.la $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libffs.la $search_list"
+search_list="$tmpdir/lib/libgen_thread.la $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/libffs.la $search_list"
+search_list="$tmpdir/libgen_thread.la $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libffs.la $search_list"
+search_list="$tmpdir/lib/libgen_thread.la $search_list"
 fi
 if test "lib" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/libffs.la"
+     search_list="$search_list $tmp_lib_value/libgen_thread.la"
   done
 fi
 
-search_list="$datatap_dir/libffs.la $datatap_dir/lib/libffs.la $datatap_dir/include/libffs.la $search_list /usr/lib/libffs.la /usr/local/lib/libffs.la /opt/ffs/lib/libffs.la /opt/misc/lib/libffs.la /opt/misc/lib/$cercs_cv_archive/libffs.la"
+search_list="$datatap_dir/libgen_thread.la $datatap_dir/lib/libgen_thread.la $datatap_dir/include/libgen_thread.la $search_list /usr/lib/libgen_thread.la /usr/local/lib/libgen_thread.la /opt/gen_thread/lib/libgen_thread.la /opt/misc/lib/libgen_thread.la /opt/misc/lib/$cercs_cv_archive/libgen_thread.la"
 tmp_search_results=""
-echo "configure:30092: searching for $search_list " >&5
+echo "configure:29576: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30096: first found $tmp_search_results " >&5
+	echo "configure:29580: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30102,30 +29586,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libffs.la"; then
-cercs_cv_ffs_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libffs.la//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libgen_thread.la"; then
+cercs_cv_gen_thread_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libgen_thread.la//g"`
 else
-cercs_cv_ffs_link_dir=""
+cercs_cv_gen_thread_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ffs_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ffs_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_link_dir" >&5
+$as_echo "$cercs_cv_gen_thread_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_ffs_link_arg=`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ffs_link_arg"; then
-arg=$cercs_cv_ffs_link_arg
+cercs_cv_gen_thread_link_arg=`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_gen_thread_link_arg"; then
+arg=$cercs_cv_gen_thread_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libffs.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_ffs_link_dir/$root.la; then
+root=`echo libgen_thread.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_gen_thread_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ffs_link_arg "`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_gen_thread_link_arg "`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "ffs"` -eq 0; then
+if test `echo $arg | grep -c "gen_thread"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -30140,33 +29624,33 @@ else
 
 
 
-# Check whether --with-ffs or --without-ffs was given.
-if test "${with_ffs+set}" = set; then
-  withval="$with_ffs"
+# Check whether --with-gen_thread was given.
+if test "${with_gen_thread+set}" = set; then
+  withval=$with_gen_thread;
+fi
 
-fi;
 
-if test -n "$with_ffs"; then
-unset cercs_cv_ffs_include_arg
-unset cercs_cv_ffs_link_arg
-if test `echo $with_ffs | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ffs=`pwd`/$with_ffs
+if test -n "$with_gen_thread"; then
+unset cercs_cv_gen_thread_include_arg
+unset cercs_cv_gen_thread_link_arg
+if test `echo $with_gen_thread | sed 's/\(.\).*/\1/g'` != "/"; then
+with_gen_thread=`pwd`/$with_gen_thread
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for ffs package" >&5
-echo $ECHO_N "checking needed include args for ffs package... $ECHO_C" >&6
-if test "${cercs_cv_ffs_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for gen_thread package" >&5
+$as_echo_n "checking needed include args for gen_thread package... " >&6; }
+if test "${cercs_cv_gen_thread_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../ffs $PWD/../../ffs $PWD/../../../ffs"
+search_list="$PWD/../gen_thread $PWD/../../gen_thread $PWD/../../../gen_thread"
 tmp_search_results=""
-echo "configure:30165: searching for $search_list " >&5
+echo "configure:29649: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30169: first found $tmp_search_results " >&5
+	echo "configure:29653: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30175,19 +29659,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/ffs.h"; then
-cercs_cv_ffs_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.ffs.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/gen_thread.h"; then
+cercs_cv_gen_thread_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.gen_thread.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ffs_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ffs_include_arg" >&6
-if test -n "$cercs_cv_ffs_include_arg"; then
-arg="$cercs_cv_ffs_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_include_arg" >&5
+$as_echo "$cercs_cv_gen_thread_include_arg" >&6; }
+if test -n "$cercs_cv_gen_thread_include_arg"; then
+arg="$cercs_cv_gen_thread_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ffs"` -eq 0; then
+if test `echo $arg | grep -c "gen_thread"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -30195,20 +29679,20 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ffs package" >&5
-echo $ECHO_N "checking needed link args for ffs package... $ECHO_C" >&6
-if test "${cercs_cv_ffs_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for gen_thread package" >&5
+$as_echo_n "checking needed link args for gen_thread package... " >&6; }
+if test "${cercs_cv_gen_thread_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../ffs $PWD/../../ffs $PWD/../../../ffs"
+search_list="$PWD/../gen_thread $PWD/../../gen_thread $PWD/../../../gen_thread"
 tmp_search_results=""
-echo "configure:30207: searching for $search_list " >&5
+echo "configure:29691: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30211: first found $tmp_search_results " >&5
+	echo "configure:29695: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30217,30 +29701,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libffs.la"; then
-cercs_cv_ffs_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libffs.la//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libgen_thread.la"; then
+cercs_cv_gen_thread_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libgen_thread.la//g"`
 else
-cercs_cv_ffs_link_dir=""
+cercs_cv_gen_thread_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ffs_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ffs_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_link_dir" >&5
+$as_echo "$cercs_cv_gen_thread_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_ffs_link_arg=`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ffs_link_arg"; then
-arg=$cercs_cv_ffs_link_arg
+cercs_cv_gen_thread_link_arg=`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_gen_thread_link_arg"; then
+arg=$cercs_cv_gen_thread_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libffs.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_ffs_link_dir/$root.la; then
+root=`echo libgen_thread.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_gen_thread_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ffs_link_arg "`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_gen_thread_link_arg "`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "ffs"` -eq 0; then
+if test `echo $arg | grep -c "gen_thread"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -30252,6 +29736,29 @@ fi
 
 fi
 
+		if test -n "$cercs_cv_ibpbio_link_dir";then
+			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ibpbio_link_dir"
+			DT_LIBS="$DT_LIBS -libclient"
+			datatap=ibverbs
+		else
+			temptest=disable
+		fi
+		if test -n "$cercs_cv_ffs_link_dir";then
+                   	DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ffs_link_dir"
+			DT_LIBS="$DT_LIBS -lgen_thread"
+			datatap=ibverbs
+		else
+			temptest=disable
+		fi
+		if test -n "$cercs_cv_gen_thread_link_dir";then
+			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_gen_thread_link_dir"
+			DT_LIBS="$DT_LIBS -lgen_thread"
+			datatap=ibverbs
+		else
+			temptest=disable
+		fi
+
+        elif test x"$ac_with_portals" = xyes; then
 
 
 
@@ -30260,83 +29767,83 @@ if test -z "$with_local_specified"; then
 
 
 
-# Check whether --with-gen_thread or --without-gen_thread was given.
-if test "${with_gen_thread+set}" = set; then
-  withval="$with_gen_thread"
+# Check whether --with-ptlpbio was given.
+if test "${with_ptlpbio+set}" = set; then
+  withval=$with_ptlpbio;
+fi
 
-fi;
 
-if test -n "$with_gen_thread"; then
-unset cercs_cv_gen_thread_include_arg
-unset cercs_cv_gen_thread_link_arg
-if test `echo $with_gen_thread | sed 's/\(.\).*/\1/g'` != "/"; then
-with_gen_thread=`pwd`/$with_gen_thread
+if test -n "$with_ptlpbio"; then
+unset cercs_cv_ptlpbio_include_arg
+unset cercs_cv_ptlpbio_link_arg
+if test `echo $with_ptlpbio | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ptlpbio=`pwd`/$with_ptlpbio
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for gen_thread package" >&5
-echo $ECHO_N "checking needed include args for gen_thread package... $ECHO_C" >&6
-if test "${cercs_cv_gen_thread_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for ptlpbio package" >&5
+$as_echo_n "checking needed include args for ptlpbio package... " >&6; }
+if test "${cercs_cv_ptlpbio_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./gen_thread.h"
+search_list="./thin_portal.h"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_gen_thread"; then
-if test `echo $with_gen_thread | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_gen_thread" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_ptlpbio"; then
+if test `echo $with_ptlpbio | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ptlpbio" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_gen_thread
+EXPANDED=$with_ptlpbio
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/gen_thread.h $datatap_dir/lib/gen_thread.h $datatap_dir/include/gen_thread.h $search_list $EXPANDED/gen_thread.h $EXPANDED/include/gen_thread.h $EXPANDED/share/gen_thread.h $EXPANDED/$cercs_cv_archive/gen_thread.h $EXPANDED/$cercs_cv_archive/include/gen_thread.h $EXPANDED/gen_thread/gen_thread.h $EXPANDED/gen_thread/$cercs_cv_archive/gen_thread.h $EXPANDED/gen_thread/include/gen_thread.h $EXPANDED/gen_thread/include/$cercs_cv_archive/gen_thread.h"
+search_list="$datatap_dir/thin_portal.h $datatap_dir/lib/thin_portal.h $datatap_dir/include/thin_portal.h $search_list $EXPANDED/thin_portal.h $EXPANDED/include/thin_portal.h $EXPANDED/share/thin_portal.h $EXPANDED/$cercs_cv_archive/thin_portal.h $EXPANDED/$cercs_cv_archive/include/thin_portal.h $EXPANDED/ptlpbio/thin_portal.h $EXPANDED/ptlpbio/$cercs_cv_archive/thin_portal.h $EXPANDED/ptlpbio/include/thin_portal.h $EXPANDED/ptlpbio/include/$cercs_cv_archive/thin_portal.h"
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../gen_thread/gen_thread.h `pwd`/../include/gen_thread.h `pwd`/../share/gen_thread.h"
+search_list="$search_list `pwd`/../ptlpbio/thin_portal.h `pwd`/../include/thin_portal.h `pwd`/../share/thin_portal.h"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/gen_thread/gen_thread.h $HOME/$cercs_cv_archive/include/gen_thread.h $HOME/include/gen_thread.h"
+search_list="$search_list $HOME/ptlpbio/thin_portal.h $HOME/$cercs_cv_archive/include/thin_portal.h $HOME/include/thin_portal.h"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/gen_thread/include/gen_thread.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/gen_thread.h $CHAOS_HOMEDIR/gen_thread/$cercs_cv_archive/include/gen_thread.h $CHAOS_HOMEDIR/gen_thread/include/gen_thread.h $CHAOS_HOMEDIR/include/gen_thread.h"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ptlpbio/include/thin_portal.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/thin_portal.h $CHAOS_HOMEDIR/ptlpbio/$cercs_cv_archive/include/thin_portal.h $CHAOS_HOMEDIR/ptlpbio/include/thin_portal.h $CHAOS_HOMEDIR/include/thin_portal.h"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/gen_thread.h $search_list"
+search_list="$tmpdir/thin_portal.h $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/gen_thread.h $search_list"
+search_list="$tmpdir/lib/thin_portal.h $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/gen_thread.h $search_list"
+search_list="$tmpdir/thin_portal.h $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/include/gen_thread.h $search_list"
+search_list="$tmpdir/include/thin_portal.h $search_list"
 fi
 if test "include" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/gen_thread.h"
+     search_list="$search_list $tmp_lib_value/thin_portal.h"
   done
 fi
 
-search_list="$datatap_dir/gen_thread.h $datatap_dir/lib/gen_thread.h $datatap_dir/include/gen_thread.h $search_list /usr/include/gen_thread.h /usr/local/include/gen_thread.h /opt/gen_thread/include/gen_thread.h /opt/misc/include/gen_thread.h /opt/misc/include/$cercs_cv_archive/gen_thread.h"
+search_list="$datatap_dir/thin_portal.h $datatap_dir/lib/thin_portal.h $datatap_dir/include/thin_portal.h $search_list /usr/include/thin_portal.h /usr/local/include/thin_portal.h /opt/ptlpbio/include/thin_portal.h /opt/misc/include/thin_portal.h /opt/misc/include/$cercs_cv_archive/thin_portal.h"
 tmp_search_results=""
-echo "configure:30335: searching for $search_list " >&5
+echo "configure:29842: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30339: first found $tmp_search_results " >&5
+	echo "configure:29846: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30345,19 +29852,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/gen_thread.h"; then
-cercs_cv_gen_thread_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.gen_thread.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_portal.h"; then
+cercs_cv_ptlpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_portal.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_gen_thread_include_arg" >&6
-if test -n "$cercs_cv_gen_thread_include_arg"; then
-arg="$cercs_cv_gen_thread_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_include_arg" >&5
+$as_echo "$cercs_cv_ptlpbio_include_arg" >&6; }
+if test -n "$cercs_cv_ptlpbio_include_arg"; then
+arg="$cercs_cv_ptlpbio_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "gen_thread"` -eq 0; then
+if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -30365,70 +29872,70 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for gen_thread package" >&5
-echo $ECHO_N "checking needed link args for gen_thread package... $ECHO_C" >&6
-if test "${cercs_cv_gen_thread_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for ptlpbio package" >&5
+$as_echo_n "checking needed link args for ptlpbio package... " >&6; }
+if test "${cercs_cv_ptlpbio_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./libgen_thread.la"
+search_list="./libptlclient.a"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_gen_thread"; then
-if test `echo $with_gen_thread | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_gen_thread" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_ptlpbio"; then
+if test `echo $with_ptlpbio | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ptlpbio" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_gen_thread
+EXPANDED=$with_ptlpbio
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/libgen_thread.la $datatap_dir/lib/libgen_thread.la $datatap_dir/include/libgen_thread.la $search_list $EXPANDED/libgen_thread.la $EXPANDED/lib/libgen_thread.la $EXPANDED/share/libgen_thread.la $EXPANDED/$cercs_cv_archive/libgen_thread.la $EXPANDED/$cercs_cv_archive/lib/libgen_thread.la $EXPANDED/gen_thread/libgen_thread.la $EXPANDED/gen_thread/$cercs_cv_archive/libgen_thread.la $EXPANDED/gen_thread/lib/libgen_thread.la $EXPANDED/gen_thread/lib/$cercs_cv_archive/ [...]
+search_list="$datatap_dir/libptlclient.a $datatap_dir/lib/libptlclient.a $datatap_dir/include/libptlclient.a $search_list $EXPANDED/libptlclient.a $EXPANDED/lib/libptlclient.a $EXPANDED/share/libptlclient.a $EXPANDED/$cercs_cv_archive/libptlclient.a $EXPANDED/$cercs_cv_archive/lib/libptlclient.a $EXPANDED/ptlpbio/libptlclient.a $EXPANDED/ptlpbio/$cercs_cv_archive/libptlclient.a $EXPANDED/ptlpbio/lib/libptlclient.a $EXPANDED/ptlpbio/lib/$cercs_cv_archive/libptlclient.a"
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../gen_thread/libgen_thread.la `pwd`/../lib/libgen_thread.la `pwd`/../share/libgen_thread.la"
+search_list="$search_list `pwd`/../ptlpbio/libptlclient.a `pwd`/../lib/libptlclient.a `pwd`/../share/libptlclient.a"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/gen_thread/libgen_thread.la $HOME/$cercs_cv_archive/lib/libgen_thread.la $HOME/lib/libgen_thread.la"
+search_list="$search_list $HOME/ptlpbio/libptlclient.a $HOME/$cercs_cv_archive/lib/libptlclient.a $HOME/lib/libptlclient.a"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/gen_thread/lib/libgen_thread.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libgen_thread.la $CHAOS_HOMEDIR/gen_thread/$cercs_cv_archive/lib/libgen_thread.la $CHAOS_HOMEDIR/gen_thread/lib/libgen_thread.la $CHAOS_HOMEDIR/lib/libgen_thread.la"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ptlpbio/lib/libptlclient.a $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libptlclient.a $CHAOS_HOMEDIR/ptlpbio/$cercs_cv_archive/lib/libptlclient.a $CHAOS_HOMEDIR/ptlpbio/lib/libptlclient.a $CHAOS_HOMEDIR/lib/libptlclient.a"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/libgen_thread.la $search_list"
+search_list="$tmpdir/libptlclient.a $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libgen_thread.la $search_list"
+search_list="$tmpdir/lib/libptlclient.a $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/libgen_thread.la $search_list"
+search_list="$tmpdir/libptlclient.a $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libgen_thread.la $search_list"
+search_list="$tmpdir/lib/libptlclient.a $search_list"
 fi
 if test "lib" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/libgen_thread.la"
+     search_list="$search_list $tmp_lib_value/libptlclient.a"
   done
 fi
 
-search_list="$datatap_dir/libgen_thread.la $datatap_dir/lib/libgen_thread.la $datatap_dir/include/libgen_thread.la $search_list /usr/lib/libgen_thread.la /usr/local/lib/libgen_thread.la /opt/gen_thread/lib/libgen_thread.la /opt/misc/lib/libgen_thread.la /opt/misc/lib/$cercs_cv_archive/libgen_thread.la"
+search_list="$datatap_dir/libptlclient.a $datatap_dir/lib/libptlclient.a $datatap_dir/include/libptlclient.a $search_list /usr/lib/libptlclient.a /usr/local/lib/libptlclient.a /opt/ptlpbio/lib/libptlclient.a /opt/misc/lib/libptlclient.a /opt/misc/lib/$cercs_cv_archive/libptlclient.a"
 tmp_search_results=""
-echo "configure:30427: searching for $search_list " >&5
+echo "configure:29934: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30431: first found $tmp_search_results " >&5
+	echo "configure:29938: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30437,30 +29944,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libgen_thread.la"; then
-cercs_cv_gen_thread_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libgen_thread.la//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libptlclient.a"; then
+cercs_cv_ptlpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libptlclient.a//g"`
 else
-cercs_cv_gen_thread_link_dir=""
+cercs_cv_ptlpbio_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_gen_thread_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_link_dir" >&5
+$as_echo "$cercs_cv_ptlpbio_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_gen_thread_link_arg=`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_gen_thread_link_arg"; then
-arg=$cercs_cv_gen_thread_link_arg
+cercs_cv_ptlpbio_link_arg=`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ptlpbio_link_arg"; then
+arg=$cercs_cv_ptlpbio_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libgen_thread.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_gen_thread_link_dir/$root.la; then
+root=`echo libptlclient.a | sed 's/\..*//'`
+if test ! -r $cercs_cv_ptlpbio_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_gen_thread_link_arg "`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_ptlpbio_link_arg "`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "gen_thread"` -eq 0; then
+if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -30475,33 +29982,33 @@ else
 
 
 
-# Check whether --with-gen_thread or --without-gen_thread was given.
-if test "${with_gen_thread+set}" = set; then
-  withval="$with_gen_thread"
+# Check whether --with-ptlpbio was given.
+if test "${with_ptlpbio+set}" = set; then
+  withval=$with_ptlpbio;
+fi
 
-fi;
 
-if test -n "$with_gen_thread"; then
-unset cercs_cv_gen_thread_include_arg
-unset cercs_cv_gen_thread_link_arg
-if test `echo $with_gen_thread | sed 's/\(.\).*/\1/g'` != "/"; then
-with_gen_thread=`pwd`/$with_gen_thread
+if test -n "$with_ptlpbio"; then
+unset cercs_cv_ptlpbio_include_arg
+unset cercs_cv_ptlpbio_link_arg
+if test `echo $with_ptlpbio | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ptlpbio=`pwd`/$with_ptlpbio
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for gen_thread package" >&5
-echo $ECHO_N "checking needed include args for gen_thread package... $ECHO_C" >&6
-if test "${cercs_cv_gen_thread_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for ptlpbio package" >&5
+$as_echo_n "checking needed include args for ptlpbio package... " >&6; }
+if test "${cercs_cv_ptlpbio_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../gen_thread $PWD/../../gen_thread $PWD/../../../gen_thread"
+search_list="$PWD/../ptlpbio $PWD/../../ptlpbio $PWD/../../../ptlpbio"
 tmp_search_results=""
-echo "configure:30500: searching for $search_list " >&5
+echo "configure:30007: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30504: first found $tmp_search_results " >&5
+	echo "configure:30011: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30510,19 +30017,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/gen_thread.h"; then
-cercs_cv_gen_thread_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.gen_thread.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_portal.h"; then
+cercs_cv_ptlpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_portal.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_gen_thread_include_arg" >&6
-if test -n "$cercs_cv_gen_thread_include_arg"; then
-arg="$cercs_cv_gen_thread_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_include_arg" >&5
+$as_echo "$cercs_cv_ptlpbio_include_arg" >&6; }
+if test -n "$cercs_cv_ptlpbio_include_arg"; then
+arg="$cercs_cv_ptlpbio_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "gen_thread"` -eq 0; then
+if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -30530,20 +30037,20 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for gen_thread package" >&5
-echo $ECHO_N "checking needed link args for gen_thread package... $ECHO_C" >&6
-if test "${cercs_cv_gen_thread_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for ptlpbio package" >&5
+$as_echo_n "checking needed link args for ptlpbio package... " >&6; }
+if test "${cercs_cv_ptlpbio_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../gen_thread $PWD/../../gen_thread $PWD/../../../gen_thread"
+search_list="$PWD/../ptlpbio $PWD/../../ptlpbio $PWD/../../../ptlpbio"
 tmp_search_results=""
-echo "configure:30542: searching for $search_list " >&5
+echo "configure:30049: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30546: first found $tmp_search_results " >&5
+	echo "configure:30053: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30552,30 +30059,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libgen_thread.la"; then
-cercs_cv_gen_thread_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libgen_thread.la//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libptlclient.a"; then
+cercs_cv_ptlpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libptlclient.a//g"`
 else
-cercs_cv_gen_thread_link_dir=""
+cercs_cv_ptlpbio_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_gen_thread_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_link_dir" >&5
+$as_echo "$cercs_cv_ptlpbio_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_gen_thread_link_arg=`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_gen_thread_link_arg"; then
-arg=$cercs_cv_gen_thread_link_arg
+cercs_cv_ptlpbio_link_arg=`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ptlpbio_link_arg"; then
+arg=$cercs_cv_ptlpbio_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libgen_thread.la | sed 's/\..*//'`
-if test ! -r $cercs_cv_gen_thread_link_dir/$root.la; then
+root=`echo libptlclient.a | sed 's/\..*//'`
+if test ! -r $cercs_cv_ptlpbio_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_gen_thread_link_arg "`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_ptlpbio_link_arg "`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "gen_thread"` -eq 0; then
+if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -30587,29 +30094,38 @@ fi
 
 fi
 
-		if test -n "$cercs_cv_ibpbio_link_dir";then
-			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ibpbio_link_dir"
-			DT_LIBS="$DT_LIBS -libclient"
-			datatap=ibverbs
-		else
-			temptest=disable
-		fi
-		if test -n "$cercs_cv_ffs_link_dir";then
-			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ffs_link_dir"
-			DT_LIBS="$DT_LIBS -lgen_thread"
-			datatap=ibverbs
-		else
-			temptest=disable
-		fi
-		if test -n "$cercs_cv_gen_thread_link_dir";then
-			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_gen_thread_link_dir"
-			DT_LIBS="$DT_LIBS -lgen_thread"
-			datatap=ibverbs
+
+		if test -n "$cercs_cv_ptlpbio_link_dir";then
+			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ptlpbio_link_dir"
+			DT_LIBS="$DT_LIBS -lptlclient -lptlserver -lbench -ldl"
+			datatap=portals
 		else
 			temptest=disable
 		fi
 
-        elif test x"$ac_with_portals" = xyes; then
+	else
+		echo "Neither portals nor infiniband found. Disabling datatap"
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DATATAP 1
+_ACEOF
+
+		datatap=disable
+		temptest=disable
+	fi
+else
+	{ $as_echo "$as_me:$LINENO: Datatap with custom library path: $withval" >&5
+$as_echo "$as_me: Datatap with custom library path: $withval" >&6;}
+
+	datatap_dir=$withval
+
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DATATAP 0
+_ACEOF
+
+
+	if test x"$ac_with_infiniband" = xyes; then
 
 
 
@@ -30618,83 +30134,83 @@ if test -z "$with_local_specified"; then
 
 
 
-# Check whether --with-ptlpbio or --without-ptlpbio was given.
-if test "${with_ptlpbio+set}" = set; then
-  withval="$with_ptlpbio"
+# Check whether --with-ibpbio was given.
+if test "${with_ibpbio+set}" = set; then
+  withval=$with_ibpbio;
+fi
 
-fi;
 
-if test -n "$with_ptlpbio"; then
-unset cercs_cv_ptlpbio_include_arg
-unset cercs_cv_ptlpbio_link_arg
-if test `echo $with_ptlpbio | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ptlpbio=`pwd`/$with_ptlpbio
+if test -n "$with_ibpbio"; then
+unset cercs_cv_ibpbio_include_arg
+unset cercs_cv_ibpbio_link_arg
+if test `echo $with_ibpbio | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ibpbio=`pwd`/$with_ibpbio
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for ptlpbio package" >&5
-echo $ECHO_N "checking needed include args for ptlpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ptlpbio_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for ibpbio package" >&5
+$as_echo_n "checking needed include args for ibpbio package... " >&6; }
+if test "${cercs_cv_ibpbio_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./thin_portal.h"
+search_list="./thin_ib.h"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_ptlpbio"; then
-if test `echo $with_ptlpbio | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ptlpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_ibpbio"; then
+if test `echo $with_ibpbio | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ibpbio" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_ptlpbio
+EXPANDED=$with_ibpbio
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/thin_portal.h $datatap_dir/lib/thin_portal.h $datatap_dir/include/thin_portal.h $search_list $EXPANDED/thin_portal.h $EXPANDED/include/thin_portal.h $EXPANDED/share/thin_portal.h $EXPANDED/$cercs_cv_archive/thin_portal.h $EXPANDED/$cercs_cv_archive/include/thin_portal.h $EXPANDED/ptlpbio/thin_portal.h $EXPANDED/ptlpbio/$cercs_cv_archive/thin_portal.h $EXPANDED/ptlpbio/include/thin_portal.h $EXPANDED/ptlpbio/include/$cercs_cv_archive/thin_portal.h"
+search_list="$datatap_dir/thin_ib.h $datatap_dir/lib/thin_ib.h $datatap_dir/include/thin_ib.h $search_list $EXPANDED/thin_ib.h $EXPANDED/include/thin_ib.h $EXPANDED/share/thin_ib.h $EXPANDED/$cercs_cv_archive/thin_ib.h $EXPANDED/$cercs_cv_archive/include/thin_ib.h $EXPANDED/ibpbio/thin_ib.h $EXPANDED/ibpbio/$cercs_cv_archive/thin_ib.h $EXPANDED/ibpbio/include/thin_ib.h $EXPANDED/ibpbio/include/$cercs_cv_archive/thin_ib.h"
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ptlpbio/thin_portal.h `pwd`/../include/thin_portal.h `pwd`/../share/thin_portal.h"
+search_list="$search_list `pwd`/../ibpbio/thin_ib.h `pwd`/../include/thin_ib.h `pwd`/../share/thin_ib.h"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ptlpbio/thin_portal.h $HOME/$cercs_cv_archive/include/thin_portal.h $HOME/include/thin_portal.h"
+search_list="$search_list $HOME/ibpbio/thin_ib.h $HOME/$cercs_cv_archive/include/thin_ib.h $HOME/include/thin_ib.h"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ptlpbio/include/thin_portal.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/thin_portal.h $CHAOS_HOMEDIR/ptlpbio/$cercs_cv_archive/include/thin_portal.h $CHAOS_HOMEDIR/ptlpbio/include/thin_portal.h $CHAOS_HOMEDIR/include/thin_portal.h"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ibpbio/include/thin_ib.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/thin_ib.h $CHAOS_HOMEDIR/ibpbio/$cercs_cv_archive/include/thin_ib.h $CHAOS_HOMEDIR/ibpbio/include/thin_ib.h $CHAOS_HOMEDIR/include/thin_ib.h"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/thin_portal.h $search_list"
+search_list="$tmpdir/thin_ib.h $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/thin_portal.h $search_list"
+search_list="$tmpdir/lib/thin_ib.h $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/thin_portal.h $search_list"
+search_list="$tmpdir/thin_ib.h $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/include/thin_portal.h $search_list"
+search_list="$tmpdir/include/thin_ib.h $search_list"
 fi
 if test "include" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/thin_portal.h"
+     search_list="$search_list $tmp_lib_value/thin_ib.h"
   done
 fi
 
-search_list="$datatap_dir/thin_portal.h $datatap_dir/lib/thin_portal.h $datatap_dir/include/thin_portal.h $search_list /usr/include/thin_portal.h /usr/local/include/thin_portal.h /opt/ptlpbio/include/thin_portal.h /opt/misc/include/thin_portal.h /opt/misc/include/$cercs_cv_archive/thin_portal.h"
+search_list="$datatap_dir/thin_ib.h $datatap_dir/lib/thin_ib.h $datatap_dir/include/thin_ib.h $search_list /usr/include/thin_ib.h /usr/local/include/thin_ib.h /opt/ibpbio/include/thin_ib.h /opt/misc/include/thin_ib.h /opt/misc/include/$cercs_cv_archive/thin_ib.h"
 tmp_search_results=""
-echo "configure:30693: searching for $search_list " >&5
+echo "configure:30209: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30697: first found $tmp_search_results " >&5
+	echo "configure:30213: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30703,19 +30219,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_portal.h"; then
-cercs_cv_ptlpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_portal.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_ib.h"; then
+cercs_cv_ibpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_ib.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ptlpbio_include_arg" >&6
-if test -n "$cercs_cv_ptlpbio_include_arg"; then
-arg="$cercs_cv_ptlpbio_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_include_arg" >&5
+$as_echo "$cercs_cv_ibpbio_include_arg" >&6; }
+if test -n "$cercs_cv_ibpbio_include_arg"; then
+arg="$cercs_cv_ibpbio_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+if test `echo $arg | grep -c "ibpbio"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -30723,70 +30239,70 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ptlpbio package" >&5
-echo $ECHO_N "checking needed link args for ptlpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ptlpbio_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for ibpbio package" >&5
+$as_echo_n "checking needed link args for ibpbio package... " >&6; }
+if test "${cercs_cv_ibpbio_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
 
 
 cercs_tmp=""
-search_list="./libptlclient.a"
+search_list="./libibclient.la"
 CHAOS_HOMEDIR=""
 if test -n "$CSH"; then
 CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -n "$with_ptlpbio"; then
-if test `echo $with_ptlpbio | cut -c1` = "~"; then
-EXPANDED=`echo "echo $with_ptlpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+if test -n "$with_ibpbio"; then
+if test `echo $with_ibpbio | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ibpbio" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-EXPANDED=$with_ptlpbio
+EXPANDED=$with_ibpbio
 fi
 
 echo "Datatap = $datatap_dir"
 
-search_list="$datatap_dir/libptlclient.a $datatap_dir/lib/libptlclient.a $datatap_dir/include/libptlclient.a $search_list $EXPANDED/libptlclient.a $EXPANDED/lib/libptlclient.a $EXPANDED/share/libptlclient.a $EXPANDED/$cercs_cv_archive/libptlclient.a $EXPANDED/$cercs_cv_archive/lib/libptlclient.a $EXPANDED/ptlpbio/libptlclient.a $EXPANDED/ptlpbio/$cercs_cv_archive/libptlclient.a $EXPANDED/ptlpbio/lib/libptlclient.a $EXPANDED/ptlpbio/lib/$cercs_cv_archive/libptlclient.a"
+search_list="$datatap_dir/libibclient.la $datatap_dir/lib/libibclient.la $datatap_dir/include/libibclient.la $search_list $EXPANDED/libibclient.la $EXPANDED/lib/libibclient.la $EXPANDED/share/libibclient.la $EXPANDED/$cercs_cv_archive/libibclient.la $EXPANDED/$cercs_cv_archive/lib/libibclient.la $EXPANDED/ibpbio/libibclient.la $EXPANDED/ibpbio/$cercs_cv_archive/libibclient.la $EXPANDED/ibpbio/lib/libibclient.la $EXPANDED/ibpbio/lib/$cercs_cv_archive/libibclient.la"
 fi
 if test -z "$with_installed_specified"; then
-search_list="$search_list `pwd`/../ptlpbio/libptlclient.a `pwd`/../lib/libptlclient.a `pwd`/../share/libptlclient.a"
+search_list="$search_list `pwd`/../ibpbio/libibclient.la `pwd`/../lib/libibclient.la `pwd`/../share/libibclient.la"
 if test "$CHAOS_HOMEDIR" != "$HOME"; then
-search_list="$search_list $HOME/ptlpbio/libptlclient.a $HOME/$cercs_cv_archive/lib/libptlclient.a $HOME/lib/libptlclient.a"
+search_list="$search_list $HOME/ibpbio/libibclient.la $HOME/$cercs_cv_archive/lib/libibclient.la $HOME/lib/libibclient.la"
 fi
 fi
 if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
-search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ptlpbio/lib/libptlclient.a $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libptlclient.a $CHAOS_HOMEDIR/ptlpbio/$cercs_cv_archive/lib/libptlclient.a $CHAOS_HOMEDIR/ptlpbio/lib/libptlclient.a $CHAOS_HOMEDIR/lib/libptlclient.a"
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ibpbio/lib/libibclient.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libibclient.la $CHAOS_HOMEDIR/ibpbio/$cercs_cv_archive/lib/libibclient.la $CHAOS_HOMEDIR/ibpbio/lib/libibclient.la $CHAOS_HOMEDIR/lib/libibclient.la"
 fi
 if test "$libdir" != '${exec_prefix}/lib'; then
 tmpdir=`echo ${libdir} |  sed 's%/$%%'`
-search_list="$tmpdir/libptlclient.a $search_list"
+search_list="$tmpdir/libibclient.la $search_list"
 fi
 if test "$exec_prefix" != "NONE"; then
 tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libptlclient.a $search_list"
+search_list="$tmpdir/lib/libibclient.la $search_list"
 fi
 if test "$includedir" != '${prefix}/include'; then
 tmpdir=`echo ${includedir} |  sed 's%/$%%'`
-search_list="$tmpdir/libptlclient.a $search_list"
+search_list="$tmpdir/libibclient.la $search_list"
 fi
 if test "$prefix" != "NONE"; then
 tmpdir=`echo ${prefix} |  sed 's%/$%%'`
-search_list="$tmpdir/lib/libptlclient.a $search_list"
+search_list="$tmpdir/lib/libibclient.la $search_list"
 fi
 if test "lib" == "lib"; then
   for tmp_lib_value in $sys_lib_search_path_spec; do
-     search_list="$search_list $tmp_lib_value/libptlclient.a"
+     search_list="$search_list $tmp_lib_value/libibclient.la"
   done
 fi
 
-search_list="$datatap_dir/libptlclient.a $datatap_dir/lib/libptlclient.a $datatap_dir/include/libptlclient.a $search_list /usr/lib/libptlclient.a /usr/local/lib/libptlclient.a /opt/ptlpbio/lib/libptlclient.a /opt/misc/lib/libptlclient.a /opt/misc/lib/$cercs_cv_archive/libptlclient.a"
+search_list="$datatap_dir/libibclient.la $datatap_dir/lib/libibclient.la $datatap_dir/include/libibclient.la $search_list /usr/lib/libibclient.la /usr/local/lib/libibclient.la /opt/ibpbio/lib/libibclient.la /opt/misc/lib/libibclient.la /opt/misc/lib/$cercs_cv_archive/libibclient.la"
 tmp_search_results=""
-echo "configure:30785: searching for $search_list " >&5
+echo "configure:30301: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30789: first found $tmp_search_results " >&5
+	echo "configure:30305: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30795,30 +30311,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libptlclient.a"; then
-cercs_cv_ptlpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libptlclient.a//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libibclient.la"; then
+cercs_cv_ibpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libibclient.la//g"`
 else
-cercs_cv_ptlpbio_link_dir=""
+cercs_cv_ibpbio_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ptlpbio_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_link_dir" >&5
+$as_echo "$cercs_cv_ibpbio_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_ptlpbio_link_arg=`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ptlpbio_link_arg"; then
-arg=$cercs_cv_ptlpbio_link_arg
+cercs_cv_ibpbio_link_arg=`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ibpbio_link_arg"; then
+arg=$cercs_cv_ibpbio_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libptlclient.a | sed 's/\..*//'`
-if test ! -r $cercs_cv_ptlpbio_link_dir/$root.la; then
+root=`echo libibclient.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_ibpbio_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ptlpbio_link_arg "`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_ibpbio_link_arg "`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+if test `echo $arg | grep -c "ibpbio"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -30833,33 +30349,33 @@ else
 
 
 
-# Check whether --with-ptlpbio or --without-ptlpbio was given.
-if test "${with_ptlpbio+set}" = set; then
-  withval="$with_ptlpbio"
+# Check whether --with-ibpbio was given.
+if test "${with_ibpbio+set}" = set; then
+  withval=$with_ibpbio;
+fi
 
-fi;
 
-if test -n "$with_ptlpbio"; then
-unset cercs_cv_ptlpbio_include_arg
-unset cercs_cv_ptlpbio_link_arg
-if test `echo $with_ptlpbio | sed 's/\(.\).*/\1/g'` != "/"; then
-with_ptlpbio=`pwd`/$with_ptlpbio
+if test -n "$with_ibpbio"; then
+unset cercs_cv_ibpbio_include_arg
+unset cercs_cv_ibpbio_link_arg
+if test `echo $with_ibpbio | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ibpbio=`pwd`/$with_ibpbio
 fi
 fi
-echo "$as_me:$LINENO: checking needed include args for ptlpbio package" >&5
-echo $ECHO_N "checking needed include args for ptlpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ptlpbio_include_arg+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed include args for ibpbio package" >&5
+$as_echo_n "checking needed include args for ibpbio package... " >&6; }
+if test "${cercs_cv_ibpbio_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../ptlpbio $PWD/../../ptlpbio $PWD/../../../ptlpbio"
+search_list="$PWD/../ibpbio $PWD/../../ibpbio $PWD/../../../ibpbio"
 tmp_search_results=""
-echo "configure:30858: searching for $search_list " >&5
+echo "configure:30374: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30862: first found $tmp_search_results " >&5
+	echo "configure:30378: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30868,19 +30384,19 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_portal.h"; then
-cercs_cv_ptlpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_portal.h##g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_ib.h"; then
+cercs_cv_ibpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_ib.h##g"`
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_include_arg" >&5
-echo "${ECHO_T}$cercs_cv_ptlpbio_include_arg" >&6
-if test -n "$cercs_cv_ptlpbio_include_arg"; then
-arg="$cercs_cv_ptlpbio_include_arg"
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_include_arg" >&5
+$as_echo "$cercs_cv_ibpbio_include_arg" >&6; }
+if test -n "$cercs_cv_ibpbio_include_arg"; then
+arg="$cercs_cv_ibpbio_include_arg"
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
-if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+if test `echo $arg | grep -c "ibpbio"` -eq 0; then
 DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
 DT_CPPFLAGS="$arg $DT_CPPFLAGS"
@@ -30888,20 +30404,20 @@ fi
 fi
 fi
 
-echo "$as_me:$LINENO: checking needed link args for ptlpbio package" >&5
-echo $ECHO_N "checking needed link args for ptlpbio package... $ECHO_C" >&6
-if test "${cercs_cv_ptlpbio_link_dir+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+{ $as_echo "$as_me:$LINENO: checking needed link args for ibpbio package" >&5
+$as_echo_n "checking needed link args for ibpbio package... " >&6; }
+if test "${cercs_cv_ibpbio_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
 
 
-search_list="$PWD/../ptlpbio $PWD/../../ptlpbio $PWD/../../../ptlpbio"
+search_list="$PWD/../ibpbio $PWD/../../ibpbio $PWD/../../../ibpbio"
 tmp_search_results=""
-echo "configure:30900: searching for $search_list " >&5
+echo "configure:30416: searching for $search_list " >&5
 for tmp_search_value in $search_list; do
    if test -r $tmp_search_value; then
 	tmp_search_results=$tmp_search_value
-	echo "configure:30904: first found $tmp_search_results " >&5
+	echo "configure:30420: first found $tmp_search_results " >&5
 	break
    fi
 done
@@ -30910,30 +30426,30 @@ if test -n "$tmp_search_results"; then
 cercs_tmp=$tmp_search_results
 fi
 
-if test -n "$cercs_tmp" -a "$cercs_tmp" != "libptlclient.a"; then
-cercs_cv_ptlpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libptlclient.a//g"`
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libibclient.la"; then
+cercs_cv_ibpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libibclient.la//g"`
 else
-cercs_cv_ptlpbio_link_dir=""
+cercs_cv_ibpbio_link_dir=""
 fi
 
 fi
 
-echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_link_dir" >&5
-echo "${ECHO_T}$cercs_cv_ptlpbio_link_dir" >&6
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ibpbio_link_dir" >&5
+$as_echo "$cercs_cv_ibpbio_link_dir" >&6; }
 ld_arg="-L"
 new_flags=$LDFLAGS
-cercs_cv_ptlpbio_link_arg=`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
-if test -n "$cercs_cv_ptlpbio_link_arg"; then
-arg=$cercs_cv_ptlpbio_link_arg
+cercs_cv_ibpbio_link_arg=`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ibpbio_link_arg"; then
+arg=$cercs_cv_ibpbio_link_arg
 no_dash_arg=`echo $arg | sed 's/^-//g'`
 if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
-root=`echo libptlclient.a | sed 's/\..*//'`
-if test ! -r $cercs_cv_ptlpbio_link_dir/$root.la; then
+root=`echo libibclient.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_ibpbio_link_dir/$root.la; then
 if eval "test \"\${LIBTOOL+set}\" = set"; then
-arg="$cercs_cv_ptlpbio_link_arg "`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/-R/1"`
+arg="$cercs_cv_ibpbio_link_arg "`echo $cercs_cv_ibpbio_link_dir | sed "/./ s/^/-R/1"`
 fi
 fi
-if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+if test `echo $arg | grep -c "ibpbio"` -eq 0; then
 new_flags="$new_flags $arg"
 else
 new_flags="$arg $new_flags"
@@ -30946,2371 +30462,4917 @@ fi
 fi
 
 
-		if test -n "$cercs_cv_ptlpbio_link_dir";then
-			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ptlpbio_link_dir"
-			DT_LIBS="$DT_LIBS -lptlclient -lptlserver -lbench -ldl"
-			datatap=portals
-		else
-			temptest=disable
-		fi
 
-	else
-		echo "Neither portals nor infiniband found. Disabling datatap"
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_DATATAP 1
-_ACEOF
+if test -z "$with_local_specified"; then
 
-		datatap=disable
-		temptest=disable
-	fi
-fi
 
-if test x"$temptest" = xdisable; then
-	datatap=disable
-	echo "Datatap dependency check failed"
 
-cat >>confdefs.h <<\_ACEOF
-#define NO_DATATAP 1
-_ACEOF
 
+# Check whether --with-ffs was given.
+if test "${with_ffs+set}" = set; then
+  withval=$with_ffs;
 fi
 
 
+if test -n "$with_ffs"; then
+unset cercs_cv_ffs_include_arg
+unset cercs_cv_ffs_link_arg
+if test `echo $with_ffs | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ffs=`pwd`/$with_ffs
+fi
+fi
+{ $as_echo "$as_me:$LINENO: checking needed include args for ffs package" >&5
+$as_echo_n "checking needed include args for ffs package... " >&6; }
+if test "${cercs_cv_ffs_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
 
 
 
 
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# Check whether --enable-research-transports or --disable-research-transports was given.
-if test "${enable_research_transports+set}" = set; then
-  enableval="$enable_research_transports"
-
-fi;
-
-
-if test "x$enable_research_transports" == "xyes"; then
-  RESEARCH_TRANSPORTS_TRUE=
-  RESEARCH_TRANSPORTS_FALSE='#'
+cercs_tmp=""
+search_list="./ffs.h"
+CHAOS_HOMEDIR=""
+if test -n "$CSH"; then
+CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
+fi
+if test -n "$with_ffs"; then
+if test `echo $with_ffs | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ffs" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-  RESEARCH_TRANSPORTS_TRUE='#'
-  RESEARCH_TRANSPORTS_FALSE=
+EXPANDED=$with_ffs
 fi
 
+echo "Datatap = $datatap_dir"
 
-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$datatap != xdisable; then
-  HAVE_DATATAP_TRUE=
-  HAVE_DATATAP_FALSE='#'
-else
-  HAVE_DATATAP_TRUE='#'
-  HAVE_DATATAP_FALSE=
+search_list="$datatap_dir/ffs.h $datatap_dir/lib/ffs.h $datatap_dir/include/ffs.h $search_list $EXPANDED/ffs.h $EXPANDED/include/ffs.h $EXPANDED/share/ffs.h $EXPANDED/$cercs_cv_archive/ffs.h $EXPANDED/$cercs_cv_archive/include/ffs.h $EXPANDED/ffs/ffs.h $EXPANDED/ffs/$cercs_cv_archive/ffs.h $EXPANDED/ffs/include/ffs.h $EXPANDED/ffs/include/$cercs_cv_archive/ffs.h"
+fi
+if test -z "$with_installed_specified"; then
+search_list="$search_list `pwd`/../ffs/ffs.h `pwd`/../include/ffs.h `pwd`/../share/ffs.h"
+if test "$CHAOS_HOMEDIR" != "$HOME"; then
+search_list="$search_list $HOME/ffs/ffs.h $HOME/$cercs_cv_archive/include/ffs.h $HOME/include/ffs.h"
+fi
+fi
+if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ffs/include/ffs.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/ffs.h $CHAOS_HOMEDIR/ffs/$cercs_cv_archive/include/ffs.h $CHAOS_HOMEDIR/ffs/include/ffs.h $CHAOS_HOMEDIR/include/ffs.h"
+fi
+if test "$libdir" != '${exec_prefix}/lib'; then
+tmpdir=`echo ${libdir} |  sed 's%/$%%'`
+search_list="$tmpdir/ffs.h $search_list"
+fi
+if test "$exec_prefix" != "NONE"; then
+tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/lib/ffs.h $search_list"
+fi
+if test "$includedir" != '${prefix}/include'; then
+tmpdir=`echo ${includedir} |  sed 's%/$%%'`
+search_list="$tmpdir/ffs.h $search_list"
+fi
+if test "$prefix" != "NONE"; then
+tmpdir=`echo ${prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/include/ffs.h $search_list"
+fi
+if test "include" == "lib"; then
+  for tmp_lib_value in $sys_lib_search_path_spec; do
+     search_list="$search_list $tmp_lib_value/ffs.h"
+  done
 fi
 
+search_list="$datatap_dir/ffs.h $datatap_dir/lib/ffs.h $datatap_dir/include/ffs.h $search_list /usr/include/ffs.h /usr/local/include/ffs.h /opt/ffs/include/ffs.h /opt/misc/include/ffs.h /opt/misc/include/$cercs_cv_archive/ffs.h"
+tmp_search_results=""
+echo "configure:30544: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:30548: first found $tmp_search_results " >&5
+	break
+   fi
+done
 
-# Check whether --enable-write or --disable-write was given.
-if test "${enable_write+set}" = set; then
-  enableval="$enable_write"
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
+fi
 
-fi;
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/ffs.h"; then
+cercs_cv_ffs_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.ffs.h##g"`
+fi
 
+fi
 
-if test "x$enable_write" != "xno"; then
-  BUILD_WRITE_TRUE=
-  BUILD_WRITE_FALSE='#'
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ffs_include_arg" >&5
+$as_echo "$cercs_cv_ffs_include_arg" >&6; }
+if test -n "$cercs_cv_ffs_include_arg"; then
+arg="$cercs_cv_ffs_include_arg"
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
+if test `echo $arg | grep -c "ffs"` -eq 0; then
+DT_CPPFLAGS="$DT_CPPFLAGS $arg";
 else
-  BUILD_WRITE_TRUE='#'
-  BUILD_WRITE_FALSE=
+DT_CPPFLAGS="$arg $DT_CPPFLAGS"
+fi
+fi
 fi
 
-
-
-LIBS="$MPILIBS"
-
-
-
-if false; then
-  USE_PARALLEL_COMPILER_TRUE=
-  USE_PARALLEL_COMPILER_FALSE='#'
+{ $as_echo "$as_me:$LINENO: checking needed link args for ffs package" >&5
+$as_echo_n "checking needed link args for ffs package... " >&6; }
+if test "${cercs_cv_ffs_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
 else
-  USE_PARALLEL_COMPILER_TRUE='#'
-  USE_PARALLEL_COMPILER_FALSE=
-fi
 
 
-if test -z "${HAVE_PHDF5_TRUE}" -a -z "${HAVE_HDF5_FALSE}"; then
-    HDF5_CPPFLAGS="${PHDF5_CPPFLAGS}"
-    HDF5_CFLAGS="${PHDF5_CFLAGS}"
-    HDF5_LDFLAGS="${PHDF5_LDFLAGS}"
-    HDF5_LIBS="${PHDF5_LIBS}"
 
 
-if true; then
-  HAVE_HDF5_TRUE=
-  HAVE_HDF5_FALSE='#'
+cercs_tmp=""
+search_list="./libffs.la"
+CHAOS_HOMEDIR=""
+if test -n "$CSH"; then
+CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
+fi
+if test -n "$with_ffs"; then
+if test `echo $with_ffs | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ffs" | csh -sf 2>/dev/null` || EXPANDED=""
 else
-  HAVE_HDF5_TRUE='#'
-  HAVE_HDF5_FALSE=
+EXPANDED=$with_ffs
 fi
 
+echo "Datatap = $datatap_dir"
 
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_HDF5 1
-_ACEOF
-
-
-
-if true; then
-  USE_PARALLEL_COMPILER_TRUE=
-  USE_PARALLEL_COMPILER_FALSE='#'
-else
-  USE_PARALLEL_COMPILER_TRUE='#'
-  USE_PARALLEL_COMPILER_FALSE=
+search_list="$datatap_dir/libffs.la $datatap_dir/lib/libffs.la $datatap_dir/include/libffs.la $search_list $EXPANDED/libffs.la $EXPANDED/lib/libffs.la $EXPANDED/share/libffs.la $EXPANDED/$cercs_cv_archive/libffs.la $EXPANDED/$cercs_cv_archive/lib/libffs.la $EXPANDED/ffs/libffs.la $EXPANDED/ffs/$cercs_cv_archive/libffs.la $EXPANDED/ffs/lib/libffs.la $EXPANDED/ffs/lib/$cercs_cv_archive/libffs.la"
 fi
-
-    { echo "$as_me:$LINENO: Use PHDF5 for sequential HDF5 tools" >&5
-echo "$as_me: Use PHDF5 for sequential HDF5 tools" >&6;}
+if test -z "$with_installed_specified"; then
+search_list="$search_list `pwd`/../ffs/libffs.la `pwd`/../lib/libffs.la `pwd`/../share/libffs.la"
+if test "$CHAOS_HOMEDIR" != "$HOME"; then
+search_list="$search_list $HOME/ffs/libffs.la $HOME/$cercs_cv_archive/lib/libffs.la $HOME/lib/libffs.la"
 fi
-
-if test -z "${HAVE_NC4PAR_TRUE}" -a -z "${HAVE_NETCDF_FALSE}"; then
-    NETCDF_CPPFLAGS="${NC4PAR_CPPFLAGS}"
-    NETCDF_CFLAGS="${NC4PAR_CFLAGS}"
-    NETCDF_LDFLAGS="${NC4PAR_LDFLAGS}"
-    NETCDF_LIBS="${NC4PAR_LIBS}"
-
-
-if true; then
-  HAVE_NETCDF_TRUE=
-  HAVE_NETCDF_FALSE='#'
-else
-  HAVE_NETCDF_TRUE='#'
-  HAVE_NETCDF_FALSE=
 fi
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_NETCDF 1
-_ACEOF
-
-
-
-if true; then
-  USE_PARALLEL_COMPILER_TRUE=
-  USE_PARALLEL_COMPILER_FALSE='#'
-else
-  USE_PARALLEL_COMPILER_TRUE='#'
-  USE_PARALLEL_COMPILER_FALSE=
+if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ffs/lib/libffs.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libffs.la $CHAOS_HOMEDIR/ffs/$cercs_cv_archive/lib/libffs.la $CHAOS_HOMEDIR/ffs/lib/libffs.la $CHAOS_HOMEDIR/lib/libffs.la"
 fi
-
-    { echo "$as_me:$LINENO: Use NC4PAR for sequential NETCDF tools" >&5
-echo "$as_me: Use NC4PAR for sequential NETCDF tools" >&6;}
+if test "$libdir" != '${exec_prefix}/lib'; then
+tmpdir=`echo ${libdir} |  sed 's%/$%%'`
+search_list="$tmpdir/libffs.la $search_list"
 fi
-
-
-ADIOSLIB_EXTRA_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE"
-ADIOSLIB_CPPFLAGS="${MXML_CPPFLAGS}"
-ADIOSLIB_CFLAGS=
-ADIOSLIB_LDFLAGS="${MXML_LDFLAGS}"
-ADIOSLIB_LDADD="-lm ${MXML_LIBS}"
-ADIOSLIB_SEQ_CPPFLAGS="-D_NOMPI ${MXML_CPPFLAGS}"
-ADIOSLIB_SEQ_CFLAGS=
-ADIOSLIB_SEQ_LDFLAGS="${MXML_LDFLAGS}"
-ADIOSLIB_SEQ_LDADD="-lm ${MXML_LIBS}"
-ADIOSLIB_INT_CPPFLAGS="-D_NOMPI ${MXML_CPPFLAGS}"
-ADIOSLIB_INT_CFLAGS=
-ADIOSLIB_INT_LDFLAGS="${MXML_LDFLAGS}"
-ADIOSLIB_INT_LDADD="-lm ${MXML_LIBS}"
-ADIOSREADLIB_CPPFLAGS=
-ADIOSREADLIB_CFLAGS=
-ADIOSREADLIB_LDFLAGS=
-ADIOSREADLIB_LDADD="-lm"
-ADIOSREADLIB_SEQ_CPPFLAGS="-D_NOMPI"
-ADIOSREADLIB_SEQ_CFLAGS=
-ADIOSREADLIB_SEQ_LDFLAGS=
-ADIOSREADLIB_SEQ_LDADD="-lm"
-if test "x${datatap}" != "xdisable"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${DT_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${DT_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DT_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DT_LIBS}"
-    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DT_CPPFLAGS}"
-    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DT_CFLAGS}"
-    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DT_LDFLAGS}"
-    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DT_LIBS}"
-    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DT_CPPFLAGS}"
-    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DT_CFLAGS}"
-    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DT_LDFLAGS}"
-    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DT_LIBS}"
+if test "$exec_prefix" != "NONE"; then
+tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/lib/libffs.la $search_list"
 fi
-if test -z "${HAVE_DART_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${DART_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DART_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DART_LIBS}"
-    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${DART_CPPFLAGS}"
-    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS}"
-    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${DART_LDFLAGS}"
-    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${DART_LIBS}"
-    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DART_CPPFLAGS}"
-    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DART_CFLAGS}"
-    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DART_LDFLAGS}"
-    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DART_LIBS}"
-    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DART_CPPFLAGS}"
-    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DART_CFLAGS}"
-    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DART_LDFLAGS}"
-    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DART_LIBS}"
+if test "$includedir" != '${prefix}/include'; then
+tmpdir=`echo ${includedir} |  sed 's%/$%%'`
+search_list="$tmpdir/libffs.la $search_list"
 fi
-if test -z "${HAVE_DIMES_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${DIMES_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DIMES_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DIMES_LIBS}"
-    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${DIMES_CPPFLAGS}"
-    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS}"
-    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${DIMES_LDFLAGS}"
-    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${DIMES_LIBS}"
-    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DIMES_CPPFLAGS}"
-    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DIMES_CFLAGS}"
-    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DIMES_LDFLAGS}"
-    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DIMES_LIBS}"
-    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DIMES_CPPFLAGS}"
-    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DIMES_CFLAGS}"
-    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DIMES_LDFLAGS}"
-    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DIMES_LIBS}"
+if test "$prefix" != "NONE"; then
+tmpdir=`echo ${prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/lib/libffs.la $search_list"
 fi
-if test -z "${HAVE_NSSI_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${NSSI_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${NSSI_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${NSSI_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${NSSI_LIBS}"
-    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${MXML_CPPFLAGS} ${NSSI_CPPFLAGS}"
-    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${MXML_CPPFLAGS} ${NSSI_CFLAGS}"
-    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${MXML_LDFLAGS} ${NSSI_LDFLAGS}"
-    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${MXML_LIBS} ${NSSI_LIBS}"
-    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${MXML_CPPFLAGS} ${NSSI_CPPFLAGS}"
-    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${MXML_CPPFLAGS} ${NSSI_CFLAGS}"
-    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${MXML_LDFLAGS} ${NSSI_LDFLAGS}"
-    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${MXML_LIBS} ${NSSI_LIBS}"
+if test "lib" == "lib"; then
+  for tmp_lib_value in $sys_lib_search_path_spec; do
+     search_list="$search_list $tmp_lib_value/libffs.la"
+  done
 fi
-if test -z "${HAVE_NC4PAR_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${NC4PAR_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${NC4PAR_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${NC4PAR_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${NC4PAR_LIBS}"
+
+search_list="$datatap_dir/libffs.la $datatap_dir/lib/libffs.la $datatap_dir/include/libffs.la $search_list /usr/lib/libffs.la /usr/local/lib/libffs.la /opt/ffs/lib/libffs.la /opt/misc/lib/libffs.la /opt/misc/lib/$cercs_cv_archive/libffs.la"
+tmp_search_results=""
+echo "configure:30636: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:30640: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
 fi
-if test -z "${HAVE_PHDF5_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${PHDF5_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${PHDF5_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${PHDF5_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${PHDF5_LIBS}"
+
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libffs.la"; then
+cercs_cv_ffs_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libffs.la//g"`
+else
+cercs_cv_ffs_link_dir=""
 fi
-if test -z "${HAVE_PORTALS_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${PORTALS_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${PORTALS_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${PORTALS_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${PORTALS_LIBS}"
-    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${PORTALS_CPPFLAGS}"
-    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${PORTALS_CFLAGS}"
-    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${PORTALS_LDFLAGS}"
-    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${PORTALS_LIBS}"
+
 fi
-if test -z "${HAVE_INFINIBAND_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${INFINIBAND_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${INFINIBAND_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${INFINIBAND_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${INFINIBAND_LIBS}"
-    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${INFINIBAND_CPPFLAGS}"
-    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${INFINIBAND_CFLAGS}"
-    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${INFINIBAND_LDFLAGS}"
-    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${INFINIBAND_LIBS}"
+
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ffs_link_dir" >&5
+$as_echo "$cercs_cv_ffs_link_dir" >&6; }
+ld_arg="-L"
+new_flags=$LDFLAGS
+cercs_cv_ffs_link_arg=`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ffs_link_arg"; then
+arg=$cercs_cv_ffs_link_arg
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
+root=`echo libffs.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_ffs_link_dir/$root.la; then
+if eval "test \"\${LIBTOOL+set}\" = set"; then
+arg="$cercs_cv_ffs_link_arg "`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/-R/1"`
 fi
-if test -z "${HAVE_NETCDF_TRUE}"; then
-    ADIOSLIB_INT_CPPFLAGS="${ADIOSLIB_INT_CPPFLAGS} ${NETCDF_CPPFLAGS}"
-    ADIOSLIB_INT_CFLAGS="${ADIOSLIB_INT_CFLAGS} ${NETCDF_CFLAGS}"
-    ADIOSLIB_INT_LDFLAGS="${ADIOSLIB_INT_LDFLAGS} ${NETCDF_LDFLAGS}"
-    ADIOSLIB_INT_LDADD="${ADIOSLIB_INT_LDADD} ${NETCDF_LIBS}"
 fi
-if test -z "${HAVE_HDF5_TRUE}"; then
-    ADIOSLIB_INT_CPPFLAGS="${ADIOSLIB_INT_CPPFLAGS} ${HDF5_CPPFLAGS}"
-    ADIOSLIB_INT_CFLAGS="${ADIOSLIB_INT_CFLAGS} ${HDF5_CFLAGS}"
-    ADIOSLIB_INT_LDFLAGS="${ADIOSLIB_INT_LDFLAGS} ${HDF5_LDFLAGS}"
-    ADIOSLIB_INT_LDADD="${ADIOSLIB_INT_LDADD} ${HDF5_LIBS}"
+if test `echo $arg | grep -c "ffs"` -eq 0; then
+new_flags="$new_flags $arg"
+else
+new_flags="$arg $new_flags"
 fi
-if test -z "${HAVE_DMALLOC_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} -DDMALLOC ${DMALLOC_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${DMALLOC_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DMALLOC_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DMALLOC_LIBS}"
-    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${DMALLOC_CPPFLAGS}"
-    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${DMALLOC_CFLAGS}"
-    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${DMALLOC_LDFLAGS}"
-    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${DMALLOC_LIBS}"
-    ADIOSLIB_INT_CPPFLAGS="${ADIOSLIB_INT_CPPFLAGS} ${DMALLOC_CPPFLAGS}"
-    ADIOSLIB_INT_CFLAGS="${ADIOSLIB_INT_CFLAGS} ${DMALLOC_CFLAGS}"
-    ADIOSLIB_INT_LDFLAGS="${ADIOSLIB_INT_LDFLAGS} ${DMALLOC_LDFLAGS}"
-    ADIOSLIB_INT_LDADD="${ADIOSLIB_INT_LDADD} ${DMALLOC_LIBS}"
-    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DMALLOC_CPPFLAGS}"
-    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DMALLOC_CFLAGS}"
-    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DMALLOC_LDFLAGS}"
-    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DMALLOC_LIBS}"
-    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DMALLOC_CPPFLAGS}"
-    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DMALLOC_CFLAGS}"
-    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DMALLOC_LDFLAGS}"
-    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DMALLOC_LIBS}"
 fi
-if test -z "${HAVE_LUSTRE_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${LUSTRE_CPPFLAGS}"
-    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${LUSTRE_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${LUSTRE_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${LUSTRE_LIBS}"
-    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${LUSTRE_CPPFLAGS}"
-    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${LUSTRE_CFLAGS}"
-    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${LUSTRE_LDFLAGS}"
-    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${LUSTRE_LIBS}"
+DT_LDFLAGS=$new_flags
 fi
 
 
+else
 
 
 
 
+# Check whether --with-ffs was given.
+if test "${with_ffs+set}" = set; then
+  withval=$with_ffs;
+fi
 
 
+if test -n "$with_ffs"; then
+unset cercs_cv_ffs_include_arg
+unset cercs_cv_ffs_link_arg
+if test `echo $with_ffs | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ffs=`pwd`/$with_ffs
+fi
+fi
+{ $as_echo "$as_me:$LINENO: checking needed include args for ffs package" >&5
+$as_echo_n "checking needed include args for ffs package... " >&6; }
+if test "${cercs_cv_ffs_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
 
 
+search_list="$PWD/../ffs $PWD/../../ffs $PWD/../../../ffs"
+tmp_search_results=""
+echo "configure:30709: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:30713: first found $tmp_search_results " >&5
+	break
+   fi
+done
 
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
+fi
 
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/ffs.h"; then
+cercs_cv_ffs_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.ffs.h##g"`
+fi
 
+fi
 
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ffs_include_arg" >&5
+$as_echo "$cercs_cv_ffs_include_arg" >&6; }
+if test -n "$cercs_cv_ffs_include_arg"; then
+arg="$cercs_cv_ffs_include_arg"
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
+if test `echo $arg | grep -c "ffs"` -eq 0; then
+DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+else
+DT_CPPFLAGS="$arg $DT_CPPFLAGS"
+fi
+fi
+fi
 
+{ $as_echo "$as_me:$LINENO: checking needed link args for ffs package" >&5
+$as_echo_n "checking needed link args for ffs package... " >&6; }
+if test "${cercs_cv_ffs_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
 
 
-
-
-
-
-
-if test -z "${USE_PARALLEL_COMPILER_TRUE}"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_PARALLEL_COMPILER 1
-_ACEOF
-
-        echo "#### Defined USE_PARALLEL_COMPILER to = [${USE_PARALLEL_COMPILER}]"
+search_list="$PWD/../ffs $PWD/../../ffs $PWD/../../../ffs"
+tmp_search_results=""
+echo "configure:30751: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:30755: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
 fi
 
-                                                                                                                                                                                                                                                                                                                                                              ac_config_files="$ac_config_files Makefile src/Makefile tests/Makefile tests/C/Makefile tests/Fortran/Makefile tests/genarray/Makefile tests/b [...]
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libffs.la"; then
+cercs_cv_ffs_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libffs.la//g"`
+else
+cercs_cv_ffs_link_dir=""
+fi
 
+fi
 
-cat >confcache <<\_ACEOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs, see configure's option --config-cache.
-# It is not useful on other systems.  If it contains results you don't
-# want to keep, you may remove or edit it.
-#
-# config.status only pays attention to the cache file if you give it
-# the --recheck option to rerun configure.
-#
-# `ac_cv_env_foo' variables (set or unset) will be overridden when
-# loading this file, other *unset* `ac_cv_foo' will be assigned the
-# following values.
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ffs_link_dir" >&5
+$as_echo "$cercs_cv_ffs_link_dir" >&6; }
+ld_arg="-L"
+new_flags=$LDFLAGS
+cercs_cv_ffs_link_arg=`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ffs_link_arg"; then
+arg=$cercs_cv_ffs_link_arg
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
+root=`echo libffs.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_ffs_link_dir/$root.la; then
+if eval "test \"\${LIBTOOL+set}\" = set"; then
+arg="$cercs_cv_ffs_link_arg "`echo $cercs_cv_ffs_link_dir | sed "/./ s/^/-R/1"`
+fi
+fi
+if test `echo $arg | grep -c "ffs"` -eq 0; then
+new_flags="$new_flags $arg"
+else
+new_flags="$arg $new_flags"
+fi
+fi
+DT_LDFLAGS=$new_flags
+fi
 
-_ACEOF
 
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-{
-  (set) 2>&1 |
-    case `(ac_space=' '; set | grep ac_space) 2>&1` in
-    *ac_space=\ *)
-      # `set' does not quote correctly, so add quotes (double-quote
-      # substitution turns \\\\ into \\, and sed turns \\ into \).
-      sed -n \
-	"s/'/'\\\\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
-      ;;
-    *)
-      # `set' quotes correctly as required by POSIX, so do not add quotes.
-      sed -n \
-	"s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
-      ;;
-    esac;
-} |
-  sed '
-     t clear
-     : clear
-     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
-     t end
-     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
-     : end' >>confcache
-if diff $cache_file confcache >/dev/null 2>&1; then :; else
-  if test -w $cache_file; then
-    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
-    cat confcache >$cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
 fi
-rm -f confcache
 
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
-# trailing colons and then remove the whole line if VPATH becomes empty
-# (actually we leave an empty line to preserve line numbers).
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
-s/:*\$(srcdir):*/:/;
-s/:*\${srcdir}:*/:/;
-s/:*@srcdir@:*/:/;
-s/^\([^=]*=[	 ]*\):*/\1/;
-s/:*$//;
-s/^[^=]*=[	 ]*$//;
-}'
-fi
 
-DEFS=-DHAVE_CONFIG_H
 
-ac_libobjs=
-ac_ltlibobjs=
-for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
-  # 1. Remove the extension, and $U if already installed.
-  ac_i=`echo "$ac_i" |
-	 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
-  # 2. Add them.
-  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
-  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
+if test -z "$with_local_specified"; then
 
-LTLIBOBJS=$ac_ltlibobjs
 
 
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+# Check whether --with-gen_thread was given.
+if test "${with_gen_thread+set}" = set; then
+  withval=$with_gen_thread;
 fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+
+if test -n "$with_gen_thread"; then
+unset cercs_cv_gen_thread_include_arg
+unset cercs_cv_gen_thread_link_arg
+if test `echo $with_gen_thread | sed 's/\(.\).*/\1/g'` != "/"; then
+with_gen_thread=`pwd`/$with_gen_thread
 fi
-if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_MPI_TRUE}" && test -z "${HAVE_MPI_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_MPI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_MPI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking needed include args for gen_thread package" >&5
+$as_echo_n "checking needed include args for gen_thread package... " >&6; }
+if test "${cercs_cv_gen_thread_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+
+cercs_tmp=""
+search_list="./gen_thread.h"
+CHAOS_HOMEDIR=""
+if test -n "$CSH"; then
+CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -z "${HAVE_MPI_TRUE}" && test -z "${HAVE_MPI_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_MPI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_MPI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test -n "$with_gen_thread"; then
+if test `echo $with_gen_thread | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_gen_thread" | csh -sf 2>/dev/null` || EXPANDED=""
+else
+EXPANDED=$with_gen_thread
 fi
-if test -z "${BUILD_FORTRAN_TRUE}" && test -z "${BUILD_FORTRAN_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"BUILD_FORTRAN\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"BUILD_FORTRAN\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+echo "Datatap = $datatap_dir"
+
+search_list="$datatap_dir/gen_thread.h $datatap_dir/lib/gen_thread.h $datatap_dir/include/gen_thread.h $search_list $EXPANDED/gen_thread.h $EXPANDED/include/gen_thread.h $EXPANDED/share/gen_thread.h $EXPANDED/$cercs_cv_archive/gen_thread.h $EXPANDED/$cercs_cv_archive/include/gen_thread.h $EXPANDED/gen_thread/gen_thread.h $EXPANDED/gen_thread/$cercs_cv_archive/gen_thread.h $EXPANDED/gen_thread/include/gen_thread.h $EXPANDED/gen_thread/include/$cercs_cv_archive/gen_thread.h"
 fi
-if test -z "${HAVE_MPI_TRUE}" && test -z "${HAVE_MPI_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_MPI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_MPI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test -z "$with_installed_specified"; then
+search_list="$search_list `pwd`/../gen_thread/gen_thread.h `pwd`/../include/gen_thread.h `pwd`/../share/gen_thread.h"
+if test "$CHAOS_HOMEDIR" != "$HOME"; then
+search_list="$search_list $HOME/gen_thread/gen_thread.h $HOME/$cercs_cv_archive/include/gen_thread.h $HOME/include/gen_thread.h"
 fi
-if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/gen_thread/include/gen_thread.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/gen_thread.h $CHAOS_HOMEDIR/gen_thread/$cercs_cv_archive/include/gen_thread.h $CHAOS_HOMEDIR/gen_thread/include/gen_thread.h $CHAOS_HOMEDIR/include/gen_thread.h"
 fi
-if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "$libdir" != '${exec_prefix}/lib'; then
+tmpdir=`echo ${libdir} |  sed 's%/$%%'`
+search_list="$tmpdir/gen_thread.h $search_list"
 fi
-if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "$exec_prefix" != "NONE"; then
+tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/lib/gen_thread.h $search_list"
 fi
-if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "$includedir" != '${prefix}/include'; then
+tmpdir=`echo ${includedir} |  sed 's%/$%%'`
+search_list="$tmpdir/gen_thread.h $search_list"
 fi
-if test -z "${HAVE_INFINIBAND_TRUE}" && test -z "${HAVE_INFINIBAND_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_INFINIBAND\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_INFINIBAND\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "$prefix" != "NONE"; then
+tmpdir=`echo ${prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/include/gen_thread.h $search_list"
 fi
-if test -z "${HAVE_INFINIBAND_TRUE}" && test -z "${HAVE_INFINIBAND_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_INFINIBAND\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_INFINIBAND\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "include" == "lib"; then
+  for tmp_lib_value in $sys_lib_search_path_spec; do
+     search_list="$search_list $tmp_lib_value/gen_thread.h"
+  done
 fi
-if test -z "${HAVE_INFINIBAND_TRUE}" && test -z "${HAVE_INFINIBAND_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_INFINIBAND\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_INFINIBAND\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+search_list="$datatap_dir/gen_thread.h $datatap_dir/lib/gen_thread.h $datatap_dir/include/gen_thread.h $search_list /usr/include/gen_thread.h /usr/local/include/gen_thread.h /opt/gen_thread/include/gen_thread.h /opt/misc/include/gen_thread.h /opt/misc/include/$cercs_cv_archive/gen_thread.h"
+tmp_search_results=""
+echo "configure:30879: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:30883: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
 fi
-if test -z "${HAVE_PORTALS_TRUE}" && test -z "${HAVE_PORTALS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PORTALS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PORTALS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/gen_thread.h"; then
+cercs_cv_gen_thread_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.gen_thread.h##g"`
 fi
-if test -z "${NEED_DARWIN_SINGLE_MODULE_TRUE}" && test -z "${NEED_DARWIN_SINGLE_MODULE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"NEED_DARWIN_SINGLE_MODULE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"NEED_DARWIN_SINGLE_MODULE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
 fi
-if test -z "${HAVE_PORTALS_TRUE}" && test -z "${HAVE_PORTALS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PORTALS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PORTALS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
-if test -z "${NEED_DARWIN_SINGLE_MODULE_TRUE}" && test -z "${NEED_DARWIN_SINGLE_MODULE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"NEED_DARWIN_SINGLE_MODULE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"NEED_DARWIN_SINGLE_MODULE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_include_arg" >&5
+$as_echo "$cercs_cv_gen_thread_include_arg" >&6; }
+if test -n "$cercs_cv_gen_thread_include_arg"; then
+arg="$cercs_cv_gen_thread_include_arg"
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
+if test `echo $arg | grep -c "gen_thread"` -eq 0; then
+DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+else
+DT_CPPFLAGS="$arg $DT_CPPFLAGS"
 fi
-if test -z "${HAVE_PORTALS_TRUE}" && test -z "${HAVE_PORTALS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PORTALS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PORTALS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_PORTALS_TRUE}" && test -z "${HAVE_PORTALS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PORTALS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PORTALS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking needed link args for gen_thread package" >&5
+$as_echo_n "checking needed link args for gen_thread package... " >&6; }
+if test "${cercs_cv_gen_thread_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+
+cercs_tmp=""
+search_list="./libgen_thread.la"
+CHAOS_HOMEDIR=""
+if test -n "$CSH"; then
+CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test -n "$with_gen_thread"; then
+if test `echo $with_gen_thread | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_gen_thread" | csh -sf 2>/dev/null` || EXPANDED=""
+else
+EXPANDED=$with_gen_thread
 fi
-if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+echo "Datatap = $datatap_dir"
+
+search_list="$datatap_dir/libgen_thread.la $datatap_dir/lib/libgen_thread.la $datatap_dir/include/libgen_thread.la $search_list $EXPANDED/libgen_thread.la $EXPANDED/lib/libgen_thread.la $EXPANDED/share/libgen_thread.la $EXPANDED/$cercs_cv_archive/libgen_thread.la $EXPANDED/$cercs_cv_archive/lib/libgen_thread.la $EXPANDED/gen_thread/libgen_thread.la $EXPANDED/gen_thread/$cercs_cv_archive/libgen_thread.la $EXPANDED/gen_thread/lib/libgen_thread.la $EXPANDED/gen_thread/lib/$cercs_cv_archive/ [...]
 fi
-if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test -z "$with_installed_specified"; then
+search_list="$search_list `pwd`/../gen_thread/libgen_thread.la `pwd`/../lib/libgen_thread.la `pwd`/../share/libgen_thread.la"
+if test "$CHAOS_HOMEDIR" != "$HOME"; then
+search_list="$search_list $HOME/gen_thread/libgen_thread.la $HOME/$cercs_cv_archive/lib/libgen_thread.la $HOME/lib/libgen_thread.la"
 fi
-if test -z "${HAVE_PHDF5_TRUE}" && test -z "${HAVE_PHDF5_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PHDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PHDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_PHDF5_TRUE}" && test -z "${HAVE_PHDF5_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PHDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PHDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/gen_thread/lib/libgen_thread.la $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libgen_thread.la $CHAOS_HOMEDIR/gen_thread/$cercs_cv_archive/lib/libgen_thread.la $CHAOS_HOMEDIR/gen_thread/lib/libgen_thread.la $CHAOS_HOMEDIR/lib/libgen_thread.la"
 fi
-if test -z "${HAVE_PHDF5_TRUE}" && test -z "${HAVE_PHDF5_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PHDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PHDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "$libdir" != '${exec_prefix}/lib'; then
+tmpdir=`echo ${libdir} |  sed 's%/$%%'`
+search_list="$tmpdir/libgen_thread.la $search_list"
 fi
-if test -z "${HAVE_PHDF5_TRUE}" && test -z "${HAVE_PHDF5_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PHDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PHDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "$exec_prefix" != "NONE"; then
+tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/lib/libgen_thread.la $search_list"
 fi
-if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "$includedir" != '${prefix}/include'; then
+tmpdir=`echo ${includedir} |  sed 's%/$%%'`
+search_list="$tmpdir/libgen_thread.la $search_list"
 fi
-if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "$prefix" != "NONE"; then
+tmpdir=`echo ${prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/lib/libgen_thread.la $search_list"
 fi
-if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test "lib" == "lib"; then
+  for tmp_lib_value in $sys_lib_search_path_spec; do
+     search_list="$search_list $tmp_lib_value/libgen_thread.la"
+  done
 fi
-if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+search_list="$datatap_dir/libgen_thread.la $datatap_dir/lib/libgen_thread.la $datatap_dir/include/libgen_thread.la $search_list /usr/lib/libgen_thread.la /usr/local/lib/libgen_thread.la /opt/gen_thread/lib/libgen_thread.la /opt/misc/lib/libgen_thread.la /opt/misc/lib/$cercs_cv_archive/libgen_thread.la"
+tmp_search_results=""
+echo "configure:30971: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:30975: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
 fi
-if test -z "${HAVE_NC4PAR_TRUE}" && test -z "${HAVE_NC4PAR_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NC4PAR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NC4PAR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libgen_thread.la"; then
+cercs_cv_gen_thread_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libgen_thread.la//g"`
+else
+cercs_cv_gen_thread_link_dir=""
 fi
-if test -z "${HAVE_NC4PAR_TRUE}" && test -z "${HAVE_NC4PAR_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NC4PAR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NC4PAR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
 fi
-if test -z "${HAVE_NC4PAR_TRUE}" && test -z "${HAVE_NC4PAR_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NC4PAR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NC4PAR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_link_dir" >&5
+$as_echo "$cercs_cv_gen_thread_link_dir" >&6; }
+ld_arg="-L"
+new_flags=$LDFLAGS
+cercs_cv_gen_thread_link_arg=`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_gen_thread_link_arg"; then
+arg=$cercs_cv_gen_thread_link_arg
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
+root=`echo libgen_thread.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_gen_thread_link_dir/$root.la; then
+if eval "test \"\${LIBTOOL+set}\" = set"; then
+arg="$cercs_cv_gen_thread_link_arg "`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/-R/1"`
 fi
-if test -z "${HAVE_NC4PAR_TRUE}" && test -z "${HAVE_NC4PAR_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NC4PAR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NC4PAR\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_PABLO_TRUE}" && test -z "${HAVE_PABLO_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PABLO\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PABLO\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test `echo $arg | grep -c "gen_thread"` -eq 0; then
+new_flags="$new_flags $arg"
+else
+new_flags="$arg $new_flags"
 fi
-if test -z "${HAVE_PABLO_TRUE}" && test -z "${HAVE_PABLO_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PABLO\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PABLO\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_PABLO_TRUE}" && test -z "${HAVE_PABLO_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_PABLO\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_PABLO\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+DT_LDFLAGS=$new_flags
 fi
-if test -z "${HAVE_NSSI_TRUE}" && test -z "${HAVE_NSSI_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NSSI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NSSI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+
+else
+
+
+
+
+# Check whether --with-gen_thread was given.
+if test "${with_gen_thread+set}" = set; then
+  withval=$with_gen_thread;
 fi
-if test -z "${HAVE_NSSI_TRUE}" && test -z "${HAVE_NSSI_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NSSI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NSSI\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+
+if test -n "$with_gen_thread"; then
+unset cercs_cv_gen_thread_include_arg
+unset cercs_cv_gen_thread_link_arg
+if test `echo $with_gen_thread | sed 's/\(.\).*/\1/g'` != "/"; then
+with_gen_thread=`pwd`/$with_gen_thread
 fi
-if test -z "${HAVE_DART_TRUE}" && test -z "${HAVE_DART_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DART\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DART\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_DART_TRUE}" && test -z "${HAVE_DART_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DART\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DART\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking needed include args for gen_thread package" >&5
+$as_echo_n "checking needed include args for gen_thread package... " >&6; }
+if test "${cercs_cv_gen_thread_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+search_list="$PWD/../gen_thread $PWD/../../gen_thread $PWD/../../../gen_thread"
+tmp_search_results=""
+echo "configure:31044: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:31048: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
 fi
-if test -z "${HAVE_DART_TRUE}" && test -z "${HAVE_DART_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DART\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DART\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/gen_thread.h"; then
+cercs_cv_gen_thread_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.gen_thread.h##g"`
 fi
-if test -z "${HAVE_DART_TRUE}" && test -z "${HAVE_DART_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DART\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DART\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
 fi
-if test -z "${HAVE_DIMES_TRUE}" && test -z "${HAVE_DIMES_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DIMES\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DIMES\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_include_arg" >&5
+$as_echo "$cercs_cv_gen_thread_include_arg" >&6; }
+if test -n "$cercs_cv_gen_thread_include_arg"; then
+arg="$cercs_cv_gen_thread_include_arg"
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
+if test `echo $arg | grep -c "gen_thread"` -eq 0; then
+DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+else
+DT_CPPFLAGS="$arg $DT_CPPFLAGS"
 fi
-if test -z "${HAVE_DIMES_TRUE}" && test -z "${HAVE_DIMES_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DIMES\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DIMES\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_DIMES_TRUE}" && test -z "${HAVE_DIMES_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DIMES\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DIMES\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_DIMES_TRUE}" && test -z "${HAVE_DIMES_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DIMES\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DIMES\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking needed link args for gen_thread package" >&5
+$as_echo_n "checking needed link args for gen_thread package... " >&6; }
+if test "${cercs_cv_gen_thread_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+search_list="$PWD/../gen_thread $PWD/../../gen_thread $PWD/../../../gen_thread"
+tmp_search_results=""
+echo "configure:31086: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:31090: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
 fi
-if test -z "${HAVE_DMALLOC_TRUE}" && test -z "${HAVE_DMALLOC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DMALLOC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DMALLOC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libgen_thread.la"; then
+cercs_cv_gen_thread_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libgen_thread.la//g"`
+else
+cercs_cv_gen_thread_link_dir=""
 fi
-if test -z "${HAVE_DMALLOC_TRUE}" && test -z "${HAVE_DMALLOC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DMALLOC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DMALLOC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
 fi
-if test -z "${HAVE_DMALLOC_TRUE}" && test -z "${HAVE_DMALLOC_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DMALLOC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DMALLOC\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_gen_thread_link_dir" >&5
+$as_echo "$cercs_cv_gen_thread_link_dir" >&6; }
+ld_arg="-L"
+new_flags=$LDFLAGS
+cercs_cv_gen_thread_link_arg=`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_gen_thread_link_arg"; then
+arg=$cercs_cv_gen_thread_link_arg
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
+root=`echo libgen_thread.la | sed 's/\..*//'`
+if test ! -r $cercs_cv_gen_thread_link_dir/$root.la; then
+if eval "test \"\${LIBTOOL+set}\" = set"; then
+arg="$cercs_cv_gen_thread_link_arg "`echo $cercs_cv_gen_thread_link_dir | sed "/./ s/^/-R/1"`
 fi
-if test -z "${HAVE_LUSTRE_TRUE}" && test -z "${HAVE_LUSTRE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_LUSTRE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_LUSTRE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_LUSTRE_TRUE}" && test -z "${HAVE_LUSTRE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_LUSTRE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_LUSTRE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test `echo $arg | grep -c "gen_thread"` -eq 0; then
+new_flags="$new_flags $arg"
+else
+new_flags="$arg $new_flags"
 fi
-if test -z "${RESEARCH_TRANSPORTS_TRUE}" && test -z "${RESEARCH_TRANSPORTS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"RESEARCH_TRANSPORTS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"RESEARCH_TRANSPORTS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_DATATAP_TRUE}" && test -z "${HAVE_DATATAP_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_DATATAP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_DATATAP\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+DT_LDFLAGS=$new_flags
 fi
-if test -z "${BUILD_WRITE_TRUE}" && test -z "${BUILD_WRITE_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"BUILD_WRITE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"BUILD_WRITE\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+
 fi
-if test -z "${USE_PARALLEL_COMPILER_TRUE}" && test -z "${USE_PARALLEL_COMPILER_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+		if test -n "$cercs_cv_ibpbio_link_dir";then
+			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ibpbio_link_dir"
+			DT_LIBS="$DT_LIBS -libclient"
+			datatap=ibverbs
+		else
+			temptest=disable
+		fi
+		if test -n "$cercs_cv_ffs_link_dir";then
+			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ffs_link_dir"
+			DT_LIBS="$DT_LIBS -lgen_thread"
+			datatap=ibverbs
+		else
+			temptest=disable
+		fi
+		if test -n "$cercs_cv_gen_thread_link_dir";then
+			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_gen_thread_link_dir"
+			DT_LIBS="$DT_LIBS -lgen_thread"
+			datatap=ibverbs
+		else
+			temptest=disable
+		fi
+
+        elif test x"$ac_with_portals" = xyes; then
+
+
+
+if test -z "$with_local_specified"; then
+
+
+
+
+# Check whether --with-ptlpbio was given.
+if test "${with_ptlpbio+set}" = set; then
+  withval=$with_ptlpbio;
 fi
-if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+
+
+if test -n "$with_ptlpbio"; then
+unset cercs_cv_ptlpbio_include_arg
+unset cercs_cv_ptlpbio_link_arg
+if test `echo $with_ptlpbio | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ptlpbio=`pwd`/$with_ptlpbio
 fi
-if test -z "${USE_PARALLEL_COMPILER_TRUE}" && test -z "${USE_PARALLEL_COMPILER_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
 fi
-if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking needed include args for ptlpbio package" >&5
+$as_echo_n "checking needed include args for ptlpbio package... " >&6; }
+if test "${cercs_cv_ptlpbio_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+
+cercs_tmp=""
+search_list="./thin_portal.h"
+CHAOS_HOMEDIR=""
+if test -n "$CSH"; then
+CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
 fi
-if test -z "${USE_PARALLEL_COMPILER_TRUE}" && test -z "${USE_PARALLEL_COMPILER_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
+if test -n "$with_ptlpbio"; then
+if test `echo $with_ptlpbio | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ptlpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+else
+EXPANDED=$with_ptlpbio
 fi
 
-: ${CONFIG_STATUS=./config.status}
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files $CONFIG_STATUS"
-{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
-echo "$as_me: creating $CONFIG_STATUS" >&6;}
-cat >$CONFIG_STATUS <<_ACEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
+echo "Datatap = $datatap_dir"
+
+search_list="$datatap_dir/thin_portal.h $datatap_dir/lib/thin_portal.h $datatap_dir/include/thin_portal.h $search_list $EXPANDED/thin_portal.h $EXPANDED/include/thin_portal.h $EXPANDED/share/thin_portal.h $EXPANDED/$cercs_cv_archive/thin_portal.h $EXPANDED/$cercs_cv_archive/include/thin_portal.h $EXPANDED/ptlpbio/thin_portal.h $EXPANDED/ptlpbio/$cercs_cv_archive/thin_portal.h $EXPANDED/ptlpbio/include/thin_portal.h $EXPANDED/ptlpbio/include/$cercs_cv_archive/thin_portal.h"
+fi
+if test -z "$with_installed_specified"; then
+search_list="$search_list `pwd`/../ptlpbio/thin_portal.h `pwd`/../include/thin_portal.h `pwd`/../share/thin_portal.h"
+if test "$CHAOS_HOMEDIR" != "$HOME"; then
+search_list="$search_list $HOME/ptlpbio/thin_portal.h $HOME/$cercs_cv_archive/include/thin_portal.h $HOME/include/thin_portal.h"
+fi
+fi
+if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ptlpbio/include/thin_portal.h $CHAOS_HOMEDIR/$cercs_cv_archive/include/thin_portal.h $CHAOS_HOMEDIR/ptlpbio/$cercs_cv_archive/include/thin_portal.h $CHAOS_HOMEDIR/ptlpbio/include/thin_portal.h $CHAOS_HOMEDIR/include/thin_portal.h"
+fi
+if test "$libdir" != '${exec_prefix}/lib'; then
+tmpdir=`echo ${libdir} |  sed 's%/$%%'`
+search_list="$tmpdir/thin_portal.h $search_list"
+fi
+if test "$exec_prefix" != "NONE"; then
+tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/lib/thin_portal.h $search_list"
+fi
+if test "$includedir" != '${prefix}/include'; then
+tmpdir=`echo ${includedir} |  sed 's%/$%%'`
+search_list="$tmpdir/thin_portal.h $search_list"
+fi
+if test "$prefix" != "NONE"; then
+tmpdir=`echo ${prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/include/thin_portal.h $search_list"
+fi
+if test "include" == "lib"; then
+  for tmp_lib_value in $sys_lib_search_path_spec; do
+     search_list="$search_list $tmp_lib_value/thin_portal.h"
+  done
+fi
+
+search_list="$datatap_dir/thin_portal.h $datatap_dir/lib/thin_portal.h $datatap_dir/include/thin_portal.h $search_list /usr/include/thin_portal.h /usr/local/include/thin_portal.h /opt/ptlpbio/include/thin_portal.h /opt/misc/include/thin_portal.h /opt/misc/include/$cercs_cv_archive/thin_portal.h"
+tmp_search_results=""
+echo "configure:31237: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:31241: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
+fi
+
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_portal.h"; then
+cercs_cv_ptlpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_portal.h##g"`
+fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_include_arg" >&5
+$as_echo "$cercs_cv_ptlpbio_include_arg" >&6; }
+if test -n "$cercs_cv_ptlpbio_include_arg"; then
+arg="$cercs_cv_ptlpbio_include_arg"
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
+if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+else
+DT_CPPFLAGS="$arg $DT_CPPFLAGS"
+fi
+fi
+fi
+
+{ $as_echo "$as_me:$LINENO: checking needed link args for ptlpbio package" >&5
+$as_echo_n "checking needed link args for ptlpbio package... " >&6; }
+if test "${cercs_cv_ptlpbio_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+
+
+cercs_tmp=""
+search_list="./libptlclient.a"
+CHAOS_HOMEDIR=""
+if test -n "$CSH"; then
+CHAOS_HOMEDIR=`echo "echo ~chaos" | csh -sf  2>/dev/null | sed 's%/$%%'` || CHAOS_HOMEDIR=""
+fi
+if test -n "$with_ptlpbio"; then
+if test `echo $with_ptlpbio | cut -c1` = "~"; then
+EXPANDED=`echo "echo $with_ptlpbio" | csh -sf 2>/dev/null` || EXPANDED=""
+else
+EXPANDED=$with_ptlpbio
+fi
+
+echo "Datatap = $datatap_dir"
+
+search_list="$datatap_dir/libptlclient.a $datatap_dir/lib/libptlclient.a $datatap_dir/include/libptlclient.a $search_list $EXPANDED/libptlclient.a $EXPANDED/lib/libptlclient.a $EXPANDED/share/libptlclient.a $EXPANDED/$cercs_cv_archive/libptlclient.a $EXPANDED/$cercs_cv_archive/lib/libptlclient.a $EXPANDED/ptlpbio/libptlclient.a $EXPANDED/ptlpbio/$cercs_cv_archive/libptlclient.a $EXPANDED/ptlpbio/lib/libptlclient.a $EXPANDED/ptlpbio/lib/$cercs_cv_archive/libptlclient.a"
+fi
+if test -z "$with_installed_specified"; then
+search_list="$search_list `pwd`/../ptlpbio/libptlclient.a `pwd`/../lib/libptlclient.a `pwd`/../share/libptlclient.a"
+if test "$CHAOS_HOMEDIR" != "$HOME"; then
+search_list="$search_list $HOME/ptlpbio/libptlclient.a $HOME/$cercs_cv_archive/lib/libptlclient.a $HOME/lib/libptlclient.a"
+fi
+fi
+if test -n "$CHAOS_HOMEDIR" -a -n "$cercs_cv_archive"; then
+search_list="$search_list $CHAOS_HOMEDIR/$cercs_cv_archive/ptlpbio/lib/libptlclient.a $CHAOS_HOMEDIR/$cercs_cv_archive/lib/libptlclient.a $CHAOS_HOMEDIR/ptlpbio/$cercs_cv_archive/lib/libptlclient.a $CHAOS_HOMEDIR/ptlpbio/lib/libptlclient.a $CHAOS_HOMEDIR/lib/libptlclient.a"
+fi
+if test "$libdir" != '${exec_prefix}/lib'; then
+tmpdir=`echo ${libdir} |  sed 's%/$%%'`
+search_list="$tmpdir/libptlclient.a $search_list"
+fi
+if test "$exec_prefix" != "NONE"; then
+tmpdir=`echo ${exec_prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/lib/libptlclient.a $search_list"
+fi
+if test "$includedir" != '${prefix}/include'; then
+tmpdir=`echo ${includedir} |  sed 's%/$%%'`
+search_list="$tmpdir/libptlclient.a $search_list"
+fi
+if test "$prefix" != "NONE"; then
+tmpdir=`echo ${prefix} |  sed 's%/$%%'`
+search_list="$tmpdir/lib/libptlclient.a $search_list"
+fi
+if test "lib" == "lib"; then
+  for tmp_lib_value in $sys_lib_search_path_spec; do
+     search_list="$search_list $tmp_lib_value/libptlclient.a"
+  done
+fi
+
+search_list="$datatap_dir/libptlclient.a $datatap_dir/lib/libptlclient.a $datatap_dir/include/libptlclient.a $search_list /usr/lib/libptlclient.a /usr/local/lib/libptlclient.a /opt/ptlpbio/lib/libptlclient.a /opt/misc/lib/libptlclient.a /opt/misc/lib/$cercs_cv_archive/libptlclient.a"
+tmp_search_results=""
+echo "configure:31329: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:31333: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
+fi
+
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libptlclient.a"; then
+cercs_cv_ptlpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libptlclient.a//g"`
+else
+cercs_cv_ptlpbio_link_dir=""
+fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_link_dir" >&5
+$as_echo "$cercs_cv_ptlpbio_link_dir" >&6; }
+ld_arg="-L"
+new_flags=$LDFLAGS
+cercs_cv_ptlpbio_link_arg=`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ptlpbio_link_arg"; then
+arg=$cercs_cv_ptlpbio_link_arg
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
+root=`echo libptlclient.a | sed 's/\..*//'`
+if test ! -r $cercs_cv_ptlpbio_link_dir/$root.la; then
+if eval "test \"\${LIBTOOL+set}\" = set"; then
+arg="$cercs_cv_ptlpbio_link_arg "`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/-R/1"`
+fi
+fi
+if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+new_flags="$new_flags $arg"
+else
+new_flags="$arg $new_flags"
+fi
+fi
+DT_LDFLAGS=$new_flags
+fi
+
+
+else
+
+
+
+
+# Check whether --with-ptlpbio was given.
+if test "${with_ptlpbio+set}" = set; then
+  withval=$with_ptlpbio;
+fi
+
+
+if test -n "$with_ptlpbio"; then
+unset cercs_cv_ptlpbio_include_arg
+unset cercs_cv_ptlpbio_link_arg
+if test `echo $with_ptlpbio | sed 's/\(.\).*/\1/g'` != "/"; then
+with_ptlpbio=`pwd`/$with_ptlpbio
+fi
+fi
+{ $as_echo "$as_me:$LINENO: checking needed include args for ptlpbio package" >&5
+$as_echo_n "checking needed include args for ptlpbio package... " >&6; }
+if test "${cercs_cv_ptlpbio_include_arg+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+search_list="$PWD/../ptlpbio $PWD/../../ptlpbio $PWD/../../../ptlpbio"
+tmp_search_results=""
+echo "configure:31402: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:31406: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
+fi
+
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "/usr/include/thin_portal.h"; then
+cercs_cv_ptlpbio_include_arg=-I`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s#.thin_portal.h##g"`
+fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_include_arg" >&5
+$as_echo "$cercs_cv_ptlpbio_include_arg" >&6; }
+if test -n "$cercs_cv_ptlpbio_include_arg"; then
+arg="$cercs_cv_ptlpbio_include_arg"
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $DT_CPPFLAGS | grep -c "$no_dash_arg"` -eq 0; then
+if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+DT_CPPFLAGS="$DT_CPPFLAGS $arg";
+else
+DT_CPPFLAGS="$arg $DT_CPPFLAGS"
+fi
+fi
+fi
+
+{ $as_echo "$as_me:$LINENO: checking needed link args for ptlpbio package" >&5
+$as_echo_n "checking needed link args for ptlpbio package... " >&6; }
+if test "${cercs_cv_ptlpbio_link_dir+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+
+
+search_list="$PWD/../ptlpbio $PWD/../../ptlpbio $PWD/../../../ptlpbio"
+tmp_search_results=""
+echo "configure:31444: searching for $search_list " >&5
+for tmp_search_value in $search_list; do
+   if test -r $tmp_search_value; then
+	tmp_search_results=$tmp_search_value
+	echo "configure:31448: first found $tmp_search_results " >&5
+	break
+   fi
+done
+
+if test -n "$tmp_search_results"; then
+cercs_tmp=$tmp_search_results
+fi
+
+if test -n "$cercs_tmp" -a "$cercs_tmp" != "libptlclient.a"; then
+cercs_cv_ptlpbio_link_dir=`$PATHPROG $cercs_tmp | sed 's#\\\\#/#g' | sed "s/.libptlclient.a//g"`
+else
+cercs_cv_ptlpbio_link_dir=""
+fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $cercs_cv_ptlpbio_link_dir" >&5
+$as_echo "$cercs_cv_ptlpbio_link_dir" >&6; }
+ld_arg="-L"
+new_flags=$LDFLAGS
+cercs_cv_ptlpbio_link_arg=`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/$ld_arg/1"`
+if test -n "$cercs_cv_ptlpbio_link_arg"; then
+arg=$cercs_cv_ptlpbio_link_arg
+no_dash_arg=`echo $arg | sed 's/^-//g'`
+if test `echo $new_flags | grep -c "$no_dash_arg"` -eq 0; then
+root=`echo libptlclient.a | sed 's/\..*//'`
+if test ! -r $cercs_cv_ptlpbio_link_dir/$root.la; then
+if eval "test \"\${LIBTOOL+set}\" = set"; then
+arg="$cercs_cv_ptlpbio_link_arg "`echo $cercs_cv_ptlpbio_link_dir | sed "/./ s/^/-R/1"`
+fi
+fi
+if test `echo $arg | grep -c "ptlpbio"` -eq 0; then
+new_flags="$new_flags $arg"
+else
+new_flags="$arg $new_flags"
+fi
+fi
+DT_LDFLAGS=$new_flags
+fi
+
+
+fi
+
+
+		if test -n "$cercs_cv_ptlpbio_link_dir";then
+			DT_LDFLAGS="$DT_LDFLAGS -L$cercs_cv_ptlpbio_link_dir"
+			DT_LIBS="$DT_LIBS -lptlclient -lptlserver -lbench -ldl"
+			datatap=portals
+		else
+			temptest=disable
+		fi
+
+	else
+		echo "Neither portals nor infiniband found. Disabling datatap"
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DATATAP 1
+_ACEOF
+
+		datatap=disable
+		temptest=disable
+	fi
+fi
+
+if test x"$temptest" = xdisable; then
+	datatap=disable
+	echo "Datatap dependency check failed"
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_DATATAP 1
+_ACEOF
+
+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
+
+
+
+# Check whether --enable-research-transports was given.
+if test "${enable_research_transports+set}" = set; then
+  enableval=$enable_research_transports;
+fi
+
+ if test "x$enable_research_transports" == "xyes"; then
+  RESEARCH_TRANSPORTS_TRUE=
+  RESEARCH_TRANSPORTS_FALSE='#'
+else
+  RESEARCH_TRANSPORTS_TRUE='#'
+  RESEARCH_TRANSPORTS_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Check whether --enable-skel-timing was given.
+if test "${enable_skel_timing+set}" = set; then
+  enableval=$enable_skel_timing;
+fi
+
+ if test "x$enable_skel_timing" == "xyes"; then
+  SKEL_TIMING_TRUE=
+  SKEL_TIMING_FALSE='#'
+else
+  SKEL_TIMING_TRUE='#'
+  SKEL_TIMING_FALSE=
+fi
+
+
+if test "x$enable_skel_timing" == "xyes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define SKEL_TIMING 1
+_ACEOF
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ if test x$datatap != xdisable; then
+  HAVE_DATATAP_TRUE=
+  HAVE_DATATAP_FALSE='#'
+else
+  HAVE_DATATAP_TRUE='#'
+  HAVE_DATATAP_FALSE=
+fi
+
+
+# Check whether --enable-write was given.
+if test "${enable_write+set}" = set; then
+  enableval=$enable_write;
+fi
+
+ if test "x$enable_write" != "xno"; then
+  BUILD_WRITE_TRUE=
+  BUILD_WRITE_FALSE='#'
+else
+  BUILD_WRITE_TRUE='#'
+  BUILD_WRITE_FALSE=
+fi
+
+
+
+LIBS="$MPILIBS"
+
+ if false; then
+  USE_PARALLEL_COMPILER_TRUE=
+  USE_PARALLEL_COMPILER_FALSE='#'
+else
+  USE_PARALLEL_COMPILER_TRUE='#'
+  USE_PARALLEL_COMPILER_FALSE=
+fi
+
+
+if test -z "${MACRODEFFLAG}"; then
+    MACRODEFFLAG="-D"
+fi
+
+
+
+if test -z "${HAVE_PHDF5_TRUE}" -a -z "${HAVE_HDF5_FALSE}"; then
+    HDF5_CPPFLAGS="${PHDF5_CPPFLAGS}"
+    HDF5_CFLAGS="${PHDF5_CFLAGS}"
+    HDF5_LDFLAGS="${PHDF5_LDFLAGS}"
+    HDF5_LIBS="${PHDF5_LIBS}"
+     if true; then
+  HAVE_HDF5_TRUE=
+  HAVE_HDF5_FALSE='#'
+else
+  HAVE_HDF5_TRUE='#'
+  HAVE_HDF5_FALSE=
+fi
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HDF5 1
+_ACEOF
+
+     if true; then
+  USE_PARALLEL_COMPILER_TRUE=
+  USE_PARALLEL_COMPILER_FALSE='#'
+else
+  USE_PARALLEL_COMPILER_TRUE='#'
+  USE_PARALLEL_COMPILER_FALSE=
+fi
+
+    { $as_echo "$as_me:$LINENO: Use PHDF5 for sequential HDF5 tools" >&5
+$as_echo "$as_me: Use PHDF5 for sequential HDF5 tools" >&6;}
+fi
+
+if test -z "${HAVE_NC4PAR_TRUE}" -a -z "${HAVE_NETCDF_FALSE}"; then
+    NETCDF_CPPFLAGS="${NC4PAR_CPPFLAGS}"
+    NETCDF_CFLAGS="${NC4PAR_CFLAGS}"
+    NETCDF_LDFLAGS="${NC4PAR_LDFLAGS}"
+    NETCDF_LIBS="${NC4PAR_LIBS}"
+     if true; then
+  HAVE_NETCDF_TRUE=
+  HAVE_NETCDF_FALSE='#'
+else
+  HAVE_NETCDF_TRUE='#'
+  HAVE_NETCDF_FALSE=
+fi
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_NETCDF 1
+_ACEOF
+
+     if true; then
+  USE_PARALLEL_COMPILER_TRUE=
+  USE_PARALLEL_COMPILER_FALSE='#'
+else
+  USE_PARALLEL_COMPILER_TRUE='#'
+  USE_PARALLEL_COMPILER_FALSE=
+fi
+
+    { $as_echo "$as_me:$LINENO: Use NC4PAR for sequential NETCDF tools" >&5
+$as_echo "$as_me: Use NC4PAR for sequential NETCDF tools" >&6;}
+fi
+
+
+ADIOSLIB_EXTRA_CPPFLAGS="${MACRODEFFLAG}_FILE_OFFSET_BITS=64 ${MACRODEFFLAG}_LARGEFILE_SOURCE ${MACRODEFFLAG}_LARGEFILE64_SOURCE ${MACRODEFFLAG}_GNU_SOURCE"
+ADIOSLIB_CPPFLAGS="${MXML_CPPFLAGS}"
+ADIOSLIB_CFLAGS=
+ADIOSLIB_LDFLAGS="${MXML_LDFLAGS}"
+ADIOSLIB_LDADD="-lm ${MXML_LIBS}"
+ADIOSLIB_SEQ_CPPFLAGS="${MACRODEFFLAG}_NOMPI ${MXML_CPPFLAGS}"
+ADIOSLIB_SEQ_CFLAGS=
+ADIOSLIB_SEQ_LDFLAGS="${MXML_LDFLAGS}"
+ADIOSLIB_SEQ_LDADD="-lm ${MXML_LIBS}"
+ADIOSLIB_INT_CPPFLAGS="${MACRODEFFLAG}_NOMPI ${MXML_CPPFLAGS}"
+ADIOSLIB_INT_CFLAGS=
+ADIOSLIB_INT_LDFLAGS="${MXML_LDFLAGS}"
+ADIOSLIB_INT_LDADD="-lm ${MXML_LIBS}"
+ADIOSREADLIB_CPPFLAGS=
+ADIOSREADLIB_CFLAGS=
+ADIOSREADLIB_LDFLAGS=
+ADIOSREADLIB_LDADD="-lm"
+ADIOSREADLIB_SEQ_CPPFLAGS="${MACRODEFFLAG}_NOMPI"
+ADIOSREADLIB_SEQ_CFLAGS=
+ADIOSREADLIB_SEQ_LDFLAGS=
+ADIOSREADLIB_SEQ_LDADD="-lm"
+if test "x${datatap}" != "xdisable"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${DT_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${DT_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DT_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DT_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DT_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DT_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DT_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DT_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DT_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DT_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DT_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DT_LIBS}"
+fi
+if test -z "${HAVE_DATASPACES_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${DATASPACES_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DATASPACES_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DATASPACES_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${DATASPACES_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${DATASPACES_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${DATASPACES_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DATASPACES_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DATASPACES_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DATASPACES_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DATASPACES_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DATASPACES_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DATASPACES_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DATASPACES_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DATASPACES_LIBS}"
+fi
+if test -z "${HAVE_DIMES_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${DIMES_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DIMES_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DIMES_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${DIMES_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${DIMES_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${DIMES_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DIMES_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DIMES_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DIMES_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DIMES_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DIMES_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DIMES_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DIMES_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DIMES_LIBS}"
+fi
+if test -z "${HAVE_NSSI_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${NSSI_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${NSSI_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${NSSI_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${NSSI_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${NSSI_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${NSSI_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${NSSI_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${NSSI_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${MXML_CPPFLAGS} ${NSSI_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${MXML_CPPFLAGS} ${NSSI_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${MXML_LDFLAGS} ${NSSI_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${MXML_LIBS} ${NSSI_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${MXML_CPPFLAGS} ${NSSI_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${MXML_CPPFLAGS} ${NSSI_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${MXML_LDFLAGS} ${NSSI_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${MXML_LIBS} ${NSSI_LIBS}"
+fi
+if test -z "${HAVE_NC4PAR_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${NC4PAR_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${NC4PAR_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${NC4PAR_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${NC4PAR_LIBS}"
+fi
+if test -z "${HAVE_PHDF5_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${PHDF5_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${PHDF5_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${PHDF5_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${PHDF5_LIBS}"
+fi
+if test -z "${HAVE_PORTALS_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${PORTALS_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${PORTALS_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${PORTALS_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${PORTALS_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${PORTALS_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${PORTALS_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${PORTALS_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${PORTALS_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${PORTALS_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${PORTALS_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${PORTALS_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${PORTALS_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${PORTALS_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${PORTALS_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${PORTALS_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${PORTALS_LIBS}"
+fi
+if test -z "${HAVE_INFINIBAND_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${INFINIBAND_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${INFINIBAND_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${INFINIBAND_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${INFINIBAND_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${INFINIBAND_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${INFINIBAND_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${INFINIBAND_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${INFINIBAND_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${INFINIBAND_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${INFINIBAND_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${INFINIBAND_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${INFINIBAND_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${INFINIBAND_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${INFINIBAND_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${INFINIBAND_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${INFINIBAND_LIBS}"
+fi
+if test -z "${HAVE_CRAY_PMI_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${CRAY_PMI_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${CRAY_PMI_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${CRAY_PMI_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${CRAY_PMI_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${CRAY_PMI_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${CRAY_PMI_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${CRAY_PMI_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${CRAY_PMI_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${CRAY_PMI_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${CRAY_PMI_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${CRAY_PMI_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${CRAY_PMI_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${CRAY_PMI_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${CRAY_PMI_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${CRAY_PMI_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${CRAY_PMI_LIBS}"
+fi
+if test -z "${HAVE_CRAY_UGNI_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${CRAY_UGNI_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${CRAY_UGNI_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${CRAY_UGNI_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${CRAY_UGNI_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${CRAY_UGNI_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${CRAY_UGNI_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${CRAY_UGNI_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${CRAY_UGNI_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${CRAY_UGNI_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${CRAY_UGNI_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${CRAY_UGNI_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${CRAY_UGNI_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${CRAY_UGNI_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${CRAY_UGNI_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${CRAY_UGNI_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${CRAY_UGNI_LIBS}"
+fi
+if test -z "${HAVE_NETCDF_TRUE}"; then
+    ADIOSLIB_INT_CPPFLAGS="${ADIOSLIB_INT_CPPFLAGS} ${NETCDF_CPPFLAGS}"
+    ADIOSLIB_INT_CFLAGS="${ADIOSLIB_INT_CFLAGS} ${NETCDF_CFLAGS}"
+    ADIOSLIB_INT_LDFLAGS="${ADIOSLIB_INT_LDFLAGS} ${NETCDF_LDFLAGS}"
+    ADIOSLIB_INT_LDADD="${ADIOSLIB_INT_LDADD} ${NETCDF_LIBS}"
+fi
+if test -z "${HAVE_HDF5_TRUE}"; then
+    ADIOSLIB_INT_CPPFLAGS="${ADIOSLIB_INT_CPPFLAGS} ${HDF5_CPPFLAGS}"
+    ADIOSLIB_INT_CFLAGS="${ADIOSLIB_INT_CFLAGS} ${HDF5_CFLAGS}"
+    ADIOSLIB_INT_LDFLAGS="${ADIOSLIB_INT_LDFLAGS} ${HDF5_LDFLAGS}"
+    ADIOSLIB_INT_LDADD="${ADIOSLIB_INT_LDADD} ${HDF5_LIBS}"
+fi
+if test -z "${HAVE_DMALLOC_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${MACRODEFFLAG}DMALLOC ${DMALLOC_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${DMALLOC_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DMALLOC_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DMALLOC_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${DMALLOC_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${DMALLOC_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${DMALLOC_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${DMALLOC_LIBS}"
+    ADIOSLIB_INT_CPPFLAGS="${ADIOSLIB_INT_CPPFLAGS} ${DMALLOC_CPPFLAGS}"
+    ADIOSLIB_INT_CFLAGS="${ADIOSLIB_INT_CFLAGS} ${DMALLOC_CFLAGS}"
+    ADIOSLIB_INT_LDFLAGS="${ADIOSLIB_INT_LDFLAGS} ${DMALLOC_LDFLAGS}"
+    ADIOSLIB_INT_LDADD="${ADIOSLIB_INT_LDADD} ${DMALLOC_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DMALLOC_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DMALLOC_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DMALLOC_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DMALLOC_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DMALLOC_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DMALLOC_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DMALLOC_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DMALLOC_LIBS}"
+fi
+if test -z "${HAVE_LUSTRE_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${LUSTRE_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${LUSTRE_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${LUSTRE_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${LUSTRE_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${LUSTRE_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${LUSTRE_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${LUSTRE_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${LUSTRE_LIBS}"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -z "${USE_PARALLEL_COMPILER_TRUE}"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_PARALLEL_COMPILER 1
+_ACEOF
+
+        echo "#### Defined USE_PARALLEL_COMPILER to = [${USE_PARALLEL_COMPILER}]"
+fi
+
+VERSION_MAJOR=`echo ${VERSION} | sed -e "s/\..*//"`
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION_MAJOR ${VERSION_MAJOR}
+_ACEOF
+
+VERSION_MINOR=`echo ${VERSION} | sed -e "s/[0-9]*\.\([0-9]*\).*/\1/"`
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION_MINOR ${VERSION_MINOR}
+_ACEOF
+
+VERSION_MICRO=`echo ${VERSION} | sed -e "s/[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/"`
+VERSION_MICRO=`echo ${VERSION_MICRO} | sed -e "s/${VERSION}//"`
+if test -z "${VERSION_MICRO}"; then
+    VERSION_MICRO=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION_MICRO ${VERSION_MICRO}
+_ACEOF
+
+
+# Get the version of the source we are configuring here
+# Just to print it out at the end of configure
+# see also Makefile.am:install-data-hook
+if type svnversion &>/dev/null; then
+    SVNVERSION=`svnversion`
+else
+    SVNVERSION="unknown"
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION_SVNREV "${SVNVERSION}"
+_ACEOF
+
+
+
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile tests/Makefile tests/C/Makefile tests/Fortran/Makefile tests/genarray/Makefile tests/bp_read/Makefile tests/suite/Makefile tests/suite/programs/Makefile utils/Makefile utils/skel/Makefile utils/skel/etc/Makefile utils/adios_lint/Makefile utils/gpp/Makefile utils/bpdump/Makefile utils/bp2h5/Makefile utils/bp2ncd/Makefile utils/bp2ascii/Makefile utils/bpsplit/Makefile utils/bpls/Makefile utils/bp2bp/Makefile examples/Makefile examples [...]
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) $as_unset $ac_var ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    test "x$cache_file" != "x/dev/null" &&
+      { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+    cat confcache >$cache_file
+  else
+    { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_MPI_TRUE}" && test -z "${HAVE_MPI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MPI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_MPI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_MPI_TRUE}" && test -z "${HAVE_MPI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MPI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_MPI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${BUILD_FORTRAN_TRUE}" && test -z "${BUILD_FORTRAN_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_FORTRAN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_FORTRAN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_MPI_TRUE}" && test -z "${HAVE_MPI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MPI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_MPI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_MXML_TRUE}" && test -z "${HAVE_MXML_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_MXML\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_INFINIBAND_TRUE}" && test -z "${HAVE_INFINIBAND_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_INFINIBAND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_INFINIBAND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_INFINIBAND_TRUE}" && test -z "${HAVE_INFINIBAND_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_INFINIBAND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_INFINIBAND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_INFINIBAND_TRUE}" && test -z "${HAVE_INFINIBAND_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_INFINIBAND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_INFINIBAND\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PORTALS_TRUE}" && test -z "${HAVE_PORTALS_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PORTALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PORTALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${NEED_DARWIN_SINGLE_MODULE_TRUE}" && test -z "${NEED_DARWIN_SINGLE_MODULE_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"NEED_DARWIN_SINGLE_MODULE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"NEED_DARWIN_SINGLE_MODULE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PORTALS_TRUE}" && test -z "${HAVE_PORTALS_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PORTALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PORTALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${NEED_DARWIN_SINGLE_MODULE_TRUE}" && test -z "${NEED_DARWIN_SINGLE_MODULE_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"NEED_DARWIN_SINGLE_MODULE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"NEED_DARWIN_SINGLE_MODULE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PORTALS_TRUE}" && test -z "${HAVE_PORTALS_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PORTALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PORTALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PORTALS_TRUE}" && test -z "${HAVE_PORTALS_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PORTALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PORTALS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_CRAY_PMI_TRUE}" && test -z "${HAVE_CRAY_PMI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CRAY_PMI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_CRAY_PMI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_CRAY_PMI_TRUE}" && test -z "${HAVE_CRAY_PMI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CRAY_PMI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_CRAY_PMI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_CRAY_PMI_TRUE}" && test -z "${HAVE_CRAY_PMI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CRAY_PMI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_CRAY_PMI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_CRAY_PMI_TRUE}" && test -z "${HAVE_CRAY_PMI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CRAY_PMI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_CRAY_PMI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_CRAY_UGNI_TRUE}" && test -z "${HAVE_CRAY_UGNI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CRAY_UGNI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_CRAY_UGNI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_CRAY_UGNI_TRUE}" && test -z "${HAVE_CRAY_UGNI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CRAY_UGNI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_CRAY_UGNI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_CRAY_UGNI_TRUE}" && test -z "${HAVE_CRAY_UGNI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CRAY_UGNI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_CRAY_UGNI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_CRAY_UGNI_TRUE}" && test -z "${HAVE_CRAY_UGNI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_CRAY_UGNI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_CRAY_UGNI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PHDF5_TRUE}" && test -z "${HAVE_PHDF5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PHDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PHDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PHDF5_TRUE}" && test -z "${HAVE_PHDF5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PHDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PHDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PHDF5_TRUE}" && test -z "${HAVE_PHDF5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PHDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PHDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PHDF5_TRUE}" && test -z "${HAVE_PHDF5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PHDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PHDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NC4PAR_TRUE}" && test -z "${HAVE_NC4PAR_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NC4PAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NC4PAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NC4PAR_TRUE}" && test -z "${HAVE_NC4PAR_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NC4PAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NC4PAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NC4PAR_TRUE}" && test -z "${HAVE_NC4PAR_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NC4PAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NC4PAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NC4PAR_TRUE}" && test -z "${HAVE_NC4PAR_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NC4PAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NC4PAR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PABLO_TRUE}" && test -z "${HAVE_PABLO_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PABLO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PABLO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PABLO_TRUE}" && test -z "${HAVE_PABLO_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PABLO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PABLO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_PABLO_TRUE}" && test -z "${HAVE_PABLO_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PABLO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_PABLO\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NSSI_TRUE}" && test -z "${HAVE_NSSI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NSSI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NSSI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NSSI_TRUE}" && test -z "${HAVE_NSSI_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NSSI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NSSI\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DATASPACES_TRUE}" && test -z "${HAVE_DATASPACES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DATASPACES_TRUE}" && test -z "${HAVE_DATASPACES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DATASPACES_TRUE}" && test -z "${HAVE_DATASPACES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DATASPACES_TRUE}" && test -z "${HAVE_DATASPACES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DATASPACES_TRUE}" && test -z "${HAVE_DATASPACES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DATASPACES_TRUE}" && test -z "${HAVE_DATASPACES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DATASPACES_TRUE}" && test -z "${HAVE_DATASPACES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DATASPACES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DIMES_TRUE}" && test -z "${HAVE_DIMES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DIMES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DIMES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DIMES_TRUE}" && test -z "${HAVE_DIMES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DIMES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DIMES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DIMES_TRUE}" && test -z "${HAVE_DIMES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DIMES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DIMES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DIMES_TRUE}" && test -z "${HAVE_DIMES_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DIMES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DIMES\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DMALLOC_TRUE}" && test -z "${HAVE_DMALLOC_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DMALLOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DMALLOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DMALLOC_TRUE}" && test -z "${HAVE_DMALLOC_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DMALLOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DMALLOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DMALLOC_TRUE}" && test -z "${HAVE_DMALLOC_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DMALLOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DMALLOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DMALLOC_TRUE}" && test -z "${HAVE_DMALLOC_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DMALLOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DMALLOC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_LUSTRE_TRUE}" && test -z "${HAVE_LUSTRE_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LUSTRE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_LUSTRE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_LUSTRE_TRUE}" && test -z "${HAVE_LUSTRE_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_LUSTRE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_LUSTRE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${RESEARCH_TRANSPORTS_TRUE}" && test -z "${RESEARCH_TRANSPORTS_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"RESEARCH_TRANSPORTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"RESEARCH_TRANSPORTS\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${SKEL_TIMING_TRUE}" && test -z "${SKEL_TIMING_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"SKEL_TIMING\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"SKEL_TIMING\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_DATATAP_TRUE}" && test -z "${HAVE_DATATAP_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_DATATAP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_DATATAP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${BUILD_WRITE_TRUE}" && test -z "${BUILD_WRITE_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_WRITE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"BUILD_WRITE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USE_PARALLEL_COMPILER_TRUE}" && test -z "${USE_PARALLEL_COMPILER_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_HDF5_TRUE}" && test -z "${HAVE_HDF5_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_HDF5\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USE_PARALLEL_COMPILER_TRUE}" && test -z "${USE_PARALLEL_COMPILER_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HAVE_NETCDF_TRUE}" && test -z "${HAVE_NETCDF_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"HAVE_NETCDF\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${USE_PARALLEL_COMPILER_TRUE}" && test -z "${USE_PARALLEL_COMPILER_FALSE}"; then
+  { { $as_echo "$as_me:$LINENO: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+$as_echo "$as_me: error: conditional \"USE_PARALLEL_COMPILER\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in
+  *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" ""	$as_nl"
+
+# Find who we are.  Look in the path if we contain no directory separator.
+case $0 in
+  *[\\/]* ) as_myself=$0 ;;
+  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+  # uniformly replaced by the line number.  The first 'sed' inserts a
+  # line-number line after each line using $LINENO; the second 'sed'
+  # does the real work.  The second script uses 'N' to pair each
+  # line-number line with the line containing $LINENO, and appends
+  # trailing '-' during substitution so that $LINENO is not a special
+  # case at line end.
+  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+  # scripts with optimization help from Paolo Bonzini.  Blame Lee
+  # E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+   { (exit 1); exit 1; }; }
+
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -p'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -p'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -p'
+  fi
+else
+  as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+  as_test_x='test -x'
+else
+  if ls -dL / >/dev/null 2>&1; then
+    as_ls_L_option=L
+  else
+    as_ls_L_option=
+  fi
+  as_test_x='
+    eval sh -c '\''
+      if test -d "$1"; then
+	test -d "$1/.";
+      else
+	case $1 in
+	-*)set "./$1";;
+	esac;
+	case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+	???[sx]*):;;*)false;;esac;fi
+    '\'' sh
+  '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.63.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTION]... [FILE]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf at gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.63,
+  with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+  case $1 in
+  --*=*)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+    ac_shift=:
+    ;;
+  *)
+    ac_option=$1
+    ac_optarg=$2
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+    ac_need_defaults=false;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    { $as_echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; };;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; } ;;
+
+  *) ac_config_targets="$ac_config_targets $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# 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'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`'
+predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`'
+LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+LD_FC='`$ECHO "X$LD_FC" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds_FC='`$ECHO "X$old_archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_FC='`$ECHO "X$compiler_FC" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+GCC_FC='`$ECHO "X$GCC_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag_FC='`$ECHO "X$lt_prog_compiler_no_builtin_flag_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl_FC='`$ECHO "X$lt_prog_compiler_wl_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic_FC='`$ECHO "X$lt_prog_compiler_pic_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static_FC='`$ECHO "X$lt_prog_compiler_static_FC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o_FC='`$ECHO "X$lt_cv_prog_compiler_c_o_FC" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc_FC='`$ECHO "X$archive_cmds_need_lc_FC" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes_FC='`$ECHO "X$enable_shared_with_static_runtimes_FC" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec_FC='`$ECHO "X$export_dynamic_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec_FC='`$ECHO "X$whole_archive_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object_FC='`$ECHO "X$compiler_needs_object_FC" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds_FC='`$ECHO "X$old_archive_from_new_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds_FC='`$ECHO "X$old_archive_from_expsyms_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_FC='`$ECHO "X$archive_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds_FC='`$ECHO "X$archive_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds_FC='`$ECHO "X$module_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds_FC='`$ECHO "X$module_expsym_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld_FC='`$ECHO "X$with_gnu_ld_FC" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag_FC='`$ECHO "X$allow_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag_FC='`$ECHO "X$no_undefined_flag_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_FC='`$ECHO "X$hardcode_libdir_flag_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld_FC='`$ECHO "X$hardcode_libdir_flag_spec_ld_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator_FC='`$ECHO "X$hardcode_libdir_separator_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_FC='`$ECHO "X$hardcode_direct_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute_FC='`$ECHO "X$hardcode_direct_absolute_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L_FC='`$ECHO "X$hardcode_minus_L_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var_FC='`$ECHO "X$hardcode_shlibpath_var_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic_FC='`$ECHO "X$hardcode_automatic_FC" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath_FC='`$ECHO "X$inherit_rpath_FC" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs_FC='`$ECHO "X$link_all_deplibs_FC" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path_FC='`$ECHO "X$fix_srcfile_path_FC" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols_FC='`$ECHO "X$always_export_symbols_FC" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds_FC='`$ECHO "X$export_symbols_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms_FC='`$ECHO "X$exclude_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms_FC='`$ECHO "X$include_expsyms_FC" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds_FC='`$ECHO "X$prelink_cmds_FC" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec_FC='`$ECHO "X$file_list_spec_FC" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action_FC='`$ECHO "X$hardcode_action_FC" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_dirs_FC='`$ECHO "X$compiler_lib_search_dirs_FC" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predep_objects_FC='`$ECHO "X$predep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdep_objects_FC='`$ECHO "X$postdep_objects_FC" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+predeps_FC='`$ECHO "X$predeps_FC" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+postdeps_FC='`$ECHO "X$postdeps_FC" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_lib_search_path_FC='`$ECHO "X$compiler_lib_search_path_FC" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+OBJDUMP \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib \
+compiler_lib_search_dirs \
+predep_objects \
+postdep_objects \
+predeps \
+postdeps \
+compiler_lib_search_path \
+LD_CXX \
+LD_FC \
+compiler_CXX \
+compiler_FC \
+lt_prog_compiler_no_builtin_flag_CXX \
+lt_prog_compiler_no_builtin_flag_FC \
+lt_prog_compiler_wl_CXX \
+lt_prog_compiler_wl_FC \
+lt_prog_compiler_pic_CXX \
+lt_prog_compiler_pic_FC \
+lt_prog_compiler_static_CXX \
+lt_prog_compiler_static_FC \
+lt_cv_prog_compiler_c_o_CXX \
+lt_cv_prog_compiler_c_o_FC \
+export_dynamic_flag_spec_CXX \
+export_dynamic_flag_spec_FC \
+whole_archive_flag_spec_CXX \
+whole_archive_flag_spec_FC \
+compiler_needs_object_CXX \
+compiler_needs_object_FC \
+with_gnu_ld_CXX \
+with_gnu_ld_FC \
+allow_undefined_flag_CXX \
+allow_undefined_flag_FC \
+no_undefined_flag_CXX \
+no_undefined_flag_FC \
+hardcode_libdir_flag_spec_CXX \
+hardcode_libdir_flag_spec_FC \
+hardcode_libdir_flag_spec_ld_CXX \
+hardcode_libdir_flag_spec_ld_FC \
+hardcode_libdir_separator_CXX \
+hardcode_libdir_separator_FC \
+fix_srcfile_path_CXX \
+fix_srcfile_path_FC \
+exclude_expsyms_CXX \
+exclude_expsyms_FC \
+include_expsyms_CXX \
+include_expsyms_FC \
+file_list_spec_CXX \
+file_list_spec_FC \
+compiler_lib_search_dirs_CXX \
+compiler_lib_search_dirs_FC \
+predep_objects_CXX \
+predep_objects_FC \
+postdep_objects_CXX \
+postdep_objects_FC \
+predeps_CXX \
+predeps_FC \
+postdeps_CXX \
+postdeps_FC \
+compiler_lib_search_path_CXX \
+compiler_lib_search_path_FC; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec \
+old_archive_cmds_CXX \
+old_archive_cmds_FC \
+old_archive_from_new_cmds_CXX \
+old_archive_from_new_cmds_FC \
+old_archive_from_expsyms_cmds_CXX \
+old_archive_from_expsyms_cmds_FC \
+archive_cmds_CXX \
+archive_cmds_FC \
+archive_expsym_cmds_CXX \
+archive_expsym_cmds_FC \
+module_cmds_CXX \
+module_cmds_FC \
+module_expsym_cmds_CXX \
+module_expsym_cmds_FC \
+export_symbols_cmds_CXX \
+export_symbols_cmds_FC \
+prelink_cmds_CXX \
+prelink_cmds_FC; do
+    case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+    *[\\\\\\\`\\"\\\$]*)
+      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+      ;;
+    *)
+      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+      ;;
+    esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"')  lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+  ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# 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
+
+
+    PACKAGE='$PACKAGE'
+    VERSION='$VERSION'
+    TIMESTAMP='$TIMESTAMP'
+    RM='$RM'
+    ofile='$ofile'
+
+
+
+
+
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+    "tests/C/Makefile") CONFIG_FILES="$CONFIG_FILES tests/C/Makefile" ;;
+    "tests/Fortran/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Fortran/Makefile" ;;
+    "tests/genarray/Makefile") CONFIG_FILES="$CONFIG_FILES tests/genarray/Makefile" ;;
+    "tests/bp_read/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bp_read/Makefile" ;;
+    "tests/suite/Makefile") CONFIG_FILES="$CONFIG_FILES tests/suite/Makefile" ;;
+    "tests/suite/programs/Makefile") CONFIG_FILES="$CONFIG_FILES tests/suite/programs/Makefile" ;;
+    "utils/Makefile") CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
+    "utils/skel/Makefile") CONFIG_FILES="$CONFIG_FILES utils/skel/Makefile" ;;
+    "utils/skel/etc/Makefile") CONFIG_FILES="$CONFIG_FILES utils/skel/etc/Makefile" ;;
+    "utils/adios_lint/Makefile") CONFIG_FILES="$CONFIG_FILES utils/adios_lint/Makefile" ;;
+    "utils/gpp/Makefile") CONFIG_FILES="$CONFIG_FILES utils/gpp/Makefile" ;;
+    "utils/bpdump/Makefile") CONFIG_FILES="$CONFIG_FILES utils/bpdump/Makefile" ;;
+    "utils/bp2h5/Makefile") CONFIG_FILES="$CONFIG_FILES utils/bp2h5/Makefile" ;;
+    "utils/bp2ncd/Makefile") CONFIG_FILES="$CONFIG_FILES utils/bp2ncd/Makefile" ;;
+    "utils/bp2ascii/Makefile") CONFIG_FILES="$CONFIG_FILES utils/bp2ascii/Makefile" ;;
+    "utils/bpsplit/Makefile") CONFIG_FILES="$CONFIG_FILES utils/bpsplit/Makefile" ;;
+    "utils/bpls/Makefile") CONFIG_FILES="$CONFIG_FILES utils/bpls/Makefile" ;;
+    "utils/bp2bp/Makefile") CONFIG_FILES="$CONFIG_FILES utils/bp2bp/Makefile" ;;
+    "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
+    "examples/C/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/Makefile" ;;
+    "examples/C/scalars/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/scalars/Makefile" ;;
+    "examples/C/arrays/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/arrays/Makefile" ;;
+    "examples/C/attributes/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/attributes/Makefile" ;;
+    "examples/C/manual/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/manual/Makefile" ;;
+    "examples/C/global-array/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/global-array/Makefile" ;;
+    "examples/C/global-array-time/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/global-array-time/Makefile" ;;
+    "examples/C/stat/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/stat/Makefile" ;;
+    "examples/C/read_all/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/read_all/Makefile" ;;
+    "examples/C/schema/Makefile") CONFIG_FILES="$CONFIG_FILES examples/C/schema/Makefile" ;;
+    "examples/Fortran/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Fortran/Makefile" ;;
+    "examples/Fortran/scalars/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Fortran/scalars/Makefile" ;;
+    "examples/Fortran/arrays/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Fortran/arrays/Makefile" ;;
+    "examples/Fortran/global-array/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Fortran/global-array/Makefile" ;;
+    "examples/Fortran/global-array-time/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Fortran/global-array-time/Makefile" ;;
+    "adios_config.flags") CONFIG_FILES="$CONFIG_FILES adios_config.flags" ;;
+
+  *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp=
+  trap 'exit_status=$?
+  { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./conf$$-$RANDOM
+  (umask 077 && mkdir "$tmp")
+} ||
+{
+   $as_echo "$as_me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr='
'
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+  cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+  || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+   { (exit 1); exit 1; }; }
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[	 ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# 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
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+  if test -z "$ac_t"; then
+    break
+  elif $ac_last_try; then
+    { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+   { (exit 1); exit 1; }; }
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+   { (exit 1); exit 1; }; }
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+   { (exit 1); exit 1; }; };;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) ac_f="$tmp/stdin";;
+      *) # Look for the file first in the build tree, then in the source tree
+	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
+	 # because $ac_f cannot contain `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+   { (exit 1); exit 1; }; };;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      ac_file_inputs="$ac_file_inputs '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$tmp/stdin" \
+      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; } ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  { as_dir="$ac_dir"
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+    s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
+
+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"; } &&
+  { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined.  Please make sure it is defined." >&5
+$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;}
+
+  rm -f "$tmp/stdin"
+  case $ac_file in
+  -) cat "$tmp/out" && rm -f "$tmp/out";;
+  *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+  esac \
+  || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+    } >"$tmp/config.h" \
+      || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
+    if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+      { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+    else
+      rm -f "$ac_file"
+      mv "$tmp/config.h" "$ac_file" \
+	|| { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  else
+    $as_echo "/* $configure_input  */" \
+      && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+      || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      { as_dir=$dirpart/$fdir
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+   { (exit 1); exit 1; }; }; }
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+    "libtool":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.
+#
+#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+#                 2006, 2007, 2008 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.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags="CXX FC "
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# An object symbol dumper.
+OBJDUMP=$lt_OBJDUMP
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names.  First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using 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.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects
+postdep_objects=$lt_postdep_objects
+predeps=$lt_predeps
+postdeps=$lt_postdeps
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path
+
+# ### 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
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+  # 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 '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
+
+  case $xsi_shell in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+#   dirname:  Compute the dirname of FILE.  If nonempty,
+#             add APPEND to the result, otherwise set result
+#             to NONDIR_REPLACEMENT.
+#             value returned in "$func_dirname_result"
+#   basename: Compute filename of FILE.
+#             value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+  case ${1} in
+    */*) func_dirname_result="${1%/*}${2}" ;;
+    *  ) func_dirname_result="${3}" ;;
+  esac
+  func_basename_result="${1##*/}"
+}
+
+# func_stripname 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).
+func_stripname ()
+{
+  # 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}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=${1%%=*}
+  func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  case ${1} in
+    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+    *)    func_lo2o_result=${1} ;;
+  esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=${#1}
+}
+
+_LT_EOF
+    ;;
+  *) # Bourne compatible functions.
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+  # Extract subdirectory from the argument.
+  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+  if test "X$func_dirname_result" = "X${1}"; then
+    func_dirname_result="${3}"
+  else
+    func_dirname_result="$func_dirname_result${2}"
+  fi
+}
+
+# func_basename file
+func_basename ()
+{
+  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname 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).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+  case ${2} in
+    .*) func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+    *)  func_stripname_result=`$ECHO "X${3}" \
+           | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+  esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+  func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+  func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+  func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+  func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+  func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+  func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+  yes)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1+=\$2"
+}
+_LT_EOF
+    ;;
+  *)
+    cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+  eval "$1=\$$1\$2"
+}
 
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_ACEOF
+_LT_EOF
+    ;;
+  esac
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-## --------------------- ##
-## M4sh Initialization.  ##
-## --------------------- ##
 
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
-  set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
+  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+    || (rm -f "$cfgfile"; exit 1)
 
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
-  as_unset=unset
-else
-  as_unset=false
-fi
+  mv -f "$cfgfile" "$ofile" ||
+    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+  chmod +x "$ofile"
 
 
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
+    cat <<_LT_EOF >> "$ofile"
 
-# NLS nuisances.
-for as_var in \
-  LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
-  LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
-  LC_TELEPHONE LC_TIME
-do
-  if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
-    eval $as_var=C; export $as_var
-  else
-    $as_unset $as_var
-  fi
-done
+# ### BEGIN LIBTOOL TAG CONFIG: CXX
 
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
+# The linker used to build libraries.
+LD=$lt_LD_CXX
 
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
-  as_basename=basename
-else
-  as_basename=false
-fi
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_CXX
 
+# A language specific compiler.
+CC=$lt_compiler_CXX
 
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
-	 X"$0" : 'X\(//\)$' \| \
-	 X"$0" : 'X\(/\)$' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
-    sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
-  	  /^X\/\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\/\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_CXX
 
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX
 
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
 
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
 
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
 
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
-  # Find who we are.  Look in the path if we contain no path at all
-  # relative or not.
-  case $0 in
-    *[\\/]* ) as_myself=$0 ;;
-    *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
 
-       ;;
-  esac
-  # We did not find ourselves, most probably we were run as `sh COMMAND'
-  # in which case we are not to be found in the path.
-  if test "x$as_myself" = x; then
-    as_myself=$0
-  fi
-  if test ! -f "$as_myself"; then
-    { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-  case $CONFIG_SHELL in
-  '')
-    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for as_base in sh bash ksh sh5; do
-	 case $as_dir in
-	 /*)
-	   if ("$as_dir/$as_base" -c '
-  as_lineno_1=$LINENO
-  as_lineno_2=$LINENO
-  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
-  test "x$as_lineno_1" != "x$as_lineno_2" &&
-  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
-	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
-	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-	     CONFIG_SHELL=$as_dir/$as_base
-	     export CONFIG_SHELL
-	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
-	   fi;;
-	 esac
-       done
-done
-;;
-  esac
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_CXX
 
-  # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
-  # uniformly replaced by the line number.  The first 'sed' inserts a
-  # line-number line before each line; the second 'sed' does the real
-  # work.  The second script uses 'N' to pair each line-number line
-  # with the numbered line, and appends trailing '-' during
-  # substitution so that $LINENO is not a special case at line end.
-  # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
-  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
-  sed '=' <$as_myself |
-    sed '
-      N
-      s,$,-,
-      : loop
-      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
-      t loop
-      s,-$,,
-      s,^['$as_cr_digits']*\n,,
-    ' >$as_me.lineno &&
-  chmod +x $as_me.lineno ||
-    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
-   { (exit 1); exit 1; }; }
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX
 
-  # Don't try to exec as it changes $[0], causing all sort of problems
-  # (the dirname of $[0] is not the place where we might find the
-  # original and so on.  Autoconf is especially sensible to this).
-  . ./$as_me.lineno
-  # Exit status is that of the last command.
-  exit
-}
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX
 
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX
 
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-  *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T='	' ;;
-  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
-  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_CXX
 
-if expr a : '\(a\)' >/dev/null 2>&1; then
-  as_expr=expr
-else
-  as_expr=false
-fi
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX
 
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
-  # We could just check for DJGPP; but this test a) works b) is more generic
-  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
-  if test -f conf$$.exe; then
-    # Don't use ln at all; we don't have any links
-    as_ln_s='cp -p'
-  else
-    as_ln_s='ln -s'
-  fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
-  as_ln_s=ln
-else
-  as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX
 
-if mkdir -p . 2>/dev/null; then
-  as_mkdir_p=:
-else
-  test -d ./-p && rmdir ./-p
-  as_mkdir_p=false
-fi
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
 
-as_executable_p="test -f"
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
 
-# 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'"
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_CXX
 
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
 
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
 
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" 	$as_nl"
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX
 
-# CDPATH.
-$as_unset CDPATH
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking.  This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX
 
-exec 6>&1
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX
 
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling.  Logging --version etc. is OK.
-exec 5>>config.log
-{
-  echo
-  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_CXX
 
-This file was extended by $as_me, which was
-generated by GNU Autoconf 2.59.  Invocation command line was
+# 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.
+hardcode_direct_absolute=$hardcode_direct_absolute_CXX
 
-  CONFIG_FILES    = $CONFIG_FILES
-  CONFIG_HEADERS  = $CONFIG_HEADERS
-  CONFIG_LINKS    = $CONFIG_LINKS
-  CONFIG_COMMANDS = $CONFIG_COMMANDS
-  $ $0 $@
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_CXX
 
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-_ACEOF
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX
 
-# Files that config.status was made for.
-if test -n "$ac_config_files"; then
-  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
-fi
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_CXX
 
-if test -n "$ac_config_headers"; then
-  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
-fi
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_CXX
 
-if test -n "$ac_config_links"; then
-  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
-fi
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
 
-if test -n "$ac_config_commands"; then
-  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
-fi
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_CXX
 
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_CXX
 
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_CXX
 
-Usage: $0 [OPTIONS] [FILE]...
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_CXX
 
-  -h, --help       print this help, then exit
-  -V, --version    print version number, then exit
-  -q, --quiet      do not print progress messages
-  -d, --debug      don't remove temporary files
-      --recheck    update $as_me by reconfiguring in the same conditions
-  --file=FILE[:TEMPLATE]
-		   instantiate the configuration file FILE
-  --header=FILE[:TEMPLATE]
-		   instantiate the configuration header FILE
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_CXX
 
-Configuration files:
-$config_files
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_CXX
 
-Configuration headers:
-$config_headers
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_CXX
 
-Configuration commands:
-$config_commands
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
 
-Report bugs to <bug-autoconf at gnu.org>."
-_ACEOF
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX
 
-cat >>$CONFIG_STATUS <<_ACEOF
-ac_cs_version="\\
-config.status
-configured by $0, generated by GNU Autoconf 2.59,
-  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_CXX
+postdep_objects=$lt_postdep_objects_CXX
+predeps=$lt_predeps_CXX
+postdeps=$lt_postdeps_CXX
 
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=$srcdir
-INSTALL="$INSTALL"
-_ACEOF
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_CXX
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-# If no file are specified by the user, then we need to provide default
-# value.  By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
-  case $1 in
-  --*=*)
-    ac_option=`expr "x$1" : 'x\([^=]*\)='`
-    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
-    ac_shift=:
-    ;;
-  -*)
-    ac_option=$1
-    ac_optarg=$2
-    ac_shift=shift
-    ;;
-  *) # This is not an option, so the user has probably given explicit
-     # arguments.
-     ac_option=$1
-     ac_need_defaults=false;;
-  esac
+# ### END LIBTOOL TAG CONFIG: CXX
+_LT_EOF
 
-  case $ac_option in
-  # Handling of the options.
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    ac_cs_recheck=: ;;
-  --version | --vers* | -V )
-    echo "$ac_cs_version"; exit 0 ;;
-  --he | --h)
-    # Conflict between --help and --header
-    { { echo "$as_me:$LINENO: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; };;
-  --help | --hel | -h )
-    echo "$ac_cs_usage"; exit 0 ;;
-  --debug | --d* | -d )
-    debug=: ;;
-  --file | --fil | --fi | --f )
-    $ac_shift
-    CONFIG_FILES="$CONFIG_FILES $ac_optarg"
-    ac_need_defaults=false;;
-  --header | --heade | --head | --hea )
-    $ac_shift
-    CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
-    ac_need_defaults=false;;
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil | --si | --s)
-    ac_cs_silent=: ;;
 
-  # This is an error.
-  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
-   { (exit 1); exit 1; }; } ;;
+    cat <<_LT_EOF >> "$ofile"
 
-  *) ac_config_targets="$ac_config_targets $1" ;;
+# ### BEGIN LIBTOOL TAG CONFIG: FC
 
-  esac
-  shift
-done
+# The linker used to build libraries.
+LD=$lt_LD_FC
 
-ac_configure_extra_args=
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds_FC
 
-if $ac_cs_silent; then
-  exec 6>/dev/null
-  ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
+# A language specific compiler.
+CC=$lt_compiler_FC
 
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-if \$ac_cs_recheck; then
-  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
-  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
-fi
+# Is the compiler the GNU compiler?
+with_gcc=$GCC_FC
 
-_ACEOF
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_FC
 
-cat >>$CONFIG_STATUS <<_ACEOF
-#
-# INIT-COMMANDS section.
-#
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_FC
 
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_FC
 
-_ACEOF
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_FC
 
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_FC
 
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_FC
 
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_config_target in $ac_config_targets
-do
-  case "$ac_config_target" in
-  # Handling of arguments.
-  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
-  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
-  "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
-  "tests/C/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/C/Makefile" ;;
-  "tests/Fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Fortran/Makefile" ;;
-  "tests/genarray/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/genarray/Makefile" ;;
-  "tests/bp_read/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/bp_read/Makefile" ;;
-  "tests/suite/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/suite/Makefile" ;;
-  "tests/suite/programs/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/suite/programs/Makefile" ;;
-  "utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/Makefile" ;;
-  "utils/adios_lint/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/adios_lint/Makefile" ;;
-  "utils/gpp/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/gpp/Makefile" ;;
-  "utils/bpdump/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/bpdump/Makefile" ;;
-  "utils/bp2h5/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/bp2h5/Makefile" ;;
-  "utils/bp2ncd/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/bp2ncd/Makefile" ;;
-  "utils/bp2ascii/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/bp2ascii/Makefile" ;;
-  "utils/bpsplit/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/bpsplit/Makefile" ;;
-  "utils/bpls/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/bpls/Makefile" ;;
-  "utils/bp2bp/Makefile" ) CONFIG_FILES="$CONFIG_FILES utils/bp2bp/Makefile" ;;
-  "examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;;
-  "examples/C/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/C/Makefile" ;;
-  "examples/C/scalars/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/C/scalars/Makefile" ;;
-  "examples/C/arrays/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/C/arrays/Makefile" ;;
-  "examples/C/attributes/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/C/attributes/Makefile" ;;
-  "examples/C/manual/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/C/manual/Makefile" ;;
-  "examples/C/global-array/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/C/global-array/Makefile" ;;
-  "examples/C/global-array-time/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/C/global-array-time/Makefile" ;;
-  "examples/C/stat/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/C/stat/Makefile" ;;
-  "examples/C/read_all/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/C/read_all/Makefile" ;;
-  "examples/Fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Fortran/Makefile" ;;
-  "examples/Fortran/scalars/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Fortran/scalars/Makefile" ;;
-  "examples/Fortran/arrays/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Fortran/arrays/Makefile" ;;
-  "examples/Fortran/global-array/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Fortran/global-array/Makefile" ;;
-  "examples/Fortran/global-array-time/Makefile" ) CONFIG_FILES="$CONFIG_FILES examples/Fortran/global-array-time/Makefile" ;;
-  "adios_config.flags" ) CONFIG_FILES="$CONFIG_FILES adios_config.flags" ;;
-  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
-  "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
-  *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
-   { (exit 1); exit 1; }; };;
-  esac
-done
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_FC
 
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used.  Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
-  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
-  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
-  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_FC
 
-# Have a temporary directory for convenience.  Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
-  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
-  trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_FC
 
-# Create a (secure) tmp directory for tmp files.
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object_FC
 
-{
-  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
-}  ||
-{
-  tmp=./confstat$$-$RANDOM
-  (umask 077 && mkdir $tmp)
-} ||
-{
-   echo "$me: cannot create a temporary directory in ." >&2
-   { (exit 1); exit 1; }
-}
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_FC
 
-_ACEOF
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_FC
 
-cat >>$CONFIG_STATUS <<_ACEOF
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds_FC
+archive_expsym_cmds=$lt_archive_expsym_cmds_FC
 
-#
-# CONFIG_FILES section.
-#
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds_FC
+module_expsym_cmds=$lt_module_expsym_cmds_FC
 
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "\$CONFIG_FILES"; then
-  # Protect against being on the right side of a sed subst in config.status.
-  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
-   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
-s, at SHELL@,$SHELL,;t t
-s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
-s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
-s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
-s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
-s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
-s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
-s, at exec_prefix@,$exec_prefix,;t t
-s, at prefix@,$prefix,;t t
-s, at program_transform_name@,$program_transform_name,;t t
-s, at bindir@,$bindir,;t t
-s, at sbindir@,$sbindir,;t t
-s, at libexecdir@,$libexecdir,;t t
-s, at datadir@,$datadir,;t t
-s, at sysconfdir@,$sysconfdir,;t t
-s, at sharedstatedir@,$sharedstatedir,;t t
-s, at localstatedir@,$localstatedir,;t t
-s, at libdir@,$libdir,;t t
-s, at includedir@,$includedir,;t t
-s, at oldincludedir@,$oldincludedir,;t t
-s, at infodir@,$infodir,;t t
-s, at mandir@,$mandir,;t t
-s, at build_alias@,$build_alias,;t t
-s, at host_alias@,$host_alias,;t t
-s, at target_alias@,$target_alias,;t t
-s, at DEFS@,$DEFS,;t t
-s, at ECHO_C@,$ECHO_C,;t t
-s, at ECHO_N@,$ECHO_N,;t t
-s, at ECHO_T@,$ECHO_T,;t t
-s, at LIBS@,$LIBS,;t t
-s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
-s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
-s, at INSTALL_DATA@,$INSTALL_DATA,;t t
-s, at CYGPATH_W@,$CYGPATH_W,;t t
-s, at PACKAGE@,$PACKAGE,;t t
-s, at VERSION@,$VERSION,;t t
-s, at ACLOCAL@,$ACLOCAL,;t t
-s, at AUTOCONF@,$AUTOCONF,;t t
-s, at AUTOMAKE@,$AUTOMAKE,;t t
-s, at AUTOHEADER@,$AUTOHEADER,;t t
-s, at MAKEINFO@,$MAKEINFO,;t t
-s, at install_sh@,$install_sh,;t t
-s, at STRIP@,$STRIP,;t t
-s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
-s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
-s, at mkdir_p@,$mkdir_p,;t t
-s, at AWK@,$AWK,;t t
-s, at SET_MAKE@,$SET_MAKE,;t t
-s, at am__leading_dot@,$am__leading_dot,;t t
-s, at AMTAR@,$AMTAR,;t t
-s, at am__tar@,$am__tar,;t t
-s, at am__untar@,$am__untar,;t t
-s, at CC@,$CC,;t t
-s, at CFLAGS@,$CFLAGS,;t t
-s, at LDFLAGS@,$LDFLAGS,;t t
-s, at CPPFLAGS@,$CPPFLAGS,;t t
-s, at ac_ct_CC@,$ac_ct_CC,;t t
-s, at EXEEXT@,$EXEEXT,;t t
-s, at OBJEXT@,$OBJEXT,;t t
-s, at DEPDIR@,$DEPDIR,;t t
-s, at am__include@,$am__include,;t t
-s, at am__quote@,$am__quote,;t t
-s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
-s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
-s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
-s, at CCDEPMODE@,$CCDEPMODE,;t t
-s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
-s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
-s, at CPP@,$CPP,;t t
-s, at EGREP@,$EGREP,;t t
-s, at CXX@,$CXX,;t t
-s, at CXXFLAGS@,$CXXFLAGS,;t t
-s, at ac_ct_CXX@,$ac_ct_CXX,;t t
-s, at CXXDEPMODE@,$CXXDEPMODE,;t t
-s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
-s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
-s, at HAVE_MPI_TRUE@,$HAVE_MPI_TRUE,;t t
-s, at HAVE_MPI_FALSE@,$HAVE_MPI_FALSE,;t t
-s, at MPICC@,$MPICC,;t t
-s, at MPILIBS@,$MPILIBS,;t t
-s, at MPICXX@,$MPICXX,;t t
-s, at BUILD_FORTRAN_TRUE@,$BUILD_FORTRAN_TRUE,;t t
-s, at BUILD_FORTRAN_FALSE@,$BUILD_FORTRAN_FALSE,;t t
-s, at FC@,$FC,;t t
-s, at FCFLAGS@,$FCFLAGS,;t t
-s, at ac_ct_FC@,$ac_ct_FC,;t t
-s, at FCLIBS@,$FCLIBS,;t t
-s, at MPIFC@,$MPIFC,;t t
-s, at build@,$build,;t t
-s, at build_cpu@,$build_cpu,;t t
-s, at build_vendor@,$build_vendor,;t t
-s, at build_os@,$build_os,;t t
-s, at host@,$host,;t t
-s, at host_cpu@,$host_cpu,;t t
-s, at host_vendor@,$host_vendor,;t t
-s, at host_os@,$host_os,;t t
-s, at SED@,$SED,;t t
-s, at LN_S@,$LN_S,;t t
-s, at ECHO@,$ECHO,;t t
-s, at AR@,$AR,;t t
-s, at ac_ct_AR@,$ac_ct_AR,;t t
-s, at RANLIB@,$RANLIB,;t t
-s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
-s, at CXXCPP@,$CXXCPP,;t t
-s, at F77@,$F77,;t t
-s, at FFLAGS@,$FFLAGS,;t t
-s, at ac_ct_F77@,$ac_ct_F77,;t t
-s, at LIBTOOL@,$LIBTOOL,;t t
-s, at HAVE_MXML_TRUE@,$HAVE_MXML_TRUE,;t t
-s, at HAVE_MXML_FALSE@,$HAVE_MXML_FALSE,;t t
-s, at PTHREAD_CC@,$PTHREAD_CC,;t t
-s, at PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
-s, at PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
-s, at MXML_LIBS@,$MXML_LIBS,;t t
-s, at MXML_LDFLAGS@,$MXML_LDFLAGS,;t t
-s, at MXML_CPPFLAGS@,$MXML_CPPFLAGS,;t t
-s, at HAVE_INFINIBAND_TRUE@,$HAVE_INFINIBAND_TRUE,;t t
-s, at HAVE_INFINIBAND_FALSE@,$HAVE_INFINIBAND_FALSE,;t t
-s, at INFINIBAND_CPPFLAGS@,$INFINIBAND_CPPFLAGS,;t t
-s, at INFINIBAND_CFLAGS@,$INFINIBAND_CFLAGS,;t t
-s, at INFINIBAND_LDFLAGS@,$INFINIBAND_LDFLAGS,;t t
-s, at INFINIBAND_LIBS@,$INFINIBAND_LIBS,;t t
-s, at INFINIBAND_HEADER@,$INFINIBAND_HEADER,;t t
-s, at HAVE_PORTALS_TRUE@,$HAVE_PORTALS_TRUE,;t t
-s, at HAVE_PORTALS_FALSE@,$HAVE_PORTALS_FALSE,;t t
-s, at NEED_DARWIN_SINGLE_MODULE_TRUE@,$NEED_DARWIN_SINGLE_MODULE_TRUE,;t t
-s, at NEED_DARWIN_SINGLE_MODULE_FALSE@,$NEED_DARWIN_SINGLE_MODULE_FALSE,;t t
-s, at PORTALS_CPPFLAGS@,$PORTALS_CPPFLAGS,;t t
-s, at PORTALS_CFLAGS@,$PORTALS_CFLAGS,;t t
-s, at PORTALS_LDFLAGS@,$PORTALS_LDFLAGS,;t t
-s, at PORTALS_LIBS@,$PORTALS_LIBS,;t t
-s, at PORTALS_HEADER@,$PORTALS_HEADER,;t t
-s, at PORTALS_NAL_HEADER@,$PORTALS_NAL_HEADER,;t t
-s, at PORTALS_RT_HEADER@,$PORTALS_RT_HEADER,;t t
-s, at HAVE_HDF5_TRUE@,$HAVE_HDF5_TRUE,;t t
-s, at HAVE_HDF5_FALSE@,$HAVE_HDF5_FALSE,;t t
-s, at HDF5_LIBS@,$HDF5_LIBS,;t t
-s, at HDF5_LDFLAGS@,$HDF5_LDFLAGS,;t t
-s, at HDF5_CPPFLAGS@,$HDF5_CPPFLAGS,;t t
-s, at HAVE_PHDF5_TRUE@,$HAVE_PHDF5_TRUE,;t t
-s, at HAVE_PHDF5_FALSE@,$HAVE_PHDF5_FALSE,;t t
-s, at PHDF5_LIBS@,$PHDF5_LIBS,;t t
-s, at PHDF5_LDFLAGS@,$PHDF5_LDFLAGS,;t t
-s, at PHDF5_CPPFLAGS@,$PHDF5_CPPFLAGS,;t t
-s, at HAVE_NETCDF_TRUE@,$HAVE_NETCDF_TRUE,;t t
-s, at HAVE_NETCDF_FALSE@,$HAVE_NETCDF_FALSE,;t t
-s, at NETCDF_LIBS@,$NETCDF_LIBS,;t t
-s, at NETCDF_LDFLAGS@,$NETCDF_LDFLAGS,;t t
-s, at NETCDF_CPPFLAGS@,$NETCDF_CPPFLAGS,;t t
-s, at HAVE_NC4PAR_TRUE@,$HAVE_NC4PAR_TRUE,;t t
-s, at HAVE_NC4PAR_FALSE@,$HAVE_NC4PAR_FALSE,;t t
-s, at NC4PAR_LIBS@,$NC4PAR_LIBS,;t t
-s, at NC4PAR_LDFLAGS@,$NC4PAR_LDFLAGS,;t t
-s, at NC4PAR_CPPFLAGS@,$NC4PAR_CPPFLAGS,;t t
-s, at HAVE_PABLO_TRUE@,$HAVE_PABLO_TRUE,;t t
-s, at HAVE_PABLO_FALSE@,$HAVE_PABLO_FALSE,;t t
-s, at PABLO_LIBS@,$PABLO_LIBS,;t t
-s, at PABLO_LDFLAGS@,$PABLO_LDFLAGS,;t t
-s, at PABLO_CPPFLAGS@,$PABLO_CPPFLAGS,;t t
-s, at HAVE_NSSI_TRUE@,$HAVE_NSSI_TRUE,;t t
-s, at HAVE_NSSI_FALSE@,$HAVE_NSSI_FALSE,;t t
-s, at NSSI_LIBS@,$NSSI_LIBS,;t t
-s, at NSSI_SERVER_LIBS@,$NSSI_SERVER_LIBS,;t t
-s, at NSSI_CFLAGS@,$NSSI_CFLAGS,;t t
-s, at NSSI_CPPFLAGS@,$NSSI_CPPFLAGS,;t t
-s, at NSSI_LDFLAGS@,$NSSI_LDFLAGS,;t t
-s, at NSSI_SRCDIR@,$NSSI_SRCDIR,;t t
-s, at NSSI_BUILDDIR@,$NSSI_BUILDDIR,;t t
-s, at HAVE_DART_TRUE@,$HAVE_DART_TRUE,;t t
-s, at HAVE_DART_FALSE@,$HAVE_DART_FALSE,;t t
-s, at DART_LIBS@,$DART_LIBS,;t t
-s, at DART_LDFLAGS@,$DART_LDFLAGS,;t t
-s, at DART_CPPFLAGS@,$DART_CPPFLAGS,;t t
-s, at HAVE_DIMES_TRUE@,$HAVE_DIMES_TRUE,;t t
-s, at HAVE_DIMES_FALSE@,$HAVE_DIMES_FALSE,;t t
-s, at DIMES_LIBS@,$DIMES_LIBS,;t t
-s, at DIMES_LDFLAGS@,$DIMES_LDFLAGS,;t t
-s, at DIMES_CPPFLAGS@,$DIMES_CPPFLAGS,;t t
-s, at HAVE_DMALLOC_TRUE@,$HAVE_DMALLOC_TRUE,;t t
-s, at HAVE_DMALLOC_FALSE@,$HAVE_DMALLOC_FALSE,;t t
-s, at DMALLOC_LIBS@,$DMALLOC_LIBS,;t t
-s, at DMALLOC_LDFLAGS@,$DMALLOC_LDFLAGS,;t t
-s, at DMALLOC_CPPFLAGS@,$DMALLOC_CPPFLAGS,;t t
-s, at HAVE_LUSTRE_TRUE@,$HAVE_LUSTRE_TRUE,;t t
-s, at HAVE_LUSTRE_FALSE@,$HAVE_LUSTRE_FALSE,;t t
-s, at LUSTRE_LIBS@,$LUSTRE_LIBS,;t t
-s, at LUSTRE_LDFLAGS@,$LUSTRE_LDFLAGS,;t t
-s, at LUSTRE_CPPFLAGS@,$LUSTRE_CPPFLAGS,;t t
-s, at CSH@,$CSH,;t t
-s, at PATHPROG@,$PATHPROG,;t t
-s, at DT_LIBS@,$DT_LIBS,;t t
-s, at DT_CPPFLAGS@,$DT_CPPFLAGS,;t t
-s, at DT_LDFLAGS@,$DT_LDFLAGS,;t t
-s, at RESEARCH_TRANSPORTS_TRUE@,$RESEARCH_TRANSPORTS_TRUE,;t t
-s, at RESEARCH_TRANSPORTS_FALSE@,$RESEARCH_TRANSPORTS_FALSE,;t t
-s, at HAVE_DATATAP_TRUE@,$HAVE_DATATAP_TRUE,;t t
-s, at HAVE_DATATAP_FALSE@,$HAVE_DATATAP_FALSE,;t t
-s, at BUILD_WRITE_TRUE@,$BUILD_WRITE_TRUE,;t t
-s, at BUILD_WRITE_FALSE@,$BUILD_WRITE_FALSE,;t t
-s, at USE_PARALLEL_COMPILER_TRUE@,$USE_PARALLEL_COMPILER_TRUE,;t t
-s, at USE_PARALLEL_COMPILER_FALSE@,$USE_PARALLEL_COMPILER_FALSE,;t t
-s, at ADIOSLIB_CPPFLAGS@,$ADIOSLIB_CPPFLAGS,;t t
-s, at ADIOSLIB_CFLAGS@,$ADIOSLIB_CFLAGS,;t t
-s, at ADIOSLIB_LDFLAGS@,$ADIOSLIB_LDFLAGS,;t t
-s, at ADIOSLIB_LDADD@,$ADIOSLIB_LDADD,;t t
-s, at ADIOSLIB_SEQ_CPPFLAGS@,$ADIOSLIB_SEQ_CPPFLAGS,;t t
-s, at ADIOSLIB_SEQ_CFLAGS@,$ADIOSLIB_SEQ_CFLAGS,;t t
-s, at ADIOSLIB_SEQ_LDFLAGS@,$ADIOSLIB_SEQ_LDFLAGS,;t t
-s, at ADIOSLIB_SEQ_LDADD@,$ADIOSLIB_SEQ_LDADD,;t t
-s, at ADIOSLIB_INT_CPPFLAGS@,$ADIOSLIB_INT_CPPFLAGS,;t t
-s, at ADIOSLIB_INT_CFLAGS@,$ADIOSLIB_INT_CFLAGS,;t t
-s, at ADIOSLIB_INT_LDFLAGS@,$ADIOSLIB_INT_LDFLAGS,;t t
-s, at ADIOSLIB_INT_LDADD@,$ADIOSLIB_INT_LDADD,;t t
-s, at ADIOSREADLIB_CPPFLAGS@,$ADIOSREADLIB_CPPFLAGS,;t t
-s, at ADIOSREADLIB_CFLAGS@,$ADIOSREADLIB_CFLAGS,;t t
-s, at ADIOSREADLIB_LDFLAGS@,$ADIOSREADLIB_LDFLAGS,;t t
-s, at ADIOSREADLIB_LDADD@,$ADIOSREADLIB_LDADD,;t t
-s, at ADIOSREADLIB_SEQ_CPPFLAGS@,$ADIOSREADLIB_SEQ_CPPFLAGS,;t t
-s, at ADIOSREADLIB_SEQ_CFLAGS@,$ADIOSREADLIB_SEQ_CFLAGS,;t t
-s, at ADIOSREADLIB_SEQ_LDFLAGS@,$ADIOSREADLIB_SEQ_LDFLAGS,;t t
-s, at ADIOSREADLIB_SEQ_LDADD@,$ADIOSREADLIB_SEQ_LDADD,;t t
-s, at ADIOSLIB_EXTRA_CPPFLAGS@,$ADIOSLIB_EXTRA_CPPFLAGS,;t t
-s, at LIBOBJS@,$LIBOBJS,;t t
-s, at LTLIBOBJS@,$LTLIBOBJS,;t t
-CEOF
-
-_ACEOF
-
-  cat >>$CONFIG_STATUS <<\_ACEOF
-  # Split the substitutions into bite-sized pieces for seds with
-  # small command number limits, like on Digital OSF/1 and HP-UX.
-  ac_max_sed_lines=48
-  ac_sed_frag=1 # Number of current file.
-  ac_beg=1 # First line for current file.
-  ac_end=$ac_max_sed_lines # Line after last line for current file.
-  ac_more_lines=:
-  ac_sed_cmds=
-  while $ac_more_lines; do
-    if test $ac_beg -gt 1; then
-      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    else
-      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
-    fi
-    if test ! -s $tmp/subs.frag; then
-      ac_more_lines=false
-    else
-      # The purpose of the label and of the branching condition is to
-      # speed up the sed processing (if there are no `@' at all, there
-      # is no need to browse any of the substitutions).
-      # These are the two extra sed commands mentioned above.
-      (echo ':t
-  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
-      if test -z "$ac_sed_cmds"; then
-	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
-      else
-	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
-      fi
-      ac_sed_frag=`expr $ac_sed_frag + 1`
-      ac_beg=$ac_end
-      ac_end=`expr $ac_end + $ac_max_sed_lines`
-    fi
-  done
-  if test -z "$ac_sed_cmds"; then
-    ac_sed_cmds=cat
-  fi
-fi # test -n "$CONFIG_FILES"
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld_FC
 
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-	cat >$tmp/stdin
-	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
-  esac
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_FC
 
-  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
-  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_FC
 
-  ac_builddir=.
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_FC
 
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+# 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
 
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_FC
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct_FC
 
+# 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.
+hardcode_direct_absolute=$hardcode_direct_absolute_FC
 
-  case $INSTALL in
-  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
-  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
-  esac
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L_FC
 
-  if test x"$ac_file" != x-; then
-    { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-    rm -f "$ac_file"
-  fi
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    configure_input=
-  else
-    configure_input="$ac_file.  "
-  fi
-  configure_input=$configure_input"Generated from `echo $ac_file_in |
-				     sed 's,.*/,,'` by configure."
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-	 # Absolute (can't be DOS-style, as IFS=:)
-	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 echo "$f";;
-      *) # Relative
-	 if test -f "$f"; then
-	   # Build tree
-	   echo "$f"
-	 elif test -f "$srcdir/$f"; then
-	   # Source tree
-	   echo "$srcdir/$f"
-	 else
-	   # /dev/null tree
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
-  sed "$ac_vpsub
-$extrasub
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s, at configure_input@,$configure_input,;t t
-s, at srcdir@,$ac_srcdir,;t t
-s, at abs_srcdir@,$ac_abs_srcdir,;t t
-s, at top_srcdir@,$ac_top_srcdir,;t t
-s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s, at builddir@,$ac_builddir,;t t
-s, at abs_builddir@,$ac_abs_builddir,;t t
-s, at top_builddir@,$ac_top_builddir,;t t
-s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
-s, at INSTALL@,$ac_INSTALL,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
-  rm -f $tmp/stdin
-  if test x"$ac_file" != x-; then
-    mv $tmp/out $ac_file
-  else
-    cat $tmp/out
-    rm -f $tmp/out
-  fi
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_FC
 
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic_FC
 
-#
-# CONFIG_HEADER section.
-#
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath_FC
 
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([	 ]*\)#\([	 ]*define[	 ][	 ]*\)'
-ac_dB='[	 ].*$,\1#\2'
-ac_dC=' '
-ac_dD=',;t'
-# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([	 ]*\)#\([	 ]*\)undef\([	 ][	 ]*\)'
-ac_uB='$,\1#\2define\3'
-ac_uC=' '
-ac_uD=',;t'
-
-for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case $ac_file in
-  - | *:- | *:-:* ) # input from stdin
-	cat >$tmp/stdin
-	ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
-	ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
-  * )   ac_file_in=$ac_file.in ;;
-  esac
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_FC
 
-  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
-
-  # First look for the input files in the build tree, otherwise in the
-  # src tree.
-  ac_file_inputs=`IFS=:
-    for f in $ac_file_in; do
-      case $f in
-      -) echo $tmp/stdin ;;
-      [\\/$]*)
-	 # Absolute (can't be DOS-style, as IFS=:)
-	 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 # Do quote $f, to prevent DOS paths from being IFS'd.
-	 echo "$f";;
-      *) # Relative
-	 if test -f "$f"; then
-	   # Build tree
-	   echo "$f"
-	 elif test -f "$srcdir/$f"; then
-	   # Source tree
-	   echo "$srcdir/$f"
-	 else
-	   # /dev/null tree
-	   { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
-   { (exit 1); exit 1; }; }
-	 fi;;
-      esac
-    done` || { (exit 1); exit 1; }
-  # Remove the trailing spaces.
-  sed 's/[	 ]*$//' $ac_file_inputs >$tmp/in
-
-_ACEOF
-
-# Transform confdefs.h into two sed scripts, `conftest.defines' and
-# `conftest.undefs', that substitutes the proper values into
-# config.h.in to produce config.h.  The first handles `#define'
-# templates, and the second `#undef' templates.
-# And first: Protect against being on the right side of a sed subst in
-# config.status.  Protect against being in an unquoted here document
-# in config.status.
-rm -f conftest.defines conftest.undefs
-# Using a here document instead of a string reduces the quoting nightmare.
-# Putting comments in sed scripts is not portable.
-#
-# `end' is used to avoid that the second main sed command (meant for
-# 0-ary CPP macros) applies to n-ary macro definitions.
-# See the Autoconf documentation for `clear'.
-cat >confdef2sed.sed <<\_ACEOF
-s/[\\&,]/\\&/g
-s,[\\$`],\\&,g
-t clear
-: clear
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*\)\(([^)]*)\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
-t end
-s,^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
-: end
-_ACEOF
-# If some macros were called several times there might be several times
-# the same #defines, which is useless.  Nevertheless, we may not want to
-# sort them, since we want the *last* AC-DEFINE to be honored.
-uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
-sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
-rm -f confdef2sed.sed
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >>conftest.undefs <<\_ACEOF
-s,^[	 ]*#[	 ]*undef[	 ][	 ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
-_ACEOF
-
-# Break up conftest.defines because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo '  if grep "^[	 ]*#[	 ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
-echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
-echo '  :' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.defines >/dev/null
-do
-  # Write a limited-size here document to $tmp/defines.sed.
-  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#define' lines.
-  echo '/^[	 ]*#[	 ]*define/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/defines.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
-  rm -f conftest.defines
-  mv conftest.tail conftest.defines
-done
-rm -f conftest.defines
-echo '  fi # grep' >>$CONFIG_STATUS
-echo >>$CONFIG_STATUS
-
-# Break up conftest.undefs because some shells have a limit on the size
-# of here documents, and old seds have small limits too (100 cmds).
-echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
-rm -f conftest.tail
-while grep . conftest.undefs >/dev/null
-do
-  # Write a limited-size here document to $tmp/undefs.sed.
-  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
-  # Speed up: don't consider the non `#undef'
-  echo '/^[	 ]*#[	 ]*undef/!b' >>$CONFIG_STATUS
-  # Work around the forget-to-reset-the-flag bug.
-  echo 't clr' >>$CONFIG_STATUS
-  echo ': clr' >>$CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
-  echo 'CEOF
-  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
-  rm -f $tmp/in
-  mv $tmp/out $tmp/in
-' >>$CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
-  rm -f conftest.undefs
-  mv conftest.tail conftest.undefs
-done
-rm -f conftest.undefs
-
-cat >>$CONFIG_STATUS <<\_ACEOF
-  # Let's still pretend it is `configure' which instantiates (i.e., don't
-  # use $as_me), people would be surprised to read:
-  #    /* config.h.  Generated by config.status.  */
-  if test x"$ac_file" = x-; then
-    echo "/* Generated by configure.  */" >$tmp/config.h
-  else
-    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
-  fi
-  cat $tmp/in >>$tmp/config.h
-  rm -f $tmp/in
-  if test x"$ac_file" != x-; then
-    if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
-      { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
-echo "$as_me: $ac_file is unchanged" >&6;}
-    else
-      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_file" : 'X\(//\)[^/]' \| \
-	 X"$ac_file" : 'X\(//\)$' \| \
-	 X"$ac_file" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-      { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path_FC
 
-      rm -f $ac_file
-      mv $tmp/config.h $ac_file
-    fi
-  else
-    cat $tmp/config.h
-    rm -f $tmp/config.h
-  fi
-# Compute $ac_file's index in $config_headers.
-_am_stamp_count=1
-for _am_header in $config_headers :; do
-  case $_am_header in
-    $ac_file | $ac_file:* )
-      break ;;
-    * )
-      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
-  esac
-done
-echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X$ac_file : 'X\(//\)[^/]' \| \
-	 X$ac_file : 'X\(//\)$' \| \
-	 X$ac_file : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X$ac_file |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`/stamp-h$_am_stamp_count
-done
-_ACEOF
-cat >>$CONFIG_STATUS <<\_ACEOF
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols_FC
 
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
-  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
-  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
-  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$ac_dest" : 'X\(//\)[^/]' \| \
-	 X"$ac_dest" : 'X\(//\)$' \| \
-	 X"$ac_dest" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-  { if $as_mkdir_p; then
-    mkdir -p "$ac_dir"
-  else
-    as_dir="$ac_dir"
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
-   { (exit 1); exit 1; }; }; }
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_FC
 
-  ac_builddir=.
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_FC
 
-if test "$ac_dir" != .; then
-  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
-  # A "../" for each directory in $ac_dir_suffix.
-  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
-  ac_dir_suffix= ac_top_builddir=
-fi
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_FC
 
-case $srcdir in
-  .)  # No --srcdir option.  We are building in place.
-    ac_srcdir=.
-    if test -z "$ac_top_builddir"; then
-       ac_top_srcdir=.
-    else
-       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
-    fi ;;
-  [\\/]* | ?:[\\/]* )  # Absolute path.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir ;;
-  *) # Relative path.
-    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds_FC
 
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
-  case "$ac_dir" in
-  .) ac_abs_builddir=`pwd`;;
-  [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
-  *) ac_abs_builddir=`pwd`/"$ac_dir";;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
-  case ${ac_top_builddir}. in
-  .) ac_abs_top_builddir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
-  *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
-  case $ac_srcdir in
-  .) ac_abs_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
-  *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
-  esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
-  case $ac_top_srcdir in
-  .) ac_abs_top_srcdir=$ac_abs_builddir;;
-  [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
-  *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
-  esac;;
-esac
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec_FC
 
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_FC
 
-  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
-  case $ac_dest in
-    depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # So let's grep whole file.
-  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
-    dirpart=`(dirname "$mf") 2>/dev/null ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$mf" : 'X\(//\)[^/]' \| \
-	 X"$mf" : 'X\(//\)$' \| \
-	 X"$mf" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$mf" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`(dirname "$file") 2>/dev/null ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$file" : 'X\(//\)[^/]' \| \
-	 X"$file" : 'X\(//\)$' \| \
-	 X"$file" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$file" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-    { if $as_mkdir_p; then
-    mkdir -p $dirpart/$fdir
-  else
-    as_dir=$dirpart/$fdir
-    as_dirs=
-    while test ! -d "$as_dir"; do
-      as_dirs="$as_dir $as_dirs"
-      as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_dir" : 'X\(//\)[^/]' \| \
-	 X"$as_dir" : 'X\(//\)$' \| \
-	 X"$as_dir" : 'X\(/\)' \| \
-	 .     : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
-  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
-  	  /^X\(\/\/\)$/{ s//\1/; q; }
-  	  /^X\(\/\).*/{ s//\1/; q; }
-  	  s/.*/./; q'`
-    done
-    test ! -n "$as_dirs" || mkdir $as_dirs
-  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
-echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
-   { (exit 1); exit 1; }; }; }
+# The directories searched by this compiler when creating a shared library.
+compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_FC
+
+# Dependencies to place before and after the objects being linked to
+# create a shared library.
+predep_objects=$lt_predep_objects_FC
+postdep_objects=$lt_postdep_objects_FC
+predeps=$lt_predeps_FC
+postdeps=$lt_postdeps_FC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_FC
+
+# ### END LIBTOOL TAG CONFIG: FC
+_LT_EOF
 
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
-  done
-done
  ;;
+
   esac
-done
-_ACEOF
+done # for ac_tag
 
-cat >>$CONFIG_STATUS <<\_ACEOF
 
 { (exit 0); exit 0; }
 _ACEOF
 chmod +x $CONFIG_STATUS
 ac_clean_files=$ac_clean_files_save
 
+test $ac_write_fail = 0 ||
+  { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+   { (exit 1); exit 1; }; }
+
 
 # configure is writing to config.log, and then calls config.status.
 # config.status does its own redirection, appending to config.log.
@@ -33332,17 +35394,12 @@ if test "$no_create" != yes; then
   # would make configure fail if this is the last instruction.
   $ac_cs_success || { (exit 1); exit 1; }
 fi
-
-
-# Get the version of the source we are configuring here
-# Just to print it out at the end of configure
-# see also Makefile.am:install-data-hook
-if type svnversion &>/dev/null; then
-    SVNVERSION=`svnversion`
-else
-    SVNVERSION="unknown"
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
+
 echo
 echo "*********************************"
 echo $PACKAGE configured as follows:
@@ -33372,6 +35429,13 @@ else
     echo "  - No research transport methods";
 fi
 
+if test "x$enable_skel_timing" == "xyes"; then
+    echo "  - Skel Timing Mechanism Enabled";
+
+else
+    echo "  - Skel Timing Mechanism Disabled";
+fi
+
 if test -z "${HAVE_MXML_TRUE}"; then
     echo "  - MXML";
     echo "      - MXML_CFLAGS = $MXML_CFLAGS";
@@ -33394,26 +35458,41 @@ else
         echo "  - No LUSTRE"
 fi
 
+    echo "  - Networking library for staging methods:";
 if test -z "${HAVE_PORTALS_TRUE}"; then
-    echo "  - PORTALS";
+    echo "    - PORTALS";
     echo "      - PORTALS_CFLAGS = $PORTALS_CFLAGS";
     echo "      - PORTALS_CPPFLAGS = $PORTALS_CPPFLAGS";
     echo "      - PORTALS_LDFLAGS = $PORTALS_LDFLAGS";
     echo "      - PORTALS_LIBS = $PORTALS_LIBS";
     echo
-else
-    echo "  - No Portals"
-fi
+#else
+#    echo "  - No Portals"
+#fi
 
-if test -z "${HAVE_INFINIBAND_TRUE}"; then
-    echo "  - INFINIBAND";
+elif test -z "${HAVE_INFINIBAND_TRUE}"; then
+    echo "    - INFINIBAND";
     echo "      - INFINIBAND_CFLAGS = $INFINIBAND_CFLAGS";
     echo "      - INFINIBAND_CPPFLAGS = $INFINIBAND_CPPFLAGS";
     echo "      - INFINIBAND_LDFLAGS = $INFINIBAND_LDFLAGS";
     echo "      - INFINIBAND_LIBS = $INFINIBAND_LIBS";
     echo
+#else
+#    echo "  - No InfiniBand"
+#fi
+
+elif test -z "${HAVE_CRAY_PMI_TRUE}" -a -z "${HAVE_CRAY_UGNI_TRUE}"; then
+    echo "    - CRAY uGNI with PMI";
+    echo "      - CFLAGS = $CRAY_PMI_CFLAGS $CRAY_UGNI_CFLAGS";
+    echo "      - CPPFLAGS = $CRAY_PMI_CPPFLAGS $CRAY_UGNI_CPPFLAGS";
+    echo "      - LDFLAGS = $CRAY_PMI_LDFLAGS $CRAY_UGNI_LDFLAGS";
+    echo "      - LIBS = $CRAY_PMI_LIBS $CRAY_UGNI_LIBS";
+    echo
+#else
+#    echo "  - No Cray uGNI"
+
 else
-    echo "  - No InfiniBand"
+    echo "    - No supported networking library found"
 fi
 
 
@@ -33425,18 +35504,18 @@ if test "x${datatap}" != "xdisable"; then
     echo "      - DT_LIBS       = $DT_LIBS";
     echo
 else
-    echo "  - No DataTap transport";
+    echo "  - No DataTap transport to build DATATAP transport method";
 fi
 
-if test -z "${HAVE_DART_TRUE}"; then
-    echo "  - DART transport method";
-    echo "      - DART_CFLAGS = $DART_CFLAGS";
-    echo "      - DART_CPPFLAGS = $DART_CPPFLAGS";
-    echo "      - DART_LDFLAGS = $DART_LDFLAGS";
-    echo "      - DART_LIBS = $DART_LIBS";
+if test -z "${HAVE_DATASPACES_TRUE}"; then
+    echo "  - DATASPACES transport method";
+    echo "      - DATASPACES_CFLAGS = $DATASPACES_CFLAGS";
+    echo "      - DATASPACES_CPPFLAGS = $DATASPACES_CPPFLAGS";
+    echo "      - DATASPACES_LDFLAGS = $DATASPACES_LDFLAGS";
+    echo "      - DATASPACES_LIBS = $DATASPACES_LIBS";
     echo
 else
-    echo "  - No DART to build DART transport method"
+    echo "  - No DATASPACES to build DATASPACES transport method"
 fi
 
 if test -z "${HAVE_DIMES_TRUE}"; then
@@ -33458,7 +35537,7 @@ if test -z "${HAVE_PHDF5_TRUE}"; then
     echo "      - PHDF5_LIBS = $PHDF5_LIBS";
     echo
 else
-    echo "  - No PHDF5"
+    echo "  - No PHDF5 to build PHDF5 transport method"
 fi
 
 if test -z "${HAVE_HDF5_TRUE}"; then
@@ -33480,7 +35559,7 @@ if test -z "${HAVE_NC4PAR_TRUE}"; then
     echo "      - NC4PAR_LIBS = $NC4PAR_LIBS";
     echo
 else
-    echo "  - No NETCDF 4 Parallel"
+    echo "  - No NETCDF 4 Parallel to build NC4 transport method"
 fi
 
 if test -z "${HAVE_NETCDF_TRUE}"; then
@@ -33502,7 +35581,7 @@ if test -z "${HAVE_NSSI_TRUE}"; then
     echo "      - NSSI_LIBS = $NSSI_LIBS";
     echo
 else
-    echo "  - No NSSI"
+    echo "  - No NSSI to build NSSI transport method"
 fi
 
 echo "  - SVN version = ${SVNVERSION}"
diff --git a/configure.ac b/configure.ac
index f1d4d63..ce4a32b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR(config)
 AC_REVISION($Revision$)
 
 AC_CONFIG_HEADERS(config.h)
-AM_INIT_AUTOMAKE(adios,1.3)
+AM_INIT_AUTOMAKE(adios,1.4.1)
 
 AC_LANG(C)
 AC_C_STRINGIZE
@@ -54,16 +54,20 @@ dnl EOF
 dnl g/^hardcode_libdir_flag_spec=".*"/s//hardcode_libdir_flag_spec=""/
 dnl g/^hardcode_libdir_flag_spec_ld=".*"/s//hardcode_libdir_flag_spec_ld=""/
 
+AC_SEARCH_LIBS([nanosleep], [rt])
+AC_CHECK_FUNCS([nanosleep strncpy strerror gettimeofday])
 AC_PROG_MXML
 dnl AC_PROG_GENGETOPT
 AC_INFINIBAND
 AC_PORTALS
+AC_CRAY_PMI
+AC_CRAY_UGNI
 AC_HDF5
 AC_PHDF5
 AC_NETCDF
 AC_NC4PAR
 AC_NSSI
-AC_PROG_DART
+AC_PROG_DATASPACES
 AC_PROG_DIMES
 AC_DMALLOC
 AC_LUSTRE
@@ -79,10 +83,22 @@ AM_CONDITIONAL([RESEARCH_TRANSPORTS], [test "x$enable_research_transports" == "x
 
 AC_LANG(C)
 
+
+AC_ARG_ENABLE(skel-timing,
+    [AS_HELP_STRING([--enable-skel-timing],
+        [Include the skel timing mechanism. By default this is not included])])
+AM_CONDITIONAL([SKEL_TIMING], [test "x$enable_skel_timing" == "xyes"])
+
+if test "x$enable_skel_timing" == "xyes"; then
+    AC_DEFINE(SKEL_TIMING, 1, [Skel timing is enabled])
+fi
+
+AC_LANG(C)
+
 AM_CONDITIONAL([HAVE_DATATAP], [test x$datatap != xdisable])
 
 AC_ARG_ENABLE(write,
-    [AS_HELP_STRING([--disable-write],[disable building the write methods in ADIOS. Must be used on MacOSX])])
+    [AS_HELP_STRING([--disable-write],[disable building the write methods in ADIOS.])])
 AM_CONDITIONAL([BUILD_WRITE], [test "x$enable_write" != "xno"])
 
 dnl CC="$MPICC"
@@ -93,6 +109,12 @@ LIBS="$MPILIBS"
 
 AM_CONDITIONAL(USE_PARALLEL_COMPILER,false)
 
+if test -z "${MACRODEFFLAG}"; then
+    MACRODEFFLAG="-D"
+fi
+AC_SUBST(MACRODEFFLAG)
+
+
 dnl Use PHDF5 for bp2h5 if no sequential HDF5 was found
 if test -z "${HAVE_PHDF5_TRUE}" -a -z "${HAVE_HDF5_FALSE}"; then
     HDF5_CPPFLAGS="${PHDF5_CPPFLAGS}"
@@ -126,16 +148,16 @@ dnl ADIOSREADLIB_* for codes using libadiosread.a, libadiosreadf.a
 dnl ADIOSREADLIB_SEQ_* for codes using libadiosread_nompi.a
 dnl adios_config will contain flags for users' code linking based on these flags
 dnl EXTRA flags are used for compiling adios stuff, which need not go into adios_config for user codes
-ADIOSLIB_EXTRA_CPPFLAGS="-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE"
+ADIOSLIB_EXTRA_CPPFLAGS="${MACRODEFFLAG}_FILE_OFFSET_BITS=64 ${MACRODEFFLAG}_LARGEFILE_SOURCE ${MACRODEFFLAG}_LARGEFILE64_SOURCE ${MACRODEFFLAG}_GNU_SOURCE"
 ADIOSLIB_CPPFLAGS="${MXML_CPPFLAGS}"
 ADIOSLIB_CFLAGS=
 ADIOSLIB_LDFLAGS="${MXML_LDFLAGS}"
 ADIOSLIB_LDADD="-lm ${MXML_LIBS}"
-ADIOSLIB_SEQ_CPPFLAGS="-D_NOMPI ${MXML_CPPFLAGS}"
+ADIOSLIB_SEQ_CPPFLAGS="${MACRODEFFLAG}_NOMPI ${MXML_CPPFLAGS}"
 ADIOSLIB_SEQ_CFLAGS=
 ADIOSLIB_SEQ_LDFLAGS="${MXML_LDFLAGS}"
 ADIOSLIB_SEQ_LDADD="-lm ${MXML_LIBS}"
-ADIOSLIB_INT_CPPFLAGS="-D_NOMPI ${MXML_CPPFLAGS}"
+ADIOSLIB_INT_CPPFLAGS="${MACRODEFFLAG}_NOMPI ${MXML_CPPFLAGS}"
 ADIOSLIB_INT_CFLAGS=
 ADIOSLIB_INT_LDFLAGS="${MXML_LDFLAGS}"
 ADIOSLIB_INT_LDADD="-lm ${MXML_LIBS}"
@@ -143,7 +165,7 @@ ADIOSREADLIB_CPPFLAGS=
 ADIOSREADLIB_CFLAGS=
 ADIOSREADLIB_LDFLAGS=
 ADIOSREADLIB_LDADD="-lm"
-ADIOSREADLIB_SEQ_CPPFLAGS="-D_NOMPI"
+ADIOSREADLIB_SEQ_CPPFLAGS="${MACRODEFFLAG}_NOMPI"
 ADIOSREADLIB_SEQ_CFLAGS=
 ADIOSREADLIB_SEQ_LDFLAGS=
 ADIOSREADLIB_SEQ_LDADD="-lm"
@@ -161,23 +183,23 @@ if test "x${datatap}" != "xdisable"; then
     ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DT_LDFLAGS}"
     ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DT_LIBS}"
 fi
-if test -z "${HAVE_DART_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${DART_CPPFLAGS}"
+if test -z "${HAVE_DATASPACES_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${DATASPACES_CPPFLAGS}"
     ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS}"
-    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DART_LDFLAGS}"
-    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DART_LIBS}"
-    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${DART_CPPFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DATASPACES_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DATASPACES_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${DATASPACES_CPPFLAGS}"
     ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS}"
-    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${DART_LDFLAGS}"
-    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${DART_LIBS}"
-    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DART_CPPFLAGS}"
-    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DART_CFLAGS}"
-    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DART_LDFLAGS}"
-    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DART_LIBS}"
-    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DART_CPPFLAGS}"
-    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DART_CFLAGS}"
-    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DART_LDFLAGS}"
-    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DART_LIBS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${DATASPACES_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${DATASPACES_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${DATASPACES_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${DATASPACES_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${DATASPACES_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${DATASPACES_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${DATASPACES_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${DATASPACES_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${DATASPACES_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${DATASPACES_LIBS}"
 fi
 if test -z "${HAVE_DIMES_TRUE}"; then
     ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${DIMES_CPPFLAGS}"
@@ -202,6 +224,10 @@ if test -z "${HAVE_NSSI_TRUE}"; then
     ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${NSSI_CFLAGS}"
     ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${NSSI_LDFLAGS}"
     ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${NSSI_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${NSSI_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${NSSI_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${NSSI_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${NSSI_LIBS}"
     ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${MXML_CPPFLAGS} ${NSSI_CPPFLAGS}"
     ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${MXML_CPPFLAGS} ${NSSI_CFLAGS}"
     ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${MXML_LDFLAGS} ${NSSI_LDFLAGS}"
@@ -232,6 +258,14 @@ if test -z "${HAVE_PORTALS_TRUE}"; then
     ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${PORTALS_CFLAGS}"
     ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${PORTALS_LDFLAGS}"
     ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${PORTALS_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${PORTALS_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${PORTALS_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${PORTALS_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${PORTALS_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${PORTALS_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${PORTALS_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${PORTALS_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${PORTALS_LIBS}"
 fi
 if test -z "${HAVE_INFINIBAND_TRUE}"; then
     ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${INFINIBAND_CPPFLAGS}"
@@ -242,6 +276,50 @@ if test -z "${HAVE_INFINIBAND_TRUE}"; then
     ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${INFINIBAND_CFLAGS}"
     ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${INFINIBAND_LDFLAGS}"
     ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${INFINIBAND_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${INFINIBAND_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${INFINIBAND_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${INFINIBAND_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${INFINIBAND_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${INFINIBAND_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${INFINIBAND_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${INFINIBAND_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${INFINIBAND_LIBS}"
+fi
+if test -z "${HAVE_CRAY_PMI_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${CRAY_PMI_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${CRAY_PMI_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${CRAY_PMI_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${CRAY_PMI_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${CRAY_PMI_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${CRAY_PMI_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${CRAY_PMI_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${CRAY_PMI_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${CRAY_PMI_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${CRAY_PMI_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${CRAY_PMI_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${CRAY_PMI_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${CRAY_PMI_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${CRAY_PMI_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${CRAY_PMI_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${CRAY_PMI_LIBS}"
+fi
+if test -z "${HAVE_CRAY_UGNI_TRUE}"; then
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${CRAY_UGNI_CPPFLAGS}"
+    ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${CRAY_UGNI_CFLAGS}"
+    ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${CRAY_UGNI_LDFLAGS}"
+    ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${CRAY_UGNI_LIBS}"
+    ADIOSLIB_SEQ_CPPFLAGS="${ADIOSLIB_SEQ_CPPFLAGS} ${CRAY_UGNI_CPPFLAGS}"
+    ADIOSLIB_SEQ_CFLAGS="${ADIOSLIB_SEQ_CFLAGS} ${CRAY_UGNI_CFLAGS}"
+    ADIOSLIB_SEQ_LDFLAGS="${ADIOSLIB_SEQ_LDFLAGS} ${CRAY_UGNI_LDFLAGS}"
+    ADIOSLIB_SEQ_LDADD="${ADIOSLIB_SEQ_LDADD} ${CRAY_UGNI_LIBS}"
+    ADIOSREADLIB_CPPFLAGS="${ADIOSREADLIB_CPPFLAGS} ${CRAY_UGNI_CPPFLAGS}"
+    ADIOSREADLIB_CFLAGS="${ADIOSREADLIB_CFLAGS} ${CRAY_UGNI_CFLAGS}"
+    ADIOSREADLIB_LDFLAGS="${ADIOSREADLIB_LDFLAGS} ${CRAY_UGNI_LDFLAGS}"
+    ADIOSREADLIB_LDADD="${ADIOSREADLIB_LDADD} ${CRAY_UGNI_LIBS}"
+    ADIOSREADLIB_SEQ_CPPFLAGS="${ADIOSREADLIB_SEQ_CPPFLAGS} ${CRAY_UGNI_CPPFLAGS}"
+    ADIOSREADLIB_SEQ_CFLAGS="${ADIOSREADLIB_SEQ_CFLAGS} ${CRAY_UGNI_CFLAGS}"
+    ADIOSREADLIB_SEQ_LDFLAGS="${ADIOSREADLIB_SEQ_LDFLAGS} ${CRAY_UGNI_LDFLAGS}"
+    ADIOSREADLIB_SEQ_LDADD="${ADIOSREADLIB_SEQ_LDADD} ${CRAY_UGNI_LIBS}"
 fi
 if test -z "${HAVE_NETCDF_TRUE}"; then
     ADIOSLIB_INT_CPPFLAGS="${ADIOSLIB_INT_CPPFLAGS} ${NETCDF_CPPFLAGS}"
@@ -256,7 +334,7 @@ if test -z "${HAVE_HDF5_TRUE}"; then
     ADIOSLIB_INT_LDADD="${ADIOSLIB_INT_LDADD} ${HDF5_LIBS}"
 fi
 if test -z "${HAVE_DMALLOC_TRUE}"; then
-    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} -DDMALLOC ${DMALLOC_CPPFLAGS}"
+    ADIOSLIB_CPPFLAGS="${ADIOSLIB_CPPFLAGS} ${MACRODEFFLAG}DMALLOC ${DMALLOC_CPPFLAGS}"
     ADIOSLIB_CFLAGS="${ADIOSLIB_CFLAGS} ${DMALLOC_CFLAGS}"
     ADIOSLIB_LDFLAGS="${ADIOSLIB_LDFLAGS} ${DMALLOC_LDFLAGS}"
     ADIOSLIB_LDADD="${ADIOSLIB_LDADD} ${DMALLOC_LIBS}"
@@ -314,6 +392,32 @@ if test -z "${USE_PARALLEL_COMPILER_TRUE}"; then
         echo "#### Defined USE_PARALLEL_COMPILER to = [${USE_PARALLEL_COMPILER}]"
 fi
 
+dnl Generate major/minor/micro version numbers
+VERSION_MAJOR=[`echo ${VERSION} | sed -e "s/\..*//"`]
+AC_DEFINE_UNQUOTED(VERSION_MAJOR, ${VERSION_MAJOR}, [Major version number])
+VERSION_MINOR=[`echo ${VERSION} | sed -e "s/[0-9]*\.\([0-9]*\).*/\1/"`]
+AC_DEFINE_UNQUOTED(VERSION_MINOR, ${VERSION_MINOR}, [Minor version number])
+VERSION_MICRO=[`echo ${VERSION} | sed -e "s/[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/"`]
+dnl if micro not defined, here it equals to VERSION; do a minus
+VERSION_MICRO=`echo ${VERSION_MICRO} | sed -e "s/${VERSION}//"`
+if test -z "${VERSION_MICRO}"; then
+    VERSION_MICRO=0
+fi
+AC_DEFINE_UNQUOTED(VERSION_MICRO, ${VERSION_MICRO}, [Micro version number])
+
+# Get the version of the source we are configuring here
+# Just to print it out at the end of configure
+# see also Makefile.am:install-data-hook
+if type svnversion &>/dev/null; then
+    SVNVERSION=`svnversion`
+else
+    SVNVERSION="unknown"
+fi
+AC_DEFINE_UNQUOTED(VERSION_SVNREV, "${SVNVERSION}", [svn revision number])
+
+
+
+
 AC_CONFIG_FILES([Makefile
                  src/Makefile
                  tests/Makefile
@@ -324,6 +428,8 @@ AC_CONFIG_FILES([Makefile
                  tests/suite/Makefile
                  tests/suite/programs/Makefile
                  utils/Makefile
+                 utils/skel/Makefile
+                 utils/skel/etc/Makefile
                  utils/adios_lint/Makefile
                  utils/gpp/Makefile
                  utils/bpdump/Makefile
@@ -343,6 +449,7 @@ AC_CONFIG_FILES([Makefile
                  examples/C/global-array-time/Makefile
                  examples/C/stat/Makefile
                  examples/C/read_all/Makefile
+                 examples/C/schema/Makefile
                  examples/Fortran/Makefile
                  examples/Fortran/scalars/Makefile
                  examples/Fortran/arrays/Makefile
@@ -353,15 +460,6 @@ AC_CONFIG_FILES([Makefile
 
 AC_OUTPUT
 
-# Get the version of the source we are configuring here
-# Just to print it out at the end of configure
-# see also Makefile.am:install-data-hook
-if type svnversion &>/dev/null; then
-    SVNVERSION=`svnversion`
-else
-    SVNVERSION="unknown"
-fi
-
 echo
 echo "*********************************"
 echo $PACKAGE configured as follows:
@@ -391,6 +489,13 @@ else
     echo "  - No research transport methods";
 fi
 
+if test "x$enable_skel_timing" == "xyes"; then
+    echo "  - Skel Timing Mechanism Enabled";
+
+else
+    echo "  - Skel Timing Mechanism Disabled";
+fi
+
 if test -z "${HAVE_MXML_TRUE}"; then
     echo "  - MXML";
     echo "      - MXML_CFLAGS = $MXML_CFLAGS";
@@ -413,26 +518,41 @@ else
         echo "  - No LUSTRE"
 fi
 
+    echo "  - Networking library for staging methods:";
 if test -z "${HAVE_PORTALS_TRUE}"; then
-    echo "  - PORTALS";
+    echo "    - PORTALS";
     echo "      - PORTALS_CFLAGS = $PORTALS_CFLAGS";
     echo "      - PORTALS_CPPFLAGS = $PORTALS_CPPFLAGS";
     echo "      - PORTALS_LDFLAGS = $PORTALS_LDFLAGS";
     echo "      - PORTALS_LIBS = $PORTALS_LIBS";
     echo
-else
-    echo "  - No Portals"
-fi
+#else
+#    echo "  - No Portals"
+#fi
 
-if test -z "${HAVE_INFINIBAND_TRUE}"; then
-    echo "  - INFINIBAND";
+elif test -z "${HAVE_INFINIBAND_TRUE}"; then
+    echo "    - INFINIBAND";
     echo "      - INFINIBAND_CFLAGS = $INFINIBAND_CFLAGS";
     echo "      - INFINIBAND_CPPFLAGS = $INFINIBAND_CPPFLAGS";
     echo "      - INFINIBAND_LDFLAGS = $INFINIBAND_LDFLAGS";
     echo "      - INFINIBAND_LIBS = $INFINIBAND_LIBS";
     echo
-else
-    echo "  - No InfiniBand"
+#else
+#    echo "  - No InfiniBand"
+#fi
+
+elif test -z "${HAVE_CRAY_PMI_TRUE}" -a -z "${HAVE_CRAY_UGNI_TRUE}"; then
+    echo "    - CRAY uGNI with PMI";
+    echo "      - CFLAGS = $CRAY_PMI_CFLAGS $CRAY_UGNI_CFLAGS";
+    echo "      - CPPFLAGS = $CRAY_PMI_CPPFLAGS $CRAY_UGNI_CPPFLAGS";
+    echo "      - LDFLAGS = $CRAY_PMI_LDFLAGS $CRAY_UGNI_LDFLAGS";
+    echo "      - LIBS = $CRAY_PMI_LIBS $CRAY_UGNI_LIBS";
+    echo
+#else
+#    echo "  - No Cray uGNI"
+
+else 
+    echo "    - No supported networking library found"
 fi
 
 dnl if test -z "${HAVE_GENGETOPT_TRUE}"; then
@@ -454,18 +574,18 @@ if test "x${datatap}" != "xdisable"; then
     echo "      - DT_LIBS       = $DT_LIBS";
     echo
 else
-    echo "  - No DataTap transport";
+    echo "  - No DataTap transport to build DATATAP transport method";
 fi
 
-if test -z "${HAVE_DART_TRUE}"; then
-    echo "  - DART transport method";
-    echo "      - DART_CFLAGS = $DART_CFLAGS";
-    echo "      - DART_CPPFLAGS = $DART_CPPFLAGS";
-    echo "      - DART_LDFLAGS = $DART_LDFLAGS";
-    echo "      - DART_LIBS = $DART_LIBS";
+if test -z "${HAVE_DATASPACES_TRUE}"; then
+    echo "  - DATASPACES transport method";
+    echo "      - DATASPACES_CFLAGS = $DATASPACES_CFLAGS";
+    echo "      - DATASPACES_CPPFLAGS = $DATASPACES_CPPFLAGS";
+    echo "      - DATASPACES_LDFLAGS = $DATASPACES_LDFLAGS";
+    echo "      - DATASPACES_LIBS = $DATASPACES_LIBS";
     echo
 else
-    echo "  - No DART to build DART transport method"
+    echo "  - No DATASPACES to build DATASPACES transport method"
 fi
 
 if test -z "${HAVE_DIMES_TRUE}"; then
@@ -487,7 +607,7 @@ if test -z "${HAVE_PHDF5_TRUE}"; then
     echo "      - PHDF5_LIBS = $PHDF5_LIBS";
     echo
 else
-    echo "  - No PHDF5"
+    echo "  - No PHDF5 to build PHDF5 transport method"
 fi
 
 if test -z "${HAVE_HDF5_TRUE}"; then
@@ -509,7 +629,7 @@ if test -z "${HAVE_NC4PAR_TRUE}"; then
     echo "      - NC4PAR_LIBS = $NC4PAR_LIBS";
     echo
 else
-    echo "  - No NETCDF 4 Parallel"
+    echo "  - No NETCDF 4 Parallel to build NC4 transport method"
 fi
 
 if test -z "${HAVE_NETCDF_TRUE}"; then
@@ -531,7 +651,7 @@ if test -z "${HAVE_NSSI_TRUE}"; then
     echo "      - NSSI_LIBS = $NSSI_LIBS";
     echo
 else
-    echo "  - No NSSI"
+    echo "  - No NSSI to build NSSI transport method"
 fi
 
 echo "  - SVN version = ${SVNVERSION}"
diff --git a/examples/C/Makefile.am b/examples/C/Makefile.am
index 89bd656..70dd81d 100644
--- a/examples/C/Makefile.am
+++ b/examples/C/Makefile.am
@@ -1 +1 @@
-SUBDIRS=scalars arrays attributes manual global-array global-array-time read_all stat
+SUBDIRS=scalars arrays attributes manual global-array global-array-time read_all stat schema
diff --git a/examples/C/Makefile.in b/examples/C/Makefile.in
index daba5e0..e731631 100644
--- a/examples/C/Makefile.in
+++ b/examples/C/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,7 +36,9 @@ host_triplet = @host@
 subdir = examples/C
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -60,18 +60,50 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 ADIOSLIB_CFLAGS = @ADIOSLIB_CFLAGS@
 ADIOSLIB_CPPFLAGS = @ADIOSLIB_CPPFLAGS@
@@ -94,32 +126,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -128,72 +160,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -204,11 +211,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -216,7 +223,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -242,26 +252,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -273,29 +276,42 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-SUBDIRS = scalars arrays attributes manual global-array global-array-time read_all stat
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = scalars arrays attributes manual global-array global-array-time read_all stat schema
 all: all-recursive
 
 .SUFFIXES:
@@ -303,14 +319,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -328,6 +344,7 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -335,10 +352,6 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -346,7 +359,7 @@ uninstall-info-am:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -363,16 +376,15 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -398,16 +410,16 @@ maintainer-clean-recursive:
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -415,14 +427,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -434,81 +446,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -538,6 +570,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -548,8 +581,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -557,18 +589,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -587,22 +639,25 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/arrays/Makefile.am b/examples/C/arrays/Makefile.am
index dd25984..5040b64 100644
--- a/examples/C/arrays/Makefile.am
+++ b/examples/C/arrays/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
diff --git a/examples/C/arrays/Makefile.in b/examples/C/arrays/Makefile.in
index 6554512..1474f39 100644
--- a/examples/C/arrays/Makefile.in
+++ b/examples/C/arrays/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ noinst_PROGRAMS = arrays_write$(EXEEXT) arrays_read$(EXEEXT)
 subdir = examples/C/arrays
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,27 +62,35 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_arrays_read_OBJECTS = arrays_read.$(OBJEXT)
 arrays_read_OBJECTS = $(am_arrays_read_OBJECTS)
 am__DEPENDENCIES_1 =
 arrays_read_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
+arrays_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(arrays_read_LDFLAGS) $(LDFLAGS) -o $@
 am_arrays_write_OBJECTS = arrays_write.$(OBJEXT)
 arrays_write_OBJECTS = $(am_arrays_write_OBJECTS)
 arrays_write_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+arrays_write_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(arrays_write_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(arrays_read_SOURCES) $(arrays_write_SOURCES)
 DIST_SOURCES = $(arrays_read_SOURCES) $(arrays_write_SOURCES)
 ETAGS = etags
@@ -110,32 +118,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -144,72 +152,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -220,11 +203,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -232,7 +215,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -258,26 +244,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -289,29 +268,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 arrays_write_SOURCES = arrays_write.c
 arrays_write_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
@@ -329,14 +322,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/arrays/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/arrays/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/arrays/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/arrays/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -354,19 +347,22 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 arrays_read$(EXEEXT): $(arrays_read_OBJECTS) $(arrays_read_DEPENDENCIES) 
 	@rm -f arrays_read$(EXEEXT)
-	$(LINK) $(arrays_read_LDFLAGS) $(arrays_read_OBJECTS) $(arrays_read_LDADD) $(LIBS)
+	$(arrays_read_LINK) $(arrays_read_OBJECTS) $(arrays_read_LDADD) $(LIBS)
 arrays_write$(EXEEXT): $(arrays_write_OBJECTS) $(arrays_write_DEPENDENCIES) 
 	@rm -f arrays_write$(EXEEXT)
-	$(LINK) $(arrays_write_LDFLAGS) $(arrays_write_OBJECTS) $(arrays_write_LDADD) $(LIBS)
+	$(arrays_write_LINK) $(arrays_write_OBJECTS) $(arrays_write_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -389,82 +385,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -493,6 +492,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -505,7 +505,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -513,18 +513,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -544,19 +564,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/attributes/Makefile.am b/examples/C/attributes/Makefile.am
index 38c22e0..69b5ebc 100644
--- a/examples/C/attributes/Makefile.am
+++ b/examples/C/attributes/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
@@ -10,6 +10,7 @@ attributes_write_LDADD = $(top_builddir)/src/libadios.a
 attributes_write_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 attributes_write_LDADD += $(ADIOSLIB_LDADD)
 attributes_read_SOURCES = attributes_read.c
+attributes_read_CPPFLAGS = -DADIOS_USE_READ_API_1
 attributes_read_LDADD = $(top_builddir)/src/libadiosread.a
 attributes_read_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 attributes_read_LDADD += $(ADIOSLIB_LDADD)
diff --git a/examples/C/attributes/Makefile.in b/examples/C/attributes/Makefile.in
index 3b99660..5021b5c 100644
--- a/examples/C/attributes/Makefile.in
+++ b/examples/C/attributes/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ noinst_PROGRAMS = attributes_write$(EXEEXT) attributes_read$(EXEEXT)
 subdir = examples/C/attributes
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,27 +62,36 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
-am_attributes_read_OBJECTS = attributes_read.$(OBJEXT)
+am_attributes_read_OBJECTS =  \
+	attributes_read-attributes_read.$(OBJEXT)
 attributes_read_OBJECTS = $(am_attributes_read_OBJECTS)
 am__DEPENDENCIES_1 =
 attributes_read_DEPENDENCIES = $(top_builddir)/src/libadiosread.a \
 	$(am__DEPENDENCIES_1)
+attributes_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(attributes_read_LDFLAGS) $(LDFLAGS) -o $@
 am_attributes_write_OBJECTS = attributes_write.$(OBJEXT)
 attributes_write_OBJECTS = $(am_attributes_write_OBJECTS)
 attributes_write_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+attributes_write_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(attributes_write_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(attributes_read_SOURCES) $(attributes_write_SOURCES)
 DIST_SOURCES = $(attributes_read_SOURCES) $(attributes_write_SOURCES)
 ETAGS = etags
@@ -110,32 +119,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -144,72 +153,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -220,11 +204,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -232,7 +216,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -258,26 +245,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -289,35 +269,50 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 attributes_write_SOURCES = attributes_write.c
 attributes_write_LDADD = $(top_builddir)/src/libadios.a \
 	$(ADIOSLIB_LDADD)
 attributes_write_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 attributes_read_SOURCES = attributes_read.c
+attributes_read_CPPFLAGS = -DADIOS_USE_READ_API_1
 attributes_read_LDADD = $(top_builddir)/src/libadiosread.a \
 	$(ADIOSLIB_LDADD)
 attributes_read_LDFLAGS = $(ADIOSLIB_LDFLAGS)
@@ -331,14 +326,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/attributes/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/attributes/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/attributes/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/attributes/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -356,19 +351,22 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 attributes_read$(EXEEXT): $(attributes_read_OBJECTS) $(attributes_read_DEPENDENCIES) 
 	@rm -f attributes_read$(EXEEXT)
-	$(LINK) $(attributes_read_LDFLAGS) $(attributes_read_OBJECTS) $(attributes_read_LDADD) $(LIBS)
+	$(attributes_read_LINK) $(attributes_read_OBJECTS) $(attributes_read_LDADD) $(LIBS)
 attributes_write$(EXEEXT): $(attributes_write_OBJECTS) $(attributes_write_DEPENDENCIES) 
 	@rm -f attributes_write$(EXEEXT)
-	$(LINK) $(attributes_write_LDFLAGS) $(attributes_write_OBJECTS) $(attributes_write_LDADD) $(LIBS)
+	$(attributes_write_LINK) $(attributes_write_OBJECTS) $(attributes_write_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -385,88 +383,97 @@ distclean-compile:
 .c.lo:
 	$(LTCOMPILE) -c -o $@ $<
 
+attributes_read-attributes_read.o: attributes_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(attributes_read_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o attributes_read-attributes_read.o `test -f 'attributes_read.c' || echo '$(srcdir)/'`attributes_read.c
+
+attributes_read-attributes_read.obj: attributes_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(attributes_read_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o attributes_read-attributes_read.obj `if test -f 'attributes_read.c'; then $(CYGPATH_W) 'attributes_read.c'; else $(CYGPATH_W) '$(srcdir)/attributes_read.c'; fi`
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -495,6 +502,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -507,7 +515,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -515,18 +523,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -546,19 +574,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/global-array-time/Makefile.am b/examples/C/global-array-time/Makefile.am
index 197e937..3063261 100644
--- a/examples/C/global-array-time/Makefile.am
+++ b/examples/C/global-array-time/Makefile.am
@@ -1,9 +1,9 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
-noinst_PROGRAMS = adios_globaltime adios_globaltime_no_xml adios_read_globaltime
+noinst_PROGRAMS = adios_globaltime adios_globaltime_no_xml adios_read_globaltime adios_read_globaltime_streaming
 
 adios_globaltime_SOURCES = adios_globaltime.c
 adios_globaltime_LDADD = $(top_builddir)/src/libadios.a
@@ -14,10 +14,15 @@ adios_globaltime_no_xml_LDADD = $(top_builddir)/src/libadios.a
 adios_globaltime_no_xml_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_globaltime_no_xml_LDADD += $(ADIOSLIB_LDADD)
 adios_read_globaltime_SOURCES = adios_read_globaltime.c
+adios_read_globaltime_CPPFLAGS = -DADIOS_USE_READ_API_1
 adios_read_globaltime_LDADD = $(top_builddir)/src/libadiosread.a
 adios_read_globaltime_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_read_globaltime_LDADD += $(ADIOSLIB_LDADD)
-                
+adios_read_globaltime_streaming_SOURCES = adios_read_globaltime_streaming.c
+adios_read_globaltime_streaming_LDADD = $(top_builddir)/src/libadiosread.a
+adios_read_globaltime_streaming_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+adios_read_globaltime_streaming_LDADD += $(ADIOSLIB_LDADD)
+
 CLEANFILES = *.bp
 CC=$(MPICC)
 EXTRA_DIST = adios_globaltime.xml gread_restart.ch gwrite_restart.ch job.pbs
diff --git a/examples/C/global-array-time/Makefile.in b/examples/C/global-array-time/Makefile.in
index a09adaa..7436071 100644
--- a/examples/C/global-array-time/Makefile.in
+++ b/examples/C/global-array-time/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,11 +36,14 @@ build_triplet = @build@
 host_triplet = @host@
 noinst_PROGRAMS = adios_globaltime$(EXEEXT) \
 	adios_globaltime_no_xml$(EXEEXT) \
-	adios_read_globaltime$(EXEEXT)
+	adios_read_globaltime$(EXEEXT) \
+	adios_read_globaltime_streaming$(EXEEXT)
 subdir = examples/C/global-array-time
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -64,39 +65,63 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_adios_globaltime_OBJECTS = adios_globaltime.$(OBJEXT)
 adios_globaltime_OBJECTS = $(am_adios_globaltime_OBJECTS)
 am__DEPENDENCIES_1 =
 adios_globaltime_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
+adios_globaltime_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_globaltime_LDFLAGS) $(LDFLAGS) -o $@
 am_adios_globaltime_no_xml_OBJECTS =  \
 	adios_globaltime_no_xml.$(OBJEXT)
 adios_globaltime_no_xml_OBJECTS =  \
 	$(am_adios_globaltime_no_xml_OBJECTS)
 adios_globaltime_no_xml_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-am_adios_read_globaltime_OBJECTS = adios_read_globaltime.$(OBJEXT)
+adios_globaltime_no_xml_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_globaltime_no_xml_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_read_globaltime_OBJECTS =  \
+	adios_read_globaltime-adios_read_globaltime.$(OBJEXT)
 adios_read_globaltime_OBJECTS = $(am_adios_read_globaltime_OBJECTS)
 adios_read_globaltime_DEPENDENCIES =  \
 	$(top_builddir)/src/libadiosread.a $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+adios_read_globaltime_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_read_globaltime_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_read_globaltime_streaming_OBJECTS =  \
+	adios_read_globaltime_streaming.$(OBJEXT)
+adios_read_globaltime_streaming_OBJECTS =  \
+	$(am_adios_read_globaltime_streaming_OBJECTS)
+adios_read_globaltime_streaming_DEPENDENCIES =  \
+	$(top_builddir)/src/libadiosread.a $(am__DEPENDENCIES_1)
+adios_read_globaltime_streaming_LINK = $(LIBTOOL) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(AM_CFLAGS) $(CFLAGS) \
+	$(adios_read_globaltime_streaming_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(adios_globaltime_SOURCES) \
 	$(adios_globaltime_no_xml_SOURCES) \
-	$(adios_read_globaltime_SOURCES)
+	$(adios_read_globaltime_SOURCES) \
+	$(adios_read_globaltime_streaming_SOURCES)
 DIST_SOURCES = $(adios_globaltime_SOURCES) \
 	$(adios_globaltime_no_xml_SOURCES) \
-	$(adios_read_globaltime_SOURCES)
+	$(adios_read_globaltime_SOURCES) \
+	$(adios_read_globaltime_streaming_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -122,32 +147,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -156,72 +181,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -232,11 +232,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -244,7 +244,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -270,26 +273,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -301,29 +297,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 adios_globaltime_SOURCES = adios_globaltime.c
 adios_globaltime_LDADD = $(top_builddir)/src/libadios.a \
@@ -334,9 +344,14 @@ adios_globaltime_no_xml_LDADD = $(top_builddir)/src/libadios.a \
 	$(ADIOSLIB_LDADD)
 adios_globaltime_no_xml_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_read_globaltime_SOURCES = adios_read_globaltime.c
+adios_read_globaltime_CPPFLAGS = -DADIOS_USE_READ_API_1
 adios_read_globaltime_LDADD = $(top_builddir)/src/libadiosread.a \
 	$(ADIOSLIB_LDADD)
 adios_read_globaltime_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+adios_read_globaltime_streaming_SOURCES = adios_read_globaltime_streaming.c
+adios_read_globaltime_streaming_LDADD =  \
+	$(top_builddir)/src/libadiosread.a $(ADIOSLIB_LDADD)
+adios_read_globaltime_streaming_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 CLEANFILES = *.bp
 EXTRA_DIST = adios_globaltime.xml gread_restart.ch gwrite_restart.ch job.pbs
 all: all-am
@@ -347,14 +362,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/global-array-time/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/global-array-time/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/global-array-time/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/global-array-time/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -372,22 +387,28 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 adios_globaltime$(EXEEXT): $(adios_globaltime_OBJECTS) $(adios_globaltime_DEPENDENCIES) 
 	@rm -f adios_globaltime$(EXEEXT)
-	$(LINK) $(adios_globaltime_LDFLAGS) $(adios_globaltime_OBJECTS) $(adios_globaltime_LDADD) $(LIBS)
+	$(adios_globaltime_LINK) $(adios_globaltime_OBJECTS) $(adios_globaltime_LDADD) $(LIBS)
 adios_globaltime_no_xml$(EXEEXT): $(adios_globaltime_no_xml_OBJECTS) $(adios_globaltime_no_xml_DEPENDENCIES) 
 	@rm -f adios_globaltime_no_xml$(EXEEXT)
-	$(LINK) $(adios_globaltime_no_xml_LDFLAGS) $(adios_globaltime_no_xml_OBJECTS) $(adios_globaltime_no_xml_LDADD) $(LIBS)
+	$(adios_globaltime_no_xml_LINK) $(adios_globaltime_no_xml_OBJECTS) $(adios_globaltime_no_xml_LDADD) $(LIBS)
 adios_read_globaltime$(EXEEXT): $(adios_read_globaltime_OBJECTS) $(adios_read_globaltime_DEPENDENCIES) 
 	@rm -f adios_read_globaltime$(EXEEXT)
-	$(LINK) $(adios_read_globaltime_LDFLAGS) $(adios_read_globaltime_OBJECTS) $(adios_read_globaltime_LDADD) $(LIBS)
+	$(adios_read_globaltime_LINK) $(adios_read_globaltime_OBJECTS) $(adios_read_globaltime_LDADD) $(LIBS)
+adios_read_globaltime_streaming$(EXEEXT): $(adios_read_globaltime_streaming_OBJECTS) $(adios_read_globaltime_streaming_DEPENDENCIES) 
+	@rm -f adios_read_globaltime_streaming$(EXEEXT)
+	$(adios_read_globaltime_streaming_LINK) $(adios_read_globaltime_streaming_OBJECTS) $(adios_read_globaltime_streaming_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -404,88 +425,97 @@ distclean-compile:
 .c.lo:
 	$(LTCOMPILE) -c -o $@ $<
 
+adios_read_globaltime-adios_read_globaltime.o: adios_read_globaltime.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adios_read_globaltime_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adios_read_globaltime-adios_read_globaltime.o `test -f 'adios_read_globaltime.c' || echo '$(srcdir)/'`adios_read_globaltime.c
+
+adios_read_globaltime-adios_read_globaltime.obj: adios_read_globaltime.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adios_read_globaltime_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adios_read_globaltime-adios_read_globaltime.obj `if test -f 'adios_read_globaltime.c'; then $(CYGPATH_W) 'adios_read_globaltime.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_globaltime.c'; fi`
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -514,6 +544,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -526,7 +557,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -534,18 +565,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -565,19 +616,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/global-array-time/adios_globaltime_no_xml.c b/examples/C/global-array-time/adios_globaltime_no_xml.c
index 9ddd9f1..380c6e7 100644
--- a/examples/C/global-array-time/adios_globaltime_no_xml.c
+++ b/examples/C/global-array-time/adios_globaltime_no_xml.c
@@ -40,9 +40,6 @@ int main (int argc, char ** argv)
 
         G = 2 * NX * size;
 
-	for (i = 0; i < NX; i++)
-	    t[i] = rank * NX + i;
-
 	strcpy (filename, "adios_globaltime.bp");
 
 	adios_init_noxml ();
@@ -62,16 +59,23 @@ int main (int argc, char ** argv)
                      ,"", adios_integer
                      ,0, 0, 0);
 
-        adios_define_var (m_adios_group, "O"
-                     ,"", adios_integer
-                     ,0, 0, 0);
-
-        adios_define_var (m_adios_group, "temperature"
-                     ,"", adios_double
-                     ,"iter,NX", "G", "O");
+        /* have to define O and temperature as many times as we 
+           write them within one step (twice) */
+        for (it=0; it < 2; it++) {
+            adios_define_var (m_adios_group, "O"
+                         ,"", adios_integer
+                         ,0, 0, 0);
+    
+            adios_define_var (m_adios_group, "temperature"
+                         ,"", adios_double
+                         ,"iter,NX", "G", "O");
+        }
 
         for (it =0; it < 5; it++) {
 
+            for (i = 0; i < NX; i++)
+                t[i] = rank + it*0.1 + 0.01;
+
         	adios_open (&m_adios_file, "restart", filename, "a", &comm);
         	adios_groupsize = 4 + 4 + 4 + NX * 8
                         	+ 4 + 4 + 4 + NX * 8;
@@ -84,10 +88,8 @@ int main (int argc, char ** argv)
         	adios_write(m_adios_file, "temperature", t);
 
         	for (i = 0; i < NX; i++)
-            		t[i]++;
+            		t[i] += 0.01;
 
-        	adios_write(m_adios_file, "NX", (void *) &NX);
-        	adios_write(m_adios_file, "G", (void *) &G);
         	O = rank * 2 * NX + NX;
         	adios_write(m_adios_file, "O", (void *) &O);
         	adios_write(m_adios_file, "temperature", t);
diff --git a/examples/C/global-array-time/adios_read_globaltime.c b/examples/C/global-array-time/adios_read_globaltime.c
index e52f625..f97f18c 100644
--- a/examples/C/global-array-time/adios_read_globaltime.c
+++ b/examples/C/global-array-time/adios_read_globaltime.c
@@ -59,7 +59,7 @@ int main (int argc, char ** argv)
 
     start[2] = 0;
     count[2] = v->dims[2];
-       
+
     bytes_read = adios_read_var (g, "temperature", start, count, data);
 
     printf("rank=%d: ", rank);
diff --git a/examples/C/global-array-time/adios_read_globaltime_streaming.c b/examples/C/global-array-time/adios_read_globaltime_streaming.c
new file mode 100644
index 0000000..81b3873
--- /dev/null
+++ b/examples/C/global-array-time/adios_read_globaltime_streaming.c
@@ -0,0 +1,102 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: read global arrays from a BP file
+ *
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mpi.h"
+#include "adios_read.h"
+
+int main (int argc, char ** argv) 
+{
+    char        filename [256];
+    int         rank, size, i, j, NX = 16;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    ADIOS_FILE * fp;
+    ADIOS_VARINFO * vi;
+    ADIOS_SELECTION sel;
+
+    void * data = NULL, * data1 = NULL, * data2 = NULL;
+    uint64_t start[2], count[2], bytes_read = 0;
+    struct timeval t0, t1;
+
+    MPI_Init (&argc, &argv);
+
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    adios_read_init_method (ADIOS_READ_METHOD_BP, comm, "verbose=4");
+
+    fp = adios_read_open_stream ("adios_globaltime.bp", ADIOS_READ_METHOD_BP,
+                                 comm, ADIOS_LOCKMODE_NONE, 0);
+    vi = adios_inq_var (fp, "temperature");
+    adios_inq_var_blockinfo (fp, vi);
+
+printf ("ndim = %d\n",  vi->ndim);
+printf ("nsteps = %d\n",  vi->nsteps);
+printf ("dims[%lu][%lu]\n",  vi->dims[0], vi->dims[1]);
+
+    uint64_t slice_size = vi->dims[1]/size;
+    start[0] = 0;
+
+    if (rank == size-1)
+        slice_size = slice_size + vi->dims[1]%size;
+
+    count[0] = vi->dims[0];
+
+    start[1] = rank * slice_size;
+    count[1] = slice_size;
+
+    data = malloc (slice_size * vi->dims[0] * 8);
+    if (rank == 0)
+    {
+        for (i = 0; i < vi->dims[0]; i++)
+        {
+            for (j = 0; j < slice_size; j++)
+                * ((double *)data + i * slice_size  + j) = 0;
+        }
+    }
+
+    sel.type = ADIOS_SELECTION_BOUNDINGBOX;
+    sel.u.bb.ndim = vi->ndim;
+    sel.u.bb.start = start;
+    sel.u.bb.count = count;
+
+    adios_schedule_read (fp, &sel, "temperature", 0, 1, data);
+
+    adios_perform_reads (fp, 1);
+
+    if (rank == 0)
+    {
+        for (i = 0; i < vi->dims[0]; i++)
+        {
+            for (j = 0; j < slice_size; j++)
+                printf (" %7.5g", * ((double *)data + i * slice_size  + j));
+            printf ("\n");
+        }
+    }
+
+    adios_advance_step (fp, 0, 30);
+    printf ("current,last = %d,%d\n", fp->current_step, fp->last_step);
+
+    adios_advance_step (fp, 0, 30);
+    printf ("current,last = %d,%d\n", fp->current_step, fp->last_step);
+
+    adios_read_close (fp);
+
+    adios_read_finalize_method (ADIOS_READ_METHOD_BP);
+
+    free (data);
+    MPI_Finalize ();
+
+    return 0;
+}
+
+
diff --git a/examples/C/global-array/Makefile.am b/examples/C/global-array/Makefile.am
index 6fa6c52..b55c5b6 100644
--- a/examples/C/global-array/Makefile.am
+++ b/examples/C/global-array/Makefile.am
@@ -1,9 +1,9 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
-noinst_PROGRAMS = adios_global adios_global_2files adios_read_global adios_global_no_xml adios_read_global_no_xml
+noinst_PROGRAMS = adios_global adios_global_2files adios_read_gpp adios_read_global adios_read_writeblock adios_read_chunk adios_global_no_xml adios_read_global_no_xml no_xml_write_byid read_no_xml_write_byid
 
 adios_global_SOURCES = adios_global.c
 adios_global_LDADD = $(top_builddir)/src/libadios.a 
@@ -14,17 +14,40 @@ adios_global_2files_LDADD = $(top_builddir)/src/libadios.a
 adios_global_2files_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_global_2files_LDADD += $(ADIOSLIB_LDADD)
 adios_read_global_SOURCES = adios_read_global.c
+adios_read_global_CPPFLAGS = -DADIOS_USE_READ_API_1
 adios_read_global_LDADD = $(top_builddir)/src/libadiosread.a 
 adios_read_global_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_read_global_LDADD += $(ADIOSLIB_LDADD)
+adios_read_writeblock_SOURCES = adios_read_writeblock.c
+adios_read_writeblock_LDADD = $(top_builddir)/src/libadiosread.a
+adios_read_writeblock_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+adios_read_writeblock_LDADD += $(ADIOSLIB_LDADD)
+adios_read_chunk_SOURCES = adios_read_chunk.c
+adios_read_chunk_LDADD = $(top_builddir)/src/libadiosread.a
+adios_read_chunk_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+adios_read_chunk_LDADD += $(ADIOSLIB_LDADD)
+adios_read_gpp_SOURCES = adios_read_gpp.c
+adios_read_gpp_LDADD = $(top_builddir)/src/libadiosread.a 
+adios_read_gpp_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+adios_read_gpp_LDADD += $(ADIOSLIB_LDADD)
 adios_global_no_xml_SOURCES = adios_global_no_xml.c
 adios_global_no_xml_LDADD = $(top_builddir)/src/libadios.a 
 adios_global_no_xml_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_global_no_xml_LDADD += $(ADIOSLIB_LDADD)
 adios_read_global_no_xml_SOURCES = adios_read_global_no_xml.c
+adios_read_global_no_xml_CPPFLAGS = -DADIOS_USE_READ_API_1
 adios_read_global_no_xml_LDADD = $(top_builddir)/src/libadiosread.a
 adios_read_global_no_xml_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_read_global_no_xml_LDADD += $(ADIOSLIB_LDADD)
+no_xml_write_byid_SOURCES = no_xml_write_byid.c
+no_xml_write_byid_LDADD = $(top_builddir)/src/libadios.a
+no_xml_write_byid_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+no_xml_write_byid_LDADD += $(ADIOSLIB_LDADD)
+read_no_xml_write_byid_SOURCES = read_no_xml_write_byid.c
+read_no_xml_write_byid_CPPFLAGS = -DADIOS_USE_READ_API_1
+read_no_xml_write_byid_LDADD = $(top_builddir)/src/libadiosread.a
+read_no_xml_write_byid_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+read_no_xml_write_byid_LDADD += $(ADIOSLIB_LDADD)
 
 CLEANFILES = *.bp
 CC=$(MPICC)
diff --git a/examples/C/global-array/Makefile.in b/examples/C/global-array/Makefile.in
index e9ce9ef..17365e3 100644
--- a/examples/C/global-array/Makefile.in
+++ b/examples/C/global-array/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -37,12 +35,16 @@ POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
 noinst_PROGRAMS = adios_global$(EXEEXT) adios_global_2files$(EXEEXT) \
-	adios_read_global$(EXEEXT) adios_global_no_xml$(EXEEXT) \
-	adios_read_global_no_xml$(EXEEXT)
+	adios_read_gpp$(EXEEXT) adios_read_global$(EXEEXT) \
+	adios_read_writeblock$(EXEEXT) adios_read_chunk$(EXEEXT) \
+	adios_global_no_xml$(EXEEXT) adios_read_global_no_xml$(EXEEXT) \
+	no_xml_write_byid$(EXEEXT) read_no_xml_write_byid$(EXEEXT)
 subdir = examples/C/global-array
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -64,47 +66,107 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_adios_global_OBJECTS = adios_global.$(OBJEXT)
 adios_global_OBJECTS = $(am_adios_global_OBJECTS)
 am__DEPENDENCIES_1 =
 adios_global_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
+adios_global_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_global_LDFLAGS) $(LDFLAGS) -o $@
 am_adios_global_2files_OBJECTS = adios_global_2files.$(OBJEXT)
 adios_global_2files_OBJECTS = $(am_adios_global_2files_OBJECTS)
 adios_global_2files_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
+adios_global_2files_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_global_2files_LDFLAGS) $(LDFLAGS) -o $@
 am_adios_global_no_xml_OBJECTS = adios_global_no_xml.$(OBJEXT)
 adios_global_no_xml_OBJECTS = $(am_adios_global_no_xml_OBJECTS)
 adios_global_no_xml_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-am_adios_read_global_OBJECTS = adios_read_global.$(OBJEXT)
+adios_global_no_xml_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_global_no_xml_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_read_chunk_OBJECTS = adios_read_chunk.$(OBJEXT)
+adios_read_chunk_OBJECTS = $(am_adios_read_chunk_OBJECTS)
+adios_read_chunk_DEPENDENCIES = $(top_builddir)/src/libadiosread.a \
+	$(am__DEPENDENCIES_1)
+adios_read_chunk_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_read_chunk_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_read_global_OBJECTS =  \
+	adios_read_global-adios_read_global.$(OBJEXT)
 adios_read_global_OBJECTS = $(am_adios_read_global_OBJECTS)
 adios_read_global_DEPENDENCIES = $(top_builddir)/src/libadiosread.a \
 	$(am__DEPENDENCIES_1)
+adios_read_global_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_read_global_LDFLAGS) $(LDFLAGS) -o $@
 am_adios_read_global_no_xml_OBJECTS =  \
-	adios_read_global_no_xml.$(OBJEXT)
+	adios_read_global_no_xml-adios_read_global_no_xml.$(OBJEXT)
 adios_read_global_no_xml_OBJECTS =  \
 	$(am_adios_read_global_no_xml_OBJECTS)
 adios_read_global_no_xml_DEPENDENCIES =  \
 	$(top_builddir)/src/libadiosread.a $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+adios_read_global_no_xml_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_read_global_no_xml_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_read_gpp_OBJECTS = adios_read_gpp.$(OBJEXT)
+adios_read_gpp_OBJECTS = $(am_adios_read_gpp_OBJECTS)
+adios_read_gpp_DEPENDENCIES = $(top_builddir)/src/libadiosread.a \
+	$(am__DEPENDENCIES_1)
+adios_read_gpp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_read_gpp_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_read_writeblock_OBJECTS = adios_read_writeblock.$(OBJEXT)
+adios_read_writeblock_OBJECTS = $(am_adios_read_writeblock_OBJECTS)
+adios_read_writeblock_DEPENDENCIES =  \
+	$(top_builddir)/src/libadiosread.a $(am__DEPENDENCIES_1)
+adios_read_writeblock_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_read_writeblock_LDFLAGS) $(LDFLAGS) -o $@
+am_no_xml_write_byid_OBJECTS = no_xml_write_byid.$(OBJEXT)
+no_xml_write_byid_OBJECTS = $(am_no_xml_write_byid_OBJECTS)
+no_xml_write_byid_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+no_xml_write_byid_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(no_xml_write_byid_LDFLAGS) $(LDFLAGS) -o $@
+am_read_no_xml_write_byid_OBJECTS =  \
+	read_no_xml_write_byid-read_no_xml_write_byid.$(OBJEXT)
+read_no_xml_write_byid_OBJECTS = $(am_read_no_xml_write_byid_OBJECTS)
+read_no_xml_write_byid_DEPENDENCIES =  \
+	$(top_builddir)/src/libadiosread.a $(am__DEPENDENCIES_1)
+read_no_xml_write_byid_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(read_no_xml_write_byid_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(adios_global_SOURCES) $(adios_global_2files_SOURCES) \
-	$(adios_global_no_xml_SOURCES) $(adios_read_global_SOURCES) \
-	$(adios_read_global_no_xml_SOURCES)
+	$(adios_global_no_xml_SOURCES) $(adios_read_chunk_SOURCES) \
+	$(adios_read_global_SOURCES) \
+	$(adios_read_global_no_xml_SOURCES) $(adios_read_gpp_SOURCES) \
+	$(adios_read_writeblock_SOURCES) $(no_xml_write_byid_SOURCES) \
+	$(read_no_xml_write_byid_SOURCES)
 DIST_SOURCES = $(adios_global_SOURCES) $(adios_global_2files_SOURCES) \
-	$(adios_global_no_xml_SOURCES) $(adios_read_global_SOURCES) \
-	$(adios_read_global_no_xml_SOURCES)
+	$(adios_global_no_xml_SOURCES) $(adios_read_chunk_SOURCES) \
+	$(adios_read_global_SOURCES) \
+	$(adios_read_global_no_xml_SOURCES) $(adios_read_gpp_SOURCES) \
+	$(adios_read_writeblock_SOURCES) $(no_xml_write_byid_SOURCES) \
+	$(read_no_xml_write_byid_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -130,32 +192,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -164,72 +226,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -240,11 +277,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -252,7 +289,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -278,26 +318,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -309,29 +342,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 adios_global_SOURCES = adios_global.c
 adios_global_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
@@ -341,17 +388,40 @@ adios_global_2files_LDADD = $(top_builddir)/src/libadios.a \
 	$(ADIOSLIB_LDADD)
 adios_global_2files_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_read_global_SOURCES = adios_read_global.c
+adios_read_global_CPPFLAGS = -DADIOS_USE_READ_API_1
 adios_read_global_LDADD = $(top_builddir)/src/libadiosread.a \
 	$(ADIOSLIB_LDADD)
 adios_read_global_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+adios_read_writeblock_SOURCES = adios_read_writeblock.c
+adios_read_writeblock_LDADD = $(top_builddir)/src/libadiosread.a \
+	$(ADIOSLIB_LDADD)
+adios_read_writeblock_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+adios_read_chunk_SOURCES = adios_read_chunk.c
+adios_read_chunk_LDADD = $(top_builddir)/src/libadiosread.a \
+	$(ADIOSLIB_LDADD)
+adios_read_chunk_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+adios_read_gpp_SOURCES = adios_read_gpp.c
+adios_read_gpp_LDADD = $(top_builddir)/src/libadiosread.a \
+	$(ADIOSLIB_LDADD)
+adios_read_gpp_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_global_no_xml_SOURCES = adios_global_no_xml.c
 adios_global_no_xml_LDADD = $(top_builddir)/src/libadios.a \
 	$(ADIOSLIB_LDADD)
 adios_global_no_xml_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_read_global_no_xml_SOURCES = adios_read_global_no_xml.c
+adios_read_global_no_xml_CPPFLAGS = -DADIOS_USE_READ_API_1
 adios_read_global_no_xml_LDADD = $(top_builddir)/src/libadiosread.a \
 	$(ADIOSLIB_LDADD)
 adios_read_global_no_xml_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+no_xml_write_byid_SOURCES = no_xml_write_byid.c
+no_xml_write_byid_LDADD = $(top_builddir)/src/libadios.a \
+	$(ADIOSLIB_LDADD)
+no_xml_write_byid_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+read_no_xml_write_byid_SOURCES = read_no_xml_write_byid.c
+read_no_xml_write_byid_CPPFLAGS = -DADIOS_USE_READ_API_1
+read_no_xml_write_byid_LDADD = $(top_builddir)/src/libadiosread.a \
+	$(ADIOSLIB_LDADD)
+read_no_xml_write_byid_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 CLEANFILES = *.bp
 EXTRA_DIST = adios_global.xml gread_temperature.ch gwrite_temperature.ch job.pbs
 all: all-am
@@ -362,14 +432,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/global-array/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/global-array/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/global-array/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/global-array/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -387,28 +457,46 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 adios_global$(EXEEXT): $(adios_global_OBJECTS) $(adios_global_DEPENDENCIES) 
 	@rm -f adios_global$(EXEEXT)
-	$(LINK) $(adios_global_LDFLAGS) $(adios_global_OBJECTS) $(adios_global_LDADD) $(LIBS)
+	$(adios_global_LINK) $(adios_global_OBJECTS) $(adios_global_LDADD) $(LIBS)
 adios_global_2files$(EXEEXT): $(adios_global_2files_OBJECTS) $(adios_global_2files_DEPENDENCIES) 
 	@rm -f adios_global_2files$(EXEEXT)
-	$(LINK) $(adios_global_2files_LDFLAGS) $(adios_global_2files_OBJECTS) $(adios_global_2files_LDADD) $(LIBS)
+	$(adios_global_2files_LINK) $(adios_global_2files_OBJECTS) $(adios_global_2files_LDADD) $(LIBS)
 adios_global_no_xml$(EXEEXT): $(adios_global_no_xml_OBJECTS) $(adios_global_no_xml_DEPENDENCIES) 
 	@rm -f adios_global_no_xml$(EXEEXT)
-	$(LINK) $(adios_global_no_xml_LDFLAGS) $(adios_global_no_xml_OBJECTS) $(adios_global_no_xml_LDADD) $(LIBS)
+	$(adios_global_no_xml_LINK) $(adios_global_no_xml_OBJECTS) $(adios_global_no_xml_LDADD) $(LIBS)
+adios_read_chunk$(EXEEXT): $(adios_read_chunk_OBJECTS) $(adios_read_chunk_DEPENDENCIES) 
+	@rm -f adios_read_chunk$(EXEEXT)
+	$(adios_read_chunk_LINK) $(adios_read_chunk_OBJECTS) $(adios_read_chunk_LDADD) $(LIBS)
 adios_read_global$(EXEEXT): $(adios_read_global_OBJECTS) $(adios_read_global_DEPENDENCIES) 
 	@rm -f adios_read_global$(EXEEXT)
-	$(LINK) $(adios_read_global_LDFLAGS) $(adios_read_global_OBJECTS) $(adios_read_global_LDADD) $(LIBS)
+	$(adios_read_global_LINK) $(adios_read_global_OBJECTS) $(adios_read_global_LDADD) $(LIBS)
 adios_read_global_no_xml$(EXEEXT): $(adios_read_global_no_xml_OBJECTS) $(adios_read_global_no_xml_DEPENDENCIES) 
 	@rm -f adios_read_global_no_xml$(EXEEXT)
-	$(LINK) $(adios_read_global_no_xml_LDFLAGS) $(adios_read_global_no_xml_OBJECTS) $(adios_read_global_no_xml_LDADD) $(LIBS)
+	$(adios_read_global_no_xml_LINK) $(adios_read_global_no_xml_OBJECTS) $(adios_read_global_no_xml_LDADD) $(LIBS)
+adios_read_gpp$(EXEEXT): $(adios_read_gpp_OBJECTS) $(adios_read_gpp_DEPENDENCIES) 
+	@rm -f adios_read_gpp$(EXEEXT)
+	$(adios_read_gpp_LINK) $(adios_read_gpp_OBJECTS) $(adios_read_gpp_LDADD) $(LIBS)
+adios_read_writeblock$(EXEEXT): $(adios_read_writeblock_OBJECTS) $(adios_read_writeblock_DEPENDENCIES) 
+	@rm -f adios_read_writeblock$(EXEEXT)
+	$(adios_read_writeblock_LINK) $(adios_read_writeblock_OBJECTS) $(adios_read_writeblock_LDADD) $(LIBS)
+no_xml_write_byid$(EXEEXT): $(no_xml_write_byid_OBJECTS) $(no_xml_write_byid_DEPENDENCIES) 
+	@rm -f no_xml_write_byid$(EXEEXT)
+	$(no_xml_write_byid_LINK) $(no_xml_write_byid_OBJECTS) $(no_xml_write_byid_LDADD) $(LIBS)
+read_no_xml_write_byid$(EXEEXT): $(read_no_xml_write_byid_OBJECTS) $(read_no_xml_write_byid_DEPENDENCIES) 
+	@rm -f read_no_xml_write_byid$(EXEEXT)
+	$(read_no_xml_write_byid_LINK) $(read_no_xml_write_byid_OBJECTS) $(read_no_xml_write_byid_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -425,88 +513,109 @@ distclean-compile:
 .c.lo:
 	$(LTCOMPILE) -c -o $@ $<
 
+adios_read_global-adios_read_global.o: adios_read_global.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adios_read_global_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adios_read_global-adios_read_global.o `test -f 'adios_read_global.c' || echo '$(srcdir)/'`adios_read_global.c
+
+adios_read_global-adios_read_global.obj: adios_read_global.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adios_read_global_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adios_read_global-adios_read_global.obj `if test -f 'adios_read_global.c'; then $(CYGPATH_W) 'adios_read_global.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_global.c'; fi`
+
+adios_read_global_no_xml-adios_read_global_no_xml.o: adios_read_global_no_xml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adios_read_global_no_xml_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adios_read_global_no_xml-adios_read_global_no_xml.o `test -f 'adios_read_global_no_xml.c' || echo '$(srcdir)/'`adios_read_global_no_xml.c
+
+adios_read_global_no_xml-adios_read_global_no_xml.obj: adios_read_global_no_xml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(adios_read_global_no_xml_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o adios_read_global_no_xml-adios_read_global_no_xml.obj `if test -f 'adios_read_global_no_xml.c'; then $(CYGPATH_W) 'adios_read_global_no_xml.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_global_no_xml.c'; fi`
+
+read_no_xml_write_byid-read_no_xml_write_byid.o: read_no_xml_write_byid.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_no_xml_write_byid_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_no_xml_write_byid-read_no_xml_write_byid.o `test -f 'read_no_xml_write_byid.c' || echo '$(srcdir)/'`read_no_xml_write_byid.c
+
+read_no_xml_write_byid-read_no_xml_write_byid.obj: read_no_xml_write_byid.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(read_no_xml_write_byid_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o read_no_xml_write_byid-read_no_xml_write_byid.obj `if test -f 'read_no_xml_write_byid.c'; then $(CYGPATH_W) 'read_no_xml_write_byid.c'; else $(CYGPATH_W) '$(srcdir)/read_no_xml_write_byid.c'; fi`
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -535,6 +644,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -547,7 +657,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -555,18 +665,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -586,19 +716,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/global-array/adios_global.c b/examples/C/global-array/adios_global.c
index 5ba61f1..176889e 100644
--- a/examples/C/global-array/adios_global.c
+++ b/examples/C/global-array/adios_global.c
@@ -20,7 +20,7 @@ int main (int argc, char ** argv)
 {
 	char        filename [256];
 	int         rank, size, i;
-	int         NX = 10; 
+	int         NX = 10;
 	double      t[NX];
 	MPI_Comm    comm = MPI_COMM_WORLD;
 
diff --git a/examples/C/global-array/adios_global.xml b/examples/C/global-array/adios_global.xml
index bbf5a65..6102f9a 100644
--- a/examples/C/global-array/adios_global.xml
+++ b/examples/C/global-array/adios_global.xml
@@ -10,7 +10,7 @@
     <attribute name="description" path="/temperature" value="Global array written from 'size' processes" type="string"/>
 </adios-group>
 
-<method group="temperature" method="MPI">stripe_count=1;stripe_size=10485760;num_aggregators=2;merging_pgs=0</method>
+<method group="temperature" method="MPI_AGGREGATE">stripe_count=1;stripe_size=10485760;num_aggregators=2;merging_pgs=0;num_ost=2</method>
 
 <buffer size-MB="2" allocate-time="now"/>
 
diff --git a/examples/C/global-array/adios_global_2files.c b/examples/C/global-array/adios_global_2files.c
index 8bb1376..2d9f285 100644
--- a/examples/C/global-array/adios_global_2files.c
+++ b/examples/C/global-array/adios_global_2files.c
@@ -7,7 +7,7 @@
 
 #include <stdio.h>
 #include "mpi.h"
-#include "adios.h"
+#include "public/adios.h"
 int main (int argc, char ** argv) 
 {
 	char        filename [256];
diff --git a/examples/C/global-array/adios_global_no_xml.c b/examples/C/global-array/adios_global_no_xml.c
index f41d360..763a657 100644
--- a/examples/C/global-array/adios_global_no_xml.c
+++ b/examples/C/global-array/adios_global_no_xml.c
@@ -22,8 +22,8 @@
 #include <stdio.h>
 #include <string.h>
 #include "mpi.h"
-#include "adios.h"
-#include "adios_types.h"
+#include "public/adios.h"
+#include "public/adios_types.h"
 
 #ifdef DMALLOC
 #include "dmalloc.h"
diff --git a/examples/C/global-array/adios_read_chunk.c b/examples/C/global-array/adios_read_chunk.c
new file mode 100644
index 0000000..124f39a
--- /dev/null
+++ b/examples/C/global-array/adios_read_chunk.c
@@ -0,0 +1,168 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: read global arrays from a BP file
+ *
+ * This code is using the generic read API, which can read in
+ * arbitrary slices of an array and thus we can read in an array
+ * on arbitrary number of processes (provided our code is smart 
+ * enough to do the domain decomposition).
+ *
+ * Run this example after adios_global, which generates 
+ * adios_global.bp. Run this example on equal or less 
+ * number of processes since we decompose only on one 
+ * dimension of the global array here. 
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mpi.h"
+#include "adios_read.h"
+
+int main (int argc, char ** argv) 
+{
+    char        filename [256];
+    int         rank, size, i, j, datasize, if_any;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    enum ADIOS_READ_METHOD method = ADIOS_READ_METHOD_BP_AGGREGATE;
+    ADIOS_SELECTION * sel1, * sel2;
+    ADIOS_VARCHUNK * chunk = 0;
+    void * data = NULL;
+    uint64_t start[2], count[2], npoints, * points;
+   
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    adios_read_init_method (method, comm, "max_chunk_size=4;verbose=3;num_aggregators=2");
+
+    ADIOS_FILE * f = adios_read_open_file ("adios_global.bp", method, comm);
+    ADIOS_VARINFO * varinfo = adios_inq_var (f, "temperature");
+    if (varinfo)
+    {
+        printf ("nsteps = %d\n", varinfo->nsteps);
+        for (i = 0; i < varinfo->nsteps; i++)
+        {
+            printf ("step: %d has %d", i, varinfo->nblocks[i]);
+        }
+        printf ("\n");
+        printf ("ndim = %d\n", varinfo->ndim);
+        printf ("dims = (");
+        datasize = 8;
+        for (i = 0; i < varinfo->ndim; i++)
+        {
+            datasize *= varinfo->dims[i];
+            printf ("%lu", varinfo->dims[i]);
+            if (i != varinfo->ndim - 1)
+            {
+                printf (",");
+            }
+        }
+        printf (")\n");
+        data = malloc (datasize);
+/*
+        adios_inq_var_blockinfo (f, varinfo);
+        for (i = 0; i < varinfo->sum_nblocks; i++)
+        {
+            printf ("block[%d]: ", i);
+            printf ("start=");
+            for (j = 0; j < varinfo->ndim; j++)
+            {
+                printf ("%lu ", varinfo->blockinfo[i].start[j]);
+            }
+            printf ("count=");
+            for (j = 0; j < varinfo->ndim; j++)
+            {
+                printf ("%lu ", varinfo->blockinfo[i].count[j]);
+            }
+            printf ("\n");
+        }
+*/
+        for (i = 0; i < varinfo->ndim; i++)
+        {
+            start[i] = 0;
+            count[i] = varinfo->dims[i];
+        }
+
+        sel1 = adios_selection_boundingbox (varinfo->ndim, start, count);
+/*
+        npoints = 1;
+        for (i = 0; i < varinfo->ndim; i++)
+        {
+            npoints *= count[i];
+        }
+
+        points = (uint64_t *) malloc (npoints * varinfo->ndim * 8);
+        for (i = 0; i < npoints; i++)
+        {
+            uint64_t temp = i;
+            for (j = varinfo->ndim - 1; j > -1; j--)
+            {
+                points[i * varinfo->ndim + j] = temp % count[j];
+                temp = temp/count[j];
+            }
+        }
+*/
+/*
+        for (i = 0; i < npoints; i++)
+        {
+            printf ("(");
+            for (j = 0; j < varinfo->ndim; j++)
+            {
+                printf ("%lu ",points[i * varinfo->ndim + j]);
+            }
+            printf (")");
+        }
+
+        printf ("\n");
+*/
+/*
+        sel2 = adios_selection_points (varinfo->ndim, npoints, points);
+*/
+        adios_schedule_read (f, sel1, "temperature", 0, 1, data);
+/*
+        adios_schedule_read (f, sel2, "temperature", 0, 1, data);
+*/
+        adios_perform_reads (f, 1);
+#if 0
+        while (adios_check_reads (f, &chunk) > 0)
+        {
+            datasize = 1;
+            for (i = 0; i < varinfo->ndim; i++)
+            {
+                datasize *= chunk->sel->u.bb.count[i];
+            }
+            printf ("data:\n");
+/*
+            for (i = 0; i < datasize; i ++)
+            {
+                printf ("%7.4f ", * ((double *)chunk->data + i));
+            }
+            printf ("\n");
+*/
+            for (i = 0; i < 10; i ++)
+            {
+                printf ("%7.4f ", * ((double *)chunk->data + i));
+            }
+            printf ("\n");
+
+            adios_free_chunk (chunk);
+        }
+#endif
+        adios_selection_delete (sel1);
+/*
+        adios_selection_delete (sel2);
+*/
+    }
+while (1);
+    adios_free_varinfo (varinfo);
+    adios_read_close (f);
+
+    adios_read_finalize_method (ADIOS_READ_METHOD_BP);
+    MPI_Finalize ();
+    return 0;
+}
diff --git a/examples/C/global-array/adios_global.c b/examples/C/global-array/adios_read_gpp.c
similarity index 56%
copy from examples/C/global-array/adios_global.c
copy to examples/C/global-array/adios_read_gpp.c
index 5ba61f1..5e1de1c 100644
--- a/examples/C/global-array/adios_global.c
+++ b/examples/C/global-array/adios_read_gpp.c
@@ -5,48 +5,53 @@
  * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
  */
 
-/* ADIOS C Example: write a global array from N processors with gwrite
+/* ADIOS C Example: read a global array from N processors with gread
  *
  * How to run: mpirun -np <N> adios_global
- * Output: adios_global.bp
+ * Reads output from adios_global.c
  * ADIOS config file: adios_global.xml
  *
 */
 #include <stdio.h>
 #include <string.h>
 #include "mpi.h"
-#include "adios.h"
+#include "public/adios_read.h"
 int main (int argc, char ** argv) 
 {
 	char        filename [256];
 	int         rank, size, i;
-	int         NX = 10; 
-	double      t[NX];
+	int         NX = 4096; 
+	double      t[NX], t1, t2;
 	MPI_Comm    comm = MPI_COMM_WORLD;
 
 	/* ADIOS variables declarations for matching gwrite_temperature.ch */
 	int         adios_err;
-	uint64_t    adios_groupsize, adios_totalsize;
-	int64_t     adios_handle;
+	ADIOS_FILE *fp;
+	ADIOS_SELECTION *s;
 
 	MPI_Init (&argc, &argv);
 	MPI_Comm_rank (comm, &rank);
 	MPI_Comm_size (comm, &size);
 
-	for (i = 0; i < NX; i++)
-		t[i] = rank*NX + i;
-
 	strcpy (filename, "adios_global.bp");
 
-	adios_init ("adios_global.xml");
+    //adios_read_init_method (ADIOS_READ_METHOD_BP, comm, "");
+
+    fp = adios_read_open_file ("adios_global.bp", ADIOS_READ_METHOD_BP, comm);
 
-	adios_open (&adios_handle, "temperature", filename, "w", &comm);
-	#include "gwrite_temperature.ch"
-	adios_close (adios_handle);
+    #include "gread_temperature.ch"
 
-        MPI_Barrier (comm);
+    adios_read_close (fp);
+
+    // Verify data
+	for (i = 0; i < NX; i++)
+		if (t[i] != rank*NX + i)
+        {
+            fprintf (stderr, "Error detected\n");
+        }
 
-	adios_finalize (rank);
+    
+    adios_read_finalize_method (ADIOS_READ_METHOD_BP);
 
 	MPI_Finalize ();
 	return 0;
diff --git a/examples/C/global-array/adios_read_writeblock.c b/examples/C/global-array/adios_read_writeblock.c
new file mode 100644
index 0000000..e01ec71
--- /dev/null
+++ b/examples/C/global-array/adios_read_writeblock.c
@@ -0,0 +1,97 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: read global arrays from a BP file
+ *
+ * This code is using the generic read API, which can read in
+ * arbitrary slices of an array and thus we can read in an array
+ * on arbitrary number of processes (provided our code is smart 
+ * enough to do the domain decomposition).
+ *
+ * Run this example after adios_global, which generates 
+ * adios_global.bp. Run this example on equal or less 
+ * number of processes since we decompose only on one 
+ * dimension of the global array here. 
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "mpi.h"
+#include "adios_read.h"
+
+int main (int argc, char ** argv) 
+{
+    char        filename [256];
+    int         rank, size, i, j, datasize;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    enum ADIOS_READ_METHOD method = ADIOS_READ_METHOD_BP;
+    ADIOS_SELECTION * sel;
+    void * data = NULL;
+    uint64_t start[2], count[2], bytes_read = 0;
+   
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    adios_read_init_method (method, comm, "verbose=4");
+
+    ADIOS_FILE * f = adios_read_open_file ("adios_global.bp", method, comm);
+    ADIOS_VARINFO * varinfo = adios_inq_var (f, "temperature");
+    if (varinfo)
+    {
+        printf ("nsteps = %d\n", varinfo->nsteps);
+        for (i = 0; i < varinfo->nsteps; i++)
+        {
+            printf ("step: %d has %d", i, varinfo->nblocks[i]);
+        }
+        printf ("\n");
+
+        adios_inq_var_blockinfo (f, varinfo);
+        for (i = 0; i < varinfo->sum_nblocks; i++)
+        {
+            printf ("block[%d]: ", i);
+            printf ("start=");
+            for (j = 0; j < varinfo->ndim; j++)
+            {
+                printf ("%lu ", varinfo->blockinfo[i].start[j]);
+            }
+            printf ("count=");
+            for (j = 0; j < varinfo->ndim; j++)
+            {
+                printf ("%lu ", varinfo->blockinfo[i].count[j]);
+            }
+            printf ("\n");
+        }
+
+        datasize = 8;
+        for (i = 0; i < varinfo->ndim; i++)
+        {
+            datasize *= varinfo->blockinfo[rank].count[i];
+        }
+
+        data = malloc (datasize);
+
+        sel = adios_selection_writeblock (rank);
+        adios_schedule_read (f, sel, "temperature", 0, 1, data);
+        adios_perform_reads (f, 1);
+        adios_selection_delete (sel);
+    }
+
+    adios_free_varinfo (varinfo);
+    adios_read_close (f);
+
+    printf ("data:\n");
+    for (i = 0; i < datasize/8; i ++)
+    {
+        printf ("%7.4f ", * ((double *)data + i));
+    }
+    printf ("\n");
+    free (data);
+    adios_read_finalize_method (ADIOS_READ_METHOD_BP);
+    MPI_Finalize ();
+    return 0;
+}
diff --git a/examples/C/global-array/gread_temperature.ch b/examples/C/global-array/gread_temperature.ch
index c7178d5..4c16e85 100644
--- a/examples/C/global-array/gread_temperature.ch
+++ b/examples/C/global-array/gread_temperature.ch
@@ -1,11 +1,4 @@
-adios_groupsize = 0;
-adios_totalsize = 0;
-adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);
-adios_buf_size = 4;
-adios_read (adios_handle, "NX", &NX, adios_buf_size);
-adios_buf_size = 4;
-adios_read (adios_handle, "size", &size, adios_buf_size);
-adios_buf_size = 4;
-adios_read (adios_handle, "rank", &rank, adios_buf_size);
-adios_buf_size = 8 * (1) * (NX);
-adios_read (adios_handle, "temperature", temperature, adios_buf_size);
+s = adios_selection_writeblock (rank);
+adios_schedule_read (fp, s, "temperature", 1, 1, t);
+adios_perform_reads (fp, 1);
+adios_selection_delete (s);
diff --git a/examples/C/global-array/adios_global_no_xml.c b/examples/C/global-array/no_xml_write_byid.c
similarity index 58%
copy from examples/C/global-array/adios_global_no_xml.c
copy to examples/C/global-array/no_xml_write_byid.c
index f41d360..ab97753 100644
--- a/examples/C/global-array/adios_global_no_xml.c
+++ b/examples/C/global-array/no_xml_write_byid.c
@@ -22,8 +22,8 @@
 #include <stdio.h>
 #include <string.h>
 #include "mpi.h"
-#include "adios.h"
-#include "adios_types.h"
+#include "public/adios.h"
+#include "public/adios_types.h"
 
 #ifdef DMALLOC
 #include "dmalloc.h"
@@ -32,11 +32,12 @@
 int main (int argc, char ** argv) 
 {
 	char        filename [256];
-	int         rank, size, i, block;
-	int         NX = 100, Global_bounds, Offsets; 
+	int         rank, size, i, j;
+	int         NX = 100, gb, offset;  //local/global/offset
 	double      t[NX];
-        int         sub_blocks = 3;
+        int         nblocks = 3;
 	MPI_Comm    comm = MPI_COMM_WORLD;
+        char g_str[100], o_str[100], l_str[100];
 
 	/* ADIOS variables declarations for matching gwrite_temperature.ch */
 	int         adios_err;
@@ -47,56 +48,45 @@ int main (int argc, char ** argv)
 	MPI_Comm_rank (comm, &rank);
 	MPI_Comm_size (comm, &size);
 
-        Global_bounds = sub_blocks * NX * size;
+        gb = nblocks * NX * size;
+        sprintf (g_str, "%d", gb);
+        sprintf (l_str, "%d", NX);
 
-	strcpy (filename, "adios_global_no_xml.bp");
+	strcpy (filename, "no_xml_write_byid.bp");
 
 	adios_init_noxml ();
         adios_allocate_buffer (ADIOS_BUFFER_ALLOC_NOW, 10);
 
         int64_t       m_adios_group;
         int64_t       m_adios_file;
+        int64_t       var_ids[nblocks];
 
         adios_declare_group (&m_adios_group, "restart", "iter", adios_flag_yes);
         adios_select_method (m_adios_group, "MPI", "", "");
 
-
-        adios_define_var (m_adios_group, "NX"
-			,"", adios_integer
-			,0, 0, 0);
-   
-	adios_define_var (m_adios_group, "Global_bounds"
-			,"", adios_integer
-			,0, 0, 0);
-
-        for (i=0;i<sub_blocks;i++) {
-   
-           adios_define_var (m_adios_group, "Offsets"
-                        ,"", adios_integer
-                        ,0, 0, 0);
-   
-           adios_define_var (m_adios_group, "temperature"
-                        ,"", adios_double
-                        ,"NX", "Global_bounds", "Offsets");
+        for (i = 0; i < nblocks; i++) 
+        {
+            offset = rank * nblocks * NX + i * NX;
+            sprintf (o_str, "%d", offset);
+            var_ids[i] = adios_define_var (m_adios_group, "temperature"
+                                          ,"", adios_double
+                                          ,l_str, g_str, o_str
+                                          );
         }
    
         adios_open (&m_adios_file, "restart", filename, "w", &comm);
 
-        adios_groupsize = sub_blocks * (4 + 4 + 4 + NX * 8);
+        adios_groupsize = nblocks * (4 + 4 + 4 + NX * 8);
 
         adios_group_size (m_adios_file, adios_groupsize, &adios_totalsize);
-	adios_write(m_adios_file, "NX", (void *) &NX);
-	adios_write(m_adios_file, "Global_bounds", (void *) &Global_bounds);
 /* now we will write the data for each sub block */
-        for (block=0;block<sub_blocks;block++) {
-
-           Offsets = rank * sub_blocks * NX + block*NX;
-           adios_write(m_adios_file, "Offsets", (void *) &Offsets);
-
-           for (i = 0; i < NX; i++)
-               t[i] = Offsets + i;
+        for (i = 0; i < nblocks; i++)
+        {
+           offset = rank * nblocks * NX + i * NX;
+           for (j = 0; j < NX; j++)
+               t[j] = offset + j;
 
-           adios_write(m_adios_file, "temperature", t);
+           adios_write_byid(m_adios_file, var_ids[i], t);
         }
 
         adios_close (m_adios_file);
diff --git a/examples/C/global-array/read_no_xml_write_byid.c b/examples/C/global-array/read_no_xml_write_byid.c
new file mode 100644
index 0000000..24b8a05
--- /dev/null
+++ b/examples/C/global-array/read_no_xml_write_byid.c
@@ -0,0 +1,102 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: read global arrays from a BP file
+ *
+ * This code is using the generic read API, which can read in
+ * arbitrary slices of an array and thus we can read in an array
+ * on arbitrary number of processes (provided our code is smart 
+ * enough to do the domain decomposition).
+ *
+ * Run this example after adios_global, which generates 
+ * adios_global.bp. Run this example on equal or less 
+ * number of processes since we decompose only on one 
+ * dimension of the global array here. 
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "mpi.h"
+#include "adios_read.h"
+
+int main (int argc, char ** argv) 
+{
+    char        filename [256];
+    int         rank, size, i, j, npl, token;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    MPI_Status  status;
+    void * data = NULL;
+    uint64_t start[1], count[1], bytes_read = 0;
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    ADIOS_FILE * f = adios_fopen ("no_xml_write_byid.bp", comm);
+    if (f == NULL)
+    {
+        printf ("%s\n", adios_errmsg());
+        return -1;
+    }
+
+    ADIOS_GROUP * g = adios_gopen (f, "restart");
+    if (g == NULL)
+    {
+        printf ("%s\n", adios_errmsg());
+        return -1;
+    }
+
+    ADIOS_VARINFO * v = adios_inq_var (g, "temperature");
+
+    /* Using less readers to read the global array back, i.e., non-uniform */
+    uint64_t slice_size = v->dims[0]/size;
+    start[0] = slice_size * rank;
+    if (rank == size-1) /* last rank may read more lines */
+        slice_size = slice_size + v->dims[0]%size;
+    count[0] = slice_size;
+
+    data = malloc (slice_size * sizeof (double));
+    if (data == NULL)
+    {
+        fprintf (stderr, "malloc failed.\n");
+        return -1;
+    }
+
+    bytes_read = adios_read_var (g, "temperature", start, count, data);
+
+    if (rank > 0) {
+        MPI_Recv (&token, 1, MPI_INT, rank-1, 0, comm, &status);
+    }
+
+    printf (" ======== Rank %d ========== \n", rank);
+    npl = 10;
+    for (i = 0; i < slice_size; i+=npl) {
+        printf ("[%4.4d]  ", rank*slice_size+i);
+        for (j= 0; j < npl; j++) {
+            printf (" %6.6g", * ((double *)data + i + j));
+        }
+        printf ("\n");
+    }
+    fflush(stdout);
+    sleep(1);
+
+    if (rank < size-1) {
+        MPI_Send (&token, 1, MPI_INT, rank+1, 0, comm);
+    }
+
+    MPI_Barrier (comm);
+
+    free (data);
+
+    adios_gclose (g);
+    adios_fclose (f);
+
+
+    MPI_Finalize ();
+    return 0;
+}
diff --git a/examples/C/manual/Makefile.am b/examples/C/manual/Makefile.am
index 144c04d..a59c0a3 100644
--- a/examples/C/manual/Makefile.am
+++ b/examples/C/manual/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
diff --git a/examples/C/manual/Makefile.in b/examples/C/manual/Makefile.in
index 2a0c3c9..ddc4769 100644
--- a/examples/C/manual/Makefile.in
+++ b/examples/C/manual/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -41,7 +39,9 @@ noinst_PROGRAMS = 1_nonadios_example$(EXEEXT) 2_adios_write$(EXEEXT) \
 subdir = examples/C/manual
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -63,35 +63,49 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_1_nonadios_example_OBJECTS = 1_nonadios_example.$(OBJEXT)
 1_nonadios_example_OBJECTS = $(am_1_nonadios_example_OBJECTS)
 am__DEPENDENCIES_1 =
 1_nonadios_example_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
+1_nonadios_example_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(1_nonadios_example_LDFLAGS) $(LDFLAGS) -o $@
 am_2_adios_write_OBJECTS = 2_adios_write.$(OBJEXT)
 2_adios_write_OBJECTS = $(am_2_adios_write_OBJECTS)
 2_adios_write_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
+2_adios_write_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(2_adios_write_LDFLAGS) $(LDFLAGS) -o $@
 am_3_adios_read_OBJECTS = 3_adios_read.$(OBJEXT)
 3_adios_read_OBJECTS = $(am_3_adios_read_OBJECTS)
 3_adios_read_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
+3_adios_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(3_adios_read_LDFLAGS) $(LDFLAGS) -o $@
 am_4_adios_nfiles_OBJECTS = 4_adios_nfiles.$(OBJEXT)
 4_adios_nfiles_OBJECTS = $(am_4_adios_nfiles_OBJECTS)
 4_adios_nfiles_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+4_adios_nfiles_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(4_adios_nfiles_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(1_nonadios_example_SOURCES) $(2_adios_write_SOURCES) \
 	$(3_adios_read_SOURCES) $(4_adios_nfiles_SOURCES)
 DIST_SOURCES = $(1_nonadios_example_SOURCES) $(2_adios_write_SOURCES) \
@@ -121,32 +135,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -155,72 +169,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -231,11 +220,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -243,7 +232,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -269,26 +261,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -300,29 +285,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 1_nonadios_example_SOURCES = 1_nonadios_example.c
 1_nonadios_example_LDADD = $(top_builddir)/src/libadios.a \
@@ -348,14 +347,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/manual/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/manual/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/manual/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/manual/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -373,25 +372,28 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 1_nonadios_example$(EXEEXT): $(1_nonadios_example_OBJECTS) $(1_nonadios_example_DEPENDENCIES) 
 	@rm -f 1_nonadios_example$(EXEEXT)
-	$(LINK) $(1_nonadios_example_LDFLAGS) $(1_nonadios_example_OBJECTS) $(1_nonadios_example_LDADD) $(LIBS)
+	$(1_nonadios_example_LINK) $(1_nonadios_example_OBJECTS) $(1_nonadios_example_LDADD) $(LIBS)
 2_adios_write$(EXEEXT): $(2_adios_write_OBJECTS) $(2_adios_write_DEPENDENCIES) 
 	@rm -f 2_adios_write$(EXEEXT)
-	$(LINK) $(2_adios_write_LDFLAGS) $(2_adios_write_OBJECTS) $(2_adios_write_LDADD) $(LIBS)
+	$(2_adios_write_LINK) $(2_adios_write_OBJECTS) $(2_adios_write_LDADD) $(LIBS)
 3_adios_read$(EXEEXT): $(3_adios_read_OBJECTS) $(3_adios_read_DEPENDENCIES) 
 	@rm -f 3_adios_read$(EXEEXT)
-	$(LINK) $(3_adios_read_LDFLAGS) $(3_adios_read_OBJECTS) $(3_adios_read_LDADD) $(LIBS)
+	$(3_adios_read_LINK) $(3_adios_read_OBJECTS) $(3_adios_read_LDADD) $(LIBS)
 4_adios_nfiles$(EXEEXT): $(4_adios_nfiles_OBJECTS) $(4_adios_nfiles_DEPENDENCIES) 
 	@rm -f 4_adios_nfiles$(EXEEXT)
-	$(LINK) $(4_adios_nfiles_LDFLAGS) $(4_adios_nfiles_OBJECTS) $(4_adios_nfiles_LDADD) $(LIBS)
+	$(4_adios_nfiles_LINK) $(4_adios_nfiles_OBJECTS) $(4_adios_nfiles_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -414,82 +416,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -518,6 +523,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -530,7 +536,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -538,18 +544,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -569,19 +595,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/read_all/Makefile.am b/examples/C/read_all/Makefile.am
index 8c6c496..ae7ec47 100644
--- a/examples/C/read_all/Makefile.am
+++ b/examples/C/read_all/Makefile.am
@@ -1,14 +1,12 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
 noinst_PROGRAMS = read_all
 
 read_all_SOURCES = read_all.c
-read_all_CPPFLAGS = -D_NOMPI
+read_all_CPPFLAGS = -D_NOMPI -DADIOS_USE_READ_API_1
 read_all_LDADD = $(top_builddir)/src/libadiosread_nompi.a 
 read_all_LDFLAGS = $(ADIOSREADLIB_LDFLAGS)
 read_all_LDADD += $(ADIOSREADLIB_LDADD)
-
-CC=$(MPICC)
diff --git a/examples/C/read_all/Makefile.in b/examples/C/read_all/Makefile.in
index c98a9bc..acf7012 100644
--- a/examples/C/read_all/Makefile.in
+++ b/examples/C/read_all/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ noinst_PROGRAMS = read_all$(EXEEXT)
 subdir = examples/C/read_all
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,23 +62,28 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_read_all_OBJECTS = read_all-read_all.$(OBJEXT)
 read_all_OBJECTS = $(am_read_all_OBJECTS)
 am__DEPENDENCIES_1 =
 read_all_DEPENDENCIES = $(top_builddir)/src/libadiosread_nompi.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+read_all_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(read_all_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(read_all_SOURCES)
 DIST_SOURCES = $(read_all_SOURCES)
 ETAGS = etags
@@ -106,32 +111,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
-CC = $(MPICC)
+CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -140,72 +145,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -216,11 +196,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -228,7 +208,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -254,26 +237,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -285,32 +261,46 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 read_all_SOURCES = read_all.c
-read_all_CPPFLAGS = -D_NOMPI
+read_all_CPPFLAGS = -D_NOMPI -DADIOS_USE_READ_API_1
 read_all_LDADD = $(top_builddir)/src/libadiosread_nompi.a \
 	$(ADIOSREADLIB_LDADD)
 read_all_LDFLAGS = $(ADIOSREADLIB_LDFLAGS)
@@ -322,14 +312,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/read_all/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/read_all/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/read_all/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/read_all/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -347,16 +337,19 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 read_all$(EXEEXT): $(read_all_OBJECTS) $(read_all_DEPENDENCIES) 
 	@rm -f read_all$(EXEEXT)
-	$(LINK) $(read_all_LDFLAGS) $(read_all_OBJECTS) $(read_all_LDADD) $(LIBS)
+	$(read_all_LINK) $(read_all_OBJECTS) $(read_all_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -385,82 +378,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -488,6 +484,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -500,7 +497,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -508,18 +505,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -539,19 +556,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/read_all/read_all.c b/examples/C/read_all/read_all.c
index b708dca..13f7bf5 100644
--- a/examples/C/read_all/read_all.c
+++ b/examples/C/read_all/read_all.c
@@ -69,7 +69,7 @@ int main (int argc, char ** argv)
                     printf(", %d",v->dims[j]);
                 printf("] = \n");
 
-                if (total_size > 1024*1024) {
+                if (total_size > 1024*1024*1024) {
                     printf("        // too big, do not read in\n");
                 } else {
                     data = malloc (total_size);
@@ -85,6 +85,8 @@ int main (int argc, char ** argv)
 
                     if (bytes_read < 0) {
                         printf ("%s\n", adios_errmsg());
+                    } else if (bytes_read > 1024*1024) {
+                        printf ("Too big to print\n");
                     } else if (v->ndim == 1) {
                         printf ("        [");
                         for (j = 0; j < v->dims[0]; j++) 
@@ -110,7 +112,7 @@ int main (int argc, char ** argv)
                             printf ("\n");
                         }
                     } else {
-                        printf ("    cannot print arrays with >2 dimensions\n");
+                        printf ("    cannot print arrays with >3 dimensions\n");
                     }
                     free (data);
                 }
diff --git a/examples/C/scalars/Makefile.am b/examples/C/scalars/Makefile.am
index f0da494..3c70675 100644
--- a/examples/C/scalars/Makefile.am
+++ b/examples/C/scalars/Makefile.am
@@ -1,9 +1,9 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
-noinst_PROGRAMS = scalars_write scalars_read
+noinst_PROGRAMS = scalars_write scalars_read scalars_write_step
 
 scalars_write_SOURCES = scalars_write.c
 scalars_write_LDADD = $(top_builddir)/src/libadios.a 
@@ -13,6 +13,10 @@ scalars_read_SOURCES = scalars_read.c
 scalars_read_LDADD = $(top_builddir)/src/libadios.a 
 scalars_read_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 scalars_read_LDADD += $(ADIOSLIB_LDADD)
+scalars_write_step_SOURCES = scalars_write.c
+scalars_write_step_LDADD = $(top_builddir)/src/libadios.a
+scalars_write_step_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+scalars_write_step_LDADD += $(ADIOSLIB_LDADD)
 
 CLEANFILES = *.bp
 CC=$(MPICC)
diff --git a/examples/C/scalars/Makefile.in b/examples/C/scalars/Makefile.in
index ca74e5f..7f7a1a3 100644
--- a/examples/C/scalars/Makefile.in
+++ b/examples/C/scalars/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,11 +34,14 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = scalars_write$(EXEEXT) scalars_read$(EXEEXT)
+noinst_PROGRAMS = scalars_write$(EXEEXT) scalars_read$(EXEEXT) \
+	scalars_write_step$(EXEEXT)
 subdir = examples/C/scalars
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,29 +63,46 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_scalars_read_OBJECTS = scalars_read.$(OBJEXT)
 scalars_read_OBJECTS = $(am_scalars_read_OBJECTS)
 am__DEPENDENCIES_1 =
 scalars_read_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
+scalars_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(scalars_read_LDFLAGS) $(LDFLAGS) -o $@
 am_scalars_write_OBJECTS = scalars_write.$(OBJEXT)
 scalars_write_OBJECTS = $(am_scalars_write_OBJECTS)
 scalars_write_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+scalars_write_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(scalars_write_LDFLAGS) $(LDFLAGS) -o $@
+am_scalars_write_step_OBJECTS = scalars_write.$(OBJEXT)
+scalars_write_step_OBJECTS = $(am_scalars_write_step_OBJECTS)
+scalars_write_step_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+scalars_write_step_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(scalars_write_step_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(scalars_read_SOURCES) $(scalars_write_SOURCES)
-DIST_SOURCES = $(scalars_read_SOURCES) $(scalars_write_SOURCES)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(scalars_read_SOURCES) $(scalars_write_SOURCES) \
+	$(scalars_write_step_SOURCES)
+DIST_SOURCES = $(scalars_read_SOURCES) $(scalars_write_SOURCES) \
+	$(scalars_write_step_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -110,32 +128,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -144,72 +162,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -220,11 +213,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -232,7 +225,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -258,26 +254,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -289,29 +278,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 scalars_write_SOURCES = scalars_write.c
 scalars_write_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
@@ -319,6 +322,10 @@ scalars_write_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 scalars_read_SOURCES = scalars_read.c
 scalars_read_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
 scalars_read_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+scalars_write_step_SOURCES = scalars_write.c
+scalars_write_step_LDADD = $(top_builddir)/src/libadios.a \
+	$(ADIOSLIB_LDADD)
+scalars_write_step_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 CLEANFILES = *.bp
 EXTRA_DIST = scalars.xml gwrite_scalars.ch gread_scalars.ch job.pbs
 all: all-am
@@ -329,14 +336,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/scalars/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/scalars/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/scalars/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/scalars/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -354,19 +361,25 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 scalars_read$(EXEEXT): $(scalars_read_OBJECTS) $(scalars_read_DEPENDENCIES) 
 	@rm -f scalars_read$(EXEEXT)
-	$(LINK) $(scalars_read_LDFLAGS) $(scalars_read_OBJECTS) $(scalars_read_LDADD) $(LIBS)
+	$(scalars_read_LINK) $(scalars_read_OBJECTS) $(scalars_read_LDADD) $(LIBS)
 scalars_write$(EXEEXT): $(scalars_write_OBJECTS) $(scalars_write_DEPENDENCIES) 
 	@rm -f scalars_write$(EXEEXT)
-	$(LINK) $(scalars_write_LDFLAGS) $(scalars_write_OBJECTS) $(scalars_write_LDADD) $(LIBS)
+	$(scalars_write_LINK) $(scalars_write_OBJECTS) $(scalars_write_LDADD) $(LIBS)
+scalars_write_step$(EXEEXT): $(scalars_write_step_OBJECTS) $(scalars_write_step_DEPENDENCIES) 
+	@rm -f scalars_write_step$(EXEEXT)
+	$(scalars_write_step_LINK) $(scalars_write_step_OBJECTS) $(scalars_write_step_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -389,82 +402,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -493,6 +509,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -505,7 +522,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -513,18 +530,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -544,19 +581,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/schema/Makefile.am b/examples/C/schema/Makefile.am
new file mode 100644
index 0000000..aac8e3c
--- /dev/null
+++ b/examples/C/schema/Makefile.am
@@ -0,0 +1,31 @@
+INCLUDES = $(all_includes)
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
+
+AUTOMAKE_OPTIONS = no-dependencies
+
+noinst_PROGRAMS = uniform rectilinear structured unstructured
+
+uniform_SOURCES = uniform.c
+uniform_LDADD = $(top_builddir)/src/libadios.a 
+uniform_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+uniform_LDADD += $(ADIOSLIB_LDADD)
+
+rectilinear_SOURCES = rectilinear.c
+rectilinear_LDADD = $(top_builddir)/src/libadios.a 
+rectilinear_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+rectilinear_LDADD += $(ADIOSLIB_LDADD)
+
+structured_SOURCES = structured.c
+structured_LDADD = $(top_builddir)/src/libadios.a 
+structured_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+structured_LDADD += $(ADIOSLIB_LDADD)
+
+unstructured_SOURCES = unstructured.c
+unstructured_LDADD = $(top_builddir)/src/libadios.a 
+unstructured_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+unstructured_LDADD += $(ADIOSLIB_LDADD)
+
+CLEANFILES = *.bp
+CC=$(MPICC)
+EXTRA_DIST = uniform.xml structured.xml rectilinear.xml unstructured.xml 
+
diff --git a/examples/C/manual/Makefile.in b/examples/C/schema/Makefile.in
similarity index 60%
copy from examples/C/manual/Makefile.in
copy to examples/C/schema/Makefile.in
index 2a0c3c9..da57cef 100644
--- a/examples/C/manual/Makefile.in
+++ b/examples/C/schema/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,12 +34,14 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = 1_nonadios_example$(EXEEXT) 2_adios_write$(EXEEXT) \
-	3_adios_read$(EXEEXT) 4_adios_nfiles$(EXEEXT)
-subdir = examples/C/manual
+noinst_PROGRAMS = uniform$(EXEEXT) rectilinear$(EXEEXT) \
+	structured$(EXEEXT) unstructured$(EXEEXT)
+subdir = examples/C/schema
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -63,39 +63,53 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
-am_1_nonadios_example_OBJECTS = 1_nonadios_example.$(OBJEXT)
-1_nonadios_example_OBJECTS = $(am_1_nonadios_example_OBJECTS)
+am_rectilinear_OBJECTS = rectilinear.$(OBJEXT)
+rectilinear_OBJECTS = $(am_rectilinear_OBJECTS)
 am__DEPENDENCIES_1 =
-1_nonadios_example_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+rectilinear_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-am_2_adios_write_OBJECTS = 2_adios_write.$(OBJEXT)
-2_adios_write_OBJECTS = $(am_2_adios_write_OBJECTS)
-2_adios_write_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+rectilinear_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(rectilinear_LDFLAGS) $(LDFLAGS) -o $@
+am_structured_OBJECTS = structured.$(OBJEXT)
+structured_OBJECTS = $(am_structured_OBJECTS)
+structured_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-am_3_adios_read_OBJECTS = 3_adios_read.$(OBJEXT)
-3_adios_read_OBJECTS = $(am_3_adios_read_OBJECTS)
-3_adios_read_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+structured_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(structured_LDFLAGS) $(LDFLAGS) -o $@
+am_uniform_OBJECTS = uniform.$(OBJEXT)
+uniform_OBJECTS = $(am_uniform_OBJECTS)
+uniform_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-am_4_adios_nfiles_OBJECTS = 4_adios_nfiles.$(OBJEXT)
-4_adios_nfiles_OBJECTS = $(am_4_adios_nfiles_OBJECTS)
-4_adios_nfiles_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+uniform_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(uniform_LDFLAGS) \
+	$(LDFLAGS) -o $@
+am_unstructured_OBJECTS = unstructured.$(OBJEXT)
+unstructured_OBJECTS = $(am_unstructured_OBJECTS)
+unstructured_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+unstructured_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(unstructured_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(1_nonadios_example_SOURCES) $(2_adios_write_SOURCES) \
-	$(3_adios_read_SOURCES) $(4_adios_nfiles_SOURCES)
-DIST_SOURCES = $(1_nonadios_example_SOURCES) $(2_adios_write_SOURCES) \
-	$(3_adios_read_SOURCES) $(4_adios_nfiles_SOURCES)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(rectilinear_SOURCES) $(structured_SOURCES) \
+	$(uniform_SOURCES) $(unstructured_SOURCES)
+DIST_SOURCES = $(rectilinear_SOURCES) $(structured_SOURCES) \
+	$(uniform_SOURCES) $(unstructured_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -121,32 +135,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -155,72 +169,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -231,11 +220,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -243,7 +232,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -269,26 +261,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -300,46 +285,58 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
-1_nonadios_example_SOURCES = 1_nonadios_example.c
-1_nonadios_example_LDADD = $(top_builddir)/src/libadios.a \
-	$(ADIOSLIB_LDADD)
-1_nonadios_example_LDFLAGS = $(ADIOSLIB_LDFLAGS)
-2_adios_write_SOURCES = 2_adios_write.c
-2_adios_write_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
-2_adios_write_LDFLAGS = $(ADIOSLIB_LDFLAGS)
-3_adios_read_SOURCES = 3_adios_read.c
-3_adios_read_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
-3_adios_read_LDFLAGS = $(ADIOSLIB_LDFLAGS)
-4_adios_nfiles_SOURCES = 4_adios_nfiles.c
-4_adios_nfiles_LDADD = $(top_builddir)/src/libadios.a \
-	$(ADIOSLIB_LDADD)
-4_adios_nfiles_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+uniform_SOURCES = uniform.c
+uniform_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+uniform_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+rectilinear_SOURCES = rectilinear.c
+rectilinear_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+rectilinear_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+structured_SOURCES = structured.c
+structured_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+structured_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+unstructured_SOURCES = unstructured.c
+unstructured_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+unstructured_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 CLEANFILES = *.bp
-EXTRA_DIST = config.xml gread_temperature.ch gwrite_temperature.ch
+EXTRA_DIST = uniform.xml structured.xml rectilinear.xml unstructured.xml 
 all: all-am
 
 .SUFFIXES:
@@ -348,14 +345,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/manual/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/manual/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/schema/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/schema/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -373,25 +370,28 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
-1_nonadios_example$(EXEEXT): $(1_nonadios_example_OBJECTS) $(1_nonadios_example_DEPENDENCIES) 
-	@rm -f 1_nonadios_example$(EXEEXT)
-	$(LINK) $(1_nonadios_example_LDFLAGS) $(1_nonadios_example_OBJECTS) $(1_nonadios_example_LDADD) $(LIBS)
-2_adios_write$(EXEEXT): $(2_adios_write_OBJECTS) $(2_adios_write_DEPENDENCIES) 
-	@rm -f 2_adios_write$(EXEEXT)
-	$(LINK) $(2_adios_write_LDFLAGS) $(2_adios_write_OBJECTS) $(2_adios_write_LDADD) $(LIBS)
-3_adios_read$(EXEEXT): $(3_adios_read_OBJECTS) $(3_adios_read_DEPENDENCIES) 
-	@rm -f 3_adios_read$(EXEEXT)
-	$(LINK) $(3_adios_read_LDFLAGS) $(3_adios_read_OBJECTS) $(3_adios_read_LDADD) $(LIBS)
-4_adios_nfiles$(EXEEXT): $(4_adios_nfiles_OBJECTS) $(4_adios_nfiles_DEPENDENCIES) 
-	@rm -f 4_adios_nfiles$(EXEEXT)
-	$(LINK) $(4_adios_nfiles_LDFLAGS) $(4_adios_nfiles_OBJECTS) $(4_adios_nfiles_LDADD) $(LIBS)
+	@list='$(noinst_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
+rectilinear$(EXEEXT): $(rectilinear_OBJECTS) $(rectilinear_DEPENDENCIES) 
+	@rm -f rectilinear$(EXEEXT)
+	$(rectilinear_LINK) $(rectilinear_OBJECTS) $(rectilinear_LDADD) $(LIBS)
+structured$(EXEEXT): $(structured_OBJECTS) $(structured_DEPENDENCIES) 
+	@rm -f structured$(EXEEXT)
+	$(structured_LINK) $(structured_OBJECTS) $(structured_LDADD) $(LIBS)
+uniform$(EXEEXT): $(uniform_OBJECTS) $(uniform_DEPENDENCIES) 
+	@rm -f uniform$(EXEEXT)
+	$(uniform_LINK) $(uniform_OBJECTS) $(uniform_LDADD) $(LIBS)
+unstructured$(EXEEXT): $(unstructured_OBJECTS) $(unstructured_DEPENDENCIES) 
+	@rm -f unstructured$(EXEEXT)
+	$(unstructured_LINK) $(unstructured_OBJECTS) $(unstructured_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -414,82 +414,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -518,6 +521,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -530,7 +534,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -538,18 +542,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -569,19 +593,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/schema/rectilinear.c b/examples/C/schema/rectilinear.c
new file mode 100644
index 0000000..978190d
--- /dev/null
+++ b/examples/C/schema/rectilinear.c
@@ -0,0 +1,89 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: write a variable along with a rectilinear mesh. 
+ * Note that the mesh dimensions depend on the rank. 
+*/
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+#include "adios.h"
+int main (int argc, char * argv[] ) 
+{
+    char        filename []="rectilinear.bp";
+    int         rank, size, i;
+    int         NX = 10;  
+    double      t[NX], mean = 0;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    char * str = "Jul, 2012";
+
+    int         adios_err;
+    uint64_t    adios_groupsize, adios_totalsize;
+    int64_t     adios_handle;
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    int xydim = size+NX;
+    float       X[size];
+    float       Y[NX];
+
+    X[0] = 0;
+    for (i = 1; i< size; i++)
+    {
+        X[i] = i + X[i-1];
+    }
+
+    Y[0] = 0;
+    for (i = 1; i< NX; i++)
+    {
+        Y[i] = i + Y[i-1];
+    }
+
+    for (i = 0; i < NX; i++)
+    {
+        t[i] = rank * NX + i;
+        mean += t[i];
+    }
+
+    mean /= NX;
+
+    adios_init ("rectilinear.xml");
+
+    adios_open (&adios_handle, "schema", filename, "w", &comm);
+
+    adios_groupsize = 4 \
+                      + 4 \
+                + 4 \
+                + 4 \
+                + 8 \
+                + strlen(str) \
+                + 4 * (1) * (size) \
+                + 4 * (1) * (NX) \
+                + 8 * (1) * (NX);
+    adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);
+    adios_write (adios_handle, "NX", &NX);
+    adios_write (adios_handle, "size", &size);
+    adios_write (adios_handle, "rank", &rank);
+    adios_write (adios_handle, "mean", &mean);
+    adios_write (adios_handle, "xydim", &xydim);
+    adios_write (adios_handle, "X", X);
+    adios_write (adios_handle, "Y", Y);
+    adios_write (adios_handle, "date", str);
+    adios_write (adios_handle, "temperature", t);
+
+    adios_close (adios_handle);
+
+    MPI_Barrier (comm);
+
+    adios_finalize (rank);
+
+    MPI_Finalize ();
+
+    return 0;
+}
diff --git a/examples/C/schema/rectilinear.xml b/examples/C/schema/rectilinear.xml
new file mode 100644
index 0000000..80ad619
--- /dev/null
+++ b/examples/C/schema/rectilinear.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<adios-config host-language="C">
+    <adios-group name="schema" coordination-communicator="comm">
+    <var name="NX"   type="integer"/>
+    <var name="size" type="integer"/>
+    <var name="rank" type="integer"/>
+    <var name="xydim" type="integer"/>
+    <var name="mean" type="double"/>
+    <var name="date" type="string" gwrite="str"/>
+    <var name="X" dimensions="size" type="float"/>
+    <var name="Y" dimensions="NX" type="float"/>
+    <!--<var name="XY" dimensions="xydim" type="float"/>-->
+    <global-bounds  dimensions="size,NX" offsets="rank,0">
+        <var name="temperature" mesh="mesh1" gwrite="t" gread="t" type="double" dimensions="1,NX"/>
+    </global-bounds>
+
+    <!-- Rectilinear meshes to visualize temperature 2D array of size size*NX -->
+
+    <!-- Mesh1: 
+         - dimensions
+         - coordinates from multiple variables
+    -->
+    <mesh name="mesh1" type="rectilinear" time-varying="no">
+        <dimensions value="size,NX"/>
+        <coordinates-multi-var value="X,Y" />
+    </mesh>
+</adios-group>
+
+<method group="schema" method="MPI"/>
+<buffer size-MB="5" allocate-time="now"/>
+</adios-config>
diff --git a/examples/C/schema/structured.c b/examples/C/schema/structured.c
new file mode 100644
index 0000000..4a1dde6
--- /dev/null
+++ b/examples/C/schema/structured.c
@@ -0,0 +1,92 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: write a variable along with a structured mesh. 
+ * Note that the mesh dimensions depend on the rank.
+*/
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+#include "adios.h"
+int main (int argc, char * argv[] ) 
+{
+    char        filename[]="structured.bp";
+    int         rank, size, i, j;
+    int         NX = 10;  
+    double      t[NX], mean = 0;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    char      * str = "Jul, 2012";
+    int         nspace=2;
+
+    int         adios_err;
+    uint64_t    adios_groupsize, adios_totalsize;
+    int64_t     adios_handle;
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    float       X[size*NX];
+    float       Y[size][NX];
+    float       XY[2*size*NX];
+    int         size2 = 2*size*NX;
+    int idx = 0;
+    for (i = 0; i< size; i++)
+    {
+        for (j=0; j<NX; j++)
+        {
+            X[idx] = i + j;
+            Y[i][j] = i - j;
+            XY[2*idx] = X[idx];
+            XY[2*idx+1]=Y[i][j];
+            idx++;
+        }
+    }
+   
+    for (i = 0; i< NX; i++) {
+        t[i] = i+rank;
+    }
+    mean /= NX;
+
+    adios_init ("structured.xml");
+
+    adios_open (&adios_handle, "schema", filename, "w", &comm);
+
+    adios_groupsize = 4 \
+                      + 4 \
+                + 4 \
+                + 4 \
+                + 4 \
+                + 8 \
+                + strlen(str) \
+                + sizeof(float) * (size) * (NX) \
+                + sizeof(float) * (size) * (NX) \
+                + sizeof(float) * (2*NX*size) \
+                + sizeof(double) * (NX);
+    adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);
+    adios_write (adios_handle, "NX", &NX);
+    adios_write (adios_handle, "size", &size);
+    adios_write (adios_handle, "size2", &size2);
+    adios_write (adios_handle, "rank", &rank);
+    adios_write (adios_handle, "mean", &mean);
+    adios_write (adios_handle, "nspace", &nspace);
+    adios_write (adios_handle, "X", X);
+    adios_write (adios_handle, "Y", Y);
+    adios_write (adios_handle, "XY",  XY);
+    adios_write (adios_handle, "date", str);
+    adios_write (adios_handle, "temperature", t);
+
+    adios_close (adios_handle);
+
+    MPI_Barrier (comm);
+
+    adios_finalize (rank);
+
+    MPI_Finalize ();
+
+    return 0;
+}
diff --git a/examples/C/schema/structured.xml b/examples/C/schema/structured.xml
new file mode 100644
index 0000000..571fbf3
--- /dev/null
+++ b/examples/C/schema/structured.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0"?>
+<adios-config host-language="C">
+    <adios-group name="schema" coordination-communicator="comm">
+    <var name="NX"   type="integer"/>
+    <var name="size" type="integer"/>
+    <var name="size2" type="integer"/>
+    <var name="rank" type="integer"/>
+    <var name="mean" type="double"/>
+    <var name="date" type="string" gwrite="str"/>
+    <var name="nspace" type="integer"/>
+    <var name="X" dimensions="size,NX" type="float"/>
+    <var name="Y" dimensions="size,NX" type="float"/>
+    <var name="XY" dimensions="size2" type="float"/>
+    <global-bounds  dimensions="size,NX" offsets="rank,0">
+        <var name="temperature" mesh="mesh5" gwrite="t" gread="t" type="double" dimensions="1,NX"/>
+    </global-bounds>
+    <!-- Mesh1: 
+         - dimensions
+         - points-multi-var
+         Note: nspace is not required for points-multi-var since 
+         the number of coordinates per node can be deducted from the number of 
+         variables provided to the points-multi-var tag
+    -->
+    <mesh name="mesh1" type="structured" time-varying="no">
+        <dimensions value="size,NX"/>
+        <points-multi-var value="X,Y" />
+    </mesh>
+    <!-- Mesh2:
+         - dimensions
+         - nspace 
+         - points-single-var
+    -->
+    <mesh name="mesh2" type="structured" time-varying="no">
+        <dimensions value="size,NX"/>
+        <nspace value="2" />
+        <points-single-var value="XY" />
+    </mesh>
+    <!-- Mesh3: 
+         - nspace
+         - dimensions
+         - points-single-var
+         nspace is the number of coordinates per point. By default nspace=ndim or
+         number of dimensions provided. However it is possible to have a 2D mesh in
+         3D space. In this case, if the points are provided in the form of a single 
+         1D array, nspace=3 is required in order to correctly extracts the X & Y 
+         coordinates. 
+    -->
+    <mesh name="mesh3" type="structured" time-varying="no">
+        <dimensions value="size,NX"/>
+        <nspace value="nspace" />
+        <points-single-var value="XY" />
+    </mesh>
+</adios-group>
+
+<method group="schema" method="MPI"/>
+<buffer size-MB="5" allocate-time="now"/>
+</adios-config>
diff --git a/examples/C/schema/uniform.c b/examples/C/schema/uniform.c
new file mode 100644
index 0000000..e2b1c2b
--- /dev/null
+++ b/examples/C/schema/uniform.c
@@ -0,0 +1,78 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: write a variable along with uniform mesh 
+*/
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+#include "adios.h"
+int main (int argc, char * argv[] ) 
+{
+    char        filename [] = "uniform.bp";
+    int         rank, size, size2, i;
+    int         O1=-1, O2=-2, S1=2;
+    int         NX = 10;  
+    double      t[NX], mean = 0;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    char * str = "Jul, 2012";
+
+    int         adios_err;
+    uint64_t    adios_groupsize, adios_totalsize;
+    int64_t     adios_handle;
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    int M2 = NX - 1;
+    for (i = 0; i < NX; i++)
+    {
+        t[i] = rank * NX + i;
+        mean += t[i];
+    }
+
+    mean /= NX;
+
+    adios_init ("uniform.xml");
+
+    adios_open (&adios_handle, "schema", filename, "w", &comm);
+
+    adios_groupsize = 4 \
+                      + 4 \
+                + 4 \
+                + 4 \
+                + 4 \
+                + 4 \
+                + 4 \
+                + 4 \
+                + 8 \
+                + strlen(str) \
+                + 8 * (1) * (NX);
+    adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);
+    adios_write (adios_handle, "NX", &NX);
+    adios_write (adios_handle, "size", &size);
+    adios_write (adios_handle, "size-2", &size2);
+    adios_write (adios_handle, "rank", &rank);
+    adios_write (adios_handle, "mean", &mean);
+    adios_write (adios_handle, "O1", &O1);
+    adios_write (adios_handle, "O2", &O2);
+    adios_write (adios_handle, "S1", &S1);
+    adios_write (adios_handle, "M2", &M2);
+    adios_write (adios_handle, "date", str);
+    adios_write (adios_handle, "temperature", t);
+
+    adios_close (adios_handle);
+
+    MPI_Barrier (comm);
+
+    adios_finalize (rank);
+
+    MPI_Finalize ();
+
+    return 0;
+}
diff --git a/examples/C/schema/uniform.xml b/examples/C/schema/uniform.xml
new file mode 100644
index 0000000..c0cdebc
--- /dev/null
+++ b/examples/C/schema/uniform.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0"?>
+<adios-config host-language="C">
+    <adios-group name="schema" coordination-communicator="comm">
+    <var name="NX"   type="integer"/>
+    <var name="size" type="integer"/>
+    <var name="size-2" type="integer"/>
+    <var name="rank" type="integer"/>
+    <var name="mean" type="double"/>
+    <var name="date" type="string" gwrite="str"/>
+    <var name="O1" type="integer"/>
+    <var name="O2" type="integer"/>
+    <var name="S1" type="integer"/>
+    <var name="M2" type="integer"/>
+    <global-bounds  dimensions="size,NX" offsets="rank,0">
+        <var name="temperature" mesh="mesh3" gwrite="t" gread="t" type="double" dimensions="1,NX"/>
+    </global-bounds>
+    <!-- Uniform meshes to visualize temperature 2D array of size*NX -->
+
+    <!-- Mesh1: Reader will assume 
+         - 0 for origin
+         - unit spacing, and
+         - extract dimensions from vars
+    -->
+    <mesh name="mesh1" type="uniform" time-varying="no">
+    </mesh>
+
+    <!-- Mesh 2: 
+         - dimensions,
+         - origin (first point), and
+         - spacing
+    Note: For an n-dimensional variable reader will expect n coordinates for origin.
+    In this case, the spacing is uniform in both direction, so only one value
+    is provided. Otherwise, use spacing value="S1,S2" as shown in Mesh 3.
+    -->
+    <mesh name="mesh2" type="uniform" time-varying="no">
+        <dimensions value="size,NX" />
+        <origin value="O1,O2" />
+        <spacing value="S1" />
+    </mesh>
+
+    <!-- Mesh 3:
+         - dimensions,
+         - origin (first point), and 
+         - spacing different in each dimension
+    Note: Values can be scalars or variable names. 
+    -->
+    <mesh name="mesh3" type="uniform" time-varying="no">
+        <dimensions value="size,NX" />
+        <origin value="-2,O2" />
+        <spacing value="S1,4" />
+    </mesh>
+
+    <!-- Mesh 4:
+         - dimensions,
+         - origin (first point), and 
+         - maximum (last point)
+    Note: "size-2" is a variable name in ADIOS XML, so a variable with such name
+    must be written by the application
+    -->
+    <mesh name="mesh4" type="uniform" time-varying="no">
+        <dimensions value="40,60" />
+        <origin value="-2,-1" />
+        <maximum value="size-2,M2" />
+    </mesh>
+</adios-group>
+
+<method group="schema" method="MPI"/>
+<buffer size-MB="5" allocate-time="now"/>
+</adios-config>
diff --git a/examples/C/schema/unstructured.c b/examples/C/schema/unstructured.c
new file mode 100644
index 0000000..d072211
--- /dev/null
+++ b/examples/C/schema/unstructured.c
@@ -0,0 +1,441 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: write variables along with an unstructured mesh. 
+ */
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+#include "adios.h"
+
+
+static char *reference = "http://people.sc.fsu.edu/~jburkardt/m_src/twod_to_vtk/twod_to_vtk.html";
+
+//44 lines
+static float points[] = {
+    0.000,     0.000,
+    0.000,     1.000,
+    0.000,     2.000,
+    0.000,     3.000,
+    1.000,     0.000,
+    1.000,     1.000,
+    1.000,     2.000,
+    1.000,     3.000,
+    2.000,     0.000,
+    2.000,     1.000,
+    2.000,     2.000,
+    2.000,     3.000,
+    3.000,     0.000,
+    3.000,     1.000,
+    3.000,     2.000,
+    3.000,     3.000,
+    4.000,     0.000,
+    4.000,     1.000,
+    4.000,     2.000,
+    4.000,     3.000,
+    5.000,     0.000,
+    5.000,     1.000,
+    5.000,     2.000,
+    5.000,     3.000,
+    6.000,     0.000,
+    6.000,     1.000,
+    6.000,     2.000,
+    6.000,     3.000,
+    7.000,     0.000,
+    7.000,     1.000,
+    7.000,     2.000,
+    7.000,     3.000,
+    8.000,     0.000,
+    8.000,     1.000,
+    8.000,     2.000,
+    8.000,     3.000,
+    9.000,     0.000,
+    9.000,     1.000,
+    9.000,     2.000,
+    9.000,     3.000,
+    10.000,     0.000,
+    10.000,     1.000,
+    10.000,     2.000,
+    10.000,     3.000
+};
+
+static float points_X[] = {
+ 0.000, 
+ 0.000, 
+ 0.000, 
+ 0.000, 
+ 1.000, 
+ 1.000, 
+ 1.000, 
+ 1.000, 
+ 2.000, 
+ 2.000, 
+ 2.000, 
+ 2.000, 
+ 3.000, 
+ 3.000, 
+ 3.000, 
+ 3.000, 
+ 4.000, 
+ 4.000, 
+ 4.000, 
+ 4.000, 
+ 5.000, 
+ 5.000, 
+ 5.000, 
+ 5.000, 
+ 6.000, 
+ 6.000, 
+ 6.000, 
+ 6.000, 
+ 7.000, 
+ 7.000, 
+ 7.000, 
+ 7.000, 
+ 8.000, 
+ 8.000, 
+ 8.000, 
+ 8.000, 
+ 9.000, 
+ 9.000, 
+ 9.000, 
+ 9.000, 
+ 10.000,
+ 10.000,
+ 10.000,
+ 10.000
+};
+
+static float points_Y[] = {
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+  0.000, 
+  1.000, 
+  2.000, 
+  3.000, 
+   0.000,
+   1.000,
+   2.000,
+   3.000
+};
+
+
+
+
+//60 lines
+static int cells[] = {
+       1,   2,  12,
+      13,  12,   2,
+       2,   3,  13,
+      14,  13,   3,
+       3,   4,  14,
+      15,  14,   4,
+       4,   5,  15,
+      16,  15,   5,
+       5,   6,  16,
+      17,  16,   6,
+       6,   7,  17,
+      18,  17,   7,
+       7,   8,  18,
+      19,  18,   8,
+       8,   9,  19,
+      20,  19,   9,
+       9,  10,  20,
+      21,  20,  10,
+      10,  11,  21,
+      22,  21,  11,
+      12,  13,  23,
+      24,  23,  13,
+      13,  14,  24,
+      25,  24,  14,
+      14,  15,  25,
+      26,  25,  15,
+      15,  16,  26,
+      27,  26,  16,
+      16,  17,  27,
+      28,  27,  17,
+      17,  18,  28,
+      29,  28,  18,
+      18,  19,  29,
+      30,  29,  19,
+      19,  20,  30,
+      31,  30,  20,
+      20,  21,  31,
+      32,  31,  21,
+      21,  22,  32,
+      33,  32,  22,
+      23,  24,  34,
+      35,  34,  24,
+      24,  25,  35,
+      36,  35,  25,
+      25,  26,  36,
+      37,  36,  26,
+      26,  27,  37,
+      38,  37,  27,
+      27,  28,  38,
+      39,  38,  28,
+      28,  29,  39,
+      40,  39,  29,
+      29,  30,  40,
+      41,  40,  30,
+      30,  31,  41,
+      42,  41,  31,
+      31,  32,  42,
+      43,  42,  32,
+      32,  33,  43,
+      44,  43,  33
+};
+
+static double U[] = {
+    0.0000000e+00,
+    0.0000000e+00,
+    0.0000000e+00,
+    0.0000000e+00,
+    5.8752800e-03,
+    5.8752800e-03,
+    5.8752800e-03,
+    5.8752800e-03,
+    9.5085900e-03,
+    9.5085900e-03,
+    9.5085900e-03,
+    9.5085900e-03,
+    9.5135100e-03,
+    9.5135100e-03,
+    9.5135100e-03,
+    9.5135100e-03,
+    5.8881600e-03,
+    5.8881600e-03,
+    5.8881600e-03,
+    5.8881600e-03,
+    1.5925500e-05,
+    1.5925500e-05,
+    1.5925500e-05,
+    1.5925500e-05,
+    5.8623800e-03,
+    5.8623800e-03,
+    5.8623800e-03,
+    5.8623800e-03,
+    9.5036500e-03,
+    9.5036500e-03,
+    9.5036500e-03,
+    9.5036500e-03,
+    9.5184100e-03,
+    9.5184100e-03,
+    9.5184100e-03,
+    9.5184100e-03,
+    5.9010200e-03,
+    5.9010200e-03,
+    5.9010200e-03,
+    5.9010200e-03,
+    3.1850900e-05,
+    3.1850900e-05,
+    3.1850900e-05,
+    3.1850900e-05
+};
+
+static  double V[] = {
+    0.0000000e+00,
+    0.0000000e+00,
+    0.0000000e+00,
+    0.0000000e+00,
+    -2.0000000e+00,
+    -2.0000000e+00,
+    -2.0000000e+00,
+    -2.0000000e+00,
+    -4.0000000e+00,
+    -4.0000000e+00,
+    -4.0000000e+00,
+    -4.0000000e+00,
+    -6.0000000e+00,
+    -6.0000000e+00,
+    -6.0000000e+00,
+    -6.0000000e+00,
+    -8.0000000e+00,
+    -8.0000000e+00,
+    -8.0000000e+00,
+    -8.0000000e+00,
+    -1.0000000e+01,
+    -1.0000000e+01,
+    -1.0000000e+01,
+    -1.0000000e+01,
+    -1.2000000e+01,
+    -1.2000000e+01,
+    -1.2000000e+01,
+    -1.2000000e+01,
+    -1.4000000e+01,
+    -1.4000000e+01,
+    -1.4000000e+01,
+    -1.4000000e+01,
+    -1.6000000e+01,
+    -1.6000000e+01,
+    -1.6000000e+01,
+    -1.6000000e+01,
+    -1.8000000e+01,
+    -1.8000000e+01,
+    -1.8000000e+01,
+    -1.8000000e+01,
+    -2.0000000e+01,
+    -2.0000000e+01,
+    -2.0000000e+01,
+    -2.0000000e+01
+};
+
+
+static double T[] = {
+
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00 ,
+    0.0000000e+00 ,
+    2.0000000e+00 ,
+    2.0000000e+00 ,
+    0.0000000e+00
+};
+
+
+int main (int argc, char ** argv ) 
+{
+    char        filename [256];
+    char        meshname [256] = "unstructured";
+    char        xmlfilename[256];
+    int         rank, size, i;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+
+    int         npoints = 44;
+    int         num_cells = 60;
+    int         Nspace = 2;
+	
+
+    /* ADIOS variables declarations for matching gwrite_temperature.ch */
+    int         adios_err;
+    uint64_t    adios_groupsize, adios_totalsize;
+    int64_t     adios_handle;
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+
+    strcpy (filename, meshname);
+    strcat (filename, ".bp");
+
+    strcpy (xmlfilename,meshname);
+    strcat (xmlfilename,".xml");
+
+    for(i = 0; i < num_cells * 3; i ++)
+    {
+	cells[i] --;
+    }
+
+    adios_init (xmlfilename);
+
+    adios_open (&adios_handle, "channel", filename, "w", &comm);
+
+    adios_groupsize = 4 \
+	+ 4 \
+	+ 4 \
+	+ 8 * (npoints) \
+	+ 8 * (npoints) \
+	+ 8 * (npoints) \
+	+ 4 * (num_cells) * (3) \
+	+ 4 * (npoints) * (2) \
+	+ 4 * (npoints) \
+	+ 4 * (npoints);
+
+    adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);
+    adios_write (adios_handle, "npoints", &npoints);
+    adios_write (adios_handle, "num_cells", &num_cells);
+    adios_write (adios_handle, "Nspace", &Nspace);
+    adios_write (adios_handle, "U", U);
+    adios_write (adios_handle, "V", V);
+    adios_write (adios_handle, "T", T);
+    adios_write (adios_handle, "cells", cells);
+    adios_write (adios_handle, "points", points);
+    adios_write (adios_handle, "points_X", points_X);
+    adios_write (adios_handle, "points_Y", points_Y);
+
+
+    adios_close (adios_handle);
+
+    MPI_Barrier (comm);
+
+    adios_finalize (rank);
+
+    MPI_Finalize ();
+    return 0;
+}
diff --git a/examples/C/schema/unstructured.xml b/examples/C/schema/unstructured.xml
new file mode 100644
index 0000000..d764363
--- /dev/null
+++ b/examples/C/schema/unstructured.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+<adios-config host-language="C">
+    <adios-group name="channel" coordination-communicator="comm">
+    <attribute name="Reference" path="/" value="http://people.sc.fsu.edu/~jburkardt/m_src/twod_to_vtk/twod_to_vtk.html"/>
+
+    <var name="npoints" type="integer"/>
+    <var name="num_cells" type="integer"/>
+
+    <var name="Nspace" type="integer"/>
+  
+    <var name="U" mesh="mesh1" type="double" dimensions="npoints"/>
+    <var name="V" mesh="mesh1" type="double" dimensions="npoints"/>
+    <var name="T" mesh="mesh1" type="double" dimensions="npoints"/>
+
+    <var name="cells" type="integer" dimensions="num_cells,3"/>
+    <var name="points" type="float" dimensions="npoints,2"/>
+
+    <var name="points_X" type="float" dimensions="npoints"/>
+    <var name="points_Y" type="float" dimensions="npoints"/>
+
+
+    <!-- Mesh1: 
+         - nspace
+         - points-multi-var
+         - uniform-cells
+    -->
+    <mesh name="mesh1" type="unstructured" time-varying="no">
+        <nspace value="Nspace" /> 
+        <points-multi-var value="points_X,points_Y" />
+        <uniform-cells count="num_cells" data="cells" type="triangle" />
+    </mesh>
+
+</adios-group>
+
+<method group="channel" method="MPI"/>
+<buffer size-MB="5" allocate-time="now"/>
+</adios-config>
diff --git a/examples/C/stat/Makefile.am b/examples/C/stat/Makefile.am
index 50138e0..f29e5d4 100644
--- a/examples/C/stat/Makefile.am
+++ b/examples/C/stat/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
@@ -10,6 +10,7 @@ stat_write_LDADD = $(top_builddir)/src/libadios.a
 stat_write_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 stat_write_LDADD += $(ADIOSLIB_LDADD)
 stat_read_SOURCES = stat_read.c
+stat_read_CPPFLAGS = -DADIOS_USE_READ_API_1
 stat_read_LDADD = $(top_builddir)/src/libadios.a 
 stat_read_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 stat_read_LDADD += $(ADIOSLIB_LDADD)
diff --git a/examples/C/stat/Makefile.in b/examples/C/stat/Makefile.in
index 8f195d2..6891675 100644
--- a/examples/C/stat/Makefile.in
+++ b/examples/C/stat/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ noinst_PROGRAMS = stat_write$(EXEEXT) stat_read$(EXEEXT)
 subdir = examples/C/stat
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,27 +62,35 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
-am_stat_read_OBJECTS = stat_read.$(OBJEXT)
+am_stat_read_OBJECTS = stat_read-stat_read.$(OBJEXT)
 stat_read_OBJECTS = $(am_stat_read_OBJECTS)
 am__DEPENDENCIES_1 =
 stat_read_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
+stat_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(stat_read_LDFLAGS) $(LDFLAGS) -o $@
 am_stat_write_OBJECTS = stat_write.$(OBJEXT)
 stat_write_OBJECTS = $(am_stat_write_OBJECTS)
 stat_write_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+stat_write_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(stat_write_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(stat_read_SOURCES) $(stat_write_SOURCES)
 DIST_SOURCES = $(stat_read_SOURCES) $(stat_write_SOURCES)
 ETAGS = etags
@@ -110,32 +118,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -144,72 +152,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -220,11 +203,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -232,7 +215,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -258,26 +244,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -289,34 +268,49 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 stat_write_SOURCES = stat_write.c
 stat_write_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
 stat_write_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 stat_read_SOURCES = stat_read.c
+stat_read_CPPFLAGS = -DADIOS_USE_READ_API_1
 stat_read_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
 stat_read_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 CLEANFILES = *.bp
@@ -329,14 +323,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/C/stat/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/C/stat/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/C/stat/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/C/stat/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -354,19 +348,22 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 stat_read$(EXEEXT): $(stat_read_OBJECTS) $(stat_read_DEPENDENCIES) 
 	@rm -f stat_read$(EXEEXT)
-	$(LINK) $(stat_read_LDFLAGS) $(stat_read_OBJECTS) $(stat_read_LDADD) $(LIBS)
+	$(stat_read_LINK) $(stat_read_OBJECTS) $(stat_read_LDADD) $(LIBS)
 stat_write$(EXEEXT): $(stat_write_OBJECTS) $(stat_write_DEPENDENCIES) 
 	@rm -f stat_write$(EXEEXT)
-	$(LINK) $(stat_write_LDFLAGS) $(stat_write_OBJECTS) $(stat_write_LDADD) $(LIBS)
+	$(stat_write_LINK) $(stat_write_OBJECTS) $(stat_write_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -383,88 +380,97 @@ distclean-compile:
 .c.lo:
 	$(LTCOMPILE) -c -o $@ $<
 
+stat_read-stat_read.o: stat_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat_read_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat_read-stat_read.o `test -f 'stat_read.c' || echo '$(srcdir)/'`stat_read.c
+
+stat_read-stat_read.obj: stat_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(stat_read_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o stat_read-stat_read.obj `if test -f 'stat_read.c'; then $(CYGPATH_W) 'stat_read.c'; else $(CYGPATH_W) '$(srcdir)/stat_read.c'; fi`
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -493,6 +499,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -505,7 +512,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -513,18 +520,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -544,19 +571,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/C/stat/gwrite_stat.ch b/examples/C/stat/gwrite_stat.ch
index 810c524..40f12e5 100644
--- a/examples/C/stat/gwrite_stat.ch
+++ b/examples/C/stat/gwrite_stat.ch
@@ -7,5 +7,5 @@ adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);
 adios_write (adios_handle, "NX", &NX);
 adios_write (adios_handle, "size", &size);
 adios_write (adios_handle, "rank", &rank);
-adios_write (adios_handle, "complex", &c);
+adios_write (adios_handle, "complex", c);
 adios_write (adios_handle, "temperature", t);
diff --git a/examples/C/stat/stat.xml b/examples/C/stat/stat.xml
index 8ced817..d3f6f5b 100644
--- a/examples/C/stat/stat.xml
+++ b/examples/C/stat/stat.xml
@@ -12,6 +12,8 @@
 
 <method group="temperature" method="MPI"/>
 <buffer size-MB="5" allocate-time="now"/>
-<analysis adios-group="temperature" var="temperature" break-points="0, 100, 1000, 10000" />
+<!--temporarily disabled the following because the support for histogram has yet to
+be implemented for the new read API. -->
+<!--analysis adios-group="temperature" var="temperature" break-points="0, 100, 1000, 10000" /-->
 </adios-config>
 
diff --git a/examples/C/stat/stat_write.c b/examples/C/stat/stat_write.c
index 1bfe4f6..a701eac 100644
--- a/examples/C/stat/stat_write.c
+++ b/examples/C/stat/stat_write.c
@@ -18,50 +18,50 @@ struct double_complex
 
 int main (int argc, char ** argv) 
 {
-	char        filename [256];
-	int         rank, size, i, it;
-	int         NX = 10; 
-	double      t[NX];
-	struct double_complex c[NX];
+    char        filename [256];
+    int         rank, size, i, it;
+    int         NX = 10; 
+    double      t[NX];
+    struct double_complex c[NX];
 
-	/* ADIOS variables declarations for matching gwrite_temperature.ch */
-	int         adios_err;
-	uint64_t    adios_groupsize, adios_totalsize;
-	int64_t     adios_handle;
-	MPI_Comm    comm=MPI_COMM_WORLD;
- 
-	MPI_Init (&argc, &argv);
-	MPI_Comm_rank (MPI_COMM_WORLD, &rank);
-	MPI_Comm_size (comm, &size);
+    /* ADIOS variables declarations for matching gwrite_temperature.ch */
+    int         adios_err;
+    uint64_t    adios_groupsize, adios_totalsize;
+    int64_t     adios_handle;
+    MPI_Comm    comm=MPI_COMM_WORLD;
 
-	adios_init ("stat.xml");
-   	strcpy (filename, "adios_stat.bp");
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+    MPI_Comm_size (comm, &size);
 
-   	for (it =0; it < 13; it++) {
-       	for (i = 0; i < NX; i++) {
-      		t[i] = it*100.0 + NX * rank + i;
+    adios_init ("stat.xml");
+    strcpy (filename, "adios_stat.bp");
+
+    for (it =0; it < 13; it++) {
+        for (i = 0; i < NX; i++) {
+            t[i] = it*100.0 + NX * rank + i;
             c[i].r = it * 10 + i + 8;
             c[i].i = it * 10 + i - 5;
-		}
-			// Introduce Inf value here	
-			t[0] = 1 / 0.0;	
+        }
+        // Introduce Inf value here    
+        t[0] = 1 / 0.0;    
 
-            if (it==0)
-		    	adios_open (&adios_handle, "temperature", filename, "w", &comm);
-            else
-		    	adios_open (&adios_handle, "temperature", filename, "a", &comm);
+        if (it==0)
+            adios_open (&adios_handle, "temperature", filename, "w", &comm);
+        else
+            adios_open (&adios_handle, "temperature", filename, "a", &comm);
 
-        	#include "gwrite_stat.ch"
-        	adios_close (adios_handle);
-			MPI_Barrier (comm);
- 	}
+#include "gwrite_stat.ch"
+        adios_close (adios_handle);
+        MPI_Barrier (comm);
+    }
 
-	printf ("[%d]: adios_stat.bp written successfully\n", rank);
-	MPI_Barrier (comm);
+    printf ("[%d]: adios_stat.bp written successfully\n", rank);
+    MPI_Barrier (comm);
     //if (rank==0) printf("Finalize adios\n");
     adios_finalize (rank);
 
-   //if (rank==0) printf("Finalize MPI\n");
+    //if (rank==0) printf("Finalize MPI\n");
     MPI_Finalize ();
-	return 0;
+    return 0;
 }
diff --git a/examples/Fortran/Makefile.in b/examples/Fortran/Makefile.in
index 22c7b8a..acca0a6 100644
--- a/examples/Fortran/Makefile.in
+++ b/examples/Fortran/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,7 +36,9 @@ host_triplet = @host@
 subdir = examples/Fortran
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -60,18 +60,50 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 ADIOSLIB_CFLAGS = @ADIOSLIB_CFLAGS@
 ADIOSLIB_CPPFLAGS = @ADIOSLIB_CPPFLAGS@
@@ -94,32 +126,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -128,72 +160,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -204,11 +211,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -216,7 +223,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -242,26 +252,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -273,28 +276,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = scalars arrays global-array global-array-time 
 all: all-recursive
 
@@ -303,14 +319,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/Fortran/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/Fortran/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Fortran/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/Fortran/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -328,6 +344,7 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -335,10 +352,6 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -346,7 +359,7 @@ uninstall-info-am:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -363,16 +376,15 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -398,16 +410,16 @@ maintainer-clean-recursive:
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -415,14 +427,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -434,81 +446,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -538,6 +570,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -548,8 +581,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -557,18 +589,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -587,24 +639,27 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
 
 #time-index
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/examples/Fortran/arrays/Makefile.in b/examples/Fortran/arrays/Makefile.in
index d4b794c..1809722 100644
--- a/examples/Fortran/arrays/Makefile.in
+++ b/examples/Fortran/arrays/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ noinst_PROGRAMS = arrays_write$(EXEEXT) arrays_read$(EXEEXT)
 subdir = examples/Fortran/arrays
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,24 +62,31 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_arrays_read_OBJECTS = arrays_read.$(OBJEXT)
 arrays_read_OBJECTS = $(am_arrays_read_OBJECTS)
 am__DEPENDENCIES_1 =
 arrays_read_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
+arrays_read_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(arrays_read_LDFLAGS) $(LDFLAGS) -o $@
 am_arrays_write_OBJECTS = arrays_write.$(OBJEXT)
 arrays_write_OBJECTS = $(am_arrays_write_OBJECTS)
 arrays_write_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+arrays_write_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(arrays_write_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
 FCLD = $(FC)
 SOURCES = $(arrays_read_SOURCES) $(arrays_write_SOURCES)
 DIST_SOURCES = $(arrays_read_SOURCES) $(arrays_write_SOURCES)
@@ -108,32 +115,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -142,72 +149,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = $(MPIFC)
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -218,11 +200,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -230,7 +212,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -256,26 +241,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -287,28 +265,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 INCLUDES = $(all_includes) -I$(top_builddir)/src
 AUTOMAKE_OPTIONS = no-dependencies
 arrays_write_SOURCES = arrays_write.F90
@@ -331,14 +322,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/Fortran/arrays/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/Fortran/arrays/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Fortran/arrays/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/Fortran/arrays/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -356,19 +347,22 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 arrays_read$(EXEEXT): $(arrays_read_OBJECTS) $(arrays_read_DEPENDENCIES) 
 	@rm -f arrays_read$(EXEEXT)
-	$(FCLINK) $(arrays_read_LDFLAGS) $(arrays_read_OBJECTS) $(arrays_read_LDADD) $(LIBS)
+	$(arrays_read_LINK) $(arrays_read_OBJECTS) $(arrays_read_LDADD) $(LIBS)
 arrays_write$(EXEEXT): $(arrays_write_OBJECTS) $(arrays_write_DEPENDENCIES) 
 	@rm -f arrays_write$(EXEEXT)
-	$(FCLINK) $(arrays_write_LDFLAGS) $(arrays_write_OBJECTS) $(arrays_write_LDADD) $(LIBS)
+	$(arrays_write_LINK) $(arrays_write_OBJECTS) $(arrays_write_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -391,82 +385,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -495,6 +492,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -507,7 +505,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -515,18 +513,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -546,19 +564,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/Fortran/arrays/arrays_read.F90 b/examples/Fortran/arrays/arrays_read.F90
index 892d932..31f8d74 100644
--- a/examples/Fortran/arrays/arrays_read.F90
+++ b/examples/Fortran/arrays/arrays_read.F90
@@ -12,6 +12,7 @@
 !/*     Similar example is ../../C/manual/2_adios_read.c       */
 !/**************************************************************/
 program arrays
+    use adios_write_mod
     implicit none
     include 'mpif.h'
 
diff --git a/examples/Fortran/arrays/arrays_write.F90 b/examples/Fortran/arrays/arrays_write.F90
index 4026499..a60cb25 100644
--- a/examples/Fortran/arrays/arrays_write.F90
+++ b/examples/Fortran/arrays/arrays_write.F90
@@ -11,6 +11,7 @@
 !/*     Similar example is ../../C/manual/2_adios_write.c     */
 !/*************************************************************/
 program arrays
+    use adios_write_mod
     implicit none
     include 'mpif.h'
 
diff --git a/examples/Fortran/global-array-time/Makefile.in b/examples/Fortran/global-array-time/Makefile.in
index a06ca43..4c2bd0f 100644
--- a/examples/Fortran/global-array-time/Makefile.in
+++ b/examples/Fortran/global-array-time/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ noinst_PROGRAMS = adios_globaltime$(EXEEXT)
 subdir = examples/Fortran/global-array-time
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,20 +62,24 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_adios_globaltime_OBJECTS = adios_globaltime.$(OBJEXT)
 adios_globaltime_OBJECTS = $(am_adios_globaltime_OBJECTS)
 am__DEPENDENCIES_1 =
 adios_globaltime_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+adios_globaltime_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(adios_globaltime_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
 FCLD = $(FC)
 SOURCES = $(adios_globaltime_SOURCES)
 DIST_SOURCES = $(adios_globaltime_SOURCES)
@@ -104,32 +108,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -138,72 +142,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = $(MPIFC)
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -214,11 +193,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -226,7 +205,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -252,26 +234,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -283,28 +258,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 INCLUDES = $(all_includes) -I$(top_builddir)/src
 AUTOMAKE_OPTIONS = no-dependencies
 adios_globaltime_SOURCES = adios_globaltime.F90
@@ -325,14 +313,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/Fortran/global-array-time/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/Fortran/global-array-time/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Fortran/global-array-time/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/Fortran/global-array-time/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -350,16 +338,19 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 adios_globaltime$(EXEEXT): $(adios_globaltime_OBJECTS) $(adios_globaltime_DEPENDENCIES) 
 	@rm -f adios_globaltime$(EXEEXT)
-	$(FCLINK) $(adios_globaltime_LDFLAGS) $(adios_globaltime_OBJECTS) $(adios_globaltime_LDADD) $(LIBS)
+	$(adios_globaltime_LINK) $(adios_globaltime_OBJECTS) $(adios_globaltime_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -382,82 +373,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -486,6 +480,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -498,7 +493,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -506,18 +501,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -537,19 +552,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/Fortran/global-array-time/adios_globaltime.F90 b/examples/Fortran/global-array-time/adios_globaltime.F90
index 3685cd1..122bb26 100644
--- a/examples/Fortran/global-array-time/adios_globaltime.F90
+++ b/examples/Fortran/global-array-time/adios_globaltime.F90
@@ -14,6 +14,7 @@
 !
 
 program adios_global
+    use adios_write_mod
     implicit none
     include 'mpif.h'
     character(len=256)      :: filename = "adios_globaltime.bp"
diff --git a/examples/Fortran/global-array/Makefile.am b/examples/Fortran/global-array/Makefile.am
index 159a865..7b2c7ac 100644
--- a/examples/Fortran/global-array/Makefile.am
+++ b/examples/Fortran/global-array/Makefile.am
@@ -3,7 +3,7 @@ INCLUDES += -I$(top_builddir)/src
 
 AUTOMAKE_OPTIONS = no-dependencies
 
-noinst_PROGRAMS = adios_global adios_global_no_xml
+noinst_PROGRAMS = adios_global adios_global_no_xml no_xml_write_byid
 
 adios_global_SOURCES = adios_global.F90
 adios_global_LDADD = $(top_builddir)/src/libadiosf.a 
@@ -15,6 +15,11 @@ adios_global_no_xml_LDADD = $(top_builddir)/src/libadiosf.a
 adios_global_no_xml_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 adios_global_no_xml_LDADD += $(ADIOSLIB_LDADD)
 
+no_xml_write_byid_SOURCES = no_xml_write_byid.F90
+no_xml_write_byid_LDADD = $(top_builddir)/src/libadiosf.a
+no_xml_write_byid_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+no_xml_write_byid_LDADD += $(ADIOSLIB_LDADD)
+
 CLEANFILES = *.bp
 CC=$(MPICC)
 FC=$(MPIFC)
diff --git a/examples/Fortran/global-array/Makefile.in b/examples/Fortran/global-array/Makefile.in
index 88a56d6..82d7b6f 100644
--- a/examples/Fortran/global-array/Makefile.in
+++ b/examples/Fortran/global-array/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,11 +34,14 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-noinst_PROGRAMS = adios_global$(EXEEXT) adios_global_no_xml$(EXEEXT)
+noinst_PROGRAMS = adios_global$(EXEEXT) adios_global_no_xml$(EXEEXT) \
+	no_xml_write_byid$(EXEEXT)
 subdir = examples/Fortran/global-array
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,27 +63,43 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_adios_global_OBJECTS = adios_global.$(OBJEXT)
 adios_global_OBJECTS = $(am_adios_global_OBJECTS)
 am__DEPENDENCIES_1 =
 adios_global_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
+adios_global_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(adios_global_LDFLAGS) $(LDFLAGS) -o $@
 am_adios_global_no_xml_OBJECTS = adios_global_no_xml.$(OBJEXT)
 adios_global_no_xml_OBJECTS = $(am_adios_global_no_xml_OBJECTS)
 adios_global_no_xml_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+adios_global_no_xml_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(adios_global_no_xml_LDFLAGS) $(LDFLAGS) -o $@
+am_no_xml_write_byid_OBJECTS = no_xml_write_byid.$(OBJEXT)
+no_xml_write_byid_OBJECTS = $(am_no_xml_write_byid_OBJECTS)
+no_xml_write_byid_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
+	$(am__DEPENDENCIES_1)
+no_xml_write_byid_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(no_xml_write_byid_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
 FCLD = $(FC)
-SOURCES = $(adios_global_SOURCES) $(adios_global_no_xml_SOURCES)
-DIST_SOURCES = $(adios_global_SOURCES) $(adios_global_no_xml_SOURCES)
+SOURCES = $(adios_global_SOURCES) $(adios_global_no_xml_SOURCES) \
+	$(no_xml_write_byid_SOURCES)
+DIST_SOURCES = $(adios_global_SOURCES) $(adios_global_no_xml_SOURCES) \
+	$(no_xml_write_byid_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -108,32 +125,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -142,72 +159,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = $(MPIFC)
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -218,11 +210,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -230,7 +222,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -256,26 +251,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -287,28 +275,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 INCLUDES = $(all_includes) -I$(top_builddir)/src
 AUTOMAKE_OPTIONS = no-dependencies
 adios_global_SOURCES = adios_global.F90
@@ -318,6 +319,10 @@ adios_global_no_xml_SOURCES = adios_global_no_xml.F90
 adios_global_no_xml_LDADD = $(top_builddir)/src/libadiosf.a \
 	$(ADIOSLIB_LDADD)
 adios_global_no_xml_LDFLAGS = $(ADIOSLIB_LDFLAGS)
+no_xml_write_byid_SOURCES = no_xml_write_byid.F90
+no_xml_write_byid_LDADD = $(top_builddir)/src/libadiosf.a \
+	$(ADIOSLIB_LDADD)
+no_xml_write_byid_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 CLEANFILES = *.bp
 FCLINK = \
 	$(LIBTOOL) --mode=link --tag F77 $(FC) \
@@ -332,14 +337,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/Fortran/global-array/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/Fortran/global-array/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Fortran/global-array/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/Fortran/global-array/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -357,19 +362,25 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 adios_global$(EXEEXT): $(adios_global_OBJECTS) $(adios_global_DEPENDENCIES) 
 	@rm -f adios_global$(EXEEXT)
-	$(FCLINK) $(adios_global_LDFLAGS) $(adios_global_OBJECTS) $(adios_global_LDADD) $(LIBS)
+	$(adios_global_LINK) $(adios_global_OBJECTS) $(adios_global_LDADD) $(LIBS)
 adios_global_no_xml$(EXEEXT): $(adios_global_no_xml_OBJECTS) $(adios_global_no_xml_DEPENDENCIES) 
 	@rm -f adios_global_no_xml$(EXEEXT)
-	$(FCLINK) $(adios_global_no_xml_LDFLAGS) $(adios_global_no_xml_OBJECTS) $(adios_global_no_xml_LDADD) $(LIBS)
+	$(adios_global_no_xml_LINK) $(adios_global_no_xml_OBJECTS) $(adios_global_no_xml_LDADD) $(LIBS)
+no_xml_write_byid$(EXEEXT): $(no_xml_write_byid_OBJECTS) $(no_xml_write_byid_DEPENDENCIES) 
+	@rm -f no_xml_write_byid$(EXEEXT)
+	$(no_xml_write_byid_LINK) $(no_xml_write_byid_OBJECTS) $(no_xml_write_byid_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -392,82 +403,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -496,6 +510,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -508,7 +523,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -516,18 +531,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -547,19 +582,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/Fortran/global-array/adios_global.F90 b/examples/Fortran/global-array/adios_global.F90
index 3eecbdb..0b848d3 100644
--- a/examples/Fortran/global-array/adios_global.F90
+++ b/examples/Fortran/global-array/adios_global.F90
@@ -13,6 +13,7 @@
 !
 
 program adios_global 
+    use adios_write_mod
     implicit none
     include 'mpif.h'
     character(len=256)      :: filename = "adios_global.bp"
diff --git a/examples/Fortran/global-array/adios_global_no_xml.F90 b/examples/Fortran/global-array/adios_global_no_xml.F90
index 756429d..d6c2c8d 100644
--- a/examples/Fortran/global-array/adios_global_no_xml.F90
+++ b/examples/Fortran/global-array/adios_global_no_xml.F90
@@ -13,6 +13,7 @@
 !
 
 program adios_global 
+    use adios_write_mod
     implicit none
     include 'mpif.h'
     character(len=256)      :: filename = "adios_global_no_xml.bp"
@@ -26,6 +27,7 @@ program adios_global
     integer*8               :: adios_groupsize, adios_totalsize
     integer*8               :: adios_handle
     integer*8               :: m_adios_group
+    integer*8               :: varid
 
     call MPI_Init (ierr)
     call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
@@ -38,39 +40,41 @@ program adios_global
     call adios_declare_group (m_adios_group, "restart", "iter", 1, adios_err)
     call adios_select_method (m_adios_group, "MPI", "", "", adios_err)
 
+    ! This example doesn't use varid during writing.
+    ! So we simply put 'varid' everywhere.
     ! define a integer
     call adios_define_var (m_adios_group, "NX" &
                           ,"", 2 &
-                          ,"", "", "", adios_err)
+                          ,"", "", "", varid)
     ! define a integer
     call adios_define_var (m_adios_group, "G" &
                           ,"", 2 &
-                          ,"", "", "", adios_err)
+                          ,"", "", "", varid)
     ! define a integer
     call adios_define_var (m_adios_group, "O" &
                           ,"", 2 &
-                          ,"", "", "", adios_err)
+                          ,"", "", "", varid)
     ! define a global array
     call adios_define_var (m_adios_group, "temperature" &
                           ,"", 6 &
-                          ,"NX", "G", "O", adios_err)
+                          ,"NX", "G", "O", varid)
 
     ! define a integer
     call adios_define_var (m_adios_group, "NX" &
                           ,"", 2 &
-                          ,"", "", "", adios_err)
+                          ,"", "", "", varid) 
     ! define a integer
     call adios_define_var (m_adios_group, "G" &
                           ,"", 2 &
-                          ,"", "", "", adios_err)
+                          ,"", "", "", varid)
     ! define a integer
     call adios_define_var (m_adios_group, "O" &
                           ,"", 2 &
-                          ,"", "", "", adios_err)
+                          ,"", "", "", varid)
     ! define a global array
     call adios_define_var (m_adios_group, "temperature" &
                           ,"", 6 &
-                          ,"NX", "G", "O", adios_err)
+                          ,"NX", "G", "O", varid) 
 
     call adios_open (adios_handle, "restart", filename, "w", comm, adios_err)
 
diff --git a/examples/Fortran/global-array/adios_global_no_xml.F90 b/examples/Fortran/global-array/no_xml_write_byid.F90
similarity index 55%
copy from examples/Fortran/global-array/adios_global_no_xml.F90
copy to examples/Fortran/global-array/no_xml_write_byid.F90
index 756429d..0597731 100644
--- a/examples/Fortran/global-array/adios_global_no_xml.F90
+++ b/examples/Fortran/global-array/no_xml_write_byid.F90
@@ -12,10 +12,11 @@
 ! ADIOS config file: None
 !
 
-program adios_global 
+program no_xml_write_byid
+    use adios_write_mod
     implicit none
     include 'mpif.h'
-    character(len=256)      :: filename = "adios_global_no_xml.bp"
+    character(len=256)      :: filename = "no_xml_write_byid.bp"
     integer                 :: rank, size, i, ierr
     integer,parameter       :: NX=10
     integer                 :: O, G
@@ -26,6 +27,8 @@ program adios_global
     integer*8               :: adios_groupsize, adios_totalsize
     integer*8               :: adios_handle
     integer*8               :: m_adios_group
+    integer*8               :: var_id1, var_id2
+    character(len=32)       :: local, global, offset
 
     call MPI_Init (ierr)
     call MPI_Comm_dup (MPI_COMM_WORLD, comm, ierr)
@@ -38,67 +41,44 @@ program adios_global
     call adios_declare_group (m_adios_group, "restart", "iter", 1, adios_err)
     call adios_select_method (m_adios_group, "MPI", "", "", adios_err)
 
-    ! define a integer
-    call adios_define_var (m_adios_group, "NX" &
-                          ,"", 2 &
-                          ,"", "", "", adios_err)
-    ! define a integer
-    call adios_define_var (m_adios_group, "G" &
-                          ,"", 2 &
-                          ,"", "", "", adios_err)
-    ! define a integer
-    call adios_define_var (m_adios_group, "O" &
-                          ,"", 2 &
-                          ,"", "", "", adios_err)
+    G = 2 * NX * size
+    O = 2 * NX * rank
+
+    write (local, "(I2)") NX
+    write (global, "(I3)") G
+    write (offset, "(I3)") O
+
     ! define a global array
     call adios_define_var (m_adios_group, "temperature" &
                           ,"", 6 &
-                          ,"NX", "G", "O", adios_err)
-
-    ! define a integer
-    call adios_define_var (m_adios_group, "NX" &
-                          ,"", 2 &
-                          ,"", "", "", adios_err)
-    ! define a integer
-    call adios_define_var (m_adios_group, "G" &
-                          ,"", 2 &
-                          ,"", "", "", adios_err)
-    ! define a integer
-    call adios_define_var (m_adios_group, "O" &
-                          ,"", 2 &
-                          ,"", "", "", adios_err)
+                          ,local, global, offset, var_id1)
+
+
+    write (offset, "(I3)") O + NX
+
     ! define a global array
     call adios_define_var (m_adios_group, "temperature" &
                           ,"", 6 &
-                          ,"NX", "G", "O", adios_err)
+                          ,local, global, offset, var_id2)
 
     call adios_open (adios_handle, "restart", filename, "w", comm, adios_err)
 
-    adios_groupsize = 4 + 4 + 4 + NX * 8 &
-                    + 4 + 4 + 4 + NX * 8
+    adios_groupsize =  NX * 8 &
+                    +  NX * 8
     call adios_group_size (adios_handle, adios_groupsize, adios_totalsize, adios_err)
 
-    G = 2 * NX * size
-    O = 2 * NX * rank
     do i = 1, NX
         t(i)  = O + i - 1
     enddo
 
-    call adios_write (adios_handle, "NX", NX, adios_err)
-    call adios_write (adios_handle, "G", G, adios_err)
-    call adios_write (adios_handle, "O", O, adios_err)
-    call adios_write (adios_handle, "temperature", t, adios_err)
-
+    call adios_write_byid (adios_handle, var_id1, t, adios_err)
 
     O = 2 * NX * rank + NX
     do i = 1, NX
         t(i)  = O + i - 1
     enddo
 
-    call adios_write (adios_handle, "NX", NX, adios_err)
-    call adios_write (adios_handle, "G", G, adios_err)
-    call adios_write (adios_handle, "O", O, adios_err)
-    call adios_write (adios_handle, "temperature", t, adios_err)
+    call adios_write_byid (adios_handle, var_id2, t, adios_err)
 
     call adios_close (adios_handle, adios_err)
 
diff --git a/examples/Fortran/scalars/Makefile.in b/examples/Fortran/scalars/Makefile.in
index b25d095..3cb5dc5 100644
--- a/examples/Fortran/scalars/Makefile.in
+++ b/examples/Fortran/scalars/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ noinst_PROGRAMS = scalars_write$(EXEEXT) scalars_read$(EXEEXT)
 subdir = examples/Fortran/scalars
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,24 +62,31 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_scalars_read_OBJECTS = scalars_read.$(OBJEXT)
 scalars_read_OBJECTS = $(am_scalars_read_OBJECTS)
 am__DEPENDENCIES_1 =
 scalars_read_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
+scalars_read_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(scalars_read_LDFLAGS) $(LDFLAGS) -o $@
 am_scalars_write_OBJECTS = scalars_write.$(OBJEXT)
 scalars_write_OBJECTS = $(am_scalars_write_OBJECTS)
 scalars_write_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+scalars_write_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(scalars_write_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
 FCLD = $(FC)
 SOURCES = $(scalars_read_SOURCES) $(scalars_write_SOURCES)
 DIST_SOURCES = $(scalars_read_SOURCES) $(scalars_write_SOURCES)
@@ -108,32 +115,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -142,72 +149,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = $(MPIFC)
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -218,11 +200,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -230,7 +212,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -256,26 +241,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -287,28 +265,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 INCLUDES = $(all_includes) -I$(top_builddir)/src
 AUTOMAKE_OPTIONS = no-dependencies
 scalars_write_SOURCES = scalars_write.F90
@@ -332,14 +323,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/Fortran/scalars/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/Fortran/scalars/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Fortran/scalars/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/Fortran/scalars/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -357,19 +348,22 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 scalars_read$(EXEEXT): $(scalars_read_OBJECTS) $(scalars_read_DEPENDENCIES) 
 	@rm -f scalars_read$(EXEEXT)
-	$(FCLINK) $(scalars_read_LDFLAGS) $(scalars_read_OBJECTS) $(scalars_read_LDADD) $(LIBS)
+	$(scalars_read_LINK) $(scalars_read_OBJECTS) $(scalars_read_LDADD) $(LIBS)
 scalars_write$(EXEEXT): $(scalars_write_OBJECTS) $(scalars_write_DEPENDENCIES) 
 	@rm -f scalars_write$(EXEEXT)
-	$(FCLINK) $(scalars_write_LDFLAGS) $(scalars_write_OBJECTS) $(scalars_write_LDADD) $(LIBS)
+	$(scalars_write_LINK) $(scalars_write_OBJECTS) $(scalars_write_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -392,82 +386,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -496,6 +493,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -508,7 +506,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -516,18 +514,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -547,19 +565,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/Fortran/scalars/scalars_read.F90 b/examples/Fortran/scalars/scalars_read.F90
index 34474a8..bc35470 100644
--- a/examples/Fortran/scalars/scalars_read.F90
+++ b/examples/Fortran/scalars/scalars_read.F90
@@ -9,6 +9,7 @@
 !/*   Example of reading various types of variable in ADIOS   */
 !/*************************************************************/
 program scalars_read
+    use adios_write_mod
     implicit none
     include 'mpif.h'
 
diff --git a/examples/Fortran/scalars/scalars_write.F90 b/examples/Fortran/scalars/scalars_write.F90
index 14165c6..241bdf4 100644
--- a/examples/Fortran/scalars/scalars_write.F90
+++ b/examples/Fortran/scalars/scalars_write.F90
@@ -9,6 +9,7 @@
 !/*   Example of writing various types of variable in ADIOS   */
 !/*************************************************************/
 program scalars
+    use adios_write_mod
     implicit none
     include 'mpif.h'
 
diff --git a/examples/Makefile.in b/examples/Makefile.in
index 3260d26..54f3cd6 100644
--- a/examples/Makefile.in
+++ b/examples/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,7 +36,9 @@ host_triplet = @host@
 subdir = examples
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -60,18 +60,50 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = C Fortran
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 ADIOSLIB_CFLAGS = @ADIOSLIB_CFLAGS@
 ADIOSLIB_CPPFLAGS = @ADIOSLIB_CPPFLAGS@
@@ -94,32 +126,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -128,72 +160,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -204,11 +211,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -216,7 +223,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -242,26 +252,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -273,28 +276,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 @BUILD_WRITE_TRUE at CSUBDIRS = C
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at FSUBDIRS = Fortran
 SUBDIRS = $(CSUBDIRS) $(FSUBDIRS)
@@ -305,14 +321,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  examples/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  examples/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu examples/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -330,6 +346,7 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -337,10 +354,6 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -348,7 +361,7 @@ uninstall-info-am:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -365,16 +378,15 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -400,16 +412,16 @@ maintainer-clean-recursive:
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -417,14 +429,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -436,81 +448,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -540,6 +572,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -550,8 +583,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -559,18 +591,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -589,22 +641,25 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/examples/coupling/.svn/all-wcprops b/examples/coupling/.svn/all-wcprops
new file mode 100644
index 0000000..407bd9e
--- /dev/null
+++ b/examples/coupling/.svn/all-wcprops
@@ -0,0 +1,47 @@
+K 25
+svn:wc:ra_dav:version-url
+V 53
+/svn-ewok/ADIOS/!svn/ver/2136/trunk/examples/coupling
+END
+coupling_writer_2D.xml
+K 25
+svn:wc:ra_dav:version-url
+V 76
+/svn-ewok/ADIOS/!svn/ver/2110/trunk/examples/coupling/coupling_writer_2D.xml
+END
+coupling_reader_2D.F90
+K 25
+svn:wc:ra_dav:version-url
+V 76
+/svn-ewok/ADIOS/!svn/ver/2132/trunk/examples/coupling/coupling_reader_2D.F90
+END
+coupling_reader_2D.xml
+K 25
+svn:wc:ra_dav:version-url
+V 76
+/svn-ewok/ADIOS/!svn/ver/2110/trunk/examples/coupling/coupling_reader_2D.xml
+END
+job
+K 25
+svn:wc:ra_dav:version-url
+V 57
+/svn-ewok/ADIOS/!svn/ver/2119/trunk/examples/coupling/job
+END
+Makefile
+K 25
+svn:wc:ra_dav:version-url
+V 62
+/svn-ewok/ADIOS/!svn/ver/2215/trunk/examples/coupling/Makefile
+END
+README
+K 25
+svn:wc:ra_dav:version-url
+V 60
+/svn-ewok/ADIOS/!svn/ver/2110/trunk/examples/coupling/README
+END
+coupling_writer_2D.F90
+K 25
+svn:wc:ra_dav:version-url
+V 76
+/svn-ewok/ADIOS/!svn/ver/2110/trunk/examples/coupling/coupling_writer_2D.F90
+END
diff --git a/examples/coupling/.svn/entries b/examples/coupling/.svn/entries
new file mode 100644
index 0000000..0da216a
--- /dev/null
+++ b/examples/coupling/.svn/entries
@@ -0,0 +1,273 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/examples/coupling
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-12-20T20:28:16.372383Z
+2136
+pnorbert
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+coupling_writer_2D.xml
+file
+
+
+
+
+2012-12-20T19:38:28.921697Z
+7900442e71772d843fb1736508d9470c
+2012-11-28T00:11:40.365798Z
+2110
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1745
+

+coupling_reader_2D.F90
+file
+
+
+
+
+2012-12-14T22:32:19.036088Z
+ea6aaf0522ebcdd958e056b66bd1dbe6
+2012-12-20T19:39:07.502574Z
+2132
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+9589
+

+coupling_reader_2D.xml
+file
+
+
+
+
+2011-09-09T20:38:42.000000Z
+3acbd1604434c6cbe275e9d06e2fde2c
+2012-11-28T00:11:40.365798Z
+2110
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1120
+

+job
+file
+
+
+
+
+2012-12-04T19:38:26.389920Z
+e5617139debb6b287b122c8426476a70
+2012-12-04T19:38:58.053190Z
+2119
+pnorbert
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2257
+

+Makefile
+file
+2215
+
+
+
+2013-01-08T17:28:32.561288Z
+b7779995059e6afe3245c481e0e38f2a
+2013-01-08T17:40:22.266814Z
+2215
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1233
+

+README
+file
+
+
+
+
+2012-08-25T00:57:12.921248Z
+641fb37c4cb5ba7dca10563059a491a4
+2012-11-28T00:11:40.365798Z
+2110
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+4729
+

+coupling_writer_2D.F90
+file
+
+
+
+
+2012-11-27T23:32:10.954892Z
+ad58f51090eb5fa0b9b711c267d03b8e
+2012-11-28T00:11:40.365798Z
+2110
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+6028
+

diff --git a/examples/coupling/.svn/format b/examples/coupling/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/coupling/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/examples/coupling/.svn/prop-base/job.svn-base b/examples/coupling/.svn/prop-base/job.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/examples/coupling/.svn/prop-base/job.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/examples/coupling/.svn/text-base/Makefile.svn-base b/examples/coupling/.svn/text-base/Makefile.svn-base
new file mode 100644
index 0000000..2e1fdf8
--- /dev/null
+++ b/examples/coupling/.svn/text-base/Makefile.svn-base
@@ -0,0 +1,45 @@
+## MPIF90 SETTINGS
+FC=mpif90
+FFLAGS=-g
+
+## FTN SETTINGS
+#FC=ftn
+#FFLAGS = -O3
+
+#TARGET=gnu
+TARGET=pgi
+
+## Set ADIOS_DIR here or before doing make
+override ADIOS_DIR:=/ccs/proj/e2e/pnorbert/ADIOS/sith.${TARGET}
+override ADIOS_INC:=` ${ADIOS_DIR}/bin/adios_config -c -f`
+override ADIOS_FLIB:=`${ADIOS_DIR}/bin/adios_config -l -f`
+override GPP = ${ADIOS_DIR}/bin/gpp.py
+
+default: coupling_writer_2D coupling_reader_2D
+all: default
+
+coupling_writer_2D.o : coupling_writer_2D.F90 gwrite_writer2D.fh
+	${FC} -g -c ${ADIOS_INC} coupling_writer_2D.F90  $<
+
+coupling_writer_2D:  coupling_writer_2D.o gwrite_writer2D.fh
+	${FC} -g -o coupling_writer_2D coupling_writer_2D.o ${ADIOS_FLIB} 
+
+gwrite_writer2D.fh: coupling_writer_2D.xml
+	${GPP} coupling_writer_2D.xml
+
+coupling_reader_2D.o : coupling_reader_2D.F90 gwrite_reader2D.fh
+	${FC} -g -c ${ADIOS_INC} coupling_reader_2D.F90  $<
+
+coupling_reader_2D:  coupling_reader_2D.o gwrite_reader2D.fh
+	${FC} -g -o coupling_reader_2D coupling_reader_2D.o ${ADIOS_FLIB} 
+
+gwrite_reader2D.fh: coupling_reader_2D.xml
+	${GPP} coupling_reader_2D.xml
+
+
+clean:
+	rm -f *.o *.mod *.fh core.* 
+	rm -f coupling_writer_2D coupling_reader_2D
+        
+distclean: clean
+	rm -f log.* dataspaces.conf conf srv.lck *.bp
diff --git a/examples/coupling/.svn/text-base/README.svn-base b/examples/coupling/.svn/text-base/README.svn-base
new file mode 100644
index 0000000..fdb54d4
--- /dev/null
+++ b/examples/coupling/.svn/text-base/README.svn-base
@@ -0,0 +1,132 @@
+REQUIREMENTS:
+    - ADIOS 1.4.1: http://www.olcf.ornl.gov/center-projects/adios
+    - Fortran 90 compiler
+    - MPI
+
+BUILD:
+    - Install ADIOS
+    - In Makefile, set ADIOS_DIR to the installation directory
+    - also set the MPI/F90 compiler name (e.g. mpif90 or ftn)
+    - run make
+
+
+1. Run the writer 
+=================
+ 2x2 processes write 4x5 blocks (8x10 global array), 5 timesteps
+
+$ mpirun -np 4 ./coupling_writer_2D 2 2 4 5 5
+ Process number        : 2 x 2
+ Array size per process: 4 x 5
+rank=0: 2D array pos: 0,0 offset: 0,0
+rank=1: 2D array pos: 1,0 offset: 4,0
+rank=2: 2D array pos: 0,1 offset: 0,5
+rank=3: 2D array pos: 1,1 offset: 4,5
+rank=1 set matrix to   1.01
+rank=0 set matrix to   0.01
+  Output file: writer_001.bp
+rank=2 set matrix to   2.01
+rank=3 set matrix to   3.01
+rank=1: ----------------------  write completed ----------------------
+rank=2: ----------------------  write completed ----------------------
+rank=3: ----------------------  write completed ----------------------
+rank=0: ----------------------  write completed ----------------------
+...
+
+
+2. Check the output
+===================
+
+$ bpls -l writer.bp 
+  integer  /info/nproc  5*scalar = 4 / 4 
+  integer  /info/npx    5*scalar = 2 / 2 
+  integer  /info/npy    5*scalar = 2 / 2 
+  integer  /gdx         5*scalar = 8 / 8 
+  integer  /gdy         5*scalar = 10 / 10 
+  integer  /aux/ox      5*scalar = 0 / 0 
+  integer  /aux/oy      5*scalar = 0 / 0 
+  integer  /aux/ldx     5*scalar = 4 / 4 
+  integer  /aux/ldy     5*scalar = 5 / 5 
+  double   /xy          5*{10, 8} = 0.01 / 3.05 / 1.53 / 1.11812 
+
+Note that F90 app writes 8x10 arrays in Fortran column-order, 
+which is 10x8 in C row-order. bpls sees/shows the C ordering 
+because it is a C program.  The reader below sees 8x10 Fortran
+array because it is a Fortan program.
+
+
+3. Run the reader
+=================
+
+$ mpirun -np 3 ./coupling_reader_2D 1 3 MPI 1 1
+ Process number        : 1 x 3
+ Method for reading: 0
+  Input file: writer.bp
+rank=0: Read in gdx and gdy, step1 from writer.bp
+rank=2: Read in gdx and gdy, step1 from writer.bp
+rank=1: Read in gdx and gdy, step1 from writer.bp
+rank=0: Read in xy(1:2,1:10) from writer.bp
+rank=2: Read in xy(5:8,1:10) from writer.bp
+rank=1: Read in xy(3:4,1:10) from writer.bp
+rank=1: Collectively wrote xy and new xy2 to reader_001.bp
+rank=2: Collectively wrote xy and new xy2 to reader_001.bp
+rank=0: Collectively wrote xy and new xy2 to reader_001.bp
+rank=2: Read in gdx and gdy, step2 from writer.bp
+rank=0: Read in gdx and gdy, step2 from writer.bp
+rank=1: Read in gdx and gdy, step2 from writer.bp
+rank=0: Read in xy(1:2,1:10) from writer.bp
+rank=2: Read in xy(5:8,1:10) from writer.bp
+rank=1: Read in xy(3:4,1:10) from writer.bp
+rank=2: Collectively wrote xy and new xy2 to reader_002.bp
+rank=1: Collectively wrote xy and new xy2 to reader_002.bp
+rank=0: Collectively wrote xy and new xy2 to reader_002.bp
+...
+
+
+4. Check the output
+===================
+
+$ bpls -l reader_001.bp 
+  integer  /info/rank  scalar = 0 
+  integer  /gdx        scalar = 8 
+  integer  /gdy        scalar = 10 
+  integer  /aux/ldx    scalar = 2 
+  integer  /aux/ldy    scalar = 10 
+  integer  /aux/ox     scalar = 0 
+  integer  /aux/oy     scalar = 0 
+  double   /xy         {10, 8} = 0.01 / 3.01 / 1.51 / 1.11803 
+  double   /xy2        {10, 8} = 0.0001 / 2.0301 / 1.2651 / 0.833742 
+
+
+xy in the two files should match:
+
+
+$ bpls -l reader_001.bp -d xy -n 8
+  double     /xy         {10, 8} = 0.01 / 3.01 / 1.51 / 1.11803 
+    (0,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (1,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (2,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (3,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (4,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (5,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (6,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (7,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (8,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (9,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+
+$ bpls -l writer.bp -d xy -n 8 -c "1,-1,-1"
+  double   /xy          5*{10, 8} = 0.01 / 3.05 / 1.53 / 1.11812 
+    slice (0:0, 0:9, 0:7)
+    (0,0,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,1,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,2,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,3,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,4,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,5,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (0,6,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (0,7,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (0,8,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (0,9,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+
+
+
+
diff --git a/examples/coupling/.svn/text-base/coupling_reader_2D.F90.svn-base b/examples/coupling/.svn/text-base/coupling_reader_2D.F90.svn-base
new file mode 100644
index 0000000..3f546ac
--- /dev/null
+++ b/examples/coupling/.svn/text-base/coupling_reader_2D.F90.svn-base
@@ -0,0 +1,321 @@
+!  
+!  ADIOS is freely available under the terms of the BSD license described
+!  in the COPYING file in the top level directory of this source distribution.
+!
+!  Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+!
+
+!
+!  Coupling writer/reader
+!
+!  Read a 2D array 
+!  to/from a file or from/to another coupling code using DataSpaces/ADIOS
+!
+!  npx * npy     processes write a 2D array, where each process writes an
+!  
+!  Data written
+!    xy          2D global array as received from the writers
+!    xy2         2D array with block,* decomp
+!
+!    All data are real*8 type
+!
+! (c) Oak Ridge National Laboratory, 2009
+! Author: Norbert Podhorszki
+!
+module coupling_reader_2D_comm
+    ! arguments
+    integer :: npx, npy, npz  ! # of processors in x-y-z direction
+    integer :: read_method    ! 0=bp, 1=hdf5, 2=dart, 3=dimes
+    integer :: read_mode      ! 0=whole array on each process
+                              ! 1=1D decomposition on 1st dim
+
+    integer :: nproc          ! number of processors
+
+    real*8, dimension(:,:),   allocatable :: xy, xy2
+
+    ! Offsets and sizes
+    integer :: ox, oy
+    integer :: ldx, ldy
+    integer :: gdx, gdy
+
+    ! MPI variables
+    integer :: group_comm, self_comm
+    integer :: rank
+    integer :: ierr
+
+    ! ADIOS variables
+    character (len=200) :: group
+    !character (len=6)   :: nprocstr
+    integer*8 :: adios_totalsize, adios_groupsize, adios_buf_size
+    integer   :: adios_err
+    integer*8 :: inh ! input file handle
+    integer*8 :: adios_handle ! output file handle (used by gwrite too)
+    character(len=256)  :: infn ! filename
+    
+    integer   :: wts  ! writer's output timestep index (read from 1,2...)
+    logical, parameter   :: dump_text = .true.
+
+end module coupling_reader_2D_comm
+
+
+program coupling
+    use coupling_reader_2D_comm
+    use adios_read_mod
+    implicit none
+    include 'mpif.h'
+
+    call MPI_Init (ierr)
+    call MPI_Comm_dup (MPI_COMM_WORLD, group_comm, ierr)
+    call MPI_Comm_dup (MPI_COMM_SELF, self_comm, ierr)
+    call MPI_Comm_rank (MPI_COMM_WORLD, rank, ierr)
+    call MPI_Comm_size (group_comm, nproc , ierr)
+
+    call processArgs()
+    if (rank == 0) then
+        print '(" Process number        : ",i0," x ",i0)',  npx,npy
+        print '(" Method for reading: ",i0)',  read_method
+
+        if (nproc .ne. npx*npy) then
+            print '(" Error: Number of processors ",i0,"does not match N*M=",i0)', nproc, npx*npy
+            call exit(1)
+        endif
+    endif
+
+    write (infn,'("writer.bp")')
+    if (rank==0)    print *, " Input file: "//trim(infn)
+
+
+    call adios_read_init_method (read_method, group_comm, "verbose=3; app_id=2; poll_interval=1000", ierr);
+    call adios_init("coupling_reader_2D.xml", ierr)
+    !call MPI_Barrier (group_comm, ierr)
+
+    !write (*,*) 'rank ', rank, "init completed"
+    !write (nprocstr,'(i0)') nproc
+
+    call adios_read_open_stream (inh, infn, read_method, group_comm, ADIOS_LOCKMODE_CURRENT, 30.0, ierr)
+    if (ierr .ne. 0) then
+        print '(" Failed to open stream: ",a0)', infn
+        print '(" open stream ierr=: ",i0)', ierr
+        call exit(1)
+    endif
+
+    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    wts = 1  ! start reading from writer's 1st step
+    do while (ierr==0)
+        call readArrays()
+        call adios_release_step(inh, ierr)
+        call printArrays()
+        call advanceArrays()
+        call MPI_Barrier (MPI_COMM_WORLD, ierr)
+        call adios_advance_step(inh, 0, 10.0, ierr)
+        if (ierr==err_end_of_stream .and. rank==0) then
+            print *, " Stream has terminated. Quit reader"
+        elseif (ierr==err_step_notready .and. rank==0) then
+            print *, " Next step has not arrived for a while. Assume termination" 
+        endif
+        wts = wts+1
+    enddo
+    call adios_read_close (inh, ierr)
+
+    ! Terminate
+    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    call adios_read_finalize_method (read_method, ierr)
+    call adios_finalize (rank, ierr)
+    call MPI_Finalize (ierr)
+end program coupling
+
+
+
+!!***************************
+subroutine readArrays()
+    use coupling_reader_2D_comm
+    use adios_read_mod
+    implicit none
+    integer             :: i,j,k
+    integer*8           :: sel
+    integer*8, dimension(3) :: offset, readsize
+
+
+    offset = 0
+    readsize = 1
+    call adios_selection_boundingbox (sel, 0, offset, readsize)
+
+    ! read gdx and gdy
+    print '("rank=",i0,": Read in gdx and gdy, step",i0," from ",a)', rank, wts, trim(infn)
+    call adios_schedule_read (inh, sel, "gdx", 1, 1, gdx, ierr)
+    call adios_schedule_read (inh, sel, "gdy", 1, 1, gdy, ierr)
+    call adios_perform_reads (inh, ierr)
+    call adios_selection_delete (sel)
+
+    ! Calculate the local x,y offsets
+    if (read_mode == 0) then
+        ! each process reads the whole array
+        ldx = gdx
+        ldy = gdy
+        ox = 0
+        oy = 0
+    elseif (read_mode == 1) then
+        ldx = gdx / nproc 
+        ldy = gdy
+        ox = rank * ldx
+        oy = 0
+        ! last process should read all the rest of columns
+        if (rank == nproc-1) then
+            ldx = gdx - ldx*(nproc-1)
+        endif
+    endif
+
+
+    if (.not. allocated(xy)) then
+        allocate( xy  (1:ldx, 1:ldy) )
+        allocate( xy2 (1:ldx, 1:ldy) )
+    endif
+    xy = -1.0 ! should be overwritten at reading the array next
+
+
+    ! Read in the whole xy array
+    readsize(1) = ldx
+    readsize(2) = ldy
+    offset(1)   = ox
+    offset(2)   = oy
+    call adios_selection_boundingbox (sel, 2, offset, readsize)
+    print '("rank=",i0,": Read in xy(",i0,":",i0,",",i0,":",i0,") from ",a)', rank, &
+            offset(1)+1, offset(1)+readsize(1), &
+            offset(2)+1, offset(2)+readsize(2),trim(infn)
+    call adios_schedule_read (inh, sel, "xy", 1, 1, xy, ierr)
+    call adios_perform_reads (inh, ierr)
+    call adios_selection_delete (sel)
+
+    do j=1,ldy
+        do i=1,ldx
+            xy2(i,j) = rank*1.0 + xy(i,j)/100.0
+        enddo
+    enddo
+    
+
+    call MPI_Barrier (group_comm, ierr)
+
+end subroutine readArrays
+
+!!***************************
+subroutine printArrays()
+    use coupling_reader_2D_comm
+    use adios_write_mod
+    implicit none
+    integer, parameter  :: u=20
+    character(len=256)  :: outfn
+    integer             :: i,j,k,writer
+
+    if (read_mode == 0) then
+
+        writer = mod(wts,nproc)
+        if (writer == rank) then
+    
+            write (outfn, '("reader_",i3.3,".bp")') wts
+            call adios_open (adios_handle, "reader2D", outfn, "w", self_comm, adios_err)
+#include "gwrite_reader2D.fh"
+            ! start streaming from buffer to disk
+            call adios_close (adios_handle, adios_err)
+            print '("rank=",i0,": One process wrote xy and new xy2 to ",a)', rank, trim(outfn)
+    
+        endif
+    
+        if (dump_text) then
+    
+            write (outfn, '("reader_",i3.3,"_",i0,".txt")') wts, rank
+            open (u, FILE=outfn, STATUS='NEW', FORM="FORMATTED")
+    
+            ! print xyz_bbb
+            write (u,'("xy(1:",i0,",1:",i0,") = ")') ldx, ldy
+            do j=1,ldy
+                do i=1,ldx
+                    write (u, '(f6.2," ",$)') xy(i,j)
+                enddo
+                write (u,*) " "  ! new line
+            enddo
+    
+            close (u)
+    
+        endif
+
+    elseif (read_mode ==1) then
+            write (outfn, '("reader_",i3.3,".bp")') wts
+            call adios_open (adios_handle, "reader2D", outfn, "w", group_comm, adios_err)
+#include "gwrite_reader2D.fh"
+            ! start streaming from buffer to disk
+            call adios_close (adios_handle, adios_err)
+            print '("rank=",i0,": Collectively wrote xy and new xy2 to ",a)', rank, trim(outfn)
+    endif
+
+end subroutine printArrays
+
+!!***************************
+subroutine advanceArrays()
+    use coupling_reader_2D_comm
+    implicit none
+
+    xy = 0.9 * xy
+    xy2 = 0.9 * xy2
+
+end subroutine advanceArrays
+
+
+!!***************************
+subroutine usage()
+    print *, "Usage: coupling_reader_2D N M method read-mode"
+    print *, "N:           number of processes in X dimension"
+    print *, "M:           number of processes in Y dimension"
+    print *, "read method: DATASPACES or DIMES for memory-to-memory coupling,"
+    print *, "             otherwise file-based"
+    print *, "read-mode:   0: each process reads whole global array"
+    print *, "             1: 1D decomposition in 1st dimension"
+end subroutine usage
+
+!!***************************
+subroutine processArgs()
+    use coupling_reader_2D_comm
+    use adios_read_mod
+
+#ifndef __GFORTRAN__
+#ifndef __GNUC__
+    interface
+         integer function iargc()
+         end function iargc
+    end interface
+#endif
+#endif
+
+    character(len=256) :: npx_str, npy_str, method_str, mode_str, ts_str
+    integer :: numargs
+
+    !! process arguments
+    numargs = iargc()
+    !print *,"Number of arguments:",numargs
+    if ( numargs < 4 ) then
+        call usage()
+        call exit(1)
+    endif
+    call getarg(1, npx_str)
+    call getarg(2, npy_str)
+    read (npx_str,'(i5)') npx
+    read (npy_str,'(i5)') npy
+
+    call getarg(3, method_str)
+    if (trim(method_str) .eq. "DATASPACES") then
+        read_method = ADIOS_READ_METHOD_DATASPACES 
+    elseif (trim(method_str) .eq. "DIMES") then
+        read_method = ADIOS_READ_METHOD_DIMES 
+    else
+        read_method = ADIOS_READ_METHOD_BP
+    endif
+
+    call getarg(4, mode_str)
+    read (mode_str,'(i5)') read_mode
+    if (read_mode < 0 .or. read_mode > 1) then
+        print *, "Argument error: read_mode must be 0 or 1"
+        call usage()
+        call exit(2)
+    endif
+
+
+end subroutine processArgs
diff --git a/examples/coupling/.svn/text-base/coupling_reader_2D.xml.svn-base b/examples/coupling/.svn/text-base/coupling_reader_2D.xml.svn-base
new file mode 100644
index 0000000..29c1422
--- /dev/null
+++ b/examples/coupling/.svn/text-base/coupling_reader_2D.xml.svn-base
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<adios-config host-language="Fortran">
+
+  <!-- Group to write the whole array from a single processor -->
+  <adios-group name="reader2D" coordination-communicator="group_comm">
+    <var name="rank" path="/info" type="integer"/>
+    <var name="gdx"  path="" type="integer"/>
+    <attribute name="description" path="/gdx" value="Global array size in x dimension"/>
+    <var name="gdy"  path="" type="integer"/>
+    <attribute name="description" path="/gdy" value="Global array size in y dimension"/>
+    <var name="ldx" path="/aux" type="integer"/>
+    <var name="ldy" path="/aux" type="integer"/>
+    <var name="ox" path="/aux" type="integer"/>
+    <var name="oy" path="/aux" type="integer"/>
+
+    <!-- 2D array to write with block,block decomposition -->
+    <global-bounds dimensions="gdx,gdy" offsets="ox,oy">
+        <var name="xy"  path="" type="double" dimensions="ldx,ldy"/>
+        <var name="xy2" path="" type="double" dimensions="ldx,ldy"/>
+    </global-bounds>
+  </adios-group>
+
+  <transport group="reader2D" method="MPI"/>
+
+  <buffer size-MB="400" allocate-time="now"/>
+
+</adios-config>
diff --git a/examples/coupling/.svn/text-base/coupling_writer_2D.F90.svn-base b/examples/coupling/.svn/text-base/coupling_writer_2D.F90.svn-base
new file mode 100644
index 0000000..7b6521e
--- /dev/null
+++ b/examples/coupling/.svn/text-base/coupling_writer_2D.F90.svn-base
@@ -0,0 +1,214 @@
+!  
+!  ADIOS is freely available under the terms of the BSD license described
+!  in the COPYING file in the top level directory of this source distribution.
+!
+!  Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+!
+
+!
+!  Coupling writer/reader
+!
+!  Write a 2D array 
+!  to/from a file or from/to another coupling code using DataSpaces/ADIOS
+!
+!  npx * npy        processes write a 2D array, where each process writes an
+!  ldx * ldy        piece with filling with its rank as real*8 value
+!  
+!  Data written
+!    xy         2D array with block,block decomp
+!
+!    All data are real*8 type
+!
+! (c) Oak Ridge National Laboratory, 2009
+! Author: Norbert Podhorszki
+!
+module coupling_writer_2D_comm
+    ! arguments
+    integer :: npx, npy, npz  ! # of processors in x-y-z direction
+    integer :: ldx, ldy, ldz  ! size of array per processor
+    integer :: timesteps      ! number of timesteps to run
+
+    integer :: nproc          ! number of processors
+
+    real*8, dimension(:,:),   allocatable :: xy
+
+    ! Offsets and sizes
+    integer :: ox, oy
+    integer :: gdx, gdy
+
+    ! MPI variables
+    integer :: group_comm
+    integer :: rank
+    integer :: ierr
+
+    ! ADIOS variables
+    character (len=200) :: group
+    !character (len=6)   :: nprocstr
+    integer*8 :: adios_handle, adios_totalsize, adios_groupsize, adios_buf_size
+    integer   :: adios_err
+
+    ! actual timestep
+    integer   :: ts 
+
+end module coupling_writer_2D_comm
+
+
+program coupling
+    use coupling_writer_2D_comm
+    use adios_write_mod
+    implicit none
+    include 'mpif.h'
+    integer :: t
+
+    call MPI_Init (ierr)
+    call MPI_Comm_dup (MPI_COMM_WORLD, group_comm, ierr)
+    call MPI_Comm_rank (MPI_COMM_WORLD, rank, ierr)
+    call MPI_Comm_size (group_comm, nproc , ierr)
+
+    call adios_init ("coupling_writer_2D.xml", ierr)
+    !call MPI_Barrier (group_comm, ierr)
+
+    call processArgs()
+    if (rank == 0) then
+        print '(" Process number        : ",i0," x ",i0)',  npx,npy
+        print '(" Array size per process: ",i0," x ",i0)',  ldx,ldy
+
+        if (nproc .ne. npx*npy) then
+            print '(" Error: Number of processors ",i0,"does not match N*M=",i0)', nproc, npx*npy
+            call exit(1)
+        endif
+    endif
+
+    !write (*,*) 'rank ', rank, "init completed"
+    !write (nprocstr,'(i0)') nproc
+
+    ! Calculate global size
+    call allocateLocalArrays()
+    !call sleep(60)
+    do ts=1,timesteps
+        call generateLocalArrays()
+        call writeArrays()
+        call MPI_Barrier (MPI_COMM_WORLD, ierr)
+        !print '("rank=",i0," goes to sleep after step ",i0)', rank, ts
+        if (ts < timesteps) call sleep(2)
+        !print '("rank=",i0," woke up")', rank
+    enddo
+
+    ! Terminate
+    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    call adios_finalize (rank, adios_err)
+    call MPI_Finalize (ierr)
+end program coupling
+
+
+!!***************************
+subroutine allocateLocalArrays()
+    use coupling_writer_2D_comm
+    implicit none
+    integer :: posx, posy, posz ! position index in the array
+    integer :: i,j,k
+
+
+!!  2D array with block,block decomposition
+    posx = mod(rank, npx)     ! 1st dim easy: 0, npx, 2npx... are in the same X position
+    posy = rank/npx           ! 2nd dim: npx processes belong into one dim
+    ox = posx * ldx
+    oy = posy * ldy
+    gdx  = npx * ldx
+    gdy  = npy * ldy
+
+    print '("rank=",i0,": 2D array pos: ",i0,",",i0," offset: ",i0,",",i0)',  &
+             rank, posx, posy, ox, oy
+
+    allocate( xy(1:ldx, 1:ldy) )
+
+end subroutine allocateLocalArrays
+
+!!***************************
+subroutine generateLocalArrays()
+    use coupling_writer_2D_comm
+    implicit none
+
+    print '("rank=",i0," set matrix to ",f6.2)', rank, 1.0*rank+0.01*ts
+    xy = 1.0*rank + 0.01*ts
+    !xy = 1.0*rank + 1.0*ts
+
+end subroutine generateLocalArrays
+
+!!***************************
+subroutine writeArrays()
+    use coupling_writer_2D_comm
+    use adios_write_mod
+    implicit none
+    character(len=256) :: fn
+    ! Write out data using ADIOS
+
+    write (fn,'("writer.bp")')
+    if (rank == 0) print *, " Output file: "//trim(fn)
+    if (ts == 1) then
+        call adios_open (adios_handle, "writer2D", fn, "w", group_comm, adios_err)
+    else
+        call adios_open (adios_handle, "writer2D", fn, "a", group_comm, adios_err)
+    endif
+
+#include "gwrite_writer2D.fh"
+
+    ! start streaming from buffer to disk
+    call adios_close (adios_handle, adios_err)
+    print '("rank=",i0,": ----------------------  write completed ----------------------")', rank
+end subroutine writeArrays
+
+
+!!***************************
+subroutine usage()
+    print *, "Usage: coupling_writer_2D N M nx ny [timesteps]"
+    print *, "N:      number of processes in X dimension"
+    print *, "M:      number of processes in Y dimension"
+    print *, "nx:     local array size in X dimension per processor"
+    print *, "ny:     local array size in Y dimension per processor"
+    print *, "timesteps: how many times to write data"
+end subroutine usage
+
+!!***************************
+subroutine processArgs()
+    use coupling_writer_2D_comm
+
+#ifndef __GFORTRAN__
+#ifndef __GNUC__
+    interface
+         integer function iargc()
+         end function iargc
+    end interface
+#endif
+#endif
+
+    character(len=256) :: npx_str, npy_str, npz_str, ldx_str, ldy_str, ldz_str, ts_str
+    integer :: numargs
+
+    !! process arguments
+    numargs = iargc()
+    !print *,"Number of arguments:",numargs
+    if ( numargs < 4 ) then
+        call usage()
+        call exit(1)
+    endif
+    call getarg(1, npx_str)
+    call getarg(2, npy_str)
+    !call getarg(4, npz_str)
+    read (npx_str,'(i5)') npx
+    read (npy_str,'(i5)') npy
+    !read (npz_str,'(i5)') npz
+    call getarg(3, ldx_str)
+    call getarg(4, ldy_str)
+    !call getarg(7, ldz_str)
+    read (ldx_str,'(i6)') ldx
+    read (ldy_str,'(i6)') ldy
+    !read (ldz_str,'(i6)') ldz
+    if ( numargs == 5 ) then
+        call getarg(5, ts_str)
+        read (ts_str,'(i6)') timesteps
+    else
+        timesteps = 1
+    endif
+
+end subroutine processArgs
diff --git a/examples/coupling/.svn/text-base/coupling_writer_2D.xml.svn-base b/examples/coupling/.svn/text-base/coupling_writer_2D.xml.svn-base
new file mode 100644
index 0000000..a46eda3
--- /dev/null
+++ b/examples/coupling/.svn/text-base/coupling_writer_2D.xml.svn-base
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<adios-config host-language="Fortran">
+  <adios-group name="writer2D">
+
+    <var name="nproc" path="/info" type="integer"/>
+    <attribute name="description" path="/info/nproc" value="Number of writers"/>
+    <var name="npx"   path="/info" type="integer"/>
+    <attribute name="description" path="/info/npx" value="Number of processors in x dimension"/>
+    <var name="npy"   path="/info" type="integer"/>
+    <attribute name="description" path="/info/npy" value="Number of processors in y dimension"/>
+
+    <var name="gdx"  path="" type="integer"/>
+    <attribute name="description" path="/gdx" value="Global array size in x dimension"/>
+    <var name="gdy"  path="" type="integer"/>
+    <attribute name="description" path="/gdy" value="Global array size in y dimension"/>
+
+    <!-- Auxiliary variables for global array indexing written (overwritten) by each process -->
+    <var name="ox"   path="/aux" type="integer"/>
+    <var name="oy"   path="/aux" type="integer"/>
+    <var name="ldx"  path="/aux" type="integer"/>
+    <var name="ldy"  path="/aux" type="integer"/>
+
+    <!-- 2D array to write with block,block decomposition -->
+    <global-bounds dimensions="gdx,gdy" offsets="ox,oy">
+        <var name="xy" path="" type="double" dimensions="ldx,ldy"/>
+    </global-bounds>
+    <attribute name="description" path="/xy" 
+               value="2D array with 2D decomposition"/>
+
+  </adios-group>
+
+  <!-- Use transport method 
+       DART for memory-to-memory coupling or
+       MPI  for file-based coupling
+  -->
+  <transport group="writer2D" method="MPI">verbose=3</transport>
+  <!--transport group="writer2D" method="DATASPACES">verbose=3</transport-->
+
+  <buffer size-MB="40" allocate-time="now"/>
+
+</adios-config>
diff --git a/examples/coupling/.svn/text-base/job.svn-base b/examples/coupling/.svn/text-base/job.svn-base
new file mode 100644
index 0000000..b69bd0d
--- /dev/null
+++ b/examples/coupling/.svn/text-base/job.svn-base
@@ -0,0 +1,89 @@
+#!/bin/bash
+#PBS -A STF006
+#PBS -N genarray
+#PBS -j oe
+#PBS -l walltime=1:00:00,size=20
+## On jaguarpf, you need size=48 (4 nodes * 12cores for 4 apruns)
+
+#cd $PBS_O_WORKDIR
+
+# Number of writers (WPX*WPY = WRITEPROC)
+WRITEPROC=16
+WPX=4
+WPY=4
+# Number of staging processes, if staging is used
+STAGINGPROC=4
+# Number of readers (RPX*RPY = READPROC)
+READPROC=9
+RPX=3
+RPY=3
+
+
+let "WP=WPX*WPY"
+if [ $WP -ne $WRITEPROC ]; then
+    echo "WPX*WPY != WRITEPROC: " $WP and $WRITEPROC
+    exit 1
+fi
+
+let "RP=RPX*RPY"
+if [ $RP -ne $READPROC ]; then
+    echo "RPX*RPY != READPROC: " $RP and $READPROC
+    exit 1
+fi
+
+
+# clean-up
+rm -f log.* draw* core* conf dataspaces.conf srv.lck
+rm -f writer.bp reader_0*.bp
+
+METHOD=`grep "<transport .*method=" coupling_writer_2D.xml | sed -e "s/^.*method=\"\([A-Z]*\).*/\1/"`
+echo "The selected coupling method in coupling_writer_2D.xml is: $METHOD"
+
+if [ "x$METHOD" == "xDATASPACES" ]; then
+    READMETHOD="DATASPACES"
+    let "PROCALL=WRITEPROC+READPROC"
+
+    # Prepare config file for DataSpaces
+    echo "## Config file for DataSpaces
+ndim = 3
+dimx = 1000
+dimy = 1000
+dimz = 1000
+max_versions = 10
+" > dataspaces.conf
+
+    # Run DataSpaces
+    SERVER=/ccs/proj/e2e/dataspaces/sith/pgi/bin/dataspaces_server
+    echo "-- Start DataSpaces server "$SERVER" on $STAGINGPROC PEs, -s$STAGINGPROC -c$PROCALL"
+    mpirun -np $STAGINGPROC $SERVER -s$STAGINGPROC -c$PROCALL &> log.server &
+
+    ## Give some time for the servers to load and startup
+    sleep 1s
+    while [ ! -f conf ]; do
+        echo "-- File conf is not yet available from server. Sleep more"
+        sleep 1s
+    done
+    sleep 10s  # wait server to fill up the conf file
+
+    ## Export the main server config to the environment
+    while read line; do
+        export set "${line}"
+    done < conf
+
+    echo "-- DataSpaces Portals IDs: P2TNID = $P2TNID   P2TPID = $P2TPID"
+else
+    READMETHOD="FILE"
+fi
+
+# Start WRITER
+echo "-- Start WRITER on $WRITEPROC PEs"
+mpirun -np $WRITEPROC ./coupling_writer_2D $WPX $WPY 10 10 5  >& log.writer &
+
+# Start READER
+echo "-- Start READER on $READPROC PEs."
+mpirun -np $READPROC ./coupling_reader_2D $RPX $RPY $READMETHOD 1 >& log.reader &
+
+echo "-- Wait until all applications exit. Run ./check.sh to see status"
+wait
+rm -f conf
+
diff --git a/examples/coupling/.svn/tmp/tempfile.2.tmp b/examples/coupling/.svn/tmp/tempfile.2.tmp
new file mode 100644
index 0000000..b69bd0d
--- /dev/null
+++ b/examples/coupling/.svn/tmp/tempfile.2.tmp
@@ -0,0 +1,89 @@
+#!/bin/bash
+#PBS -A STF006
+#PBS -N genarray
+#PBS -j oe
+#PBS -l walltime=1:00:00,size=20
+## On jaguarpf, you need size=48 (4 nodes * 12cores for 4 apruns)
+
+#cd $PBS_O_WORKDIR
+
+# Number of writers (WPX*WPY = WRITEPROC)
+WRITEPROC=16
+WPX=4
+WPY=4
+# Number of staging processes, if staging is used
+STAGINGPROC=4
+# Number of readers (RPX*RPY = READPROC)
+READPROC=9
+RPX=3
+RPY=3
+
+
+let "WP=WPX*WPY"
+if [ $WP -ne $WRITEPROC ]; then
+    echo "WPX*WPY != WRITEPROC: " $WP and $WRITEPROC
+    exit 1
+fi
+
+let "RP=RPX*RPY"
+if [ $RP -ne $READPROC ]; then
+    echo "RPX*RPY != READPROC: " $RP and $READPROC
+    exit 1
+fi
+
+
+# clean-up
+rm -f log.* draw* core* conf dataspaces.conf srv.lck
+rm -f writer.bp reader_0*.bp
+
+METHOD=`grep "<transport .*method=" coupling_writer_2D.xml | sed -e "s/^.*method=\"\([A-Z]*\).*/\1/"`
+echo "The selected coupling method in coupling_writer_2D.xml is: $METHOD"
+
+if [ "x$METHOD" == "xDATASPACES" ]; then
+    READMETHOD="DATASPACES"
+    let "PROCALL=WRITEPROC+READPROC"
+
+    # Prepare config file for DataSpaces
+    echo "## Config file for DataSpaces
+ndim = 3
+dimx = 1000
+dimy = 1000
+dimz = 1000
+max_versions = 10
+" > dataspaces.conf
+
+    # Run DataSpaces
+    SERVER=/ccs/proj/e2e/dataspaces/sith/pgi/bin/dataspaces_server
+    echo "-- Start DataSpaces server "$SERVER" on $STAGINGPROC PEs, -s$STAGINGPROC -c$PROCALL"
+    mpirun -np $STAGINGPROC $SERVER -s$STAGINGPROC -c$PROCALL &> log.server &
+
+    ## Give some time for the servers to load and startup
+    sleep 1s
+    while [ ! -f conf ]; do
+        echo "-- File conf is not yet available from server. Sleep more"
+        sleep 1s
+    done
+    sleep 10s  # wait server to fill up the conf file
+
+    ## Export the main server config to the environment
+    while read line; do
+        export set "${line}"
+    done < conf
+
+    echo "-- DataSpaces Portals IDs: P2TNID = $P2TNID   P2TPID = $P2TPID"
+else
+    READMETHOD="FILE"
+fi
+
+# Start WRITER
+echo "-- Start WRITER on $WRITEPROC PEs"
+mpirun -np $WRITEPROC ./coupling_writer_2D $WPX $WPY 10 10 5  >& log.writer &
+
+# Start READER
+echo "-- Start READER on $READPROC PEs."
+mpirun -np $READPROC ./coupling_reader_2D $RPX $RPY $READMETHOD 1 >& log.reader &
+
+echo "-- Wait until all applications exit. Run ./check.sh to see status"
+wait
+rm -f conf
+
diff --git a/examples/coupling/.svn/tmp/tempfile.tmp b/examples/coupling/.svn/tmp/tempfile.tmp
new file mode 100644
index 0000000..b69bd0d
--- /dev/null
+++ b/examples/coupling/.svn/tmp/tempfile.tmp
@@ -0,0 +1,89 @@
+#!/bin/bash
+#PBS -A STF006
+#PBS -N genarray
+#PBS -j oe
+#PBS -l walltime=1:00:00,size=20
+## On jaguarpf, you need size=48 (4 nodes * 12cores for 4 apruns)
+
+#cd $PBS_O_WORKDIR
+
+# Number of writers (WPX*WPY = WRITEPROC)
+WRITEPROC=16
+WPX=4
+WPY=4
+# Number of staging processes, if staging is used
+STAGINGPROC=4
+# Number of readers (RPX*RPY = READPROC)
+READPROC=9
+RPX=3
+RPY=3
+
+
+let "WP=WPX*WPY"
+if [ $WP -ne $WRITEPROC ]; then
+    echo "WPX*WPY != WRITEPROC: " $WP and $WRITEPROC
+    exit 1
+fi
+
+let "RP=RPX*RPY"
+if [ $RP -ne $READPROC ]; then
+    echo "RPX*RPY != READPROC: " $RP and $READPROC
+    exit 1
+fi
+
+
+# clean-up
+rm -f log.* draw* core* conf dataspaces.conf srv.lck
+rm -f writer.bp reader_0*.bp
+
+METHOD=`grep "<transport .*method=" coupling_writer_2D.xml | sed -e "s/^.*method=\"\([A-Z]*\).*/\1/"`
+echo "The selected coupling method in coupling_writer_2D.xml is: $METHOD"
+
+if [ "x$METHOD" == "xDATASPACES" ]; then
+    READMETHOD="DATASPACES"
+    let "PROCALL=WRITEPROC+READPROC"
+
+    # Prepare config file for DataSpaces
+    echo "## Config file for DataSpaces
+ndim = 3
+dimx = 1000
+dimy = 1000
+dimz = 1000
+max_versions = 10
+" > dataspaces.conf
+
+    # Run DataSpaces
+    SERVER=/ccs/proj/e2e/dataspaces/sith/pgi/bin/dataspaces_server
+    echo "-- Start DataSpaces server "$SERVER" on $STAGINGPROC PEs, -s$STAGINGPROC -c$PROCALL"
+    mpirun -np $STAGINGPROC $SERVER -s$STAGINGPROC -c$PROCALL &> log.server &
+
+    ## Give some time for the servers to load and startup
+    sleep 1s
+    while [ ! -f conf ]; do
+        echo "-- File conf is not yet available from server. Sleep more"
+        sleep 1s
+    done
+    sleep 10s  # wait server to fill up the conf file
+
+    ## Export the main server config to the environment
+    while read line; do
+        export set "${line}"
+    done < conf
+
+    echo "-- DataSpaces Portals IDs: P2TNID = $P2TNID   P2TPID = $P2TPID"
+else
+    READMETHOD="FILE"
+fi
+
+# Start WRITER
+echo "-- Start WRITER on $WRITEPROC PEs"
+mpirun -np $WRITEPROC ./coupling_writer_2D $WPX $WPY 10 10 5  >& log.writer &
+
+# Start READER
+echo "-- Start READER on $READPROC PEs."
+mpirun -np $READPROC ./coupling_reader_2D $RPX $RPY $READMETHOD 1 >& log.reader &
+
+echo "-- Wait until all applications exit. Run ./check.sh to see status"
+wait
+rm -f conf
+
diff --git a/examples/coupling/Makefile b/examples/coupling/Makefile
new file mode 100644
index 0000000..2e1fdf8
--- /dev/null
+++ b/examples/coupling/Makefile
@@ -0,0 +1,45 @@
+## MPIF90 SETTINGS
+FC=mpif90
+FFLAGS=-g
+
+## FTN SETTINGS
+#FC=ftn
+#FFLAGS = -O3
+
+#TARGET=gnu
+TARGET=pgi
+
+## Set ADIOS_DIR here or before doing make
+override ADIOS_DIR:=/ccs/proj/e2e/pnorbert/ADIOS/sith.${TARGET}
+override ADIOS_INC:=` ${ADIOS_DIR}/bin/adios_config -c -f`
+override ADIOS_FLIB:=`${ADIOS_DIR}/bin/adios_config -l -f`
+override GPP = ${ADIOS_DIR}/bin/gpp.py
+
+default: coupling_writer_2D coupling_reader_2D
+all: default
+
+coupling_writer_2D.o : coupling_writer_2D.F90 gwrite_writer2D.fh
+	${FC} -g -c ${ADIOS_INC} coupling_writer_2D.F90  $<
+
+coupling_writer_2D:  coupling_writer_2D.o gwrite_writer2D.fh
+	${FC} -g -o coupling_writer_2D coupling_writer_2D.o ${ADIOS_FLIB} 
+
+gwrite_writer2D.fh: coupling_writer_2D.xml
+	${GPP} coupling_writer_2D.xml
+
+coupling_reader_2D.o : coupling_reader_2D.F90 gwrite_reader2D.fh
+	${FC} -g -c ${ADIOS_INC} coupling_reader_2D.F90  $<
+
+coupling_reader_2D:  coupling_reader_2D.o gwrite_reader2D.fh
+	${FC} -g -o coupling_reader_2D coupling_reader_2D.o ${ADIOS_FLIB} 
+
+gwrite_reader2D.fh: coupling_reader_2D.xml
+	${GPP} coupling_reader_2D.xml
+
+
+clean:
+	rm -f *.o *.mod *.fh core.* 
+	rm -f coupling_writer_2D coupling_reader_2D
+        
+distclean: clean
+	rm -f log.* dataspaces.conf conf srv.lck *.bp
diff --git a/examples/coupling/README b/examples/coupling/README
new file mode 100644
index 0000000..fdb54d4
--- /dev/null
+++ b/examples/coupling/README
@@ -0,0 +1,132 @@
+REQUIREMENTS:
+    - ADIOS 1.4.1: http://www.olcf.ornl.gov/center-projects/adios
+    - Fortran 90 compiler
+    - MPI
+
+BUILD:
+    - Install ADIOS
+    - In Makefile, set ADIOS_DIR to the installation directory
+    - also set the MPI/F90 compiler name (e.g. mpif90 or ftn)
+    - run make
+
+
+1. Run the writer 
+=================
+ 2x2 processes write 4x5 blocks (8x10 global array), 5 timesteps
+
+$ mpirun -np 4 ./coupling_writer_2D 2 2 4 5 5
+ Process number        : 2 x 2
+ Array size per process: 4 x 5
+rank=0: 2D array pos: 0,0 offset: 0,0
+rank=1: 2D array pos: 1,0 offset: 4,0
+rank=2: 2D array pos: 0,1 offset: 0,5
+rank=3: 2D array pos: 1,1 offset: 4,5
+rank=1 set matrix to   1.01
+rank=0 set matrix to   0.01
+  Output file: writer_001.bp
+rank=2 set matrix to   2.01
+rank=3 set matrix to   3.01
+rank=1: ----------------------  write completed ----------------------
+rank=2: ----------------------  write completed ----------------------
+rank=3: ----------------------  write completed ----------------------
+rank=0: ----------------------  write completed ----------------------
+...
+
+
+2. Check the output
+===================
+
+$ bpls -l writer.bp 
+  integer  /info/nproc  5*scalar = 4 / 4 
+  integer  /info/npx    5*scalar = 2 / 2 
+  integer  /info/npy    5*scalar = 2 / 2 
+  integer  /gdx         5*scalar = 8 / 8 
+  integer  /gdy         5*scalar = 10 / 10 
+  integer  /aux/ox      5*scalar = 0 / 0 
+  integer  /aux/oy      5*scalar = 0 / 0 
+  integer  /aux/ldx     5*scalar = 4 / 4 
+  integer  /aux/ldy     5*scalar = 5 / 5 
+  double   /xy          5*{10, 8} = 0.01 / 3.05 / 1.53 / 1.11812 
+
+Note that F90 app writes 8x10 arrays in Fortran column-order, 
+which is 10x8 in C row-order. bpls sees/shows the C ordering 
+because it is a C program.  The reader below sees 8x10 Fortran
+array because it is a Fortan program.
+
+
+3. Run the reader
+=================
+
+$ mpirun -np 3 ./coupling_reader_2D 1 3 MPI 1 1
+ Process number        : 1 x 3
+ Method for reading: 0
+  Input file: writer.bp
+rank=0: Read in gdx and gdy, step1 from writer.bp
+rank=2: Read in gdx and gdy, step1 from writer.bp
+rank=1: Read in gdx and gdy, step1 from writer.bp
+rank=0: Read in xy(1:2,1:10) from writer.bp
+rank=2: Read in xy(5:8,1:10) from writer.bp
+rank=1: Read in xy(3:4,1:10) from writer.bp
+rank=1: Collectively wrote xy and new xy2 to reader_001.bp
+rank=2: Collectively wrote xy and new xy2 to reader_001.bp
+rank=0: Collectively wrote xy and new xy2 to reader_001.bp
+rank=2: Read in gdx and gdy, step2 from writer.bp
+rank=0: Read in gdx and gdy, step2 from writer.bp
+rank=1: Read in gdx and gdy, step2 from writer.bp
+rank=0: Read in xy(1:2,1:10) from writer.bp
+rank=2: Read in xy(5:8,1:10) from writer.bp
+rank=1: Read in xy(3:4,1:10) from writer.bp
+rank=2: Collectively wrote xy and new xy2 to reader_002.bp
+rank=1: Collectively wrote xy and new xy2 to reader_002.bp
+rank=0: Collectively wrote xy and new xy2 to reader_002.bp
+...
+
+
+4. Check the output
+===================
+
+$ bpls -l reader_001.bp 
+  integer  /info/rank  scalar = 0 
+  integer  /gdx        scalar = 8 
+  integer  /gdy        scalar = 10 
+  integer  /aux/ldx    scalar = 2 
+  integer  /aux/ldy    scalar = 10 
+  integer  /aux/ox     scalar = 0 
+  integer  /aux/oy     scalar = 0 
+  double   /xy         {10, 8} = 0.01 / 3.01 / 1.51 / 1.11803 
+  double   /xy2        {10, 8} = 0.0001 / 2.0301 / 1.2651 / 0.833742 
+
+
+xy in the two files should match:
+
+
+$ bpls -l reader_001.bp -d xy -n 8
+  double     /xy         {10, 8} = 0.01 / 3.01 / 1.51 / 1.11803 
+    (0,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (1,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (2,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (3,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (4,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (5,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (6,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (7,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (8,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (9,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+
+$ bpls -l writer.bp -d xy -n 8 -c "1,-1,-1"
+  double   /xy          5*{10, 8} = 0.01 / 3.05 / 1.53 / 1.11812 
+    slice (0:0, 0:9, 0:7)
+    (0,0,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,1,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,2,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,3,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,4,0)    0.01 0.01 0.01 0.01 1.01 1.01 1.01 1.01 
+    (0,5,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (0,6,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (0,7,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (0,8,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+    (0,9,0)    2.01 2.01 2.01 2.01 3.01 3.01 3.01 3.01 
+
+
+
+
diff --git a/examples/coupling/coupling_reader_2D.F90 b/examples/coupling/coupling_reader_2D.F90
new file mode 100644
index 0000000..3f546ac
--- /dev/null
+++ b/examples/coupling/coupling_reader_2D.F90
@@ -0,0 +1,321 @@
+!  
+!  ADIOS is freely available under the terms of the BSD license described
+!  in the COPYING file in the top level directory of this source distribution.
+!
+!  Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+!
+
+!
+!  Coupling writer/reader
+!
+!  Read a 2D array 
+!  to/from a file or from/to another coupling code using DataSpaces/ADIOS
+!
+!  npx * npy     processes write a 2D array, where each process writes an
+!  
+!  Data written
+!    xy          2D global array as received from the writers
+!    xy2         2D array with block,* decomp
+!
+!    All data are real*8 type
+!
+! (c) Oak Ridge National Laboratory, 2009
+! Author: Norbert Podhorszki
+!
+module coupling_reader_2D_comm
+    ! arguments
+    integer :: npx, npy, npz  ! # of processors in x-y-z direction
+    integer :: read_method    ! 0=bp, 1=hdf5, 2=dart, 3=dimes
+    integer :: read_mode      ! 0=whole array on each process
+                              ! 1=1D decomposition on 1st dim
+
+    integer :: nproc          ! number of processors
+
+    real*8, dimension(:,:),   allocatable :: xy, xy2
+
+    ! Offsets and sizes
+    integer :: ox, oy
+    integer :: ldx, ldy
+    integer :: gdx, gdy
+
+    ! MPI variables
+    integer :: group_comm, self_comm
+    integer :: rank
+    integer :: ierr
+
+    ! ADIOS variables
+    character (len=200) :: group
+    !character (len=6)   :: nprocstr
+    integer*8 :: adios_totalsize, adios_groupsize, adios_buf_size
+    integer   :: adios_err
+    integer*8 :: inh ! input file handle
+    integer*8 :: adios_handle ! output file handle (used by gwrite too)
+    character(len=256)  :: infn ! filename
+    
+    integer   :: wts  ! writer's output timestep index (read from 1,2...)
+    logical, parameter   :: dump_text = .true.
+
+end module coupling_reader_2D_comm
+
+
+program coupling
+    use coupling_reader_2D_comm
+    use adios_read_mod
+    implicit none
+    include 'mpif.h'
+
+    call MPI_Init (ierr)
+    call MPI_Comm_dup (MPI_COMM_WORLD, group_comm, ierr)
+    call MPI_Comm_dup (MPI_COMM_SELF, self_comm, ierr)
+    call MPI_Comm_rank (MPI_COMM_WORLD, rank, ierr)
+    call MPI_Comm_size (group_comm, nproc , ierr)
+
+    call processArgs()
+    if (rank == 0) then
+        print '(" Process number        : ",i0," x ",i0)',  npx,npy
+        print '(" Method for reading: ",i0)',  read_method
+
+        if (nproc .ne. npx*npy) then
+            print '(" Error: Number of processors ",i0,"does not match N*M=",i0)', nproc, npx*npy
+            call exit(1)
+        endif
+    endif
+
+    write (infn,'("writer.bp")')
+    if (rank==0)    print *, " Input file: "//trim(infn)
+
+
+    call adios_read_init_method (read_method, group_comm, "verbose=3; app_id=2; poll_interval=1000", ierr);
+    call adios_init("coupling_reader_2D.xml", ierr)
+    !call MPI_Barrier (group_comm, ierr)
+
+    !write (*,*) 'rank ', rank, "init completed"
+    !write (nprocstr,'(i0)') nproc
+
+    call adios_read_open_stream (inh, infn, read_method, group_comm, ADIOS_LOCKMODE_CURRENT, 30.0, ierr)
+    if (ierr .ne. 0) then
+        print '(" Failed to open stream: ",a0)', infn
+        print '(" open stream ierr=: ",i0)', ierr
+        call exit(1)
+    endif
+
+    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    wts = 1  ! start reading from writer's 1st step
+    do while (ierr==0)
+        call readArrays()
+        call adios_release_step(inh, ierr)
+        call printArrays()
+        call advanceArrays()
+        call MPI_Barrier (MPI_COMM_WORLD, ierr)
+        call adios_advance_step(inh, 0, 10.0, ierr)
+        if (ierr==err_end_of_stream .and. rank==0) then
+            print *, " Stream has terminated. Quit reader"
+        elseif (ierr==err_step_notready .and. rank==0) then
+            print *, " Next step has not arrived for a while. Assume termination" 
+        endif
+        wts = wts+1
+    enddo
+    call adios_read_close (inh, ierr)
+
+    ! Terminate
+    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    call adios_read_finalize_method (read_method, ierr)
+    call adios_finalize (rank, ierr)
+    call MPI_Finalize (ierr)
+end program coupling
+
+
+
+!!***************************
+subroutine readArrays()
+    use coupling_reader_2D_comm
+    use adios_read_mod
+    implicit none
+    integer             :: i,j,k
+    integer*8           :: sel
+    integer*8, dimension(3) :: offset, readsize
+
+
+    offset = 0
+    readsize = 1
+    call adios_selection_boundingbox (sel, 0, offset, readsize)
+
+    ! read gdx and gdy
+    print '("rank=",i0,": Read in gdx and gdy, step",i0," from ",a)', rank, wts, trim(infn)
+    call adios_schedule_read (inh, sel, "gdx", 1, 1, gdx, ierr)
+    call adios_schedule_read (inh, sel, "gdy", 1, 1, gdy, ierr)
+    call adios_perform_reads (inh, ierr)
+    call adios_selection_delete (sel)
+
+    ! Calculate the local x,y offsets
+    if (read_mode == 0) then
+        ! each process reads the whole array
+        ldx = gdx
+        ldy = gdy
+        ox = 0
+        oy = 0
+    elseif (read_mode == 1) then
+        ldx = gdx / nproc 
+        ldy = gdy
+        ox = rank * ldx
+        oy = 0
+        ! last process should read all the rest of columns
+        if (rank == nproc-1) then
+            ldx = gdx - ldx*(nproc-1)
+        endif
+    endif
+
+
+    if (.not. allocated(xy)) then
+        allocate( xy  (1:ldx, 1:ldy) )
+        allocate( xy2 (1:ldx, 1:ldy) )
+    endif
+    xy = -1.0 ! should be overwritten at reading the array next
+
+
+    ! Read in the whole xy array
+    readsize(1) = ldx
+    readsize(2) = ldy
+    offset(1)   = ox
+    offset(2)   = oy
+    call adios_selection_boundingbox (sel, 2, offset, readsize)
+    print '("rank=",i0,": Read in xy(",i0,":",i0,",",i0,":",i0,") from ",a)', rank, &
+            offset(1)+1, offset(1)+readsize(1), &
+            offset(2)+1, offset(2)+readsize(2),trim(infn)
+    call adios_schedule_read (inh, sel, "xy", 1, 1, xy, ierr)
+    call adios_perform_reads (inh, ierr)
+    call adios_selection_delete (sel)
+
+    do j=1,ldy
+        do i=1,ldx
+            xy2(i,j) = rank*1.0 + xy(i,j)/100.0
+        enddo
+    enddo
+    
+
+    call MPI_Barrier (group_comm, ierr)
+
+end subroutine readArrays
+
+!!***************************
+subroutine printArrays()
+    use coupling_reader_2D_comm
+    use adios_write_mod
+    implicit none
+    integer, parameter  :: u=20
+    character(len=256)  :: outfn
+    integer             :: i,j,k,writer
+
+    if (read_mode == 0) then
+
+        writer = mod(wts,nproc)
+        if (writer == rank) then
+    
+            write (outfn, '("reader_",i3.3,".bp")') wts
+            call adios_open (adios_handle, "reader2D", outfn, "w", self_comm, adios_err)
+#include "gwrite_reader2D.fh"
+            ! start streaming from buffer to disk
+            call adios_close (adios_handle, adios_err)
+            print '("rank=",i0,": One process wrote xy and new xy2 to ",a)', rank, trim(outfn)
+    
+        endif
+    
+        if (dump_text) then
+    
+            write (outfn, '("reader_",i3.3,"_",i0,".txt")') wts, rank
+            open (u, FILE=outfn, STATUS='NEW', FORM="FORMATTED")
+    
+            ! print xyz_bbb
+            write (u,'("xy(1:",i0,",1:",i0,") = ")') ldx, ldy
+            do j=1,ldy
+                do i=1,ldx
+                    write (u, '(f6.2," ",$)') xy(i,j)
+                enddo
+                write (u,*) " "  ! new line
+            enddo
+    
+            close (u)
+    
+        endif
+
+    elseif (read_mode ==1) then
+            write (outfn, '("reader_",i3.3,".bp")') wts
+            call adios_open (adios_handle, "reader2D", outfn, "w", group_comm, adios_err)
+#include "gwrite_reader2D.fh"
+            ! start streaming from buffer to disk
+            call adios_close (adios_handle, adios_err)
+            print '("rank=",i0,": Collectively wrote xy and new xy2 to ",a)', rank, trim(outfn)
+    endif
+
+end subroutine printArrays
+
+!!***************************
+subroutine advanceArrays()
+    use coupling_reader_2D_comm
+    implicit none
+
+    xy = 0.9 * xy
+    xy2 = 0.9 * xy2
+
+end subroutine advanceArrays
+
+
+!!***************************
+subroutine usage()
+    print *, "Usage: coupling_reader_2D N M method read-mode"
+    print *, "N:           number of processes in X dimension"
+    print *, "M:           number of processes in Y dimension"
+    print *, "read method: DATASPACES or DIMES for memory-to-memory coupling,"
+    print *, "             otherwise file-based"
+    print *, "read-mode:   0: each process reads whole global array"
+    print *, "             1: 1D decomposition in 1st dimension"
+end subroutine usage
+
+!!***************************
+subroutine processArgs()
+    use coupling_reader_2D_comm
+    use adios_read_mod
+
+#ifndef __GFORTRAN__
+#ifndef __GNUC__
+    interface
+         integer function iargc()
+         end function iargc
+    end interface
+#endif
+#endif
+
+    character(len=256) :: npx_str, npy_str, method_str, mode_str, ts_str
+    integer :: numargs
+
+    !! process arguments
+    numargs = iargc()
+    !print *,"Number of arguments:",numargs
+    if ( numargs < 4 ) then
+        call usage()
+        call exit(1)
+    endif
+    call getarg(1, npx_str)
+    call getarg(2, npy_str)
+    read (npx_str,'(i5)') npx
+    read (npy_str,'(i5)') npy
+
+    call getarg(3, method_str)
+    if (trim(method_str) .eq. "DATASPACES") then
+        read_method = ADIOS_READ_METHOD_DATASPACES 
+    elseif (trim(method_str) .eq. "DIMES") then
+        read_method = ADIOS_READ_METHOD_DIMES 
+    else
+        read_method = ADIOS_READ_METHOD_BP
+    endif
+
+    call getarg(4, mode_str)
+    read (mode_str,'(i5)') read_mode
+    if (read_mode < 0 .or. read_mode > 1) then
+        print *, "Argument error: read_mode must be 0 or 1"
+        call usage()
+        call exit(2)
+    endif
+
+
+end subroutine processArgs
diff --git a/examples/coupling/coupling_reader_2D.xml b/examples/coupling/coupling_reader_2D.xml
new file mode 100644
index 0000000..29c1422
--- /dev/null
+++ b/examples/coupling/coupling_reader_2D.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<adios-config host-language="Fortran">
+
+  <!-- Group to write the whole array from a single processor -->
+  <adios-group name="reader2D" coordination-communicator="group_comm">
+    <var name="rank" path="/info" type="integer"/>
+    <var name="gdx"  path="" type="integer"/>
+    <attribute name="description" path="/gdx" value="Global array size in x dimension"/>
+    <var name="gdy"  path="" type="integer"/>
+    <attribute name="description" path="/gdy" value="Global array size in y dimension"/>
+    <var name="ldx" path="/aux" type="integer"/>
+    <var name="ldy" path="/aux" type="integer"/>
+    <var name="ox" path="/aux" type="integer"/>
+    <var name="oy" path="/aux" type="integer"/>
+
+    <!-- 2D array to write with block,block decomposition -->
+    <global-bounds dimensions="gdx,gdy" offsets="ox,oy">
+        <var name="xy"  path="" type="double" dimensions="ldx,ldy"/>
+        <var name="xy2" path="" type="double" dimensions="ldx,ldy"/>
+    </global-bounds>
+  </adios-group>
+
+  <transport group="reader2D" method="MPI"/>
+
+  <buffer size-MB="400" allocate-time="now"/>
+
+</adios-config>
diff --git a/examples/coupling/coupling_writer_2D.F90 b/examples/coupling/coupling_writer_2D.F90
new file mode 100644
index 0000000..7b6521e
--- /dev/null
+++ b/examples/coupling/coupling_writer_2D.F90
@@ -0,0 +1,214 @@
+!  
+!  ADIOS is freely available under the terms of the BSD license described
+!  in the COPYING file in the top level directory of this source distribution.
+!
+!  Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+!
+
+!
+!  Coupling writer/reader
+!
+!  Write a 2D array 
+!  to/from a file or from/to another coupling code using DataSpaces/ADIOS
+!
+!  npx * npy        processes write a 2D array, where each process writes an
+!  ldx * ldy        piece with filling with its rank as real*8 value
+!  
+!  Data written
+!    xy         2D array with block,block decomp
+!
+!    All data are real*8 type
+!
+! (c) Oak Ridge National Laboratory, 2009
+! Author: Norbert Podhorszki
+!
+module coupling_writer_2D_comm
+    ! arguments
+    integer :: npx, npy, npz  ! # of processors in x-y-z direction
+    integer :: ldx, ldy, ldz  ! size of array per processor
+    integer :: timesteps      ! number of timesteps to run
+
+    integer :: nproc          ! number of processors
+
+    real*8, dimension(:,:),   allocatable :: xy
+
+    ! Offsets and sizes
+    integer :: ox, oy
+    integer :: gdx, gdy
+
+    ! MPI variables
+    integer :: group_comm
+    integer :: rank
+    integer :: ierr
+
+    ! ADIOS variables
+    character (len=200) :: group
+    !character (len=6)   :: nprocstr
+    integer*8 :: adios_handle, adios_totalsize, adios_groupsize, adios_buf_size
+    integer   :: adios_err
+
+    ! actual timestep
+    integer   :: ts 
+
+end module coupling_writer_2D_comm
+
+
+program coupling
+    use coupling_writer_2D_comm
+    use adios_write_mod
+    implicit none
+    include 'mpif.h'
+    integer :: t
+
+    call MPI_Init (ierr)
+    call MPI_Comm_dup (MPI_COMM_WORLD, group_comm, ierr)
+    call MPI_Comm_rank (MPI_COMM_WORLD, rank, ierr)
+    call MPI_Comm_size (group_comm, nproc , ierr)
+
+    call adios_init ("coupling_writer_2D.xml", ierr)
+    !call MPI_Barrier (group_comm, ierr)
+
+    call processArgs()
+    if (rank == 0) then
+        print '(" Process number        : ",i0," x ",i0)',  npx,npy
+        print '(" Array size per process: ",i0," x ",i0)',  ldx,ldy
+
+        if (nproc .ne. npx*npy) then
+            print '(" Error: Number of processors ",i0,"does not match N*M=",i0)', nproc, npx*npy
+            call exit(1)
+        endif
+    endif
+
+    !write (*,*) 'rank ', rank, "init completed"
+    !write (nprocstr,'(i0)') nproc
+
+    ! Calculate global size
+    call allocateLocalArrays()
+    !call sleep(60)
+    do ts=1,timesteps
+        call generateLocalArrays()
+        call writeArrays()
+        call MPI_Barrier (MPI_COMM_WORLD, ierr)
+        !print '("rank=",i0," goes to sleep after step ",i0)', rank, ts
+        if (ts < timesteps) call sleep(2)
+        !print '("rank=",i0," woke up")', rank
+    enddo
+
+    ! Terminate
+    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    call adios_finalize (rank, adios_err)
+    call MPI_Finalize (ierr)
+end program coupling
+
+
+!!***************************
+subroutine allocateLocalArrays()
+    use coupling_writer_2D_comm
+    implicit none
+    integer :: posx, posy, posz ! position index in the array
+    integer :: i,j,k
+
+
+!!  2D array with block,block decomposition
+    posx = mod(rank, npx)     ! 1st dim easy: 0, npx, 2npx... are in the same X position
+    posy = rank/npx           ! 2nd dim: npx processes belong into one dim
+    ox = posx * ldx
+    oy = posy * ldy
+    gdx  = npx * ldx
+    gdy  = npy * ldy
+
+    print '("rank=",i0,": 2D array pos: ",i0,",",i0," offset: ",i0,",",i0)',  &
+             rank, posx, posy, ox, oy
+
+    allocate( xy(1:ldx, 1:ldy) )
+
+end subroutine allocateLocalArrays
+
+!!***************************
+subroutine generateLocalArrays()
+    use coupling_writer_2D_comm
+    implicit none
+
+    print '("rank=",i0," set matrix to ",f6.2)', rank, 1.0*rank+0.01*ts
+    xy = 1.0*rank + 0.01*ts
+    !xy = 1.0*rank + 1.0*ts
+
+end subroutine generateLocalArrays
+
+!!***************************
+subroutine writeArrays()
+    use coupling_writer_2D_comm
+    use adios_write_mod
+    implicit none
+    character(len=256) :: fn
+    ! Write out data using ADIOS
+
+    write (fn,'("writer.bp")')
+    if (rank == 0) print *, " Output file: "//trim(fn)
+    if (ts == 1) then
+        call adios_open (adios_handle, "writer2D", fn, "w", group_comm, adios_err)
+    else
+        call adios_open (adios_handle, "writer2D", fn, "a", group_comm, adios_err)
+    endif
+
+#include "gwrite_writer2D.fh"
+
+    ! start streaming from buffer to disk
+    call adios_close (adios_handle, adios_err)
+    print '("rank=",i0,": ----------------------  write completed ----------------------")', rank
+end subroutine writeArrays
+
+
+!!***************************
+subroutine usage()
+    print *, "Usage: coupling_writer_2D N M nx ny [timesteps]"
+    print *, "N:      number of processes in X dimension"
+    print *, "M:      number of processes in Y dimension"
+    print *, "nx:     local array size in X dimension per processor"
+    print *, "ny:     local array size in Y dimension per processor"
+    print *, "timesteps: how many times to write data"
+end subroutine usage
+
+!!***************************
+subroutine processArgs()
+    use coupling_writer_2D_comm
+
+#ifndef __GFORTRAN__
+#ifndef __GNUC__
+    interface
+         integer function iargc()
+         end function iargc
+    end interface
+#endif
+#endif
+
+    character(len=256) :: npx_str, npy_str, npz_str, ldx_str, ldy_str, ldz_str, ts_str
+    integer :: numargs
+
+    !! process arguments
+    numargs = iargc()
+    !print *,"Number of arguments:",numargs
+    if ( numargs < 4 ) then
+        call usage()
+        call exit(1)
+    endif
+    call getarg(1, npx_str)
+    call getarg(2, npy_str)
+    !call getarg(4, npz_str)
+    read (npx_str,'(i5)') npx
+    read (npy_str,'(i5)') npy
+    !read (npz_str,'(i5)') npz
+    call getarg(3, ldx_str)
+    call getarg(4, ldy_str)
+    !call getarg(7, ldz_str)
+    read (ldx_str,'(i6)') ldx
+    read (ldy_str,'(i6)') ldy
+    !read (ldz_str,'(i6)') ldz
+    if ( numargs == 5 ) then
+        call getarg(5, ts_str)
+        read (ts_str,'(i6)') timesteps
+    else
+        timesteps = 1
+    endif
+
+end subroutine processArgs
diff --git a/examples/coupling/coupling_writer_2D.xml b/examples/coupling/coupling_writer_2D.xml
new file mode 100644
index 0000000..a46eda3
--- /dev/null
+++ b/examples/coupling/coupling_writer_2D.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<adios-config host-language="Fortran">
+  <adios-group name="writer2D">
+
+    <var name="nproc" path="/info" type="integer"/>
+    <attribute name="description" path="/info/nproc" value="Number of writers"/>
+    <var name="npx"   path="/info" type="integer"/>
+    <attribute name="description" path="/info/npx" value="Number of processors in x dimension"/>
+    <var name="npy"   path="/info" type="integer"/>
+    <attribute name="description" path="/info/npy" value="Number of processors in y dimension"/>
+
+    <var name="gdx"  path="" type="integer"/>
+    <attribute name="description" path="/gdx" value="Global array size in x dimension"/>
+    <var name="gdy"  path="" type="integer"/>
+    <attribute name="description" path="/gdy" value="Global array size in y dimension"/>
+
+    <!-- Auxiliary variables for global array indexing written (overwritten) by each process -->
+    <var name="ox"   path="/aux" type="integer"/>
+    <var name="oy"   path="/aux" type="integer"/>
+    <var name="ldx"  path="/aux" type="integer"/>
+    <var name="ldy"  path="/aux" type="integer"/>
+
+    <!-- 2D array to write with block,block decomposition -->
+    <global-bounds dimensions="gdx,gdy" offsets="ox,oy">
+        <var name="xy" path="" type="double" dimensions="ldx,ldy"/>
+    </global-bounds>
+    <attribute name="description" path="/xy" 
+               value="2D array with 2D decomposition"/>
+
+  </adios-group>
+
+  <!-- Use transport method 
+       DART for memory-to-memory coupling or
+       MPI  for file-based coupling
+  -->
+  <transport group="writer2D" method="MPI">verbose=3</transport>
+  <!--transport group="writer2D" method="DATASPACES">verbose=3</transport-->
+
+  <buffer size-MB="40" allocate-time="now"/>
+
+</adios-config>
diff --git a/examples/coupling/job b/examples/coupling/job
new file mode 100755
index 0000000..b69bd0d
--- /dev/null
+++ b/examples/coupling/job
@@ -0,0 +1,89 @@
+#!/bin/bash
+#PBS -A STF006
+#PBS -N genarray
+#PBS -j oe
+#PBS -l walltime=1:00:00,size=20
+## On jaguarpf, you need size=48 (4 nodes * 12cores for 4 apruns)
+
+#cd $PBS_O_WORKDIR
+
+# Number of writers (WPX*WPY = WRITEPROC)
+WRITEPROC=16
+WPX=4
+WPY=4
+# Number of staging processes, if staging is used
+STAGINGPROC=4
+# Number of readers (RPX*RPY = READPROC)
+READPROC=9
+RPX=3
+RPY=3
+
+
+let "WP=WPX*WPY"
+if [ $WP -ne $WRITEPROC ]; then
+    echo "WPX*WPY != WRITEPROC: " $WP and $WRITEPROC
+    exit 1
+fi
+
+let "RP=RPX*RPY"
+if [ $RP -ne $READPROC ]; then
+    echo "RPX*RPY != READPROC: " $RP and $READPROC
+    exit 1
+fi
+
+
+# clean-up
+rm -f log.* draw* core* conf dataspaces.conf srv.lck
+rm -f writer.bp reader_0*.bp
+
+METHOD=`grep "<transport .*method=" coupling_writer_2D.xml | sed -e "s/^.*method=\"\([A-Z]*\).*/\1/"`
+echo "The selected coupling method in coupling_writer_2D.xml is: $METHOD"
+
+if [ "x$METHOD" == "xDATASPACES" ]; then
+    READMETHOD="DATASPACES"
+    let "PROCALL=WRITEPROC+READPROC"
+
+    # Prepare config file for DataSpaces
+    echo "## Config file for DataSpaces
+ndim = 3
+dimx = 1000
+dimy = 1000
+dimz = 1000
+max_versions = 10
+" > dataspaces.conf
+
+    # Run DataSpaces
+    SERVER=/ccs/proj/e2e/dataspaces/sith/pgi/bin/dataspaces_server
+    echo "-- Start DataSpaces server "$SERVER" on $STAGINGPROC PEs, -s$STAGINGPROC -c$PROCALL"
+    mpirun -np $STAGINGPROC $SERVER -s$STAGINGPROC -c$PROCALL &> log.server &
+
+    ## Give some time for the servers to load and startup
+    sleep 1s
+    while [ ! -f conf ]; do
+        echo "-- File conf is not yet available from server. Sleep more"
+        sleep 1s
+    done
+    sleep 10s  # wait server to fill up the conf file
+
+    ## Export the main server config to the environment
+    while read line; do
+        export set "${line}"
+    done < conf
+
+    echo "-- DataSpaces Portals IDs: P2TNID = $P2TNID   P2TPID = $P2TPID"
+else
+    READMETHOD="FILE"
+fi
+
+# Start WRITER
+echo "-- Start WRITER on $WRITEPROC PEs"
+mpirun -np $WRITEPROC ./coupling_writer_2D $WPX $WPY 10 10 5  >& log.writer &
+
+# Start READER
+echo "-- Start READER on $READPROC PEs."
+mpirun -np $READPROC ./coupling_reader_2D $RPX $RPY $READMETHOD 1 >& log.reader &
+
+echo "-- Wait until all applications exit. Run ./check.sh to see status"
+wait
+rm -f conf
+
diff --git a/examples/skel/.svn/all-wcprops b/examples/skel/.svn/all-wcprops
new file mode 100644
index 0000000..a6e2bc2
--- /dev/null
+++ b/examples/skel/.svn/all-wcprops
@@ -0,0 +1,5 @@
+K 25
+svn:wc:ra_dav:version-url
+V 49
+/svn-ewok/ADIOS/!svn/ver/1865/trunk/examples/skel
+END
diff --git a/examples/skel/.svn/entries b/examples/skel/.svn/entries
new file mode 100644
index 0000000..af9086a
--- /dev/null
+++ b/examples/skel/.svn/entries
@@ -0,0 +1,43 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/examples/skel
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-11T19:39:38.181232Z
+1865
+lot
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+

+genarray3d
+dir
+

+grapes
+dir
+

+geos5
+dir
+

+s3d
+dir
+

+gts
+dir
+

diff --git a/examples/skel/.svn/format b/examples/skel/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/skel/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/examples/skel/genarray3d/.svn/all-wcprops b/examples/skel/genarray3d/.svn/all-wcprops
new file mode 100644
index 0000000..532c818
--- /dev/null
+++ b/examples/skel/genarray3d/.svn/all-wcprops
@@ -0,0 +1,11 @@
+K 25
+svn:wc:ra_dav:version-url
+V 60
+/svn-ewok/ADIOS/!svn/ver/1833/trunk/examples/skel/genarray3d
+END
+genarray3d.xml
+K 25
+svn:wc:ra_dav:version-url
+V 75
+/svn-ewok/ADIOS/!svn/ver/1833/trunk/examples/skel/genarray3d/genarray3d.xml
+END
diff --git a/examples/skel/genarray3d/.svn/entries b/examples/skel/genarray3d/.svn/entries
new file mode 100644
index 0000000..0a69c88
--- /dev/null
+++ b/examples/skel/genarray3d/.svn/entries
@@ -0,0 +1,62 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/examples/skel/genarray3d
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-10T17:34:49.573110Z
+1833
+lot
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+

+genarray3d.xml
+file
+
+
+
+
+2012-07-10T18:43:37.821481Z
+cf48d2e26d4b669a3c0aeed85afed1e9
+2012-07-10T17:34:49.573110Z
+1833
+lot
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2751
+

diff --git a/examples/skel/genarray3d/.svn/format b/examples/skel/genarray3d/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/skel/genarray3d/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/tests/genarray/genarray3d.xml b/examples/skel/genarray3d/.svn/text-base/genarray3d.xml.svn-base
similarity index 96%
copy from tests/genarray/genarray3d.xml
copy to examples/skel/genarray3d/.svn/text-base/genarray3d.xml.svn-base
index 035a860..a1eac8b 100644
--- a/tests/genarray/genarray3d.xml
+++ b/examples/skel/genarray3d/.svn/text-base/genarray3d.xml.svn-base
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<adios-config host-language="Fortran">
+<adios-config host-language="C">
   <adios-group name="genarray" coordination-communicator="group_comm" time-index="steps">
     <var name="gndx" path="/dimensions" type="integer"/>
     <var name="gndy" path="/dimensions" type="integer"/>
@@ -43,6 +43,6 @@
 
   <method group="genarray" method="POSIX"/>
 
-  <buffer size-MB="20" allocate-time="now"/>
+  <buffer size-MB="256" allocate-time="now"/>
 
 </adios-config>
diff --git a/tests/genarray/genarray3d.xml b/examples/skel/genarray3d/genarray3d.xml
similarity index 96%
copy from tests/genarray/genarray3d.xml
copy to examples/skel/genarray3d/genarray3d.xml
index 035a860..a1eac8b 100644
--- a/tests/genarray/genarray3d.xml
+++ b/examples/skel/genarray3d/genarray3d.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<adios-config host-language="Fortran">
+<adios-config host-language="C">
   <adios-group name="genarray" coordination-communicator="group_comm" time-index="steps">
     <var name="gndx" path="/dimensions" type="integer"/>
     <var name="gndy" path="/dimensions" type="integer"/>
@@ -43,6 +43,6 @@
 
   <method group="genarray" method="POSIX"/>
 
-  <buffer size-MB="20" allocate-time="now"/>
+  <buffer size-MB="256" allocate-time="now"/>
 
 </adios-config>
diff --git a/examples/skel/geos5/.svn/all-wcprops b/examples/skel/geos5/.svn/all-wcprops
new file mode 100644
index 0000000..758c51b
--- /dev/null
+++ b/examples/skel/geos5/.svn/all-wcprops
@@ -0,0 +1,11 @@
+K 25
+svn:wc:ra_dav:version-url
+V 55
+/svn-ewok/ADIOS/!svn/ver/1865/trunk/examples/skel/geos5
+END
+geos5.xml
+K 25
+svn:wc:ra_dav:version-url
+V 65
+/svn-ewok/ADIOS/!svn/ver/1865/trunk/examples/skel/geos5/geos5.xml
+END
diff --git a/examples/skel/geos5/.svn/entries b/examples/skel/geos5/.svn/entries
new file mode 100644
index 0000000..2ae24f9
--- /dev/null
+++ b/examples/skel/geos5/.svn/entries
@@ -0,0 +1,62 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/examples/skel/geos5
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-11T19:39:38.181232Z
+1865
+lot
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+

+geos5.xml
+file
+
+
+
+
+2012-07-11T21:22:26.596637Z
+ad7db474b4bf49a96dc2aa3f21808ad9
+2012-07-11T19:39:38.181232Z
+1865
+lot
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+23203
+

diff --git a/examples/skel/geos5/.svn/format b/examples/skel/geos5/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/skel/geos5/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/examples/skel/geos5/.svn/prop-base/geos5.xml.svn-base b/examples/skel/geos5/.svn/prop-base/geos5.xml.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/examples/skel/geos5/.svn/prop-base/geos5.xml.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/examples/skel/geos5/.svn/text-base/geos5.xml.svn-base b/examples/skel/geos5/.svn/text-base/geos5.xml.svn-base
new file mode 100644
index 0000000..2fe83c8
--- /dev/null
+++ b/examples/skel/geos5/.svn/text-base/geos5.xml.svn-base
@@ -0,0 +1,301 @@
+<?xml version="1.0"?>
+<adios-config host-language="Fortran">
+  <adios-group name="geosgcm" coordination-communicator="agcm_comm">
+    <var name="nsteps" path="/info" type="integer"/>
+    <var name="gndx" path="/dimensions" type="integer"/>
+    <var name="gndy" path="/dimensions" type="integer"/>
+    <var name="gndz" path="/dimensions" type="integer"/>
+
+    <!-- Auxiliary variables for global array indexing -->
+    <var name="offx" path="/aux" type="integer"/>
+    <var name="offy" path="/aux" type="integer"/>
+    <var name="offz" path="/aux" type="integer"/>
+    <var name="ndx" path="/aux" type="integer"/>
+    <var name="ndy" path="/aux" type="integer"/>
+    <var name="ndz" path="/aux" type="integer"/>
+    <var name="npx" path="/aux" type="integer"/>
+    <var name="npy" path="/aux" type="integer"/>
+    <var name="npz" path="/aux" type="integer"/>
+
+    <global-bounds dimensions="gndx,gndy" offsets="offx,offy">
+        <var name="geosgcm_prog/PHIS" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_prog/SLP" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_prog/PS" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_gwd/TAUOROX" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_gwd/TAUOROY" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_gwd/TAUBKGX" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_gwd/TAUBKGY" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_moist/PHIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PHIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEDYN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PEDYN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TEDYN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEPHY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PEPHY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TEPHY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEANA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PEANA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TEANA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEGEN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEGWD" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KERAY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEBKG" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEORO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KETRB" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KESRF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEINT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KETOP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEMST" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KECDCOR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PECDCOR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TECDCOR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEREMAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PEREMAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TEREMAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/CONVKE" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/CONVCPT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/CONVPHI" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/CONVTHV" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEADV" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEPG" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEDP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEHOT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/DKERESIN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/DKERESPG" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/QFIXER" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/DTHVDTREMAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/DTHVDTCONSV" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/PHIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SGH" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/VARFLT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPPV" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPPT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPPB" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPQ" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/QVFILL" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OXFILL" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/QA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/US" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/VS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SPEED" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/PBLH" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/QS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/THAT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/QHAT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RASTIME" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RASPBLQ" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TPW" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CNPRCP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LSPRCP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ANPRCP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SNO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/PLS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/PCU" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CCWP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUTT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAULO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUMD" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUHI" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUDU" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUSS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUSO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUBC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUOC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TDUST" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TSALT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TSO4" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TBC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TOC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CLDTT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CLDLO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CLDMD" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CLDHI" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SPLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SPWATR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RUNOFF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/BASEFLOW" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/EMIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CQ" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CM" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RISFC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LAI" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/GRN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SNOMAS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/WET1" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TSOIL1" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FRLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FRLANDICE" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FRLAKE" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FRSEAICE" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FROCEAN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/USTAR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/Z0" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/Z0H" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LHFX" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SHFX" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/EVAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUX" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RHOS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/U2M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/V2M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/T2M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/Q2M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/U10N" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/V10N" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/U10M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/V10M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/T10M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/Q10M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/U50M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/V50M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/GUST" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/VENT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ASNOW" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RADSRF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FLNS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FLNSC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FLNSCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OLR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OLRC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OLRCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWSC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWSCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SFCEM" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWCLDTMP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWCLDPRS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OSR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OSRCLR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWTNET" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWTNETC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWTNETCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWTNETNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RADSWT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SLRSF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGDWN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGDWNC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGNET" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGNETC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGNETNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGNETCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBEDO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBVR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBVF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBNR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBNF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/EVLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LHLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SHLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/GHLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SMLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TWLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TELAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_turb/SRFDIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_turb/DBUOY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_turb/WERAD" path="" type="real" dimensions="ndx,ndy"/>
+    </global-bounds>
+
+    <!-- 3D array written by genarray with 1 timesteps -->
+    <global-bounds dimensions="gndx,gndy,gndz" offsets="offx,offy,offz">
+        <var name="geosgcm_prog/U" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/V" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/T" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/H" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/OMEGA" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/QV" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/QI" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/QL" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/RH" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/O3" path="" type="real" dimensions="ndx,ndy,ndz"/>
+
+        <var name="geosgcm_gwd/DUDTORO" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DVDTORO" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DTDTORO" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DUDTBKG" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DVDTBKG" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DTDTBKG" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DUDTRAY" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DVDTRAY" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DTDTRAY" path="" type="real" dimensions="ndx,ndy,ndz"/>
+
+        <var name="geosgcm_moist/QL" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QI" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QR" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RICE" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RLIQ" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RH1" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CNVMF0" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CNVMFD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CNVMFC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/REVCN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/REVAN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/REVLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RSUCN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RSUAN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RSULS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/THIM" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/EVAPC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/SUBLC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/FCLD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CLCN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CLLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QICN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QILS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QLCN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QLLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/INTDIS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/TOPDIS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KH" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KM" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KHLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KMLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/EKH" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/EKM" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KHSFC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KHRAD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/RI" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/DU" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DUDTDYN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DUDTTRB" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DUDTMST" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DUDTGWD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DVDTDYN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DVDTTRB" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DVDTMST" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DVDTGWD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTDYN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTMST" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTTRB" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTGWD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTLW" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTLWC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTLWCNA" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTSW" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTSWC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTSWNA" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTSWCNA" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTFRI" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DQVDTDYN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DQVDTMST" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DQVDTTRB" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DQVDTCHM" path="" type="real" dimensions="ndx,ndy,ndz"/>
+    </global-bounds>
+
+    </adios-group>
+
+    <method group="geosgcm" method="MPI"/>
+    <!--method group="geosgcm" method="TIME_AGG">time_steps=10,step_break=10,io_method=MPI</method-->
+
+ <buffer size-MB="512" allocate-time="now"/>
+</adios-config>
+
diff --git a/examples/skel/geos5/geos5.xml b/examples/skel/geos5/geos5.xml
new file mode 100755
index 0000000..2fe83c8
--- /dev/null
+++ b/examples/skel/geos5/geos5.xml
@@ -0,0 +1,301 @@
+<?xml version="1.0"?>
+<adios-config host-language="Fortran">
+  <adios-group name="geosgcm" coordination-communicator="agcm_comm">
+    <var name="nsteps" path="/info" type="integer"/>
+    <var name="gndx" path="/dimensions" type="integer"/>
+    <var name="gndy" path="/dimensions" type="integer"/>
+    <var name="gndz" path="/dimensions" type="integer"/>
+
+    <!-- Auxiliary variables for global array indexing -->
+    <var name="offx" path="/aux" type="integer"/>
+    <var name="offy" path="/aux" type="integer"/>
+    <var name="offz" path="/aux" type="integer"/>
+    <var name="ndx" path="/aux" type="integer"/>
+    <var name="ndy" path="/aux" type="integer"/>
+    <var name="ndz" path="/aux" type="integer"/>
+    <var name="npx" path="/aux" type="integer"/>
+    <var name="npy" path="/aux" type="integer"/>
+    <var name="npz" path="/aux" type="integer"/>
+
+    <global-bounds dimensions="gndx,gndy" offsets="offx,offy">
+        <var name="geosgcm_prog/PHIS" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_prog/SLP" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_prog/PS" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_gwd/TAUOROX" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_gwd/TAUOROY" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_gwd/TAUBKGX" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_gwd/TAUBKGY" path="" type="real" dimensions="ndx,ndy"/>
+        <var name="geosgcm_moist/PHIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PHIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEDYN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PEDYN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TEDYN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEPHY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PEPHY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TEPHY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEANA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PEANA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TEANA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEGEN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEGWD" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KERAY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEBKG" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEORO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KETRB" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KESRF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEINT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KETOP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEMST" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KECDCOR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PECDCOR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TECDCOR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEREMAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/PEREMAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/TEREMAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/CONVKE" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/CONVCPT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/CONVPHI" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/CONVTHV" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEADV" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEPG" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEDP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/KEHOT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/DKERESIN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/DKERESPG" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/QFIXER" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/DTHVDTREMAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_bud/DTHVDTCONSV" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/PHIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SGH" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/VARFLT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPPV" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPPT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPPB" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TROPQ" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/QVFILL" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OXFILL" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/QA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/US" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/VS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SPEED" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/PBLH" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/QS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/THAT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/QHAT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RASTIME" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RASPBLQ" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TPW" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CNPRCP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LSPRCP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ANPRCP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SNO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/PLS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/PCU" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CCWP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUTT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAULO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUMD" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUHI" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUDU" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUSS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUSO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUBC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TTAUOC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TDUST" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TSALT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TSO4" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TBC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TOC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CLDTT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CLDLO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CLDMD" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CLDHI" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SPLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SPWATR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RUNOFF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/BASEFLOW" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/EMIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CQ" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/CM" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RISFC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LAI" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/GRN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SNOMAS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/WET1" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TSOIL1" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FRLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FRLANDICE" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FRLAKE" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FRSEAICE" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FROCEAN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/USTAR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/Z0" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/Z0H" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LHFX" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SHFX" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/EVAP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUX" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TAUY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RHOS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/U2M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/V2M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/T2M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/Q2M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/U10N" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/V10N" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/U10M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/V10M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/T10M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/Q10M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/U50M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/V50M" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/GUST" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/VENT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ASNOW" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RADSRF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FLNS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FLNSC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/FLNSCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OLR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OLRC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OLRCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWSC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWSCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SFCEM" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWCLDTMP" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWCLDPRS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OSR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/OSRCLR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWTNET" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWTNETC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWTNETCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWTNETNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/RADSWT" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SLRSF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGDWN" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGDWNC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGNET" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGNETC" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGNETNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWGNETCNA" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBEDO" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBVR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBVF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBNR" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/ALBNF" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/EVLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LHLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SHLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SWLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/LWLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/GHLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/SMLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TWLAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_surf/TELAND" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_turb/SRFDIS" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_turb/DBUOY" path="" type="real" dimensions="ndx,ndy"/>
+       <var name="geosgcm_turb/WERAD" path="" type="real" dimensions="ndx,ndy"/>
+    </global-bounds>
+
+    <!-- 3D array written by genarray with 1 timesteps -->
+    <global-bounds dimensions="gndx,gndy,gndz" offsets="offx,offy,offz">
+        <var name="geosgcm_prog/U" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/V" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/T" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/H" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/OMEGA" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/QV" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/QI" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/QL" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/RH" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_prog/O3" path="" type="real" dimensions="ndx,ndy,ndz"/>
+
+        <var name="geosgcm_gwd/DUDTORO" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DVDTORO" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DTDTORO" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DUDTBKG" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DVDTBKG" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DTDTBKG" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DUDTRAY" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DVDTRAY" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_gwd/DTDTRAY" path="" type="real" dimensions="ndx,ndy,ndz"/>
+
+        <var name="geosgcm_moist/QL" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QI" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QR" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RICE" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RLIQ" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RH1" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CNVMF0" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CNVMFD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CNVMFC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/REVCN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/REVAN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/REVLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RSUCN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RSUAN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/RSULS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/THIM" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/EVAPC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/SUBLC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/FCLD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CLCN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/CLLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QICN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QILS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QLCN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_moist/QLLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/INTDIS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/TOPDIS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KH" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KM" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KHLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KMLS" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/EKH" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/EKM" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KHSFC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/KHRAD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/RI" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_turb/DU" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DUDTDYN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DUDTTRB" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DUDTMST" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DUDTGWD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DVDTDYN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DVDTTRB" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DVDTMST" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DVDTGWD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTDYN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTMST" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTTRB" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTGWD" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTLW" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTLWC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTLWCNA" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTSW" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTSWC" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTSWNA" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTSWCNA" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DTDTFRI" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DQVDTDYN" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DQVDTMST" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DQVDTTRB" path="" type="real" dimensions="ndx,ndy,ndz"/>
+        <var name="geosgcm_tend/DQVDTCHM" path="" type="real" dimensions="ndx,ndy,ndz"/>
+    </global-bounds>
+
+    </adios-group>
+
+    <method group="geosgcm" method="MPI"/>
+    <!--method group="geosgcm" method="TIME_AGG">time_steps=10,step_break=10,io_method=MPI</method-->
+
+ <buffer size-MB="512" allocate-time="now"/>
+</adios-config>
+
diff --git a/examples/skel/grapes/.svn/all-wcprops b/examples/skel/grapes/.svn/all-wcprops
new file mode 100644
index 0000000..9e8d667
--- /dev/null
+++ b/examples/skel/grapes/.svn/all-wcprops
@@ -0,0 +1,11 @@
+K 25
+svn:wc:ra_dav:version-url
+V 56
+/svn-ewok/ADIOS/!svn/ver/1865/trunk/examples/skel/grapes
+END
+grapes.xml
+K 25
+svn:wc:ra_dav:version-url
+V 67
+/svn-ewok/ADIOS/!svn/ver/1865/trunk/examples/skel/grapes/grapes.xml
+END
diff --git a/examples/skel/grapes/.svn/entries b/examples/skel/grapes/.svn/entries
new file mode 100644
index 0000000..89d74b0
--- /dev/null
+++ b/examples/skel/grapes/.svn/entries
@@ -0,0 +1,62 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/examples/skel/grapes
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-11T19:39:38.181232Z
+1865
+lot
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+

+grapes.xml
+file
+
+
+
+
+2012-07-11T21:22:26.527702Z
+2d1c9bdbbe7b6c2895d61d0ad9e25da1
+2012-07-11T19:39:38.181232Z
+1865
+lot
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2953
+

diff --git a/examples/skel/grapes/.svn/format b/examples/skel/grapes/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/skel/grapes/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/examples/skel/grapes/.svn/text-base/grapes.xml.svn-base b/examples/skel/grapes/.svn/text-base/grapes.xml.svn-base
new file mode 100644
index 0000000..09651f8
--- /dev/null
+++ b/examples/skel/grapes/.svn/text-base/grapes.xml.svn-base
@@ -0,0 +1,50 @@
+<adios-config host-language="Fortran">
+<adios-group name="post_process" coordination-communicator="group_comm" time-index="steps">
+ <var name="gndx" path="/dimensions" type="integer" />
+ <var name="gndy" path="/dimensions" type="integer" />
+ <var name="gndz" path="/dimensions" type="integer" />
+ <var name="nproc" path="/info" type="integer" />
+ <attribute name="description" path="/info/nproc" value="Number of writers" />
+ <var name="npx" path="/info" type="integer" />
+ <attribute name="description" path="/info/npx" value="Number of processors in x dimension" />
+ <var name="npy" path="/info" type="integer" />
+ <attribute name="description" path="/info/npy" value="Number of processors in y dimension" />
+ <var name="npz" path="/info" type="integer" />
+ <attribute name="description" path="/info/npz" value="Number of processors in z dimension" />
+ <!-- Auxiliary variables for global array indexing  -->
+ <var name="offx" path="/aux" type="integer" />
+ <var name="offy" path="/aux" type="integer" />
+ <var name="offz" path="/aux" type="integer" />
+ <var name="ndx" path="/aux" type="integer" />
+ <var name="ndy" path="/aux" type="integer" />
+ <var name="ndz" path="/aux" type="integer" />
+<!-- 3D|2D array written by genarray with 1 timesteps  -->
+<global-bounds dimensions="gndx,gndz,gndy" offsets="offx,offz,offy">
+ <var name="up" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ <var name="vp" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ <var name="tp" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ <var name="zp" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ <var name="wp" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ </global-bounds>
+<global-bounds dimensions="gndx,gndy" offsets="offx,offy">
+ <var name="rainc" path="/var" type="real" dimensions="ndx,ndy,steps" />
+ <var name="rainnc" path="/var" type="real" dimensions="ndx,ndy,steps" />
+ </global-bounds>
+ <attribute name="description" path="/var/uvtzwp" value="3D array with 3D decomposition" />
+ </adios-group>
+ <method group="post_process" method="MPI_LUSTRE">
+stripe_count=32;stripe_size=1048576;block_size=1048576</method>
+ <buffer size-MB="500" allocate-time="now" />
+<!--
+Estimation about the size of output data by a process at a time
+The adios_group for every process has such descriptive variables like gndx, gndy, gndz, nproc, ndx, ndy, ndz,offx, offy and offz.
+     size for one output of 3-D variable=type_size*ndx*ndy*ndz;
+ For instance, 100 km H-resolution (gndx=1440, gndy=720, gndz=17),
+ if choosing npx=1440, npy=720, npz=0, assuming type_size for real=4B
+  var_num:number of descriptive variables,   assuming type_size for integer=4B                 
+ then for every process
+                            ndx=1440/32=45; ndy=720/32=23; ndz=gndz=17;
+                            adios_groupsize=4*10+4*45*23*17
+                                                             =70420B=68.8MB
+-->
+</adios-config>
diff --git a/examples/skel/grapes/grapes.xml b/examples/skel/grapes/grapes.xml
new file mode 100644
index 0000000..09651f8
--- /dev/null
+++ b/examples/skel/grapes/grapes.xml
@@ -0,0 +1,50 @@
+<adios-config host-language="Fortran">
+<adios-group name="post_process" coordination-communicator="group_comm" time-index="steps">
+ <var name="gndx" path="/dimensions" type="integer" />
+ <var name="gndy" path="/dimensions" type="integer" />
+ <var name="gndz" path="/dimensions" type="integer" />
+ <var name="nproc" path="/info" type="integer" />
+ <attribute name="description" path="/info/nproc" value="Number of writers" />
+ <var name="npx" path="/info" type="integer" />
+ <attribute name="description" path="/info/npx" value="Number of processors in x dimension" />
+ <var name="npy" path="/info" type="integer" />
+ <attribute name="description" path="/info/npy" value="Number of processors in y dimension" />
+ <var name="npz" path="/info" type="integer" />
+ <attribute name="description" path="/info/npz" value="Number of processors in z dimension" />
+ <!-- Auxiliary variables for global array indexing  -->
+ <var name="offx" path="/aux" type="integer" />
+ <var name="offy" path="/aux" type="integer" />
+ <var name="offz" path="/aux" type="integer" />
+ <var name="ndx" path="/aux" type="integer" />
+ <var name="ndy" path="/aux" type="integer" />
+ <var name="ndz" path="/aux" type="integer" />
+<!-- 3D|2D array written by genarray with 1 timesteps  -->
+<global-bounds dimensions="gndx,gndz,gndy" offsets="offx,offz,offy">
+ <var name="up" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ <var name="vp" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ <var name="tp" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ <var name="zp" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ <var name="wp" path="/var" type="real" dimensions="ndx,ndz,ndy,steps" />
+ </global-bounds>
+<global-bounds dimensions="gndx,gndy" offsets="offx,offy">
+ <var name="rainc" path="/var" type="real" dimensions="ndx,ndy,steps" />
+ <var name="rainnc" path="/var" type="real" dimensions="ndx,ndy,steps" />
+ </global-bounds>
+ <attribute name="description" path="/var/uvtzwp" value="3D array with 3D decomposition" />
+ </adios-group>
+ <method group="post_process" method="MPI_LUSTRE">
+stripe_count=32;stripe_size=1048576;block_size=1048576</method>
+ <buffer size-MB="500" allocate-time="now" />
+<!--
+Estimation about the size of output data by a process at a time
+The adios_group for every process has such descriptive variables like gndx, gndy, gndz, nproc, ndx, ndy, ndz,offx, offy and offz.
+     size for one output of 3-D variable=type_size*ndx*ndy*ndz;
+ For instance, 100 km H-resolution (gndx=1440, gndy=720, gndz=17),
+ if choosing npx=1440, npy=720, npz=0, assuming type_size for real=4B
+  var_num:number of descriptive variables,   assuming type_size for integer=4B                 
+ then for every process
+                            ndx=1440/32=45; ndy=720/32=23; ndz=gndz=17;
+                            adios_groupsize=4*10+4*45*23*17
+                                                             =70420B=68.8MB
+-->
+</adios-config>
diff --git a/examples/skel/gts/.svn/all-wcprops b/examples/skel/gts/.svn/all-wcprops
new file mode 100644
index 0000000..369e3d9
--- /dev/null
+++ b/examples/skel/gts/.svn/all-wcprops
@@ -0,0 +1,11 @@
+K 25
+svn:wc:ra_dav:version-url
+V 53
+/svn-ewok/ADIOS/!svn/ver/1833/trunk/examples/skel/gts
+END
+gts.xml
+K 25
+svn:wc:ra_dav:version-url
+V 61
+/svn-ewok/ADIOS/!svn/ver/1833/trunk/examples/skel/gts/gts.xml
+END
diff --git a/examples/skel/gts/.svn/entries b/examples/skel/gts/.svn/entries
new file mode 100644
index 0000000..d61483b
--- /dev/null
+++ b/examples/skel/gts/.svn/entries
@@ -0,0 +1,62 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/examples/skel/gts
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-10T17:34:49.573110Z
+1833
+lot
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+

+gts.xml
+file
+
+
+
+
+2012-07-10T18:43:37.899484Z
+c3dcfb01ab5d26789b72bce1791a0122
+2012-07-10T17:34:49.573110Z
+1833
+lot
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3917
+

diff --git a/examples/skel/gts/.svn/format b/examples/skel/gts/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/skel/gts/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/examples/skel/gts/.svn/text-base/gts.xml.svn-base b/examples/skel/gts/.svn/text-base/gts.xml.svn-base
new file mode 100644
index 0000000..21d77cc
--- /dev/null
+++ b/examples/skel/gts/.svn/text-base/gts.xml.svn-base
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<adios-config host-language="Fortran">
+<adios-group name="restart" coordination-communicator="comm">
+  <var name="mype" type="integer" read="no"/>
+  <var name="numberpe" type="integer" read="no"/>
+  <var name="istep" gread="istart" type="integer"/>
+  <var name="mgrid" type="integer" read="no"/>
+  <var name="mpsi" type="integer"  read="no"/>
+  <var name="nprobe" type="integer" read="no"/>
+  <var name="nrbin" type="integer" read="no"/>
+  <var name="nbin_a" type="integer" read="no"/>
+  <var name="mimax" type="integer" read="no"/>
+  <var name="mpsi+1" type="integer" read="no"/>
+  <var name="sprng_buffer_len" type="integer" read="no"/>
+  <global-bounds dimensions="numberpe" offsets="mype">
+     <var name="mi" type="integer" dimensions="1"/>
+     <var name="ntracer" type="integer" dimensions="1"/>
+     <var name="etracer_i0" type="double" dimensions="1"/>
+     <var name="misum" type="double" dimensions="1"/>
+     <var name="cloud_i" type="double" dimensions="1"/>
+     <var name="isize" type="integer"  dimensions="1"/>
+  </global-bounds>
+  <global-bounds dimensions="sprng_buffer_len,numberpe" offsets="0,mype">
+     <var name="buffer1" type="byte" dimensions="sprng_buffer_len,1"/>
+  </global-bounds>
+  <global-bounds dimensions="nprobe,numberpe" offsets="0,mype">
+     <var name="sn_box" type="double" dimensions="nprobe,1"/>
+  </global-bounds>
+  <global-bounds dimensions="nbin_a,numberpe" offsets="0,mype">
+     <var name="sn0" type="double" dimensions="nbin_a,1"/>
+  </global-bounds>
+  <global-bounds dimensions="nrbin,numberpe" offsets="0,mype">
+     <var name="rdtem0" type="double" dimensions="nrbin,1"/>
+     <var name="rtden" type="double" dimensions="nrbin,1"/>
+  </global-bounds>
+  <global-bounds dimensions="mpsi+1,numberpe" offsets="0,mype">
+     <var name="sn0_g" type="double" dimensions="mpsi+1,1"/>
+     <var name="pmarki" type="double" dimensions="mpsi+1,1"/>
+     <var name="ddT_da" type="double" dimensions="mpsi+1,1"/>
+  </global-bounds>
+  <global-bounds dimensions="mgrid,numberpe" offsets="0,mype">
+     <var name="markeri" type="double" dimensions="mgrid,1"/>
+  </global-bounds>
+  <global-bounds dimensions="2,mgrid,numberpe" offsets="0,0,mype">
+     <var name="phi" type="double" dimensions="2,mgrid,1"/>
+  </global-bounds>
+  <global-bounds dimensions="mimax,numberpe" offsets="0,mype">
+    <var name="zion0" gwrite="zion0(6,1:mimax)" gread="zion0_read" type="double" dimensions="mimax,1"/>
+  </global-bounds>
+  <global-bounds dimensions="7,mimax,numberpe" offsets="0,0,mype">
+    <var name="zion" type="double" dimensions="7,mimax,1"/>
+  </global-bounds>
+
+  <gwrite src="if(ifelectron==1) then"/>
+  <var name="memax" type="integer" read="no"/>
+  <global-bounds dimensions="numberpe" offsets="mype">
+     <var name="me" type="integer"  dimensions="1"/>
+     <var name="ntracer_e" type="integer"  dimensions="1"/>
+     <var name="etracer_e0" type="double" dimensions="1"/>
+     <var name="mesum" type="double"  dimensions="1"/>
+     <var name="cloud_e" type="double"  dimensions="1"/>
+  </global-bounds>
+  <global-bounds dimensions="mpsi+1,numberpe" offsets="0,mype">
+     <var name="pmarke" type="double" dimensions="mpsi+1,1"/>
+  </global-bounds>
+  <global-bounds dimensions="mgrid,numberpe" offsets="0,mype">
+     <var name="markere" type="double" dimensions="mgrid,1"/>
+  </global-bounds>
+  <global-bounds dimensions="memax,numberpe" offsets="0,mype">
+    <var name="zeon0" gwrite="zeon0(6,1:memax)" gread="zeon0_read" type="double" dimensions="memax,1"/>
+  </global-bounds>
+  <global-bounds dimensions="7,memax,numberpe" offsets="0,0,mype">
+    <var name="zeon" type="double" dimensions="7,memax,1"/>
+  </global-bounds>
+  <gwrite src="endif"/>
+</adios-group>
+
+
+<!-- method priority="3" method="MPI_AMR" iterations="100" group="restart"/ -->
+<method priority="3" method="POSIX" group="restart"/>
+<buffer size-MB="256" allocate-time="now" />
+</adios-config>
diff --git a/examples/skel/gts/gts.xml b/examples/skel/gts/gts.xml
new file mode 100644
index 0000000..21d77cc
--- /dev/null
+++ b/examples/skel/gts/gts.xml
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<adios-config host-language="Fortran">
+<adios-group name="restart" coordination-communicator="comm">
+  <var name="mype" type="integer" read="no"/>
+  <var name="numberpe" type="integer" read="no"/>
+  <var name="istep" gread="istart" type="integer"/>
+  <var name="mgrid" type="integer" read="no"/>
+  <var name="mpsi" type="integer"  read="no"/>
+  <var name="nprobe" type="integer" read="no"/>
+  <var name="nrbin" type="integer" read="no"/>
+  <var name="nbin_a" type="integer" read="no"/>
+  <var name="mimax" type="integer" read="no"/>
+  <var name="mpsi+1" type="integer" read="no"/>
+  <var name="sprng_buffer_len" type="integer" read="no"/>
+  <global-bounds dimensions="numberpe" offsets="mype">
+     <var name="mi" type="integer" dimensions="1"/>
+     <var name="ntracer" type="integer" dimensions="1"/>
+     <var name="etracer_i0" type="double" dimensions="1"/>
+     <var name="misum" type="double" dimensions="1"/>
+     <var name="cloud_i" type="double" dimensions="1"/>
+     <var name="isize" type="integer"  dimensions="1"/>
+  </global-bounds>
+  <global-bounds dimensions="sprng_buffer_len,numberpe" offsets="0,mype">
+     <var name="buffer1" type="byte" dimensions="sprng_buffer_len,1"/>
+  </global-bounds>
+  <global-bounds dimensions="nprobe,numberpe" offsets="0,mype">
+     <var name="sn_box" type="double" dimensions="nprobe,1"/>
+  </global-bounds>
+  <global-bounds dimensions="nbin_a,numberpe" offsets="0,mype">
+     <var name="sn0" type="double" dimensions="nbin_a,1"/>
+  </global-bounds>
+  <global-bounds dimensions="nrbin,numberpe" offsets="0,mype">
+     <var name="rdtem0" type="double" dimensions="nrbin,1"/>
+     <var name="rtden" type="double" dimensions="nrbin,1"/>
+  </global-bounds>
+  <global-bounds dimensions="mpsi+1,numberpe" offsets="0,mype">
+     <var name="sn0_g" type="double" dimensions="mpsi+1,1"/>
+     <var name="pmarki" type="double" dimensions="mpsi+1,1"/>
+     <var name="ddT_da" type="double" dimensions="mpsi+1,1"/>
+  </global-bounds>
+  <global-bounds dimensions="mgrid,numberpe" offsets="0,mype">
+     <var name="markeri" type="double" dimensions="mgrid,1"/>
+  </global-bounds>
+  <global-bounds dimensions="2,mgrid,numberpe" offsets="0,0,mype">
+     <var name="phi" type="double" dimensions="2,mgrid,1"/>
+  </global-bounds>
+  <global-bounds dimensions="mimax,numberpe" offsets="0,mype">
+    <var name="zion0" gwrite="zion0(6,1:mimax)" gread="zion0_read" type="double" dimensions="mimax,1"/>
+  </global-bounds>
+  <global-bounds dimensions="7,mimax,numberpe" offsets="0,0,mype">
+    <var name="zion" type="double" dimensions="7,mimax,1"/>
+  </global-bounds>
+
+  <gwrite src="if(ifelectron==1) then"/>
+  <var name="memax" type="integer" read="no"/>
+  <global-bounds dimensions="numberpe" offsets="mype">
+     <var name="me" type="integer"  dimensions="1"/>
+     <var name="ntracer_e" type="integer"  dimensions="1"/>
+     <var name="etracer_e0" type="double" dimensions="1"/>
+     <var name="mesum" type="double"  dimensions="1"/>
+     <var name="cloud_e" type="double"  dimensions="1"/>
+  </global-bounds>
+  <global-bounds dimensions="mpsi+1,numberpe" offsets="0,mype">
+     <var name="pmarke" type="double" dimensions="mpsi+1,1"/>
+  </global-bounds>
+  <global-bounds dimensions="mgrid,numberpe" offsets="0,mype">
+     <var name="markere" type="double" dimensions="mgrid,1"/>
+  </global-bounds>
+  <global-bounds dimensions="memax,numberpe" offsets="0,mype">
+    <var name="zeon0" gwrite="zeon0(6,1:memax)" gread="zeon0_read" type="double" dimensions="memax,1"/>
+  </global-bounds>
+  <global-bounds dimensions="7,memax,numberpe" offsets="0,0,mype">
+    <var name="zeon" type="double" dimensions="7,memax,1"/>
+  </global-bounds>
+  <gwrite src="endif"/>
+</adios-group>
+
+
+<!-- method priority="3" method="MPI_AMR" iterations="100" group="restart"/ -->
+<method priority="3" method="POSIX" group="restart"/>
+<buffer size-MB="256" allocate-time="now" />
+</adios-config>
diff --git a/examples/skel/s3d/.svn/all-wcprops b/examples/skel/s3d/.svn/all-wcprops
new file mode 100644
index 0000000..8945a16
--- /dev/null
+++ b/examples/skel/s3d/.svn/all-wcprops
@@ -0,0 +1,11 @@
+K 25
+svn:wc:ra_dav:version-url
+V 53
+/svn-ewok/ADIOS/!svn/ver/1865/trunk/examples/skel/s3d
+END
+s3d.xml
+K 25
+svn:wc:ra_dav:version-url
+V 61
+/svn-ewok/ADIOS/!svn/ver/1865/trunk/examples/skel/s3d/s3d.xml
+END
diff --git a/examples/skel/s3d/.svn/entries b/examples/skel/s3d/.svn/entries
new file mode 100644
index 0000000..43be7c4
--- /dev/null
+++ b/examples/skel/s3d/.svn/entries
@@ -0,0 +1,62 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/examples/skel/s3d
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-11T19:39:38.181232Z
+1865
+lot
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+

+s3d.xml
+file
+
+
+
+
+2012-07-11T21:22:26.744621Z
+5407661621a620f37a34c25105d9276f
+2012-07-11T19:39:38.181232Z
+1865
+lot
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1737
+

diff --git a/examples/skel/s3d/.svn/format b/examples/skel/s3d/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/skel/s3d/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/examples/skel/s3d/.svn/text-base/s3d.xml.svn-base b/examples/skel/s3d/.svn/text-base/s3d.xml.svn-base
new file mode 100644
index 0000000..e9fa3de
--- /dev/null
+++ b/examples/skel/s3d/.svn/text-base/s3d.xml.svn-base
@@ -0,0 +1,26 @@
+<?xml version="1.0"?> <adios-config host-language="Fortran"> <adios-group
+name="restart" coordination-communicator="gcomm" stats="Off"> <var
+name="gx" type="integer" /> <var name="gy" type="integer" /> <var
+name="gz" type="integer" /> <var name="lx" type="integer" /> <var
+name="ly" type="integer" /> <var name="lz" type="integer" /> <var
+name="nx" type="integer" /> <var name="ny" type="integer" /> <var
+name="nz" type="integer" /> <var name="time" type="double" /> <var
+name="tstep" type="double" /> <var name="time_save" type="double" /> <var
+name="pout" type="double" /> <global-bounds dimensions="gx,gy,gz"
+offsets="lx,ly,lz"> <var name="temp" type="double" dimensions="nx,ny,nz" />
+<var name="pressure" type="double" dimensions="nx,ny,nz" /> <var
+name="uvel" type="double" dimensions="nx,ny,nz" /> <var name="vvel"
+type="double" dimensions="nx,ny,nz" /> <var name="wvel" type="double"
+dimensions="nx,ny,nz" /> <var name="H2" type="double"
+dimensions="nx,ny,nz" /><var name="O2" type="double"
+dimensions="nx,ny,nz" /><var name="O" type="double" dimensions="nx,ny,nz" /><var
+name="OH" type="double" dimensions="nx,ny,nz" /><var name="H2O"
+type="double" dimensions="nx,ny,nz" /><var name="H" type="double"
+dimensions="nx,ny,nz" /><var name="HO2" type="double"
+dimensions="nx,ny,nz" /><var name="CO" type="double"
+dimensions="nx,ny,nz" /><var name="CO2" type="double"
+dimensions="nx,ny,nz" /><var name="HCO" type="double"
+dimensions="nx,ny,nz" /><var name="N2" type="double"
+dimensions="nx,ny,nz" /></global-bounds> </adios-group> <method
+group="restart" method="MPI_AMR"> stripe_count=1,stripe_size=25600000,block_size=25600000,num_aggregators=1920,merging_pgs=0
+</method> <buffer size-MB="200" allocate-time="now" /> </adios-config>
diff --git a/examples/skel/s3d/s3d.xml b/examples/skel/s3d/s3d.xml
new file mode 100644
index 0000000..e9fa3de
--- /dev/null
+++ b/examples/skel/s3d/s3d.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?> <adios-config host-language="Fortran"> <adios-group
+name="restart" coordination-communicator="gcomm" stats="Off"> <var
+name="gx" type="integer" /> <var name="gy" type="integer" /> <var
+name="gz" type="integer" /> <var name="lx" type="integer" /> <var
+name="ly" type="integer" /> <var name="lz" type="integer" /> <var
+name="nx" type="integer" /> <var name="ny" type="integer" /> <var
+name="nz" type="integer" /> <var name="time" type="double" /> <var
+name="tstep" type="double" /> <var name="time_save" type="double" /> <var
+name="pout" type="double" /> <global-bounds dimensions="gx,gy,gz"
+offsets="lx,ly,lz"> <var name="temp" type="double" dimensions="nx,ny,nz" />
+<var name="pressure" type="double" dimensions="nx,ny,nz" /> <var
+name="uvel" type="double" dimensions="nx,ny,nz" /> <var name="vvel"
+type="double" dimensions="nx,ny,nz" /> <var name="wvel" type="double"
+dimensions="nx,ny,nz" /> <var name="H2" type="double"
+dimensions="nx,ny,nz" /><var name="O2" type="double"
+dimensions="nx,ny,nz" /><var name="O" type="double" dimensions="nx,ny,nz" /><var
+name="OH" type="double" dimensions="nx,ny,nz" /><var name="H2O"
+type="double" dimensions="nx,ny,nz" /><var name="H" type="double"
+dimensions="nx,ny,nz" /><var name="HO2" type="double"
+dimensions="nx,ny,nz" /><var name="CO" type="double"
+dimensions="nx,ny,nz" /><var name="CO2" type="double"
+dimensions="nx,ny,nz" /><var name="HCO" type="double"
+dimensions="nx,ny,nz" /><var name="N2" type="double"
+dimensions="nx,ny,nz" /></global-bounds> </adios-group> <method
+group="restart" method="MPI_AMR"> stripe_count=1,stripe_size=25600000,block_size=25600000,num_aggregators=1920,merging_pgs=0
+</method> <buffer size-MB="200" allocate-time="now" /> </adios-config>
diff --git a/examples/staging/.svn/all-wcprops b/examples/staging/.svn/all-wcprops
new file mode 100644
index 0000000..0294f03
--- /dev/null
+++ b/examples/staging/.svn/all-wcprops
@@ -0,0 +1,5 @@
+K 25
+svn:wc:ra_dav:version-url
+V 52
+/svn-ewok/ADIOS/!svn/ver/2108/trunk/examples/staging
+END
diff --git a/examples/staging/.svn/entries b/examples/staging/.svn/entries
new file mode 100644
index 0000000..de91ca4
--- /dev/null
+++ b/examples/staging/.svn/entries
@@ -0,0 +1,38 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/examples/staging
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-11-27T19:39:19.645877Z
+2108
+pnorbert
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+stage_write
+dir
+

diff --git a/examples/staging/.svn/format b/examples/staging/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/staging/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/examples/staging/stage_write/.svn/all-wcprops b/examples/staging/stage_write/.svn/all-wcprops
new file mode 100644
index 0000000..4f686a9
--- /dev/null
+++ b/examples/staging/stage_write/.svn/all-wcprops
@@ -0,0 +1,83 @@
+K 25
+svn:wc:ra_dav:version-url
+V 64
+/svn-ewok/ADIOS/!svn/ver/2108/trunk/examples/staging/stage_write
+END
+Makefile.genarray_stream
+K 25
+svn:wc:ra_dav:version-url
+V 89
+/svn-ewok/ADIOS/!svn/ver/2108/trunk/examples/staging/stage_write/Makefile.genarray_stream
+END
+decompose_single.c
+K 25
+svn:wc:ra_dav:version-url
+V 83
+/svn-ewok/ADIOS/!svn/ver/2106/trunk/examples/staging/stage_write/decompose_single.c
+END
+genarray_stream.F90
+K 25
+svn:wc:ra_dav:version-url
+V 84
+/svn-ewok/ADIOS/!svn/ver/2108/trunk/examples/staging/stage_write/genarray_stream.F90
+END
+utils.c
+K 25
+svn:wc:ra_dav:version-url
+V 72
+/svn-ewok/ADIOS/!svn/ver/2106/trunk/examples/staging/stage_write/utils.c
+END
+genarray_stream.xml
+K 25
+svn:wc:ra_dav:version-url
+V 84
+/svn-ewok/ADIOS/!svn/ver/2108/trunk/examples/staging/stage_write/genarray_stream.xml
+END
+decompose.h
+K 25
+svn:wc:ra_dav:version-url
+V 76
+/svn-ewok/ADIOS/!svn/ver/2106/trunk/examples/staging/stage_write/decompose.h
+END
+utils.h
+K 25
+svn:wc:ra_dav:version-url
+V 72
+/svn-ewok/ADIOS/!svn/ver/2106/trunk/examples/staging/stage_write/utils.h
+END
+decompose_block.c
+K 25
+svn:wc:ra_dav:version-url
+V 82
+/svn-ewok/ADIOS/!svn/ver/2106/trunk/examples/staging/stage_write/decompose_block.c
+END
+job
+K 25
+svn:wc:ra_dav:version-url
+V 68
+/svn-ewok/ADIOS/!svn/ver/2108/trunk/examples/staging/stage_write/job
+END
+Makefile
+K 25
+svn:wc:ra_dav:version-url
+V 73
+/svn-ewok/ADIOS/!svn/ver/2215/trunk/examples/staging/stage_write/Makefile
+END
+README
+K 25
+svn:wc:ra_dav:version-url
+V 71
+/svn-ewok/ADIOS/!svn/ver/2108/trunk/examples/staging/stage_write/README
+END
+stage_write.c
+K 25
+svn:wc:ra_dav:version-url
+V 78
+/svn-ewok/ADIOS/!svn/ver/2108/trunk/examples/staging/stage_write/stage_write.c
+END
+test_decompose.c
+K 25
+svn:wc:ra_dav:version-url
+V 81
+/svn-ewok/ADIOS/!svn/ver/2106/trunk/examples/staging/stage_write/test_decompose.c
+END
diff --git a/examples/staging/stage_write/.svn/entries b/examples/staging/stage_write/.svn/entries
new file mode 100644
index 0000000..4ededff
--- /dev/null
+++ b/examples/staging/stage_write/.svn/entries
@@ -0,0 +1,477 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/examples/staging/stage_write
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-11-27T19:39:19.645877Z
+2108
+pnorbert
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+Makefile.genarray_stream
+file
+
+
+
+
+2013-01-08T17:28:10.968070Z
+7a6c035e1d4e61c2bc654142a4036fa8
+2012-11-27T19:39:19.645877Z
+2108
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+624
+

+decompose_single.c
+file
+
+
+
+
+2012-11-26T22:20:04.433137Z
+0882d00eb7d8cbd71a49bb89bb8e74d7
+2012-11-26T22:25:21.934313Z
+2106
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+589
+

+genarray_stream.F90
+file
+
+
+
+
+2012-11-27T18:57:43.521014Z
+17a705054c52b8a795d2162268ab6999
+2012-11-27T19:39:19.645877Z
+2108
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+10709
+

+utils.c
+file
+
+
+
+
+2012-08-01T22:28:03.953365Z
+cbe54d7aaf79ee46e618a3e2ab040f4e
+2012-11-26T22:25:21.934313Z
+2106
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+4884
+

+genarray_stream.xml
+file
+
+
+
+
+2012-11-27T19:37:12.089286Z
+6efe7ee904c7f5df2144f24718f8d4af
+2012-11-27T19:39:19.645877Z
+2108
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2778
+

+decompose.h
+file
+
+
+
+
+2012-08-01T22:08:34.281966Z
+81dedcf9e93aa71142759728f9d66c1b
+2012-11-26T22:25:21.934313Z
+2106
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+428
+

+utils.h
+file
+
+
+
+
+2012-08-01T22:31:11.680213Z
+fcd23062d629ebc5c2862062f143c1d5
+2012-11-26T22:25:21.934313Z
+2106
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1590
+

+decompose_block.c
+file
+
+
+
+
+2012-11-26T22:21:24.972664Z
+4f4e5675dd5639e18c44acd8ddb6ea88
+2012-11-26T22:25:21.934313Z
+2106
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2708
+

+job
+file
+
+
+
+
+2013-01-08T17:39:49.955529Z
+181836832800054da55bca8ef9c83ea2
+2012-11-27T19:39:19.645877Z
+2108
+pnorbert
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1604
+

+README
+file
+
+
+
+
+2012-11-27T19:00:22.646136Z
+99c4faef9fc5fd77f214c94d6a07a4c7
+2012-11-27T19:39:19.645877Z
+2108
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2792
+

+Makefile
+file
+2215
+
+
+
+2013-01-08T17:27:36.810840Z
+2e6687927e76a0e85ef06a4ced1002da
+2013-01-08T17:40:22.266814Z
+2215
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+801
+

+test_decompose.c
+file
+
+
+
+
+2012-08-02T18:09:37.905612Z
+80ec4d118929bc8311a8d361707c0d44
+2012-11-26T22:25:21.934313Z
+2106
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3665
+

+stage_write.c
+file
+
+
+
+
+2012-11-27T19:37:34.727503Z
+335ed6d704667aea0dab7cd041703ea9
+2012-11-27T19:39:19.645877Z
+2108
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+13802
+

diff --git a/examples/staging/stage_write/.svn/format b/examples/staging/stage_write/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/examples/staging/stage_write/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/examples/staging/stage_write/.svn/prop-base/job.svn-base b/examples/staging/stage_write/.svn/prop-base/job.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/examples/staging/stage_write/.svn/prop-base/job.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/examples/staging/stage_write/.svn/text-base/Makefile.genarray_stream.svn-base b/examples/staging/stage_write/.svn/text-base/Makefile.genarray_stream.svn-base
new file mode 100644
index 0000000..c1b45de
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/Makefile.genarray_stream.svn-base
@@ -0,0 +1,30 @@
+## MPIF90 SETTINGS
+FC=mpif90
+FFLAGS=-g
+
+## FTN SETTINGS
+#FC=ftn
+#FFLAGS = -O3
+
+#TARGET=gnu
+TARGET=pgi
+
+## Set ADIOS_DIR here or before doing make
+override ADIOS_DIR=/ccs/proj/e2e/pnorbert/ADIOS/sith.${TARGET}
+override ADIOS_INC=`${ADIOS_DIR}/bin/adios_config -c -f`
+override ADIOS_FLIB=`${ADIOS_DIR}/bin/adios_config -l -f`
+
+default: genarray_stream
+all: default
+
+genarray_stream.o : genarray_stream.F90 
+	${FC} -g -c ${ADIOS_INC} genarray_stream.F90  $<
+
+genarray_stream:  genarray_stream.o
+	${FC} -g -o genarray_stream genarray_stream.o ${ADIOS_FLIB} 
+
+
+clean:
+	rm -f *.o *.mod *.fh core.*
+	rm -f genarray_stream
+        
diff --git a/examples/staging/stage_write/.svn/text-base/Makefile.svn-base b/examples/staging/stage_write/.svn/text-base/Makefile.svn-base
new file mode 100644
index 0000000..398c102
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/Makefile.svn-base
@@ -0,0 +1,41 @@
+## mpicc SETTINGS
+CC=mpicc
+CFLAGS=-g 
+LDFLAGS=-g
+
+## cc SETTINGS
+#CC=cc
+#CFLAGS = -O3
+#LDFLAGS =
+
+#TARGET=gnu
+TARGET=pgi
+
+## Set ADIOS_DIR here or before doing make
+override ADIOS_DIR=/ccs/proj/e2e/pnorbert/ADIOS/sith.${TARGET}
+override ADIOS_INC=`${ADIOS_DIR}/bin/adios_config -c`
+override ADIOS_CLIB=`${ADIOS_DIR}/bin/adios_config -l`
+
+
+default: stage_write 
+all: default
+
+OBJS = utils.o decompose_block.o 
+
+%.o: %.c
+	${CC} ${CFLAGS} -c ${ADIOS_INC} $<
+
+stage_write: ${OBJS} stage_write.o
+	${CC} ${LDFLAGS} -o stage_write ${OBJS} stage_write.o ${ADIOS_CLIB}
+
+test_decompose: ${OBJS} test_decompose.o 
+	${CC} ${LDFLAGS} -o test_decompose ${OBJS} test_decompose.o ${ADIOS_CLIB}
+
+clean:
+	rm -f *.o *.mod *.fh core.*
+	rm -f stage_write
+
+
+distclean: clean
+	rm -f log.* dataspaces.conf conf srv.lck *.bp
+
diff --git a/examples/staging/stage_write/.svn/text-base/README.svn-base b/examples/staging/stage_write/.svn/text-base/README.svn-base
new file mode 100644
index 0000000..041b65a
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/README.svn-base
@@ -0,0 +1,47 @@
+STAGE WRITE CODE
+
+This code can be used to perform your disk I/O after sending the data to a staging area. 
+It can also be used to read in your file with a certain number of processors with a new decomposition and write out the data with the new layout.
+
+BUILD
+=====
+Edit the Makefile for your needs. This example is not built automatically with ADIOS. You need to install ADIOS first, then use the installation to build this code. 
+
+The read method in this code is not set by argument but is in the source. Set it for your target usage. See variable "read_method", set around line 32. 
+
+USAGE
+=====
+The 'job' file provides an example how to launch 3 applications within one job. Besides your own app, first you have to prepare and start the staging server (DataSpaces in the job script). Then you can run both your app and this stage writer code.
+
+Parameters to stage write:
+    E.g. genarray.bp staged.bp MPI \"\" $READPROC 1 1 
+
+    input   Input stream path
+    output  Output file path
+    method  ADIOS method to write with
+    params  Write method parameters (in quotes; comma-separated list)
+    <decomposition>    list of numbers e.g. 32 8 4
+            Decomposition values in each dimension of an array
+            The product of these number must be less then the number
+            of processes. Processes whose rank is higher than the
+            product, will not read/write anything.
+               Arrays with less dimensions than the number of values,
+            will be decomposed with using the numbers from the beginning.
+
+NOTES
+=====
+1. The job example is set for the ./genarray_stream.F90 writing application, which is not built automatically. Use the Makefile.genarray_stream to build it. 
+WARNING: the method used in the genarray_stream.xml should match the reading method in stage_write.c. That is, if you use a file method (e.g. MPI) to write to a file, the stage_write should use the BP reading method to be able to process it. Then you don't need to run the dataspaces server in the job either. Modify both places to use DataSpaces for staging. 
+
+2. The writing application must append new steps into the same file (name). A stream in ADIOS staging cannot consist of multiple file names but of a single "file" with multiple steps in it. E.g. we had to modify the tests/genarray/genarray.F90 to append to a file named "genarray.bp". See ./genarray_stream.F90, which is not built automatically.
+
+3. You probably end up modifying this code. For instance, you might find that the desired decomposition cannot be expressed (e.g. you have arrays with various dimensions and you want decomposition different from them), or you want to pass the output file name within the stream dataset itself, or you want to do something with the data before writing it out.
+
+
+
+
+
+
+
+
+
diff --git a/examples/staging/stage_write/.svn/text-base/decompose.h.svn-base b/examples/staging/stage_write/.svn/text-base/decompose.h.svn-base
new file mode 100644
index 0000000..0d133ff
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/decompose.h.svn-base
@@ -0,0 +1,17 @@
+#ifndef __DECOMPOSE_H_
+#define __DECOMPOSE_H_
+
+#include <stdint.h>
+
+/* Decompose a variable among several processors 
+
+   count/start: array of size/offset in each dimension 
+   writesize:   sum (count)
+
+*/
+void decompose (int numproc, int rank, int ndim, uint64_t *dims, int *decomp_values,
+                /*OUT*/ uint64_t *count,
+                /*OUT*/ uint64_t *start,
+                /*OUT*/ uint64_t *writesize);
+
+#endif
diff --git a/examples/staging/stage_write/.svn/text-base/decompose_block.c.svn-base b/examples/staging/stage_write/.svn/text-base/decompose_block.c.svn-base
new file mode 100644
index 0000000..8f49267
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/decompose_block.c.svn-base
@@ -0,0 +1,91 @@
+/* 
+Decompose arrays in all dimensions (block), evenly among 
+the processes. 
+
+Does not care how small the blocks become, so small arrays
+with many writers may suffer with this approach.
+
+*/
+
+#include "decompose.h"
+#include "utils.h"
+
+void decompose (int numproc, int rank, int ndim, uint64_t *dims, 
+                int *np, // number of processes in each dimension
+                /*OUT*/ uint64_t *count,
+                /*OUT*/ uint64_t *start,
+                /*OUT*/ uint64_t *writesize)
+{
+    int i;
+    int pos[10]; // rank's position in each dimensions
+
+    if (ndim == 0) {
+        // scalars -> rank 0 writes them
+        if (rank == 0) 
+            *writesize = 1;
+        else 
+            *writesize = 0;
+        return;
+    }
+
+    /* calculate this process' position in the n-dim space
+        0 1 2
+        3 4 5
+        6 7 8
+
+        for 1D: 
+        posx = rank/1             ! 1st dim: 0, 1, 2...,rank-1 are in the same X position
+    
+        for 2D: 
+        posx = mod(rank, npx)     ! 1st dim: 0, npx, 2npx... are in the same X position
+        posy = rank/(npx)         ! 2nd dim: npx processes belong into one dim
+
+        for 3D: 
+        posx = mod(rank, npx)     ! 1st dim: 0, npx, 2npx... are in the same X position
+        posy = mod(rank/npx, npy) ! 2nd dim: (0, npx-1) have the same dim (so divide with npx first)
+        posz = rank/(npx*npy)     ! 3rd dim: npx*npy processes belong into one dim
+    */
+    int nps = 1;
+    for (i=0; i<ndim-1; i++)
+    {
+        pos[i] = (rank / nps) % np[i];
+        nps *= np[i];
+    }
+    pos[i] = rank / nps;
+
+    char ints[256];
+    ints_to_str(ndim, pos, ints);
+    if (pos[ndim-1] >= np[ndim-1]) {
+        print("rank %d: position in %d-D space = %s ---> Out of bound process\n", rank, ndim, ints);
+    } else {
+        print("rank %d: position in %d-D space = %s\n", rank, ndim, ints);
+    }
+
+    /* Decompose each dimension according to the position */
+    *writesize = 1;
+    for (i=0; i<ndim; i++)
+    {
+        if (pos[ndim-1] >= np[ndim-1]) 
+        {
+            // this process gets nothing to read
+            count[i] = 0;
+            start[i] = 0;
+        } 
+        else 
+        {
+            count[i] = dims[i] / np[i];
+            start[i] = count[i] * pos[i];
+            if (pos[i] == np[i]-1) {
+                // last one in the dimension may need to read more than the rest
+                count[i] = dims[i] - count[i]*(np[i]-1);
+            }
+        }
+        *writesize *= count[i];
+    }
+    int64s_to_str(ndim, count, ints);
+    print("rank %d: ldims   in %d-D space = %s\n", rank, ndim, ints);
+    int64s_to_str(ndim, start, ints);
+    print("rank %d: offsets in %d-D space = %s\n", rank, ndim, ints);
+}
+
+
diff --git a/examples/staging/stage_write/.svn/text-base/decompose_single.c.svn-base b/examples/staging/stage_write/.svn/text-base/decompose_single.c.svn-base
new file mode 100644
index 0000000..522f9b4
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/decompose_single.c.svn-base
@@ -0,0 +1,27 @@
+#include "decompose.h"
+
+/* Silly decompose: let process 0 do everything */
+void decompose (int numproc, int rank, int ndim, uint64_t *dims, int *decomp_values,
+                /*OUT*/ uint64_t *count,
+                /*OUT*/ uint64_t *start,
+                /*OUT*/ uint64_t *writesize)
+{
+    int i;
+    if (rank == 0) 
+        *writesize = 1;
+    else 
+        *writesize = 0;
+
+    for (i=0; i<ndim; i++)
+    {
+        if (rank == 0) {
+            count[i] = dims[i];
+            *writesize *= dims[i];
+        } else {
+            count[i] = 0;
+        }
+        start[i] = 0;
+    }
+}
+
+
diff --git a/tests/genarray/genarray.F90 b/examples/staging/stage_write/.svn/text-base/genarray_stream.F90.svn-base
similarity index 68%
copy from tests/genarray/genarray.F90
copy to examples/staging/stage_write/.svn/text-base/genarray_stream.F90.svn-base
index aaa0547..34b467c 100644
--- a/tests/genarray/genarray.F90
+++ b/examples/staging/stage_write/.svn/text-base/genarray_stream.F90.svn-base
@@ -6,7 +6,7 @@
 !
 
 !
-!  GENARRAY
+!  GENARRAY for staging: same as genarray but appends steps into a single file
 !
 !  Write an ADIOS BP file from many processor for test purposes.
 !
@@ -17,7 +17,7 @@
 ! (c) Oak Ridge National Laboratory, 2009
 ! Author: Norbert Podhorszki
 !
-module genarray_comm
+module genarray_stream_comm
     ! arguments
     character(len=256) :: outputfile, inputfile
     integer :: npx, npy, npz  ! # of processors in x-y-z direction
@@ -32,8 +32,11 @@ module genarray_comm
 
     real*8, dimension(:,:,:), allocatable :: double_xyz
 
-    ! MPI variables
-    integer :: group_comm
+    ! MPI COMM_WORLD is for all codes started up at once on Cray XK6 
+    integer :: wrank, wnproc
+
+    ! MPI 'world' for this app variables
+    integer :: app_comm, color
     integer :: rank, nproc
     integer :: ierr
 
@@ -48,21 +51,36 @@ module genarray_comm
     real*8 :: io_start_time, io_end_time, io_total_time
 
 
-end module genarray_comm
+end module genarray_stream_comm
 
 
 program genarray
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     include 'mpif.h'
 
+    !print *,"call MPI_Init "
     call MPI_Init (ierr)
-    call MPI_Comm_dup (MPI_COMM_WORLD, group_comm, ierr)
-    call MPI_Comm_rank (MPI_COMM_WORLD, rank, ierr)
-    call MPI_Comm_size (group_comm, nproc , ierr)
-
-    call adios_init ("genarray3d.xml", ierr)
-    !call MPI_Barrier (group_comm, ierr)
+    ! World comm spans all applications started with the same aprun command 
+    ! on a Cray XK6
+    !print *,"call MPI_rank (world) "
+    call MPI_Comm_rank (MPI_COMM_WORLD, wrank, ierr)
+    !print *,"call MPI_size (world) "
+    call MPI_Comm_size (MPI_COMM_WORLD, wnproc , ierr)
+    ! Have to split and create a 'world' communicator for genarray only
+    color = 1
+    !print *,"call MPI_split "
+    !call MPI_Comm_split (MPI_COMM_WORLD, color, wrank, app_comm, ierr)
+    call MPI_Comm_dup (MPI_COMM_WORLD, app_comm, ierr)
+    !print *,"call MPI_rank (app) "
+    call MPI_Comm_rank (app_comm, rank, ierr)
+    !print *,"call MPI_size (app) "
+    call MPI_Comm_size (app_comm, nproc , ierr)
+
+    !print *,"call adios_init "
+    call adios_init ("genarray_stream.xml", ierr)
+    !print *,"MPI_Barrier "
+    call MPI_Barrier (app_comm, ierr)
 
     call processArgs()
     if (rank == 0) then
@@ -90,15 +108,18 @@ program genarray
 
     call writeArray()
     ! Terminate
-    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    call MPI_Barrier (app_comm, ierr)
     call adios_finalize (rank, ierr)
+    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    print *,"Writer calls MPI_Finalize"
     call MPI_Finalize (ierr)
+    print *,"Exit writer code "
 end program genarray
 
 
 !!***************************
 subroutine determineLocalSize()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     if (common_size) then
        ! we are done since we know them from argument
@@ -111,7 +132,7 @@ end subroutine determineLocalSize
 
 !!***************************
 subroutine determineGlobalSize()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     if (common_size) then
         gndx = npx * ndx
@@ -126,7 +147,7 @@ end subroutine determineGlobalSize
 
 !!***************************
 subroutine determineOffsets()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     integer :: posx, posy, posz ! position index in the array
     if (common_size) then
@@ -146,7 +167,7 @@ end subroutine determineOffsets
 
 !!***************************
 subroutine generateLocalArray()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     integer :: i,j,k
     allocate( double_xyz(1:ndx, 1:ndy, 1:ndz) )
@@ -162,33 +183,54 @@ end subroutine generateLocalArray
 
 !!***************************
 subroutine writeArray()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     integer*8 adios_handle, adios_groupsize
     integer adios_err
     integer :: tstep
     character(2) :: mode = "w"
-    character(len=256) :: outfilename
     include 'mpif.h'
 
 
     if (rank==0) print '("Writing: "," filename ",14x,"size(GB)",4x,"io_time(sec)",6x,"GB/s")'
     do tstep=1,timesteps
-        !if (tstep > 1) mode = "a"
+        if (tstep > 1) mode = "a"
         double_xyz = tstep + double_xyz
-        call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
+        call MPI_BARRIER(app_comm, adios_err)
         io_start_time = MPI_WTIME()
         group = "genarray"
-        write (outfilename,'(a,".",i3.3,".bp")') trim(outputfile),tstep
-        call adios_open (adios_handle, group, outfilename, mode, group_comm, adios_err)
-#include "gwrite_genarray.fh"
+        call adios_open (adios_handle, group, outputfile, mode, app_comm, adios_err)
+        adios_groupsize = 13*4 + 9*8*ndx*ndy*ndz
+        call adios_group_size (adios_handle, adios_groupsize, adios_totalsize, adios_err)
+        call adios_write (adios_handle, "gndx", gndx, adios_err)
+        call adios_write (adios_handle, "gndy", gndy, adios_err)
+        call adios_write (adios_handle, "gndz", gndz, adios_err)
+        call adios_write (adios_handle, "nproc", nproc, adios_err)
+        call adios_write (adios_handle, "npx", npx, adios_err)
+        call adios_write (adios_handle, "npy", npy, adios_err)
+        call adios_write (adios_handle, "npz", npz, adios_err)
+        call adios_write (adios_handle, "offx", offx, adios_err)
+        call adios_write (adios_handle, "offy", offy, adios_err)
+        call adios_write (adios_handle, "offz", offz, adios_err)
+        call adios_write (adios_handle, "ndx", ndx, adios_err)
+        call adios_write (adios_handle, "ndy", ndy, adios_err)
+        call adios_write (adios_handle, "ndz", ndz, adios_err)
+        call adios_write (adios_handle, "var1", double_xyz, adios_err)
+        call adios_write (adios_handle, "var2", double_xyz, adios_err)
+        call adios_write (adios_handle, "var3", double_xyz, adios_err)
+        call adios_write (adios_handle, "var4", double_xyz, adios_err)
+        call adios_write (adios_handle, "var5", double_xyz, adios_err)
+        call adios_write (adios_handle, "var6", double_xyz, adios_err)
+        call adios_write (adios_handle, "var7", double_xyz, adios_err)
+        call adios_write (adios_handle, "var8", double_xyz, adios_err)
+        call adios_write (adios_handle, "var9", double_xyz, adios_err)
         call adios_close (adios_handle, adios_err)
-        call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
+        call MPI_BARRIER(app_comm ,adios_err)
         io_end_time = MPI_WTIME()
         io_total_time = io_end_time - io_start_time
         sz = adios_totalsize * nproc/1024.d0/1024.d0/1024.d0 !size in GB
         gbs = sz/io_total_time
-        if (rank==0) print '("Writing: ",a20,d12.2,2x,d12.2,2x,d12.3)', outfilename,sz,io_total_time,gbs
+        if (rank==0) print '("Writing: ",a20,d12.2,2x,d12.2,2x,d12.3)', outputfile,sz,io_total_time,gbs
         if (tstep<timesteps) call sleep(sleeptime)
      end do
 end subroutine writeArray
@@ -211,7 +253,7 @@ end subroutine usage
 
 !!***************************
 subroutine processArgs()
-    use genarray_comm
+    use genarray_stream_comm
 
 #ifndef __GFORTRAN__
 #ifndef __GNUC__
diff --git a/tests/genarray/genarray3d.xml b/examples/staging/stage_write/.svn/text-base/genarray_stream.xml.svn-base
similarity index 97%
copy from tests/genarray/genarray3d.xml
copy to examples/staging/stage_write/.svn/text-base/genarray_stream.xml.svn-base
index 035a860..9f5c8f7 100644
--- a/tests/genarray/genarray3d.xml
+++ b/examples/staging/stage_write/.svn/text-base/genarray_stream.xml.svn-base
@@ -41,7 +41,7 @@
 
   </adios-group>
 
-  <method group="genarray" method="POSIX"/>
+  <method group="genarray" method="DATASPACES">verbose=2</method>
 
   <buffer size-MB="20" allocate-time="now"/>
 
diff --git a/examples/staging/stage_write/.svn/text-base/job.svn-base b/examples/staging/stage_write/.svn/text-base/job.svn-base
new file mode 100644
index 0000000..e3820cc
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/job.svn-base
@@ -0,0 +1,62 @@
+#!/bin/bash
+#PBS -A STF006
+#PBS -N genarray
+#PBS -j oe
+#PBS -l walltime=1:00:00,size=20
+## On the Cray, you need at least 3 nodes for 3 separate application runs
+
+cd $PBS_O_WORKDIR
+
+SERVER=/ccs/proj/e2e/dataspaces/sith/pgi/bin/dataspaces_server
+
+WRITEPROC=1
+STAGINGPROC=1
+READPROC=1
+let "PROCALL=WRITEPROC+READPROC"
+
+# clean-up previous run
+rm -f log.* core* conf dataspaces.conf 
+rm staged.bp genarray.bp
+
+# Prepare config file for DataSpaces
+echo "## Config file for DataSpaces
+ndim = 3
+dimx = 128
+dimy = 32768
+dimz = 128
+max_versions = 10
+#max_readers =" $READPROC " 
+#lock_type = 2
+" > dataspaces.conf
+
+# Run DataSpaces
+echo "-- Start DataSpaces server "$SERVER" on $STAGINGPROC PEs, -s$STAGINGPROC -c$PROCALL"
+mpirun -np $STAGINGPROC $SERVER -s$STAGINGPROC -c$PROCALL &> log.server &
+
+## Give some time for the servers to load and startup
+sleep 1s
+while [ ! -f conf ]; do
+    echo "-- File conf is not yet available from server. Sleep more"
+    sleep 1s
+done
+sleep 3s  # wait server to fill up the conf file
+
+## Export the main server config to the environment
+while read line; do
+    export set "${line}"
+done < conf
+
+echo "-- DataSpaces IDs: P2TNID = $P2TNID   P2TPID = $P2TPID"
+
+# Start GENARRAY
+echo "-- Start GENARRAY on $WRITEPROC PEs"
+mpirun -np $WRITEPROC ./genarray_stream genarray.bp $WRITEPROC 1 1 16 32 64 5 10 >& log.genarray &
+
+# Start STAGE_WRITE
+echo "-- Start STAGE_WRITE on $READPROC PEs"
+mpirun -np $READPROC ./stage_write genarray.bp staged.bp MPI \"\" $READPROC 1 1 >& log.stage_write &
+
+echo "-- Wait until all applications exit. Run ./check.sh to see status"
+wait
+rm -f conf
+
diff --git a/examples/staging/stage_write/.svn/text-base/stage_write.c.svn-base b/examples/staging/stage_write/.svn/text-base/stage_write.c.svn-base
new file mode 100644
index 0000000..57f0b2d
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/stage_write.c.svn-base
@@ -0,0 +1,430 @@
+/* 
+ * Staged write of ADIOS files using a staging method
+ *
+ * Copyright (c) 2008 - 2012.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+
+/* Staged write example code.
+   Assumptions:
+     - one output step fits into the memory of the staged writer.
+       Actually, this means, even more memory is needed than the size of output.
+       We need to read each variable while also buffering all of them for output.
+     - output steps contain the same variable set (no changes in variables)
+     - attributes are the same for all steps (will write only once here)
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include "mpi.h"
+#include "utils.h"
+#include "adios.h"
+#include "adios_read.h"
+#include "adios_error.h"
+
+//static enum ADIOS_READ_METHOD read_method = ADIOS_READ_METHOD_BP;
+static enum ADIOS_READ_METHOD read_method = ADIOS_READ_METHOD_DATASPACES;
+
+// Input arguments
+char   infilename[256];    // File/stream to read 
+char   outfilename[256];   // File to write
+char   methodname[16];     // ADIOS write method
+char   methodparams[256];  // ADIOS write method
+
+static const int max_read_buffer_size  = 1024*1024*1024;
+static const int max_write_buffer_size = 1024*1024*1024;
+
+static int timeout_sec = 600; // will stop if no data found for this time (-1: never stop)
+
+
+// Global variables
+int         rank, numproc;
+MPI_Comm    comm; 
+ADIOS_FILE *f;      // stream for reading
+int64_t    fh;     // ADIOS output file handle
+int64_t     gh;     // ADIOS group for output definitions
+uint64_t    write_total; // data size written by one processor
+uint64_t    largest_block; // the largest variable block one process reads
+char     ** group_namelist; // name of ADIOS group
+char       *readbuf; // read buffer
+int         decomp_values[10];
+
+
+int process_metadata(int step);
+int read_write(int step);
+
+void printUsage(char *prgname)
+{
+    print0("Usage: %s input output method \"params\" <decomposition>\n"
+           "    input   Input stream path\n"
+           "    output  Output file path\n"
+           "    method  ADIOS method to write with\n"
+           "    params  Write method parameters (in quotes; comma-separated list)\n"
+           "    <decomposition>    list of numbers e.g. 32 8 4\n"
+           "            Decomposition values in each dimension of an array\n"
+           "            The product of these number must be less then the number\n"
+           "            of processes. Processes whose rank is higher than the\n"
+           "            product, will not write anything.\n"
+           "               Arrays with less dimensions than the number of values,\n"
+           "            will be decomposed with using the appropriate number of\n"
+           "            values.\n"
+        ,prgname);
+}
+
+
+int processArgs(int argc, char ** argv)
+{
+    int i, j, nd, prod;
+    char *end;
+    if (argc < 5) {
+        printUsage (argv[0]);
+        return 1;
+    }
+    strncpy(infilename,     argv[1], sizeof(infilename));
+    strncpy(outfilename,    argv[2], sizeof(outfilename));
+    strncpy(methodname,     argv[3], sizeof(methodname));
+    strncpy(methodparams,   argv[4], sizeof(methodparams));
+    
+    nd = 0;
+    j = 5;
+    while (argc > j && j<11) { // get max 6 dimensions
+        errno = 0; 
+        decomp_values[nd] = strtol(argv[j], &end, 10); 
+        if (errno || (end != 0 && *end != '\0')) { 
+            print0 ("ERROR: Invalid decomposition number in argument %d: '%s'\n",
+                    j, argv[j]); 
+            printUsage(argv[0]);
+            return 1; 
+        } 
+        nd++; 
+        j++;
+    }
+
+    if (argc > j) { 
+        print0 ("ERROR: Only 6 decompositon arguments are supported\n");
+        return 1; 
+    } 
+
+    for (i=nd; i<10; i++) {
+        decomp_values[i] = 1;
+    }
+
+    prod = 1;
+    for (i=0; i<nd; i++) {
+        prod *= decomp_values[i];
+    }
+
+    if (prod > numproc) {
+        print0 ("ERROR: Product of decomposition numbers %d > number of processes %d\n", 
+                prod, numproc);
+        printUsage(argv[0]);
+        return 1; 
+    }
+
+    return 0;
+}
+
+
+int main (int argc, char ** argv) 
+{
+    int         err;
+    int         steps = 0, curr_step;
+    int         retval = 0;
+
+    MPI_Init (&argc, &argv);
+    comm = MPI_COMM_WORLD;
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &numproc);
+
+    if (processArgs(argc, argv)) {
+        return 1;
+    }
+    
+    print0("Input stream      = %s\n", infilename);
+    print0("Output stream     = %s\n", outfilename);
+    print0("Method            = %s\n", methodname);
+    print0("Method parameters = %s\n", methodparams);
+    
+
+    err = adios_read_init_method(read_method, comm, 
+                                 "max_chunk_size=100; "
+                                 "app_id =32767; \n"
+                                 "verbose= 3;"
+                                 "poll_interval  =  100;"
+                                );
+
+    if (!err) {
+        print0 ("%s\n", adios_errmsg());
+    }
+
+    adios_init_noxml();
+
+    print0 ("Waiting to open stream %s...\n", infilename);
+    f = adios_read_open_stream (infilename, read_method, comm, 
+                                             ADIOS_LOCKMODE_ALL, timeout_sec);
+    if (adios_errno == err_file_not_found) 
+    {
+        print ("rank %d: Stream not found after waiting %d seconds: %s\n", 
+               rank, timeout_sec, adios_errmsg());
+        retval = adios_errno;
+    } 
+    else if (adios_errno == err_end_of_stream) 
+    {
+        print ("rank %d: Stream terminated before open. %s\n", rank, adios_errmsg());
+        retval = adios_errno;
+    } 
+    else if (f == NULL) {
+        print ("rank %d: Error at opening stream: %s\n", rank, adios_errmsg());
+        retval = adios_errno;
+    } 
+    else 
+    {
+        // process steps here... 
+        if (f->current_step != 0) {
+            print ("rank %d: WARNING: First %d steps were missed by open.\n", 
+                   rank, f->current_step);
+        }
+
+        while (adios_errno != err_end_of_stream) {
+            steps++; // start counting from 1
+
+            print0 ("File info:\n");
+            print0 ("  current step:   %d\n", f->current_step);
+            print0 ("  last step:      %d\n", f->last_step);
+            print0 ("  # of variables: %d:\n", f->nvars);
+
+            retval = process_metadata(steps);
+            if (retval) break;
+
+            retval = read_write(steps);
+            if (retval) break;
+
+            // advance to 1) next available step with 2) blocking wait 
+            curr_step = f->current_step; // save for final bye print
+            adios_advance_step (f, 0, timeout_sec);
+
+            if (adios_errno == err_step_notready) 
+            {
+                print ("rank %d: No new step arrived within the timeout. Quit. %s\n", 
+                       rank, adios_errmsg());
+                break; // quit while loop
+            } 
+            else if (f->current_step != curr_step+1) 
+            {
+                print ("rank %d: WARNING: steps %d..%d were missed when advancing.\n", 
+                        rank, curr_step+1, f->current_step-1);
+            }
+
+        }
+
+        adios_read_close (f);
+    } 
+    print0 ("Bye after processing %d steps\n", steps);
+
+    adios_read_finalize_method (read_method);
+    adios_finalize (rank);
+    MPI_Finalize ();
+
+    return retval;
+}
+
+
+typedef struct {
+    ADIOS_VARINFO * v;
+    uint64_t        start[10];
+    uint64_t        count[10];
+    uint64_t        writesize; // size of subset this process writes, 0: do not write
+} VarInfo;
+
+VarInfo * varinfo;
+
+int process_metadata(int step)
+{
+    int retval = 0;
+    int i, j;
+    char gdims[256], ldims[256], offs[256];
+    uint64_t sum_count;
+    ADIOS_VARINFO *v; // shortcut pointer
+
+    if (step > 1)
+    {
+        // right now, nothing to prepare in later steps
+        print("Step %d. return immediately\n",step);
+        return 0;
+    }
+
+    /* First step processing */
+
+    // get groupname of stream, then declare for output
+    adios_get_grouplist(f, &group_namelist);
+    print0("Group name is %s\n", group_namelist[0]);
+    adios_declare_group(&gh,group_namelist[0],"",adios_flag_yes);
+
+
+    varinfo = (VarInfo *) malloc (sizeof(VarInfo) * f->nvars);
+    if (!varinfo) {
+        print("ERROR: rank %d cannot allocate %lu bytes\n", rank, sizeof(VarInfo)*f->nvars);
+        return 1;
+    }
+
+    write_total = 0;
+    largest_block = 0;
+
+    // Decompose each variable and calculate output buffer size
+    for (i=0; i<f->nvars; i++) 
+    {
+        print0 ("Get info on variable %d: %s\n", i, f->var_namelist[i]); 
+        varinfo[i].v = adios_inq_var_byid (f, i);
+        v = varinfo[i].v; // just a shortcut
+        if (v == NULL) {
+            print ("rank %d: ERROR: Variable %s inquiry failed: %s\n", 
+                   rank, f->var_namelist[i], adios_errmsg());
+            return 1;
+        }
+
+        // print variable type and dimensions
+        print0("    %-9s  %s", adios_type_to_string(v->type), f->var_namelist[i]);
+        if (v->ndim > 0) {
+            print0("[%llu", v->dims[0]);
+            for (j = 1; j < v->ndim; j++)
+                print0(", %llu", v->dims[j]);
+            print0("] :\n");
+        } else {
+            print0("\tscalar\n");
+        }
+
+        // determine subset we will write
+        decompose (numproc, rank, v->ndim, v->dims, decomp_values,
+                   varinfo[i].count, varinfo[i].start, &sum_count);
+        varinfo[i].writesize = sum_count * adios_type_size(v->type, v->value);
+
+        if (varinfo[i].writesize != 0) {
+            write_total += varinfo[i].writesize;
+            if (largest_block < varinfo[i].writesize)
+                largest_block = varinfo[i].writesize; 
+        }
+
+    }
+
+    // determine output buffer size and allocate it
+    uint64_t bufsize = write_total + f->nvars*128 + f->nattrs*32 + 1024; 
+    if (bufsize > max_write_buffer_size) {
+        print ("ERROR: rank %d: write buffer size needs to hold about %llu bytes, "
+                "but max is set to %d\n", rank, bufsize, max_write_buffer_size);
+        return 1;
+    }
+    print0 ("Rank %d: allocate %llu MB for output buffer\n", rank, bufsize/1048576+1);
+    adios_allocate_buffer (ADIOS_BUFFER_ALLOC_NOW, bufsize/1048576+1); 
+
+    // allocate read buffer
+    bufsize = largest_block + 128;
+    if (bufsize > max_read_buffer_size) {
+        print ("ERROR: rank %d: read buffer size needs to hold at least %llu bytes, "
+                "but max is set to %d\n", rank, bufsize, max_read_buffer_size);
+        return 1;
+    }
+    print0 ("Rank %d: allocate %g MB for input buffer\n", rank, (double)bufsize/1048576.0);
+    readbuf = (char *) malloc ((size_t)bufsize);
+    if (!readbuf) {
+        print ("ERROR: rank %d: cannot allocate %llu bytes for read buffer\n",
+               rank, bufsize);
+        return 1;
+    }
+
+    // Select output method
+    adios_select_method (gh, methodname, methodparams, "");
+
+    // Define variables for output based on decomposition
+    char *vpath, *vname;
+    for (i=0; i<f->nvars; i++) 
+    {
+        v = varinfo[i].v;
+        if (varinfo[i].writesize != 0) {
+            // define variable for ADIOS writes
+            getbasename (f->var_namelist[i], &vpath, &vname);
+
+            if (v->ndim > 0) 
+            {
+                int64s_to_str (v->ndim, v->dims, gdims);
+                int64s_to_str (v->ndim, varinfo[i].count, ldims);
+                int64s_to_str (v->ndim, varinfo[i].start, offs);
+
+                print ("rank %d: Define variable path=\"%s\" name=\"%s\"  "
+                       "gdims=%s  ldims=%s  offs=%s\n", 
+                       rank, vpath, vname, gdims, ldims, offs);
+
+                adios_define_var (gh, vname, vpath, v->type, ldims, gdims, offs);
+            }
+            else 
+            {
+                print ("rank %d: Define scalar path=\"%s\" name=\"%s\"\n",
+                       rank, vpath, vname);
+
+                adios_define_var (gh, vname, vpath, v->type, "", "", "");
+            }
+            free(vpath);
+            free(vname);
+        }
+    }
+
+    if (rank == 0)
+    {
+        // get and define attributes
+        enum ADIOS_DATATYPES attr_type;
+        void * attr_value;
+        char * attr_value_str;
+        int  attr_size;
+        for (i=0; i<f->nattrs; i++) 
+        {
+            adios_get_attr_byid (f, i, &attr_type, &attr_size, &attr_value);
+            attr_value_str = (char *)value_to_string (attr_type, attr_value, 0);
+            adios_define_attribute (gh, f->attr_namelist[i], "",
+                                    attr_type, attr_value_str, "");
+            free (attr_value);
+        }
+    }
+
+    return retval;
+}
+
+int read_write(int step)
+{
+    int retval = 0;
+    int i;
+    uint64_t total_size;
+
+    // open output file
+    adios_open (&fh, group_namelist[0], outfilename, (step==1 ? "w" : "a"), &comm);
+    adios_group_size (fh, write_total, &total_size);
+    
+    for (i=0; i<f->nvars; i++) 
+    {
+        if (varinfo[i].writesize != 0) {
+            // read variable subset
+            print ("rank %d: Read variable %d: %s\n", rank, i, f->var_namelist[i]); 
+            ADIOS_SELECTION *sel = adios_selection_boundingbox (varinfo[i].v->ndim,
+                    varinfo[i].start, 
+                    varinfo[i].count);
+            adios_schedule_read_byid (f, sel, i, 1, 1, readbuf);
+            adios_perform_reads (f, 1);   
+
+
+            // write (buffer) variable
+            print ("rank %d: Write variable %d: %s\n", rank, i, f->var_namelist[i]); 
+            adios_write(fh, f->var_namelist[i], readbuf);
+        }
+    }
+
+    adios_release_step (f); // this step is no longer needed to be locked in staging area
+    adios_close (fh); // write out output buffer to file
+    return retval;
+}
+
+
+
diff --git a/examples/staging/stage_write/.svn/text-base/test_decompose.c.svn-base b/examples/staging/stage_write/.svn/text-base/test_decompose.c.svn-base
new file mode 100644
index 0000000..26146ff
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/test_decompose.c.svn-base
@@ -0,0 +1,134 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "decompose.h"
+#include "utils.h"
+
+int ndim, nproc;
+uint64_t *dims;
+int *np;
+int rank; // unused, required by print0 in utils.h
+
+void printUsage(char *prgname)
+{
+    print0("Usage: %s N M dim1 ... dimN np1 ... npN\n"
+           "    N           Number of dimensions\n"
+           "    M           Number of processes\n"
+           "    dim1..dimN  Dimensions\n"
+           "    np1..npN    list of decomposition numbers e.g. 32 8 4\n"
+           "            Decomposition values in each dimension of an array\n"
+           "            The product of these number must be less then the number\n"
+           "            of processes. Processes whose rank is higher than the\n"
+           "            product, will not write anything.\n"
+           "               Arrays with less dimensions than the number of values,\n"
+           "            will be decomposed with using the appropriate number of\n"
+           "            values.\n"
+        ,prgname);
+}
+
+int processArgs(int argc, char ** argv)
+{   
+    int i, j, nd, prod; 
+    char *end;
+
+    if (argc < 3) {
+        printUsage (argv[0]);
+        return 1;
+    }
+
+    errno = 0;
+    ndim = strtol(argv[1], &end, 10);
+    if (errno || (end != 0 && *end != '\0')) {
+        print0 ("ERROR: Invalid decomposition number in argument 1: '%s'\n", argv[j]);
+        printUsage(argv[0]);
+        return 1;
+    }
+
+    errno = 0;
+    nproc = strtol(argv[2], &end, 10);
+    if (errno || (end != 0 && *end != '\0')) {
+        print0 ("ERROR: Invalid decomposition number in argument 2: '%s'\n", argv[j]);
+        printUsage(argv[0]);
+        return 1;
+    }
+
+    if (argc != 3+2*ndim) {
+        print0 ("ERROR: Expected number of arguments is %d\n", 2*ndim+2);
+        printUsage (argv[0]);
+        return 1;
+    }
+    
+    dims = (uint64_t*) malloc (sizeof(uint64_t) * ndim);
+    np   = (int*) malloc (sizeof(int) * ndim);
+
+    nd = 0;
+    j = 3;
+    for (nd=0; nd < ndim; nd++) { // get ndim dimensions
+        errno = 0;
+        dims[nd] = strtoll(argv[j], &end, 10);
+        if (errno || (end != 0 && *end != '\0')) {
+            print0 ("ERROR: Invalid decomposition number in argument %d: '%s'\n",
+                    j, argv[j]);
+            printUsage(argv[0]);
+            return 1;
+        }
+        j++;
+    }
+
+    for (nd=0; nd < ndim; nd++) { // get ndim decomposition values
+        errno = 0;
+        np[nd] = strtoll(argv[j], &end, 10);
+        if (errno || (end != 0 && *end != '\0')) {
+            print0 ("ERROR: Invalid decomposition number in argument %d: '%s'\n",
+                    j, argv[j]);
+            printUsage(argv[0]);
+            return 1;
+        }
+        j++;
+    }
+
+    prod = 1;
+    for (i=0; i<ndim; i++) {
+        prod *= np[i];
+    }
+
+    if (prod > nproc) {
+        print0 ("ERROR: Product of decomposition numbers %d > number of processes %d\n",
+                prod, nproc);
+        printUsage(argv[0]);
+        return 1;
+    }
+
+    return 0;
+}
+
+int main (int argc, char ** argv)
+{
+    char ints[256];
+    uint64_t count[10], start[10], totalsize;
+    int i, nd;
+
+    if (processArgs(argc, argv)) 
+        return 1;
+
+    print("# of proc: %d\n", nproc);
+    ints_to_str(ndim, np, ints);
+    print("decomposition: %s\n", ints);
+
+    for (nd = ndim; nd > 0; nd--)
+    {
+        int64s_to_str(nd, dims, ints);
+        print("--------------------------------------------\n");
+        print("%d  dimensions: %s\n", nd, ints);
+        for (i=0; i<nproc; i++) {
+            decompose (nproc, i, nd, dims, np, count, start, &totalsize);
+        }
+    }
+
+    return 0;
+}
+
+
diff --git a/examples/staging/stage_write/.svn/text-base/utils.c.svn-base b/examples/staging/stage_write/.svn/text-base/utils.c.svn-base
new file mode 100644
index 0000000..c03583c
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/utils.c.svn-base
@@ -0,0 +1,211 @@
+/* 
+ * Staged write of ADIOS files using a staging method
+ *
+ * Copyright (c) 2008 - 2012.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+#include "utils.h"
+
+void ints_to_str (int n, int *values, char *s)
+{
+    int i;
+    char v[32];
+    if (!n) {
+        s[0] = '\0';
+        return;
+    }
+    sprintf(s,"%d", values[0]);
+    for (i=1; i<n; i++)
+    {
+        sprintf (v,",%d", values[i]);
+        strcat (s,v);
+    }
+}
+
+void int64s_to_str (int n, uint64_t *values, char *s)
+{
+    int i;
+    char v[32];
+    if (!n) {
+        s[0] = '\0';
+        return;
+    }
+    sprintf(s,"%llu", values[0]);
+    for (i=1; i<n; i++)
+    {
+        sprintf (v,",%llu", values[i]);
+        strcat (s,v);
+    }
+}
+
+
+const char * value_to_string (enum ADIOS_DATATYPES type, void * data, int idx)
+{
+    static char s [100];
+    s [0] = 0;
+
+
+    switch (type)
+    {
+        case adios_unsigned_byte:
+            sprintf (s, "%u", ((uint8_t *) data)[idx]);
+            break;
+
+        case adios_byte:
+            sprintf (s, "%d", ((int8_t *) data)[idx]);
+            break;
+
+        case adios_short:
+            sprintf (s, "%hd", ((int16_t *) data)[idx]);
+            break;
+
+        case adios_unsigned_short:
+            sprintf (s, "%hu", ((uint16_t *) data)[idx]);
+            break;
+
+        case adios_integer:
+            sprintf (s, "%d", ((int32_t *) data)[idx]);
+            break;
+
+        case adios_unsigned_integer:
+            sprintf (s, "%u", ((uint32_t *) data)[idx]);
+            break;
+
+        case adios_long:
+            sprintf (s, "%lld", ((int64_t *) data)[idx]);
+            break;
+
+        case adios_unsigned_long:
+            sprintf (s, "%llu", ((uint64_t *) data)[idx]);
+            break;
+
+        case adios_real:
+            sprintf (s, "%g", ((float *) data)[idx]);
+            break;
+
+        case adios_double:
+            sprintf (s, "%lg", ((double *) data)[idx]);
+            break;
+
+        case adios_long_double:
+            sprintf (s, "%Lg", ((long double *) data)[idx]);
+            break;
+
+        case adios_string:
+            return (char*) ((char *)data+idx);
+            break;
+
+        case adios_complex:
+            sprintf (s, "(%g, %g)", 
+                    ((float *) data)[2*idx], ((float *) data)[2*idx+1]);
+            break;
+
+        case adios_double_complex:
+            sprintf (s, "(%lg, %lg)", 
+                    ((double *) data)[2*idx], ((double *) data)[2*idx+1]);
+            break;
+        
+        default:
+            sprintf (s, "unknown");
+            break;
+    }
+
+    return s;
+}
+
+
+
+
+void getbasename (char *path, char **dirname, char **basename)
+{
+    char *work, *ptr;
+
+    work = strdup(path);
+    if (work[strlen(work)-1] == '/' && strlen(work)>1)
+        work[strlen(work)-1] = '\0';
+
+    ptr = rindex(work, '/');
+    if (ptr && ptr != work) {
+        // found a / and but not the beginning / of a full path
+        ptr[0] = 0;
+        *dirname = strdup(work);
+        ptr[0] = '/';
+        *basename = strdup(ptr+1);
+    } else if (ptr == work) {
+        // found / as the first character 
+        *dirname = strdup("");
+        *basename = strdup(ptr+1);
+    } else {
+        *dirname = NULL; //strdup(".");
+        *basename = strdup(work);
+    }
+    free(work);
+}
+
+
+bool file_exists (char * path)
+{
+    struct stat sb;
+    int i = stat ( path, &sb );
+    if ( i == 0 )
+	/* File found */
+	return true;
+    return false;
+}
+
+bool is_dir(char *path) {
+     struct stat sb;
+     if ( !stat( path, &sb) ) {
+         if ( sb.st_mode & S_IFDIR ) {
+             //if (verbose) printf("isDir( %s ) = true\n", path);
+             return  true;
+         }
+     } /* else {
+         // for whatever reason, stat cannot be retrieved
+         // so just say here, it is not a directory 
+        retval = false;
+     }*/
+     return false;
+}
+
+int createdir_recursive( char* path)
+{
+    int res;
+    char *dirs, *base;
+    /*printf(" called mkdir %s\n", path);*/
+    getbasename(path, &dirs, &base);
+    if ( dirs != NULL)  {
+        if ( !is_dir(dirs) ) {
+	    /*printf(" dirs=%s  base=%s\n", dirs, base);*/
+            res = createdir_recursive(dirs);
+	} else res = 0;
+        free(dirs);
+        if (res) return res;
+    }
+    if (file_exists(path))
+        res = 0;
+    else
+        res = mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+    if (res) {
+        if (errno == EEXIST) {
+            print("Concurrency error: createdir %s failed: %s\n", path, strerror(errno));
+            print("Some other process created this dir already during this function call\n");
+            res = 0;
+        } else {
+            print("createdir %s failed: %s\n", path, strerror(errno));
+        }
+    }
+    //else
+    //   print("createdir %s succeeded\n", path);
+
+    free(base);
+    return (res);
+}
+
diff --git a/examples/staging/stage_write/.svn/text-base/utils.h.svn-base b/examples/staging/stage_write/.svn/text-base/utils.h.svn-base
new file mode 100644
index 0000000..21196aa
--- /dev/null
+++ b/examples/staging/stage_write/.svn/text-base/utils.h.svn-base
@@ -0,0 +1,50 @@
+/* 
+ * Staged write of ADIOS files using a staging method
+ *
+ * Copyright (c) 2008 - 2012.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#ifndef __UTILS_H_
+#define __UTILS_H_
+
+#include <stdio.h>
+#include <stdint.h>
+#include "adios_types.h"
+
+#define MAX3(a,b,c) (a > b ? (a > c ? a : c) : (b > c ? b : c))
+#define print(...) fprintf (stderr, __VA_ARGS__); 
+#define print0(...) if (!rank) fprintf (stderr, __VA_ARGS__); 
+
+#define bool int
+#define false 0
+#define true 1
+
+void ints_to_str (int n, int *values, char *s);
+void int64s_to_str (int n, uint64_t *values, char *s);
+const char * value_to_string (enum ADIOS_DATATYPES type, void * data, int idx);
+
+/* Get basename and dirname from path.
+   Allocates memory for both strings, they should be freed after use.
+   May return NULL for dirname. "" for dirname means path is like /file.
+
+   dir1/dir2/file   dir=dir1/dir2   base=file
+   dir1/file        dir=dir1        base=file
+   file             dir=null        base=file
+   /file            dir=""          base=file
+   dir1/            dir=null        base=dir1
+   /                dir=""          base=""
+   ""               dir=null        base=""
+*/
+void getbasename (char *path, char **dirname, char **basename);
+
+bool file_exists (char *path);  // true if stat(path) succeeds, 
+                                // i.e. it is an accessible item on file system
+bool is_dir (char *path);       // true if path is a directory (and stat() succeeds on it)
+
+/** mkdir -r
+  * return: 0 on success, otherwise mkdir() syscall's return value
+  */
+int createdir_recursive( char* path);
+
+#endif
+
diff --git a/examples/staging/stage_write/Makefile b/examples/staging/stage_write/Makefile
new file mode 100644
index 0000000..398c102
--- /dev/null
+++ b/examples/staging/stage_write/Makefile
@@ -0,0 +1,41 @@
+## mpicc SETTINGS
+CC=mpicc
+CFLAGS=-g 
+LDFLAGS=-g
+
+## cc SETTINGS
+#CC=cc
+#CFLAGS = -O3
+#LDFLAGS =
+
+#TARGET=gnu
+TARGET=pgi
+
+## Set ADIOS_DIR here or before doing make
+override ADIOS_DIR=/ccs/proj/e2e/pnorbert/ADIOS/sith.${TARGET}
+override ADIOS_INC=`${ADIOS_DIR}/bin/adios_config -c`
+override ADIOS_CLIB=`${ADIOS_DIR}/bin/adios_config -l`
+
+
+default: stage_write 
+all: default
+
+OBJS = utils.o decompose_block.o 
+
+%.o: %.c
+	${CC} ${CFLAGS} -c ${ADIOS_INC} $<
+
+stage_write: ${OBJS} stage_write.o
+	${CC} ${LDFLAGS} -o stage_write ${OBJS} stage_write.o ${ADIOS_CLIB}
+
+test_decompose: ${OBJS} test_decompose.o 
+	${CC} ${LDFLAGS} -o test_decompose ${OBJS} test_decompose.o ${ADIOS_CLIB}
+
+clean:
+	rm -f *.o *.mod *.fh core.*
+	rm -f stage_write
+
+
+distclean: clean
+	rm -f log.* dataspaces.conf conf srv.lck *.bp
+
diff --git a/examples/staging/stage_write/Makefile.genarray_stream b/examples/staging/stage_write/Makefile.genarray_stream
new file mode 100644
index 0000000..c1b45de
--- /dev/null
+++ b/examples/staging/stage_write/Makefile.genarray_stream
@@ -0,0 +1,30 @@
+## MPIF90 SETTINGS
+FC=mpif90
+FFLAGS=-g
+
+## FTN SETTINGS
+#FC=ftn
+#FFLAGS = -O3
+
+#TARGET=gnu
+TARGET=pgi
+
+## Set ADIOS_DIR here or before doing make
+override ADIOS_DIR=/ccs/proj/e2e/pnorbert/ADIOS/sith.${TARGET}
+override ADIOS_INC=`${ADIOS_DIR}/bin/adios_config -c -f`
+override ADIOS_FLIB=`${ADIOS_DIR}/bin/adios_config -l -f`
+
+default: genarray_stream
+all: default
+
+genarray_stream.o : genarray_stream.F90 
+	${FC} -g -c ${ADIOS_INC} genarray_stream.F90  $<
+
+genarray_stream:  genarray_stream.o
+	${FC} -g -o genarray_stream genarray_stream.o ${ADIOS_FLIB} 
+
+
+clean:
+	rm -f *.o *.mod *.fh core.*
+	rm -f genarray_stream
+        
diff --git a/examples/staging/stage_write/README b/examples/staging/stage_write/README
new file mode 100644
index 0000000..041b65a
--- /dev/null
+++ b/examples/staging/stage_write/README
@@ -0,0 +1,47 @@
+STAGE WRITE CODE
+
+This code can be used to perform your disk I/O after sending the data to a staging area. 
+It can also be used to read in your file with a certain number of processors with a new decomposition and write out the data with the new layout.
+
+BUILD
+=====
+Edit the Makefile for your needs. This example is not built automatically with ADIOS. You need to install ADIOS first, then use the installation to build this code. 
+
+The read method in this code is not set by argument but is in the source. Set it for your target usage. See variable "read_method", set around line 32. 
+
+USAGE
+=====
+The 'job' file provides an example how to launch 3 applications within one job. Besides your own app, first you have to prepare and start the staging server (DataSpaces in the job script). Then you can run both your app and this stage writer code.
+
+Parameters to stage write:
+    E.g. genarray.bp staged.bp MPI \"\" $READPROC 1 1 
+
+    input   Input stream path
+    output  Output file path
+    method  ADIOS method to write with
+    params  Write method parameters (in quotes; comma-separated list)
+    <decomposition>    list of numbers e.g. 32 8 4
+            Decomposition values in each dimension of an array
+            The product of these number must be less then the number
+            of processes. Processes whose rank is higher than the
+            product, will not read/write anything.
+               Arrays with less dimensions than the number of values,
+            will be decomposed with using the numbers from the beginning.
+
+NOTES
+=====
+1. The job example is set for the ./genarray_stream.F90 writing application, which is not built automatically. Use the Makefile.genarray_stream to build it. 
+WARNING: the method used in the genarray_stream.xml should match the reading method in stage_write.c. That is, if you use a file method (e.g. MPI) to write to a file, the stage_write should use the BP reading method to be able to process it. Then you don't need to run the dataspaces server in the job either. Modify both places to use DataSpaces for staging. 
+
+2. The writing application must append new steps into the same file (name). A stream in ADIOS staging cannot consist of multiple file names but of a single "file" with multiple steps in it. E.g. we had to modify the tests/genarray/genarray.F90 to append to a file named "genarray.bp". See ./genarray_stream.F90, which is not built automatically.
+
+3. You probably end up modifying this code. For instance, you might find that the desired decomposition cannot be expressed (e.g. you have arrays with various dimensions and you want decomposition different from them), or you want to pass the output file name within the stream dataset itself, or you want to do something with the data before writing it out.
+
+
+
+
+
+
+
+
+
diff --git a/examples/staging/stage_write/decompose.h b/examples/staging/stage_write/decompose.h
new file mode 100644
index 0000000..0d133ff
--- /dev/null
+++ b/examples/staging/stage_write/decompose.h
@@ -0,0 +1,17 @@
+#ifndef __DECOMPOSE_H_
+#define __DECOMPOSE_H_
+
+#include <stdint.h>
+
+/* Decompose a variable among several processors 
+
+   count/start: array of size/offset in each dimension 
+   writesize:   sum (count)
+
+*/
+void decompose (int numproc, int rank, int ndim, uint64_t *dims, int *decomp_values,
+                /*OUT*/ uint64_t *count,
+                /*OUT*/ uint64_t *start,
+                /*OUT*/ uint64_t *writesize);
+
+#endif
diff --git a/examples/staging/stage_write/decompose_block.c b/examples/staging/stage_write/decompose_block.c
new file mode 100644
index 0000000..8f49267
--- /dev/null
+++ b/examples/staging/stage_write/decompose_block.c
@@ -0,0 +1,91 @@
+/* 
+Decompose arrays in all dimensions (block), evenly among 
+the processes. 
+
+Does not care how small the blocks become, so small arrays
+with many writers may suffer with this approach.
+
+*/
+
+#include "decompose.h"
+#include "utils.h"
+
+void decompose (int numproc, int rank, int ndim, uint64_t *dims, 
+                int *np, // number of processes in each dimension
+                /*OUT*/ uint64_t *count,
+                /*OUT*/ uint64_t *start,
+                /*OUT*/ uint64_t *writesize)
+{
+    int i;
+    int pos[10]; // rank's position in each dimensions
+
+    if (ndim == 0) {
+        // scalars -> rank 0 writes them
+        if (rank == 0) 
+            *writesize = 1;
+        else 
+            *writesize = 0;
+        return;
+    }
+
+    /* calculate this process' position in the n-dim space
+        0 1 2
+        3 4 5
+        6 7 8
+
+        for 1D: 
+        posx = rank/1             ! 1st dim: 0, 1, 2...,rank-1 are in the same X position
+    
+        for 2D: 
+        posx = mod(rank, npx)     ! 1st dim: 0, npx, 2npx... are in the same X position
+        posy = rank/(npx)         ! 2nd dim: npx processes belong into one dim
+
+        for 3D: 
+        posx = mod(rank, npx)     ! 1st dim: 0, npx, 2npx... are in the same X position
+        posy = mod(rank/npx, npy) ! 2nd dim: (0, npx-1) have the same dim (so divide with npx first)
+        posz = rank/(npx*npy)     ! 3rd dim: npx*npy processes belong into one dim
+    */
+    int nps = 1;
+    for (i=0; i<ndim-1; i++)
+    {
+        pos[i] = (rank / nps) % np[i];
+        nps *= np[i];
+    }
+    pos[i] = rank / nps;
+
+    char ints[256];
+    ints_to_str(ndim, pos, ints);
+    if (pos[ndim-1] >= np[ndim-1]) {
+        print("rank %d: position in %d-D space = %s ---> Out of bound process\n", rank, ndim, ints);
+    } else {
+        print("rank %d: position in %d-D space = %s\n", rank, ndim, ints);
+    }
+
+    /* Decompose each dimension according to the position */
+    *writesize = 1;
+    for (i=0; i<ndim; i++)
+    {
+        if (pos[ndim-1] >= np[ndim-1]) 
+        {
+            // this process gets nothing to read
+            count[i] = 0;
+            start[i] = 0;
+        } 
+        else 
+        {
+            count[i] = dims[i] / np[i];
+            start[i] = count[i] * pos[i];
+            if (pos[i] == np[i]-1) {
+                // last one in the dimension may need to read more than the rest
+                count[i] = dims[i] - count[i]*(np[i]-1);
+            }
+        }
+        *writesize *= count[i];
+    }
+    int64s_to_str(ndim, count, ints);
+    print("rank %d: ldims   in %d-D space = %s\n", rank, ndim, ints);
+    int64s_to_str(ndim, start, ints);
+    print("rank %d: offsets in %d-D space = %s\n", rank, ndim, ints);
+}
+
+
diff --git a/examples/staging/stage_write/decompose_single.c b/examples/staging/stage_write/decompose_single.c
new file mode 100644
index 0000000..522f9b4
--- /dev/null
+++ b/examples/staging/stage_write/decompose_single.c
@@ -0,0 +1,27 @@
+#include "decompose.h"
+
+/* Silly decompose: let process 0 do everything */
+void decompose (int numproc, int rank, int ndim, uint64_t *dims, int *decomp_values,
+                /*OUT*/ uint64_t *count,
+                /*OUT*/ uint64_t *start,
+                /*OUT*/ uint64_t *writesize)
+{
+    int i;
+    if (rank == 0) 
+        *writesize = 1;
+    else 
+        *writesize = 0;
+
+    for (i=0; i<ndim; i++)
+    {
+        if (rank == 0) {
+            count[i] = dims[i];
+            *writesize *= dims[i];
+        } else {
+            count[i] = 0;
+        }
+        start[i] = 0;
+    }
+}
+
+
diff --git a/tests/genarray/genarray.F90 b/examples/staging/stage_write/genarray_stream.F90
similarity index 68%
copy from tests/genarray/genarray.F90
copy to examples/staging/stage_write/genarray_stream.F90
index aaa0547..34b467c 100644
--- a/tests/genarray/genarray.F90
+++ b/examples/staging/stage_write/genarray_stream.F90
@@ -6,7 +6,7 @@
 !
 
 !
-!  GENARRAY
+!  GENARRAY for staging: same as genarray but appends steps into a single file
 !
 !  Write an ADIOS BP file from many processor for test purposes.
 !
@@ -17,7 +17,7 @@
 ! (c) Oak Ridge National Laboratory, 2009
 ! Author: Norbert Podhorszki
 !
-module genarray_comm
+module genarray_stream_comm
     ! arguments
     character(len=256) :: outputfile, inputfile
     integer :: npx, npy, npz  ! # of processors in x-y-z direction
@@ -32,8 +32,11 @@ module genarray_comm
 
     real*8, dimension(:,:,:), allocatable :: double_xyz
 
-    ! MPI variables
-    integer :: group_comm
+    ! MPI COMM_WORLD is for all codes started up at once on Cray XK6 
+    integer :: wrank, wnproc
+
+    ! MPI 'world' for this app variables
+    integer :: app_comm, color
     integer :: rank, nproc
     integer :: ierr
 
@@ -48,21 +51,36 @@ module genarray_comm
     real*8 :: io_start_time, io_end_time, io_total_time
 
 
-end module genarray_comm
+end module genarray_stream_comm
 
 
 program genarray
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     include 'mpif.h'
 
+    !print *,"call MPI_Init "
     call MPI_Init (ierr)
-    call MPI_Comm_dup (MPI_COMM_WORLD, group_comm, ierr)
-    call MPI_Comm_rank (MPI_COMM_WORLD, rank, ierr)
-    call MPI_Comm_size (group_comm, nproc , ierr)
-
-    call adios_init ("genarray3d.xml", ierr)
-    !call MPI_Barrier (group_comm, ierr)
+    ! World comm spans all applications started with the same aprun command 
+    ! on a Cray XK6
+    !print *,"call MPI_rank (world) "
+    call MPI_Comm_rank (MPI_COMM_WORLD, wrank, ierr)
+    !print *,"call MPI_size (world) "
+    call MPI_Comm_size (MPI_COMM_WORLD, wnproc , ierr)
+    ! Have to split and create a 'world' communicator for genarray only
+    color = 1
+    !print *,"call MPI_split "
+    !call MPI_Comm_split (MPI_COMM_WORLD, color, wrank, app_comm, ierr)
+    call MPI_Comm_dup (MPI_COMM_WORLD, app_comm, ierr)
+    !print *,"call MPI_rank (app) "
+    call MPI_Comm_rank (app_comm, rank, ierr)
+    !print *,"call MPI_size (app) "
+    call MPI_Comm_size (app_comm, nproc , ierr)
+
+    !print *,"call adios_init "
+    call adios_init ("genarray_stream.xml", ierr)
+    !print *,"MPI_Barrier "
+    call MPI_Barrier (app_comm, ierr)
 
     call processArgs()
     if (rank == 0) then
@@ -90,15 +108,18 @@ program genarray
 
     call writeArray()
     ! Terminate
-    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    call MPI_Barrier (app_comm, ierr)
     call adios_finalize (rank, ierr)
+    call MPI_Barrier (MPI_COMM_WORLD, ierr)
+    print *,"Writer calls MPI_Finalize"
     call MPI_Finalize (ierr)
+    print *,"Exit writer code "
 end program genarray
 
 
 !!***************************
 subroutine determineLocalSize()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     if (common_size) then
        ! we are done since we know them from argument
@@ -111,7 +132,7 @@ end subroutine determineLocalSize
 
 !!***************************
 subroutine determineGlobalSize()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     if (common_size) then
         gndx = npx * ndx
@@ -126,7 +147,7 @@ end subroutine determineGlobalSize
 
 !!***************************
 subroutine determineOffsets()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     integer :: posx, posy, posz ! position index in the array
     if (common_size) then
@@ -146,7 +167,7 @@ end subroutine determineOffsets
 
 !!***************************
 subroutine generateLocalArray()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     integer :: i,j,k
     allocate( double_xyz(1:ndx, 1:ndy, 1:ndz) )
@@ -162,33 +183,54 @@ end subroutine generateLocalArray
 
 !!***************************
 subroutine writeArray()
-    use genarray_comm
+    use genarray_stream_comm
     implicit none
     integer*8 adios_handle, adios_groupsize
     integer adios_err
     integer :: tstep
     character(2) :: mode = "w"
-    character(len=256) :: outfilename
     include 'mpif.h'
 
 
     if (rank==0) print '("Writing: "," filename ",14x,"size(GB)",4x,"io_time(sec)",6x,"GB/s")'
     do tstep=1,timesteps
-        !if (tstep > 1) mode = "a"
+        if (tstep > 1) mode = "a"
         double_xyz = tstep + double_xyz
-        call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
+        call MPI_BARRIER(app_comm, adios_err)
         io_start_time = MPI_WTIME()
         group = "genarray"
-        write (outfilename,'(a,".",i3.3,".bp")') trim(outputfile),tstep
-        call adios_open (adios_handle, group, outfilename, mode, group_comm, adios_err)
-#include "gwrite_genarray.fh"
+        call adios_open (adios_handle, group, outputfile, mode, app_comm, adios_err)
+        adios_groupsize = 13*4 + 9*8*ndx*ndy*ndz
+        call adios_group_size (adios_handle, adios_groupsize, adios_totalsize, adios_err)
+        call adios_write (adios_handle, "gndx", gndx, adios_err)
+        call adios_write (adios_handle, "gndy", gndy, adios_err)
+        call adios_write (adios_handle, "gndz", gndz, adios_err)
+        call adios_write (adios_handle, "nproc", nproc, adios_err)
+        call adios_write (adios_handle, "npx", npx, adios_err)
+        call adios_write (adios_handle, "npy", npy, adios_err)
+        call adios_write (adios_handle, "npz", npz, adios_err)
+        call adios_write (adios_handle, "offx", offx, adios_err)
+        call adios_write (adios_handle, "offy", offy, adios_err)
+        call adios_write (adios_handle, "offz", offz, adios_err)
+        call adios_write (adios_handle, "ndx", ndx, adios_err)
+        call adios_write (adios_handle, "ndy", ndy, adios_err)
+        call adios_write (adios_handle, "ndz", ndz, adios_err)
+        call adios_write (adios_handle, "var1", double_xyz, adios_err)
+        call adios_write (adios_handle, "var2", double_xyz, adios_err)
+        call adios_write (adios_handle, "var3", double_xyz, adios_err)
+        call adios_write (adios_handle, "var4", double_xyz, adios_err)
+        call adios_write (adios_handle, "var5", double_xyz, adios_err)
+        call adios_write (adios_handle, "var6", double_xyz, adios_err)
+        call adios_write (adios_handle, "var7", double_xyz, adios_err)
+        call adios_write (adios_handle, "var8", double_xyz, adios_err)
+        call adios_write (adios_handle, "var9", double_xyz, adios_err)
         call adios_close (adios_handle, adios_err)
-        call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
+        call MPI_BARRIER(app_comm ,adios_err)
         io_end_time = MPI_WTIME()
         io_total_time = io_end_time - io_start_time
         sz = adios_totalsize * nproc/1024.d0/1024.d0/1024.d0 !size in GB
         gbs = sz/io_total_time
-        if (rank==0) print '("Writing: ",a20,d12.2,2x,d12.2,2x,d12.3)', outfilename,sz,io_total_time,gbs
+        if (rank==0) print '("Writing: ",a20,d12.2,2x,d12.2,2x,d12.3)', outputfile,sz,io_total_time,gbs
         if (tstep<timesteps) call sleep(sleeptime)
      end do
 end subroutine writeArray
@@ -211,7 +253,7 @@ end subroutine usage
 
 !!***************************
 subroutine processArgs()
-    use genarray_comm
+    use genarray_stream_comm
 
 #ifndef __GFORTRAN__
 #ifndef __GNUC__
diff --git a/tests/genarray/genarray3d.xml b/examples/staging/stage_write/genarray_stream.xml
similarity index 97%
copy from tests/genarray/genarray3d.xml
copy to examples/staging/stage_write/genarray_stream.xml
index 035a860..9f5c8f7 100644
--- a/tests/genarray/genarray3d.xml
+++ b/examples/staging/stage_write/genarray_stream.xml
@@ -41,7 +41,7 @@
 
   </adios-group>
 
-  <method group="genarray" method="POSIX"/>
+  <method group="genarray" method="DATASPACES">verbose=2</method>
 
   <buffer size-MB="20" allocate-time="now"/>
 
diff --git a/examples/staging/stage_write/job b/examples/staging/stage_write/job
new file mode 100755
index 0000000..e3820cc
--- /dev/null
+++ b/examples/staging/stage_write/job
@@ -0,0 +1,62 @@
+#!/bin/bash
+#PBS -A STF006
+#PBS -N genarray
+#PBS -j oe
+#PBS -l walltime=1:00:00,size=20
+## On the Cray, you need at least 3 nodes for 3 separate application runs
+
+cd $PBS_O_WORKDIR
+
+SERVER=/ccs/proj/e2e/dataspaces/sith/pgi/bin/dataspaces_server
+
+WRITEPROC=1
+STAGINGPROC=1
+READPROC=1
+let "PROCALL=WRITEPROC+READPROC"
+
+# clean-up previous run
+rm -f log.* core* conf dataspaces.conf 
+rm staged.bp genarray.bp
+
+# Prepare config file for DataSpaces
+echo "## Config file for DataSpaces
+ndim = 3
+dimx = 128
+dimy = 32768
+dimz = 128
+max_versions = 10
+#max_readers =" $READPROC " 
+#lock_type = 2
+" > dataspaces.conf
+
+# Run DataSpaces
+echo "-- Start DataSpaces server "$SERVER" on $STAGINGPROC PEs, -s$STAGINGPROC -c$PROCALL"
+mpirun -np $STAGINGPROC $SERVER -s$STAGINGPROC -c$PROCALL &> log.server &
+
+## Give some time for the servers to load and startup
+sleep 1s
+while [ ! -f conf ]; do
+    echo "-- File conf is not yet available from server. Sleep more"
+    sleep 1s
+done
+sleep 3s  # wait server to fill up the conf file
+
+## Export the main server config to the environment
+while read line; do
+    export set "${line}"
+done < conf
+
+echo "-- DataSpaces IDs: P2TNID = $P2TNID   P2TPID = $P2TPID"
+
+# Start GENARRAY
+echo "-- Start GENARRAY on $WRITEPROC PEs"
+mpirun -np $WRITEPROC ./genarray_stream genarray.bp $WRITEPROC 1 1 16 32 64 5 10 >& log.genarray &
+
+# Start STAGE_WRITE
+echo "-- Start STAGE_WRITE on $READPROC PEs"
+mpirun -np $READPROC ./stage_write genarray.bp staged.bp MPI \"\" $READPROC 1 1 >& log.stage_write &
+
+echo "-- Wait until all applications exit. Run ./check.sh to see status"
+wait
+rm -f conf
+
diff --git a/examples/staging/stage_write/stage_write.c b/examples/staging/stage_write/stage_write.c
new file mode 100644
index 0000000..57f0b2d
--- /dev/null
+++ b/examples/staging/stage_write/stage_write.c
@@ -0,0 +1,430 @@
+/* 
+ * Staged write of ADIOS files using a staging method
+ *
+ * Copyright (c) 2008 - 2012.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+
+/* Staged write example code.
+   Assumptions:
+     - one output step fits into the memory of the staged writer.
+       Actually, this means, even more memory is needed than the size of output.
+       We need to read each variable while also buffering all of them for output.
+     - output steps contain the same variable set (no changes in variables)
+     - attributes are the same for all steps (will write only once here)
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <errno.h>
+#include "mpi.h"
+#include "utils.h"
+#include "adios.h"
+#include "adios_read.h"
+#include "adios_error.h"
+
+//static enum ADIOS_READ_METHOD read_method = ADIOS_READ_METHOD_BP;
+static enum ADIOS_READ_METHOD read_method = ADIOS_READ_METHOD_DATASPACES;
+
+// Input arguments
+char   infilename[256];    // File/stream to read 
+char   outfilename[256];   // File to write
+char   methodname[16];     // ADIOS write method
+char   methodparams[256];  // ADIOS write method
+
+static const int max_read_buffer_size  = 1024*1024*1024;
+static const int max_write_buffer_size = 1024*1024*1024;
+
+static int timeout_sec = 600; // will stop if no data found for this time (-1: never stop)
+
+
+// Global variables
+int         rank, numproc;
+MPI_Comm    comm; 
+ADIOS_FILE *f;      // stream for reading
+int64_t    fh;     // ADIOS output file handle
+int64_t     gh;     // ADIOS group for output definitions
+uint64_t    write_total; // data size written by one processor
+uint64_t    largest_block; // the largest variable block one process reads
+char     ** group_namelist; // name of ADIOS group
+char       *readbuf; // read buffer
+int         decomp_values[10];
+
+
+int process_metadata(int step);
+int read_write(int step);
+
+void printUsage(char *prgname)
+{
+    print0("Usage: %s input output method \"params\" <decomposition>\n"
+           "    input   Input stream path\n"
+           "    output  Output file path\n"
+           "    method  ADIOS method to write with\n"
+           "    params  Write method parameters (in quotes; comma-separated list)\n"
+           "    <decomposition>    list of numbers e.g. 32 8 4\n"
+           "            Decomposition values in each dimension of an array\n"
+           "            The product of these number must be less then the number\n"
+           "            of processes. Processes whose rank is higher than the\n"
+           "            product, will not write anything.\n"
+           "               Arrays with less dimensions than the number of values,\n"
+           "            will be decomposed with using the appropriate number of\n"
+           "            values.\n"
+        ,prgname);
+}
+
+
+int processArgs(int argc, char ** argv)
+{
+    int i, j, nd, prod;
+    char *end;
+    if (argc < 5) {
+        printUsage (argv[0]);
+        return 1;
+    }
+    strncpy(infilename,     argv[1], sizeof(infilename));
+    strncpy(outfilename,    argv[2], sizeof(outfilename));
+    strncpy(methodname,     argv[3], sizeof(methodname));
+    strncpy(methodparams,   argv[4], sizeof(methodparams));
+    
+    nd = 0;
+    j = 5;
+    while (argc > j && j<11) { // get max 6 dimensions
+        errno = 0; 
+        decomp_values[nd] = strtol(argv[j], &end, 10); 
+        if (errno || (end != 0 && *end != '\0')) { 
+            print0 ("ERROR: Invalid decomposition number in argument %d: '%s'\n",
+                    j, argv[j]); 
+            printUsage(argv[0]);
+            return 1; 
+        } 
+        nd++; 
+        j++;
+    }
+
+    if (argc > j) { 
+        print0 ("ERROR: Only 6 decompositon arguments are supported\n");
+        return 1; 
+    } 
+
+    for (i=nd; i<10; i++) {
+        decomp_values[i] = 1;
+    }
+
+    prod = 1;
+    for (i=0; i<nd; i++) {
+        prod *= decomp_values[i];
+    }
+
+    if (prod > numproc) {
+        print0 ("ERROR: Product of decomposition numbers %d > number of processes %d\n", 
+                prod, numproc);
+        printUsage(argv[0]);
+        return 1; 
+    }
+
+    return 0;
+}
+
+
+int main (int argc, char ** argv) 
+{
+    int         err;
+    int         steps = 0, curr_step;
+    int         retval = 0;
+
+    MPI_Init (&argc, &argv);
+    comm = MPI_COMM_WORLD;
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &numproc);
+
+    if (processArgs(argc, argv)) {
+        return 1;
+    }
+    
+    print0("Input stream      = %s\n", infilename);
+    print0("Output stream     = %s\n", outfilename);
+    print0("Method            = %s\n", methodname);
+    print0("Method parameters = %s\n", methodparams);
+    
+
+    err = adios_read_init_method(read_method, comm, 
+                                 "max_chunk_size=100; "
+                                 "app_id =32767; \n"
+                                 "verbose= 3;"
+                                 "poll_interval  =  100;"
+                                );
+
+    if (!err) {
+        print0 ("%s\n", adios_errmsg());
+    }
+
+    adios_init_noxml();
+
+    print0 ("Waiting to open stream %s...\n", infilename);
+    f = adios_read_open_stream (infilename, read_method, comm, 
+                                             ADIOS_LOCKMODE_ALL, timeout_sec);
+    if (adios_errno == err_file_not_found) 
+    {
+        print ("rank %d: Stream not found after waiting %d seconds: %s\n", 
+               rank, timeout_sec, adios_errmsg());
+        retval = adios_errno;
+    } 
+    else if (adios_errno == err_end_of_stream) 
+    {
+        print ("rank %d: Stream terminated before open. %s\n", rank, adios_errmsg());
+        retval = adios_errno;
+    } 
+    else if (f == NULL) {
+        print ("rank %d: Error at opening stream: %s\n", rank, adios_errmsg());
+        retval = adios_errno;
+    } 
+    else 
+    {
+        // process steps here... 
+        if (f->current_step != 0) {
+            print ("rank %d: WARNING: First %d steps were missed by open.\n", 
+                   rank, f->current_step);
+        }
+
+        while (adios_errno != err_end_of_stream) {
+            steps++; // start counting from 1
+
+            print0 ("File info:\n");
+            print0 ("  current step:   %d\n", f->current_step);
+            print0 ("  last step:      %d\n", f->last_step);
+            print0 ("  # of variables: %d:\n", f->nvars);
+
+            retval = process_metadata(steps);
+            if (retval) break;
+
+            retval = read_write(steps);
+            if (retval) break;
+
+            // advance to 1) next available step with 2) blocking wait 
+            curr_step = f->current_step; // save for final bye print
+            adios_advance_step (f, 0, timeout_sec);
+
+            if (adios_errno == err_step_notready) 
+            {
+                print ("rank %d: No new step arrived within the timeout. Quit. %s\n", 
+                       rank, adios_errmsg());
+                break; // quit while loop
+            } 
+            else if (f->current_step != curr_step+1) 
+            {
+                print ("rank %d: WARNING: steps %d..%d were missed when advancing.\n", 
+                        rank, curr_step+1, f->current_step-1);
+            }
+
+        }
+
+        adios_read_close (f);
+    } 
+    print0 ("Bye after processing %d steps\n", steps);
+
+    adios_read_finalize_method (read_method);
+    adios_finalize (rank);
+    MPI_Finalize ();
+
+    return retval;
+}
+
+
+typedef struct {
+    ADIOS_VARINFO * v;
+    uint64_t        start[10];
+    uint64_t        count[10];
+    uint64_t        writesize; // size of subset this process writes, 0: do not write
+} VarInfo;
+
+VarInfo * varinfo;
+
+int process_metadata(int step)
+{
+    int retval = 0;
+    int i, j;
+    char gdims[256], ldims[256], offs[256];
+    uint64_t sum_count;
+    ADIOS_VARINFO *v; // shortcut pointer
+
+    if (step > 1)
+    {
+        // right now, nothing to prepare in later steps
+        print("Step %d. return immediately\n",step);
+        return 0;
+    }
+
+    /* First step processing */
+
+    // get groupname of stream, then declare for output
+    adios_get_grouplist(f, &group_namelist);
+    print0("Group name is %s\n", group_namelist[0]);
+    adios_declare_group(&gh,group_namelist[0],"",adios_flag_yes);
+
+
+    varinfo = (VarInfo *) malloc (sizeof(VarInfo) * f->nvars);
+    if (!varinfo) {
+        print("ERROR: rank %d cannot allocate %lu bytes\n", rank, sizeof(VarInfo)*f->nvars);
+        return 1;
+    }
+
+    write_total = 0;
+    largest_block = 0;
+
+    // Decompose each variable and calculate output buffer size
+    for (i=0; i<f->nvars; i++) 
+    {
+        print0 ("Get info on variable %d: %s\n", i, f->var_namelist[i]); 
+        varinfo[i].v = adios_inq_var_byid (f, i);
+        v = varinfo[i].v; // just a shortcut
+        if (v == NULL) {
+            print ("rank %d: ERROR: Variable %s inquiry failed: %s\n", 
+                   rank, f->var_namelist[i], adios_errmsg());
+            return 1;
+        }
+
+        // print variable type and dimensions
+        print0("    %-9s  %s", adios_type_to_string(v->type), f->var_namelist[i]);
+        if (v->ndim > 0) {
+            print0("[%llu", v->dims[0]);
+            for (j = 1; j < v->ndim; j++)
+                print0(", %llu", v->dims[j]);
+            print0("] :\n");
+        } else {
+            print0("\tscalar\n");
+        }
+
+        // determine subset we will write
+        decompose (numproc, rank, v->ndim, v->dims, decomp_values,
+                   varinfo[i].count, varinfo[i].start, &sum_count);
+        varinfo[i].writesize = sum_count * adios_type_size(v->type, v->value);
+
+        if (varinfo[i].writesize != 0) {
+            write_total += varinfo[i].writesize;
+            if (largest_block < varinfo[i].writesize)
+                largest_block = varinfo[i].writesize; 
+        }
+
+    }
+
+    // determine output buffer size and allocate it
+    uint64_t bufsize = write_total + f->nvars*128 + f->nattrs*32 + 1024; 
+    if (bufsize > max_write_buffer_size) {
+        print ("ERROR: rank %d: write buffer size needs to hold about %llu bytes, "
+                "but max is set to %d\n", rank, bufsize, max_write_buffer_size);
+        return 1;
+    }
+    print0 ("Rank %d: allocate %llu MB for output buffer\n", rank, bufsize/1048576+1);
+    adios_allocate_buffer (ADIOS_BUFFER_ALLOC_NOW, bufsize/1048576+1); 
+
+    // allocate read buffer
+    bufsize = largest_block + 128;
+    if (bufsize > max_read_buffer_size) {
+        print ("ERROR: rank %d: read buffer size needs to hold at least %llu bytes, "
+                "but max is set to %d\n", rank, bufsize, max_read_buffer_size);
+        return 1;
+    }
+    print0 ("Rank %d: allocate %g MB for input buffer\n", rank, (double)bufsize/1048576.0);
+    readbuf = (char *) malloc ((size_t)bufsize);
+    if (!readbuf) {
+        print ("ERROR: rank %d: cannot allocate %llu bytes for read buffer\n",
+               rank, bufsize);
+        return 1;
+    }
+
+    // Select output method
+    adios_select_method (gh, methodname, methodparams, "");
+
+    // Define variables for output based on decomposition
+    char *vpath, *vname;
+    for (i=0; i<f->nvars; i++) 
+    {
+        v = varinfo[i].v;
+        if (varinfo[i].writesize != 0) {
+            // define variable for ADIOS writes
+            getbasename (f->var_namelist[i], &vpath, &vname);
+
+            if (v->ndim > 0) 
+            {
+                int64s_to_str (v->ndim, v->dims, gdims);
+                int64s_to_str (v->ndim, varinfo[i].count, ldims);
+                int64s_to_str (v->ndim, varinfo[i].start, offs);
+
+                print ("rank %d: Define variable path=\"%s\" name=\"%s\"  "
+                       "gdims=%s  ldims=%s  offs=%s\n", 
+                       rank, vpath, vname, gdims, ldims, offs);
+
+                adios_define_var (gh, vname, vpath, v->type, ldims, gdims, offs);
+            }
+            else 
+            {
+                print ("rank %d: Define scalar path=\"%s\" name=\"%s\"\n",
+                       rank, vpath, vname);
+
+                adios_define_var (gh, vname, vpath, v->type, "", "", "");
+            }
+            free(vpath);
+            free(vname);
+        }
+    }
+
+    if (rank == 0)
+    {
+        // get and define attributes
+        enum ADIOS_DATATYPES attr_type;
+        void * attr_value;
+        char * attr_value_str;
+        int  attr_size;
+        for (i=0; i<f->nattrs; i++) 
+        {
+            adios_get_attr_byid (f, i, &attr_type, &attr_size, &attr_value);
+            attr_value_str = (char *)value_to_string (attr_type, attr_value, 0);
+            adios_define_attribute (gh, f->attr_namelist[i], "",
+                                    attr_type, attr_value_str, "");
+            free (attr_value);
+        }
+    }
+
+    return retval;
+}
+
+int read_write(int step)
+{
+    int retval = 0;
+    int i;
+    uint64_t total_size;
+
+    // open output file
+    adios_open (&fh, group_namelist[0], outfilename, (step==1 ? "w" : "a"), &comm);
+    adios_group_size (fh, write_total, &total_size);
+    
+    for (i=0; i<f->nvars; i++) 
+    {
+        if (varinfo[i].writesize != 0) {
+            // read variable subset
+            print ("rank %d: Read variable %d: %s\n", rank, i, f->var_namelist[i]); 
+            ADIOS_SELECTION *sel = adios_selection_boundingbox (varinfo[i].v->ndim,
+                    varinfo[i].start, 
+                    varinfo[i].count);
+            adios_schedule_read_byid (f, sel, i, 1, 1, readbuf);
+            adios_perform_reads (f, 1);   
+
+
+            // write (buffer) variable
+            print ("rank %d: Write variable %d: %s\n", rank, i, f->var_namelist[i]); 
+            adios_write(fh, f->var_namelist[i], readbuf);
+        }
+    }
+
+    adios_release_step (f); // this step is no longer needed to be locked in staging area
+    adios_close (fh); // write out output buffer to file
+    return retval;
+}
+
+
+
diff --git a/examples/staging/stage_write/test_decompose.c b/examples/staging/stage_write/test_decompose.c
new file mode 100644
index 0000000..26146ff
--- /dev/null
+++ b/examples/staging/stage_write/test_decompose.c
@@ -0,0 +1,134 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "decompose.h"
+#include "utils.h"
+
+int ndim, nproc;
+uint64_t *dims;
+int *np;
+int rank; // unused, required by print0 in utils.h
+
+void printUsage(char *prgname)
+{
+    print0("Usage: %s N M dim1 ... dimN np1 ... npN\n"
+           "    N           Number of dimensions\n"
+           "    M           Number of processes\n"
+           "    dim1..dimN  Dimensions\n"
+           "    np1..npN    list of decomposition numbers e.g. 32 8 4\n"
+           "            Decomposition values in each dimension of an array\n"
+           "            The product of these number must be less then the number\n"
+           "            of processes. Processes whose rank is higher than the\n"
+           "            product, will not write anything.\n"
+           "               Arrays with less dimensions than the number of values,\n"
+           "            will be decomposed with using the appropriate number of\n"
+           "            values.\n"
+        ,prgname);
+}
+
+int processArgs(int argc, char ** argv)
+{   
+    int i, j, nd, prod; 
+    char *end;
+
+    if (argc < 3) {
+        printUsage (argv[0]);
+        return 1;
+    }
+
+    errno = 0;
+    ndim = strtol(argv[1], &end, 10);
+    if (errno || (end != 0 && *end != '\0')) {
+        print0 ("ERROR: Invalid decomposition number in argument 1: '%s'\n", argv[j]);
+        printUsage(argv[0]);
+        return 1;
+    }
+
+    errno = 0;
+    nproc = strtol(argv[2], &end, 10);
+    if (errno || (end != 0 && *end != '\0')) {
+        print0 ("ERROR: Invalid decomposition number in argument 2: '%s'\n", argv[j]);
+        printUsage(argv[0]);
+        return 1;
+    }
+
+    if (argc != 3+2*ndim) {
+        print0 ("ERROR: Expected number of arguments is %d\n", 2*ndim+2);
+        printUsage (argv[0]);
+        return 1;
+    }
+    
+    dims = (uint64_t*) malloc (sizeof(uint64_t) * ndim);
+    np   = (int*) malloc (sizeof(int) * ndim);
+
+    nd = 0;
+    j = 3;
+    for (nd=0; nd < ndim; nd++) { // get ndim dimensions
+        errno = 0;
+        dims[nd] = strtoll(argv[j], &end, 10);
+        if (errno || (end != 0 && *end != '\0')) {
+            print0 ("ERROR: Invalid decomposition number in argument %d: '%s'\n",
+                    j, argv[j]);
+            printUsage(argv[0]);
+            return 1;
+        }
+        j++;
+    }
+
+    for (nd=0; nd < ndim; nd++) { // get ndim decomposition values
+        errno = 0;
+        np[nd] = strtoll(argv[j], &end, 10);
+        if (errno || (end != 0 && *end != '\0')) {
+            print0 ("ERROR: Invalid decomposition number in argument %d: '%s'\n",
+                    j, argv[j]);
+            printUsage(argv[0]);
+            return 1;
+        }
+        j++;
+    }
+
+    prod = 1;
+    for (i=0; i<ndim; i++) {
+        prod *= np[i];
+    }
+
+    if (prod > nproc) {
+        print0 ("ERROR: Product of decomposition numbers %d > number of processes %d\n",
+                prod, nproc);
+        printUsage(argv[0]);
+        return 1;
+    }
+
+    return 0;
+}
+
+int main (int argc, char ** argv)
+{
+    char ints[256];
+    uint64_t count[10], start[10], totalsize;
+    int i, nd;
+
+    if (processArgs(argc, argv)) 
+        return 1;
+
+    print("# of proc: %d\n", nproc);
+    ints_to_str(ndim, np, ints);
+    print("decomposition: %s\n", ints);
+
+    for (nd = ndim; nd > 0; nd--)
+    {
+        int64s_to_str(nd, dims, ints);
+        print("--------------------------------------------\n");
+        print("%d  dimensions: %s\n", nd, ints);
+        for (i=0; i<nproc; i++) {
+            decompose (nproc, i, nd, dims, np, count, start, &totalsize);
+        }
+    }
+
+    return 0;
+}
+
+
diff --git a/examples/staging/stage_write/utils.c b/examples/staging/stage_write/utils.c
new file mode 100644
index 0000000..c03583c
--- /dev/null
+++ b/examples/staging/stage_write/utils.c
@@ -0,0 +1,211 @@
+/* 
+ * Staged write of ADIOS files using a staging method
+ *
+ * Copyright (c) 2008 - 2012.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <errno.h>
+
+#include "utils.h"
+
+void ints_to_str (int n, int *values, char *s)
+{
+    int i;
+    char v[32];
+    if (!n) {
+        s[0] = '\0';
+        return;
+    }
+    sprintf(s,"%d", values[0]);
+    for (i=1; i<n; i++)
+    {
+        sprintf (v,",%d", values[i]);
+        strcat (s,v);
+    }
+}
+
+void int64s_to_str (int n, uint64_t *values, char *s)
+{
+    int i;
+    char v[32];
+    if (!n) {
+        s[0] = '\0';
+        return;
+    }
+    sprintf(s,"%llu", values[0]);
+    for (i=1; i<n; i++)
+    {
+        sprintf (v,",%llu", values[i]);
+        strcat (s,v);
+    }
+}
+
+
+const char * value_to_string (enum ADIOS_DATATYPES type, void * data, int idx)
+{
+    static char s [100];
+    s [0] = 0;
+
+
+    switch (type)
+    {
+        case adios_unsigned_byte:
+            sprintf (s, "%u", ((uint8_t *) data)[idx]);
+            break;
+
+        case adios_byte:
+            sprintf (s, "%d", ((int8_t *) data)[idx]);
+            break;
+
+        case adios_short:
+            sprintf (s, "%hd", ((int16_t *) data)[idx]);
+            break;
+
+        case adios_unsigned_short:
+            sprintf (s, "%hu", ((uint16_t *) data)[idx]);
+            break;
+
+        case adios_integer:
+            sprintf (s, "%d", ((int32_t *) data)[idx]);
+            break;
+
+        case adios_unsigned_integer:
+            sprintf (s, "%u", ((uint32_t *) data)[idx]);
+            break;
+
+        case adios_long:
+            sprintf (s, "%lld", ((int64_t *) data)[idx]);
+            break;
+
+        case adios_unsigned_long:
+            sprintf (s, "%llu", ((uint64_t *) data)[idx]);
+            break;
+
+        case adios_real:
+            sprintf (s, "%g", ((float *) data)[idx]);
+            break;
+
+        case adios_double:
+            sprintf (s, "%lg", ((double *) data)[idx]);
+            break;
+
+        case adios_long_double:
+            sprintf (s, "%Lg", ((long double *) data)[idx]);
+            break;
+
+        case adios_string:
+            return (char*) ((char *)data+idx);
+            break;
+
+        case adios_complex:
+            sprintf (s, "(%g, %g)", 
+                    ((float *) data)[2*idx], ((float *) data)[2*idx+1]);
+            break;
+
+        case adios_double_complex:
+            sprintf (s, "(%lg, %lg)", 
+                    ((double *) data)[2*idx], ((double *) data)[2*idx+1]);
+            break;
+        
+        default:
+            sprintf (s, "unknown");
+            break;
+    }
+
+    return s;
+}
+
+
+
+
+void getbasename (char *path, char **dirname, char **basename)
+{
+    char *work, *ptr;
+
+    work = strdup(path);
+    if (work[strlen(work)-1] == '/' && strlen(work)>1)
+        work[strlen(work)-1] = '\0';
+
+    ptr = rindex(work, '/');
+    if (ptr && ptr != work) {
+        // found a / and but not the beginning / of a full path
+        ptr[0] = 0;
+        *dirname = strdup(work);
+        ptr[0] = '/';
+        *basename = strdup(ptr+1);
+    } else if (ptr == work) {
+        // found / as the first character 
+        *dirname = strdup("");
+        *basename = strdup(ptr+1);
+    } else {
+        *dirname = NULL; //strdup(".");
+        *basename = strdup(work);
+    }
+    free(work);
+}
+
+
+bool file_exists (char * path)
+{
+    struct stat sb;
+    int i = stat ( path, &sb );
+    if ( i == 0 )
+	/* File found */
+	return true;
+    return false;
+}
+
+bool is_dir(char *path) {
+     struct stat sb;
+     if ( !stat( path, &sb) ) {
+         if ( sb.st_mode & S_IFDIR ) {
+             //if (verbose) printf("isDir( %s ) = true\n", path);
+             return  true;
+         }
+     } /* else {
+         // for whatever reason, stat cannot be retrieved
+         // so just say here, it is not a directory 
+        retval = false;
+     }*/
+     return false;
+}
+
+int createdir_recursive( char* path)
+{
+    int res;
+    char *dirs, *base;
+    /*printf(" called mkdir %s\n", path);*/
+    getbasename(path, &dirs, &base);
+    if ( dirs != NULL)  {
+        if ( !is_dir(dirs) ) {
+	    /*printf(" dirs=%s  base=%s\n", dirs, base);*/
+            res = createdir_recursive(dirs);
+	} else res = 0;
+        free(dirs);
+        if (res) return res;
+    }
+    if (file_exists(path))
+        res = 0;
+    else
+        res = mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH);
+    if (res) {
+        if (errno == EEXIST) {
+            print("Concurrency error: createdir %s failed: %s\n", path, strerror(errno));
+            print("Some other process created this dir already during this function call\n");
+            res = 0;
+        } else {
+            print("createdir %s failed: %s\n", path, strerror(errno));
+        }
+    }
+    //else
+    //   print("createdir %s succeeded\n", path);
+
+    free(base);
+    return (res);
+}
+
diff --git a/examples/staging/stage_write/utils.h b/examples/staging/stage_write/utils.h
new file mode 100644
index 0000000..21196aa
--- /dev/null
+++ b/examples/staging/stage_write/utils.h
@@ -0,0 +1,50 @@
+/* 
+ * Staged write of ADIOS files using a staging method
+ *
+ * Copyright (c) 2008 - 2012.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#ifndef __UTILS_H_
+#define __UTILS_H_
+
+#include <stdio.h>
+#include <stdint.h>
+#include "adios_types.h"
+
+#define MAX3(a,b,c) (a > b ? (a > c ? a : c) : (b > c ? b : c))
+#define print(...) fprintf (stderr, __VA_ARGS__); 
+#define print0(...) if (!rank) fprintf (stderr, __VA_ARGS__); 
+
+#define bool int
+#define false 0
+#define true 1
+
+void ints_to_str (int n, int *values, char *s);
+void int64s_to_str (int n, uint64_t *values, char *s);
+const char * value_to_string (enum ADIOS_DATATYPES type, void * data, int idx);
+
+/* Get basename and dirname from path.
+   Allocates memory for both strings, they should be freed after use.
+   May return NULL for dirname. "" for dirname means path is like /file.
+
+   dir1/dir2/file   dir=dir1/dir2   base=file
+   dir1/file        dir=dir1        base=file
+   file             dir=null        base=file
+   /file            dir=""          base=file
+   dir1/            dir=null        base=dir1
+   /                dir=""          base=""
+   ""               dir=null        base=""
+*/
+void getbasename (char *path, char **dirname, char **basename);
+
+bool file_exists (char *path);  // true if stat(path) succeeds, 
+                                // i.e. it is an accessible item on file system
+bool is_dir (char *path);       // true if path is a directory (and stat() succeeds on it)
+
+/** mkdir -r
+  * return: 0 on success, otherwise mkdir() syscall's return value
+  */
+int createdir_recursive( char* path);
+
+#endif
+
diff --git a/runconf b/runconf
index ee109ef..ae84bee 100755
--- a/runconf
+++ b/runconf
@@ -9,7 +9,14 @@ if [ `hostname | cut -c 1-4` == "sith" ]; then
     ########
     # Sith #
     ########
-    echo "Configure on SITH"
+    source /etc/profile.d/modules.sh
+    TARGET=`module list 2>&1 | grep "PE"- | sed "s/^.*PE-\([a-z]*\).*/\1/"`
+
+    if [ -z "$TARGET" ]; then
+        echo "Cannot determine Programming environment. Exit"
+        exit 1
+    fi
+    echo "Configure on SITH for $TARGET env."
     source /etc/profile.d/modules.sh
     module unload hdf5
     module unload netcdf
@@ -18,28 +25,113 @@ if [ `hostname | cut -c 1-4` == "sith" ]; then
     module unload PE-intel
     module unload PE-pathscale
     module unload pgi gcc intel pathscale
-    TARGET=pgi
+    module unload python
     module load PE-$TARGET
     module load mxml
+    module load python
     # Use both seq hdf5 (for utils) and 
     #   parallel hdf5 (for PHDF5 method)
-    module load hdf5/1.8.5
+    module load hdf5/1.8.10
     SEQ_HDF5_DIR=$HDF5_DIR
     SEQ_HDF5_CLIB=$HDF5_CLIB
     module unload hdf5
-    module load hdf5/1.8.5_par
+    module load hdf5/1.8.10_par
     PAR_HDF5_DIR=$HDF5_DIR
     PAR_HDF5_CLIB=$HDF5_CLIB
     module unload hdf5
     # Seq. and Parallel NetCDF 4 
-    module load netcdf/4.1.1
+    #module load netcdf/4.1.1
+    #SEQ_NC_DIR=$NETCDF_DIR
+    #SEQ_NC_CLIB=$NETCDF_CLIB
+    #module unload netcdf
+    #module load netcdf/4.1.1_par
+    #PAR_NC_DIR=$NETCDF_DIR
+    #PAR_NC_CLIB=$NETCDF_CLIB
+    #module unload netcdf
+    export MPICC=mpicc
+    export MPICXX=mpiCC
+    export MPIFC=mpif90
+    if [ "$TARGET" == "pgi" ]; then
+        export CC=pgcc
+        export CXX=pgCC
+        export FC=pgf90
+        WITHDART="--with-dataspaces=/ccs/proj/e2e/dataspaces/sith/$TARGET"
+    elif [ "$TARGET" == "gnu" ]; then
+        export CC=gcc
+        export CXX=g++
+        export FC=gfortran
+        WITHDART="--with-dataspaces=/ccs/proj/e2e/dataspaces/sith/$TARGET"
+    elif [ "$TARGET" == "intel" ]; then
+        export CC=icc
+        export CXX=icpc
+        export FC=ifort
+        WITHDART=""
+    else
+        echo "TARGET must be pgi or gnu or intel"
+        exit 1
+    fi
+        
+    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK" 
+    export CFLAGS="-g -fPIC" 
+    ./configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/sith.$TARGET \
+        --enable-dependency-tracking \
+        --enable-research-transports \
+        --with-lustre=/usr/lib64 \
+        $WITHDART 
+        #--with-hdf5=${SEQ_HDF5_DIR} \
+        #--with-hdf5-libs="${SEQ_HDF5_CLIB}" \
+        #--with-dmalloc=/ccs/proj/e2e/qliu/dmalloc.sith.$TARGET 
+        #--with-dmalloc=/ccs/proj/e2e/pnorbert/dmalloc.$TARGET 
+        #--enable-shared --disable-static
+        #--without-datatap #--without-infiniband
+        #--with-phdf5=${PAR_HDF5_DIR} \
+        #--with-phdf5-libs="${PAR_HDF5_CLIB}" \
+        #--with-netcdf=${SEQ_NC_DIR} \
+        #--with-netcdf-libs="${SEQ_NC_CLIB}" \
+        #--with-nc4par=${PAR_NC_DIR} \
+        #--with-nc4par-libs="${PAR_NC_CLIB}" \
+        #--with-dmalloc=/ccs/proj/e2e/pnorbert/dmalloc.$TARGET 
+        #--with-datatap=/ccs/home/habbasi/work/ewok/
+        #--enable-datatap=ib
+
+elif [ `hostname | cut -c 1-4` == "yona" ]; then
+
+    ########
+    # Yona #
+    ########
+    TARGET=pgi
+    echo "Configure on Yona for $TARGET env."
+    source /etc/profile.d/modules.sh
+    module unload hdf5
+    module unload netcdf
+    module unload PE-gnu
+    module unload PE-pgi
+    module unload PE-intel
+    module unload PE-pathscale
+    module unload pgi gcc intel pathscale
+    #module unload python
+    module load PE-$TARGET
+    module load mxml
+    #module load python
+    # Use both seq hdf5 (for utils) and 
+    #   parallel hdf5 (for PHDF5 method)
+    module load hdf5/1.8.5
+    SEQ_HDF5_DIR=$HDF5_DIR
+    SEQ_HDF5_CLIB=$HDF5_CLIB
+    module unload hdf5
+    #module load hdf5/1.8.5_par
+    #PAR_HDF5_DIR=$HDF5_DIR
+    #PAR_HDF5_CLIB=$HDF5_CLIB
+    #module unload hdf5
+    # Seq. and Parallel NetCDF 4 
+    module load netcdf/3.6.2
     SEQ_NC_DIR=$NETCDF_DIR
     SEQ_NC_CLIB=$NETCDF_CLIB
     module unload netcdf
-    module load netcdf/4.1.1_par
-    PAR_NC_DIR=$NETCDF_DIR
-    PAR_NC_CLIB=$NETCDF_CLIB
-    module unload netcdf
+    #module load netcdf/4.1.1_par
+    #PAR_NC_DIR=$NETCDF_DIR
+    #PAR_NC_CLIB=$NETCDF_CLIB
+    #module unload netcdf
     export MPICC=mpicc
     export MPICXX=mpiCC
     export MPIFC=mpif90
@@ -52,53 +144,68 @@ if [ `hostname | cut -c 1-4` == "sith" ]; then
         export CXX=g++
         export FC=gfortran
     elif [ "$TARGET" == "intel" ]; then
+        export CC=pgcc
+        export CXX=pgCC
+        export FC=pgf90
+    elif [ "$TARGET" == "gnu" ]; then
+        export CC=gcc
+        export CXX=g++
+        export FC=gfortran
+    elif [ "$TARGET" == "intel" ]; then
         export CC=icc
         export CXX=icpc
         export FC=ifort
     else
-        echo "TARGET must be pgi or gnu"
+        echo "TARGET must be pgi or gnu or intel"
         exit 1
     fi
         
     export CFLAGS="-g -fPIC" 
-    ./configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/sith.$TARGET \
+    ./configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/yona.$TARGET \
         --enable-dependency-tracking \
         --enable-research-transports  \
         --with-hdf5=${SEQ_HDF5_DIR} \
         --with-hdf5-libs="${SEQ_HDF5_CLIB}" \
-        --with-phdf5=${PAR_HDF5_DIR} \
-        --with-phdf5-libs="${PAR_HDF5_CLIB}" \
         --with-netcdf=${SEQ_NC_DIR} \
         --with-netcdf-libs="${SEQ_NC_CLIB}" \
-        --with-nc4par=${PAR_NC_DIR} \
-        --with-nc4par-libs="${PAR_NC_CLIB}" \
         --with-lustre=/usr \
         --without-datatap --without-infiniband
+        #--with-phdf5=${PAR_HDF5_DIR} \
+        #--with-phdf5-libs="${PAR_HDF5_CLIB}" \
+        #--with-nc4par=${PAR_NC_DIR} \
+        #--with-nc4par-libs="${PAR_NC_CLIB}" \
         #--with-dmalloc=/ccs/proj/e2e/pnorbert/dmalloc.$TARGET 
         #--with-datatap=/ccs/home/habbasi/work/ewok/
         #--enable-datatap=ib
 
 
 elif [ `hostname | cut -c 1-4` == "lens" ]; then
-    echo "Configure on LENS"
     source /etc/profile.d/modules.sh
+    source /etc/profile.d/modules.sh
+    TARGET=`module list 2>&1 | grep "PE"- | sed "s/^.*PE-\([a-z]*\).*/\1/"`
+
+    if [ -z "$TARGET" ]; then
+        echo "Cannot determine Programming environment. Exit"
+        exit 1
+    fi
+    echo "Configure on LENS for $TARGET env."
     module unload hdf5
     module unload netcdf
     module unload PE-gnu
     module unload PE-pgi
     module unload PE-pathscale
     module unload pgi
-    TARGET=pgi
     module load PE-$TARGET
+    module load mxml
     # Use both seq hdf5 (for utils) and 
     #   parallel hdf5 (for PHDF5 method)
-    #module load hdf5/1.8.2
+    module load hdf5/1.8.6
     SEQ_HDF5_DIR=$HDF5_DIR
     SEQ_HDF5_CLIB=$HDF5_CLIB
-    #module unload hdf5
-    #module load hdf5/1.8.2_par
-    PAR_HDF5_DIR=$HDF5_DIR
-    PAR_HDF5_CLIB=$HDF5_CLIB
+    module unload hdf5
+    #module load hdf5/1.8.6_ompi1.4.2
+    #PAR_HDF5_DIR=$HDF5_DIR
+    #PAR_HDF5_CLIB=$HDF5_CLIB
     #module unload hdf5
     # Seq NetCDF 3 for bp2ncd
     #module load netcdf/3.6.2
@@ -120,14 +227,270 @@ elif [ `hostname | cut -c 1-4` == "lens" ]; then
     fi
 
     export CFLAGS="-g -fPIC"
-    ./configure --prefix=/ccs/proj/e2e/qliu/ADIOS/sith.$TARGET \
+    ./configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/lens.$TARGET \
         --enable-dependency-tracking \
-        --with-mxml=/ccs/proj/e2e/pnorbert/mxml \
         --enable-research-transports  \
-        --without-datatap \
-        --with-dmalloc=/ccs/proj/e2e/qliu/dmalloc.lens.$TARGET
+        --with-hdf5=${SEQ_HDF5_DIR} \
+        --with-hdf5-libs="${SEQ_HDF5_CLIB}" \
+        --without-datatap
+        #--with-mxml=/ccs/proj/e2e/pnorbert/mxml \
 
-elif [ `hostname | cut -c 1-6` == "jaguar" -o `hostname | cut -c 1-7` == "chester" ]; then
+
+elif [ `hostname | cut -c 1-8` == "jaguarpf" ]; then
+
+    BUILD_STAGING=true
+    if [ $BUILD_STAGING == "false" ]; then
+    
+        ################
+        # Jaguar/Titan #
+        ################
+        TARGET=pgi
+        echo "Configure on JAGUAR (XK6) for $TARGET env."
+        export CC=cc
+        #export CFLAGS="-Wall -g" 
+        export FC=ftn
+        export CXX=CC
+        source /opt/modules/default/etc/modules.sh
+        module unload szip
+        module unload hdf5
+        module unload netcdf
+        module unload netcdf-hdf5parallel
+        module unload hdf5-parallel
+        module unload mxml
+        module unload PrgEnv-gnu
+        module unload PrgEnv-pgi
+        module unload PrgEnv-intel
+        module unload PrgEnv-cray
+        #module unload papi
+        module load PrgEnv-$TARGET
+        module swap xtpe-interlagos xtpe-istanbul
+        #module load szip
+        #module load xt-papi
+        module load mxml
+        # use the two lines below for openmpi
+        #export CC=mpicc
+        #export FC=mpif90
+        CFLAGS="-g -fPIC" ./configure --prefix=/ccs/proj/e2e/qliu/ADIOS/test.$TARGET \
+            --host=jaguar --host_alias=jaguar  \
+            --enable-dependency-tracking \
+            #--with-hdf5=/opt/cray/hdf5/1.8.7/pgi/109 \
+            #--with-phdf5=/opt/cray/hdf5-parallel/1.8.7/pgi/109 \
+#            --with-lustre=/opt/xt-lustre-ss/2.2_1.6.5/usr
+#            --with-dmalloc=/ccs/proj/e2e/qliu/dmalloc.$TARGET
+#            --enable-research-transports \
+#            --with-netcdf=/opt/cray/netcdf/3.6.2/netcdf-${TARGET} \
+#            --with-nc4par=/opt/cray/netcdf-hdf5parallel/4.0.1.3/netcdf-hdf5parallel-$TARGET \
+#            --with-phdf5=/opt/cray/hdf5-parallel/1.8.4.1/hdf5-parallel-$TARGET \
+#            --with-hdf5=/sw/xt5/hdf5/1.8.2/cnl2.1_gnu7.2.3 \
+#            --with-hdf5=/sw/xt5/hdf5/1.8.2/cnl2.1_gnu4.2.0 \
+#            --with-mxml=/ccs/proj/e2e/pnorbert/mxml.xt5.$TARGET \
+            
+    else 
+    
+        ##########################
+        # Jaguar/Titan + staging #
+        ##########################
+        TARGET=pgi
+        echo "Configure on JAGUAR including staging methods for $TARGET env."
+        export CC=cc
+        export FC=ftn
+        export CXX=CC
+        source /opt/modules/default/etc/modules.sh
+        module unload szip
+        module unload hdf5
+        module unload netcdf
+        module unload hdf5-parallel
+        module unload netcdf-hdf5parallel
+        module unload mxml
+        module unload PrgEnv-gnu
+        module unload PrgEnv-pgi
+        module unload PrgEnv-intel
+        module unload PrgEnv-cray
+        #module unload papi
+        #module unload xtpe-quadcore
+        module load PrgEnv-$TARGET
+        module swap xtpe-interlagos xtpe-istanbul
+        #module load dataspaces/1.0.0
+        unset EXTRA_LIBS
+        unset LDFLAGS
+        if [ "$TARGET" == "pgi" ]; then
+            #module swap pgi pgi/11.8.0
+            # NSSI needs -pgcpplibs flag 
+            export LDFLAGS="-pgcpplibs" 
+            DATASPACES_DIR="/ccs/proj/e2e/dataspaces/xk6/$TARGET"
+        elif [ "$TARGET" == "gnu" ]; then
+            # NSSI needs libstdc++
+            export EXTRA_LIBS="/opt/gcc/4.4.4/snos/lib64/libstdc++.a"
+            module swap gcc gcc/4.4.4
+            DATASPACES_DIR="/ccs/proj/e2e/dataspaces/xk6/$TARGET"
+        else
+            unset DATASPACES_DIR
+        fi
+     
+        # NOTE hdf5-parallel module does not work with C++ compiler
+        #module load hdf5-parallel
+        #module load netcdf-hdf5parallel
+        module load szip
+        #module load papi
+        module load mxml
+        # use the two lines below for openmpi
+        #export CC=mpicc
+        #export FC=mpif90
+        export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK -DDART_DO_VERSIONING" 
+        export CFLAGS="-fPIC -g -O0" 
+        #./configure --prefix=/ccs/proj/fus022/norbert/RMP/adios.xt5.$TARGET \
+        ./configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/xk6.$TARGET \
+        --enable-dependency-tracking \
+        --with-cray-pmi=/opt/cray/pmi/default \
+        --with-cray-ugni-incdir=/opt/cray/gni-headers/default/include \
+        --with-cray-ugni-libdir=/opt/cray/ugni/default/lib \
+        --with-dataspaces=$DATASPACES_DIR 
+        #--with-netcdf=/opt/cray/netcdf/3.6.2/netcdf-${TARGET} \
+        #--with-hdf5=/sw/xt5/hdf5/1.8.2/cnl2.1_gnu4.2.0 \
+        #--with-nc4par=/opt/cray/netcdf-hdf5parallel/4.0.1.3/netcdf-hdf5parallel-$TARGET \
+        #--with-phdf5=/opt/cray/hdf5-parallel/1.8.4.1/hdf5-parallel-$TARGET \
+        #--with-dimes=/ccs/proj/e2e/pnorbert/spaces/$TARGET
+        #--with-nssi=/ccs/proj/e2e/pnorbert/nssi/xt5/$TARGET \
+        #--with-datatap=/ccs/home/zf2/work/pe.$TARGET \
+        #--with-datatap=/ccs/proj/e2e/pnorbert/datatap/xt5/$TARGET \
+    
+    fi
+    
+
+
+elif [ `hostname | cut -c 1-7` == "chester" ]; then
+
+      ###############
+      # Chester XK6 #
+      ###############
+      TARGET=`module list 2>&1 | grep "PrgEnv"- | sed "s/^.*PrgEnv-\([a-z]*\).*/\1/"`
+      echo "Configure on Chester (XK6) for $TARGET env."
+      export CC=cc
+      #export CFLAGS="-Wall -g" 
+      export FC=ftn
+      export CXX=CC
+      source /opt/modules/default/etc/modules.sh
+      module unload szip
+      module unload hdf5
+      module unload netcdf
+      module unload netcdf-hdf5parallel
+      module unload hdf5-parallel
+      module unload PrgEnv-gnu
+      module unload PrgEnv-pgi
+      module unload PrgEnv-intel
+      module unload PrgEnv-cray
+      module unload papi
+      module unload pmi
+      module load PrgEnv-$TARGET
+      module load dataspaces/1.0.0
+      if [ "$TARGET" == "pgi" ]; then
+          module swap pgi pgi/11.8.0
+          # NSSI needs -pgcpplibs flag 
+          export LDFLAGS="-pgcpplibs" 
+          unset EXTRA_LIBS 
+          WITHDART="--with-dataspaces=$DATASPACES_DIR"
+      elif [ "$TARGET" == "gnu" ]; then
+          # NSSI needs libstdc++
+          unset LDFLAGS 
+          export EXTRA_LIBS="/opt/gcc/4.7.1/snos/lib64/libstdc++.a"
+          #module swap gcc gcc/4.4.4
+          WITHDART="--with-dataspaces=$DATASPACES_DIR"
+      else
+          unset LDFLAGS 
+          unset EXTRA_LIBS 
+          WITHDART=""
+      fi
+      #module load szip
+      #module load xt-papi
+      module load mxml
+      module load pmi
+      # use the two lines below for openmpi
+      #export CC=mpicc
+      #export FC=mpif90
+      CFLAGS="-g -fPIC" ./configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/chester.$TARGET \
+          --enable-dependency-tracking 
+#          --with-cray-pmi=/opt/cray/pmi/default \
+#          --with-cray-ugni-incdir=/opt/cray/gni-headers/2.1-1.0400.4351.3.1.gem/include \
+#          --with-cray-ugni-libdir=/opt/cray/ugni/default/lib \
+#          $WITHDART
+#            --with-lustre=/opt/xt-lustre-ss/2.2_1.6.5/usr \
+#            --with-dmalloc=/ccs/proj/e2e/qliu/dmalloc.$TARGET \
+#            --enable-research-transports \
+#            --with-netcdf=/opt/cray/netcdf/3.6.2/netcdf-${TARGET} \
+#            --with-nc4par=/opt/cray/netcdf-hdf5parallel/4.0.1.3/netcdf-hdf5parallel-$TARGET \
+#            --with-phdf5=/opt/cray/hdf5-parallel/1.8.4.1/hdf5-parallel-$TARGET \
+#            --with-hdf5=/sw/xt5/hdf5/1.8.2/cnl2.1_gnu7.2.3 \
+#            --with-hdf5=/sw/xt5/hdf5/1.8.2/cnl2.1_gnu4.2.0 \
+#            --with-mxml=/ccs/proj/e2e/pnorbert/mxml.xt5.$TARGET \
+            
+
+elif [ `hostname | cut -c 1-5` == "smoky" ]; then
+
+    #########
+    # Smoky #
+    #########
+    echo "Configure on SMOKY"
+    source /etc/profile.d/modules.sh
+    module unload hdf5
+    module unload netcdf
+    module unload PE-gnu
+    module unload PE-pgi
+    module unload PE-intel
+    module unload PE-pathscale
+    module unload pgi gcc intel pathscale
+    TARGET=pgi
+    module load PE-$TARGET
+    # Use both seq hdf5 (for utils) and 
+    #   parallel hdf5 (for PHDF5 method)
+    #module load hdf5/1.8.5
+    #SEQ_HDF5_DIR=$HDF5_DIR
+    #SEQ_HDF5_DIR=/sw/smoky/hdf5/1.8.5/centos5.5_pgi10.4
+    #SEQ_HDF5_CLIB=$HDF5_CLIB
+    #module unload hdf5/1.8.5
+    #module load hdf5/1.8.5_ompi1.4.2
+    #PAR_HDF5_DIR=$HDF5_DIR
+    #PAR_HDF5_DIR=/sw/smoky/hdf5/1.8.5/centos5.5_pgi10.4_ompi1.4.2
+    #PAR_HDF5_CLIB=$HDF5_CLIB
+    export MPICC=mpicc
+    export MPICXX=mpiCC
+    export MPIFC=mpif90
+    if [ "$TARGET" == "pgi" ]; then
+        export CC=pgcc
+        export CXX=pgCC
+        export FC=pgf90
+    elif [ "$TARGET" == "gnu" ]; then
+        export CC=gcc
+        export CXX=g++
+        export FC=gfortran
+    elif [ "$TARGET" == "intel" ]; then
+        export CC=icc
+        export CXX=icpc
+        export FC=ifort
+    else
+        echo "TARGET must be pgi or gnu"
+        exit 1
+    fi
+        
+    export CFLAGS="-g -fPIC" 
+    ./configure --prefix=/ccs/proj/e2e/pnorbert/ADIOS/smoky.$TARGET \
+        --enable-dependency-tracking \
+        --enable-research-transports  \
+        --with-mxml=/ccs/proj/e2e/pnorbert/mxml.smoky.$TARGET \
+        --without-hdf5 --without-phdf5 \
+        --without-netcdf --without-nc4par \
+        --with-lustre=/usr \
+        --without-datatap --without-infiniband \
+        #--with-phdf5=${PAR_HDF5_DIR} \
+        #--with-phdf5-libs="${PAR_HDF5_CLIB}" \
+        #--with-hdf5=${SEQ_HDF5_DIR} \
+        #--with-hdf5-libs="${SEQ_HDF5_CLIB}" \
+        #--with-netcdf=${SEQ_NC_DIR} \
+        #--with-netcdf-libs="${SEQ_NC_CLIB}" \
+        #--with-nc4par=${PAR_NC_DIR} \
+        #--with-nc4par-libs="${PAR_NC_CLIB}" \
+
+
+elif [ `hostname | cut -c 1-6` == "jaguar" ]; then
 
     BUILD_STAGING=false
     if [ $BUILD_STAGING == "false" ]; then
@@ -135,7 +498,8 @@ elif [ `hostname | cut -c 1-6` == "jaguar" -o `hostname | cut -c 1-7` == "cheste
         ##########
         # Jaguar #
         ##########
-        echo "Configure on JAGUAR"
+        TARGET=pgi
+        echo "Configure on JAGUAR (XT5) for $TARGET env."
         export CC=cc
         #export CFLAGS="-Wall -g" 
         export FC=ftn
@@ -151,19 +515,21 @@ elif [ `hostname | cut -c 1-6` == "jaguar" -o `hostname | cut -c 1-7` == "cheste
         module unload PrgEnv-intel
         module unload PrgEnv-cray
         module unload xt-papi
-        TARGET=pgi
         module load PrgEnv-$TARGET
+        module swap xtpe-interlagos xtpe-istanbul
         #module load szip
         #module load xt-papi
         module load mxml
         # use the two lines below for openmpi
         #export CC=mpicc
         #export FC=mpif90
-        CFLAGS="-g -fPIC" ./configure --prefix=/ccs/proj/e2e/adios/xt5.$TARGET \
+        CFLAGS="-g -fPIC" ./configure --prefix=/ccs/proj/e2e/qliu/ADIOS/test.$TARGET \
             --enable-dependency-tracking \
             --with-mxml=/ccs/proj/e2e/pnorbert/mxml.xt5.pgi \
-            --without-portals \
-            --with-lustre=/opt/xt-lustre-ss/2.2_1.6.5/usr
+            --with-hdf5=/opt/cray/hdf5/1.8.7/pgi/109 \
+            --with-phdf5=/opt/cray/hdf5-parallel/1.8.7/pgi/109 \
+            --without-portals
+#            --with-lustre=/opt/xt-lustre-ss/2.2_1.6.5/usr
 #            --with-dmalloc=/ccs/proj/e2e/qliu/dmalloc.$TARGET
 #            --enable-research-transports \
 #            --with-netcdf=/opt/cray/netcdf/3.6.2/netcdf-${TARGET} \
@@ -178,7 +544,8 @@ elif [ `hostname | cut -c 1-6` == "jaguar" -o `hostname | cut -c 1-7` == "cheste
         ##########
         # Jaguar #
         ##########
-        echo "Configure on JAGUAR including staging methods"
+        TARGET=pgi
+        echo "Configure on JAGUAR including staging methods for $TARGET env."
         export CC=cc
         export FC=ftn
         export CXX=CC
@@ -194,7 +561,6 @@ elif [ `hostname | cut -c 1-6` == "jaguar" -o `hostname | cut -c 1-7` == "cheste
         module unload PrgEnv-cray
         module unload xt-papi
         #module unload xtpe-quadcore
-        TARGET=pgi
         module load PrgEnv-$TARGET
         if [ "$TARGET" == "pgi" ]; then
             module swap pgi pgi/10.4.0
@@ -237,6 +603,21 @@ elif [ `hostname | cut -c 1-6` == "jaguar" -o `hostname | cut -c 1-7` == "cheste
     
     fi
     
+elif [ `hostname -f | cut -c 8-15` == "intrepid" ]; then
+    #####################
+    # Intrepid BlueGene #
+    #####################
+    echo "Configure on Intrepid (BlueGene)"
+    export MPICC=mpixlc_r
+    export MPIFC=mpixlf90
+    export CFLAGS=""
+    export FC=xlf90
+    export CC=xlc_r
+
+    ./configure --prefix=/home/qliu/ADIOS \
+            --enable-dependency-tracking \
+            --with-mxml=/home/qliu/mxml
+
 elif [ `hostname | cut -c 1-4` == "euge" ]; then
     ###################
     # Eugene BlueGene #
@@ -248,6 +629,7 @@ elif [ `hostname | cut -c 1-4` == "euge" ]; then
     export CFLAGS=""
     export FC=xlf90
     export CC=xlc_r
+    export MACRODEFFLAG="-WL,-D"
 
     source /etc/profile.d/modules.sh
     module load python
@@ -265,31 +647,13 @@ elif [ `hostname | cut -c 1-4` == "euge" ]; then
             --with-hdf5-libs="$HDF5_CLIB" \
             --without-phdf5
 
-
-elif [ `hostname | cut -c 1-4` == "lens" ]; then
-
-    ########
-    # Lens #
-    ########
-    echo "Configure on LENS"
-    export CC=mpicc
-    export CXX=mpiCC
-    source /etc/profile.d/modules.sh
-    module load hdf5
-    #module load netcdf
-    CFLAGS="-fPIC" ./configure --prefix=/ccs/proj/e2e/pnorbert/adios/lens \
-        --enable-dependency-tracking \
-        --with-mxml=/ccs/proj/e2e/pnorbert/mxml \
-        --without-netcdf
-        #--with-hdf5=/sw/analysis-x64/hdf5/1.6.7/sl5.0_pgi7.1.5_ompi1.2.6 \
-        #--with-netcdf=/sw/analysis-x64/netcdf/3.6.2/sl5.0_pgi7.1.5
-    
     
 elif [ `hostname | cut -c 1-4` == "nid0" ]; then
     ############
     # Franklin #
     ############
-    echo "Configure on FRANKLIN"
+    TARGET=pgi
+    echo "Configure on FRANKLIN for $TARGET env."
     export CC=cc
     export CXX=CC
     export FC=ftn
@@ -301,7 +665,6 @@ elif [ `hostname | cut -c 1-4` == "nid0" ]; then
     module unload PrgEnv-pgi
     module unload PrgEnv-pathscale
     module unload PrgEnv-cray
-    TARGET=pgi
     module load PrgEnv-$TARGET
     #if [ "${TARGET}" == "pgi" ]; then
     #    module swap pgi pgi/10.5.0
@@ -319,6 +682,111 @@ elif [ `hostname | cut -c 1-4` == "nid0" ]; then
         --with-nc4par=/opt/cray/netcdf-hdf5parallel/4.1.1.0/netcdf-hdf5parallel-${TARGET} \
         --with-dart=/global/homes/p/pnorbert/dart.0628.pgi
     
+
+elif [ `hostname | cut -c 1-6` == "hopper" ]; then
+    ##########
+    # Hopper #
+    ##########
+    TARGET=pgi
+    echo "Configure on HOPPER for $TARGET env."
+    export MPICC=cc
+    export MPICXX=CC
+    export MPIFC=ftn
+    module unload hdf5
+    module unload netcdf
+    module unload hdf5-parallel
+    module unload netcdf-hdf5parallel
+    module unload PrgEnv-gnu
+    module unload PrgEnv-pgi
+    module unload PrgEnv-pathscale
+    module unload PrgEnv-cray
+    TARGET=pgi
+    module load PrgEnv-$TARGET
+    module load python
+    if [ "$TARGET" == "pgi" ]; then
+        export CC=pgcc
+        export CXX=pgCC
+        export FC=pgf90
+        export LDFLAGS="-pgcpplibs"
+        WITHDART="--with-dataspaces=/global/homes/p/pnorbert/dataspaces/1.1.0/$TARGET"
+    elif [ "$TARGET" == "gnu" ]; then
+        export CC=gcc
+        export CXX=g++
+        export FC=gfortran
+        export LDFLAGS=""
+        WITHDART="--with-dataspaces=/global/homes/p/pnorbert/dataspaces/1.1.0/$TARGET"
+    elif [ "$TARGET" == "intel" ]; then
+        export CC=icc
+        export CXX=icpc
+        export FC=ifort
+        export LDFLAGS=""
+        WITHDART=""
+    else
+        echo "TARGET must be pgi or gnu or intel"
+        exit 1
+    fi
+    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK"
+    export CFLAGS="-fPIC"
+    ./configure --prefix=/global/homes/p/pnorbert/adios/1.4.1/hopper/$TARGET \
+        --enable-dependency-tracking \
+        --with-mxml=$HOME/mxml/mxml.hopper \
+        --with-lustre=/usr \
+        $WITHDART \
+        --with-cray-pmi-incdir=/opt/cray/pmi/default/include \
+        --with-cray-pmi-libdir=/opt/cray/pmi/default/lib64 \
+        --with-cray-ugni-incdir=/opt/cray/gni-headers/default/include \
+        --with-cray-ugni-libdir=/opt/cray/ugni/default/lib64 \
+        --without-hdf5 --without-netcdf
+
+
+elif [ `hostname | cut -c 1-6` == "kraken" ]; then
+    ##########
+    # Kraken #
+    ##########
+    source /opt/modules/default/etc/modules.sh
+    TARGET=`module list 2>&1 | grep PrgEnv | sed "s/^.*Env-\([a-z]*\).*/\1/"`
+
+    if [ -z "$TARGET" ]; then
+        echo "Cannot determine Programming environment. Exit"
+        exit 1
+    fi
+    echo ""
+    echo "Configure KRAKEN for the $TARGET compiler"
+    echo ""
+    export CC=cc
+    export FC=ftn
+    export CXX=CC
+    module unload szip
+    module unload hdf5
+    module unload netcdf
+    module unload hdf5-parallel
+    module unload netcdf-hdf5parallel
+    module unload xt-papi
+    module unload papi
+    if [ "$TARGET" == "pgi" ]; then
+        #module swap pgi pgi/10.4.0
+        # NSSI needs -pgcpplibs flag 
+        export EXTRA_LIBS=""
+        export LDFLAGS="-pgcpplibs" 
+    elif [ "$TARGET" == "gnu" ]; then
+        # NSSI needs libstdc++
+        export EXTRA_LIBS="/opt/gcc/4.4.4/snos/lib64/libstdc++.a"
+        export LDFLAGS="" 
+        #module swap gcc gcc/4.4.4
+    fi
+
+    module load szip
+    module load mxml
+    module load subversion
+    export CPPFLAGS="-DMPICH_IGNORE_CXX_SEEK" 
+    export CFLAGS="-fPIC -g -O0" 
+    ./configure --prefix=/${HOME}/adios/$TARGET \
+        --enable-dependency-tracking \
+        --with-portals=yes \
+        --without-netcdf --without-nc4par --without-hdf5 --without-phdf5 \
+        --with-dataspaces=${HOME}/dataspaces/1.0.0/$TARGET
+
+
 elif [ `hostname | cut -c 1-4` == "dyn9" -o `hostname | cut -c 1-3` == "pnb" ]; then
 
     #######
@@ -326,19 +794,20 @@ elif [ `hostname | cut -c 1-4` == "dyn9" -o `hostname | cut -c 1-3` == "pnb" ];
     #######
     echo "Configure on Mac"
     # Installed MacPorts and GCC4.4 and OpenMPI 1.4.2 ports 
-    # But should work with default openmpi and gcc, using --disable-fortran
+    # But should work with default mpicc and gcc, using --disable-fortran
     export CC=/opt/local/bin/gcc-mp-4.4
     export FC=/opt/local/bin/gfortran-mp-4.4
     export CXX=/opt/local/bin/g++-mp-4.4
     export MPICC=/opt/local/bin/openmpicc
     export MPIFC=/opt/local/bin/openmpif90
     export MPICXX=/opt/local/bin/openmpicxx
-    CFLAGS="-DO_LARGEFILE=0 -fno-common" ./configure --prefix=/opt/adios \
+    CFLAGS="-g -DO_LARGEFILE=0 -fno-common" ./configure --prefix=/opt/adios \
         --with-mxml=/opt/mxml \
         --with-netcdf=/opt/netcdf \
         --with-phdf5=/opt/hdf5 \
         --with-hdf5=/opt/hdf5.seq
 
+
 elif [ `hostname | cut -c 1-7` == "ubuntu" ]; then
 
     #########################
@@ -353,6 +822,7 @@ elif [ `hostname | cut -c 1-7` == "ubuntu" ]; then
         #--with-phdf5=/usr/local \
         #--with-netcdf=/usr 
 
+
 elif [ `hostname | cut -c 1-6` == "tomato" ]; then
 
     #########################
@@ -367,6 +837,7 @@ elif [ `hostname | cut -c 1-6` == "tomato" ]; then
         --with-hdf5=/home/thkorde/local \
         --with-netcdf=/home/thkorde/local
 
+
 elif [ `hostname | cut -c 1-4` == "qliu" ]; then
 
     #########################
@@ -382,31 +853,11 @@ elif [ `hostname | cut -c 1-4` == "qliu" ]; then
         #--with-hdf5=/home/thkorde/local \
         #--with-netcdf=/home/thkorde/local
 
-elif [ `hostname | cut -c 1-5` == "smoky" ]; then
-
-    #########
-    # Smoky #
-    #########
-    echo "Configure on SMOKY"
-export CC=mpicc
-export FC=mpif90
-# use the two lines below for openmpi
-#export CC=mpicc
-#export FC=mpif90
-# use for both MPI implementations
-./configure --prefix=/ccs/home/ge1/work/smoky \
-            --enable-dependency-tracking \
-            --with-mxml=/ccs/home/ge1/work/smoky \
-            --with-hdf5=/sw/xt5/hdf5/1.6.7/cnl2.1_gnu4.2.4 \
-            --with-hdf5-libdir="/sw/xt5/hdf5/1.6.7/cnl2.1_gnu4.2.4/lib -L/sw/xt5/szip/2.1/sles10.1_gnu4.2.4/lib -lsz -lz" \
-            --with-phdf5=/sw/xt5/hdf5/1.6.7/cnl2.1_gnu4.2.4_par \
-            --with-phdf5-libdir="/sw/xt5/hdf5/1.6.7/cnl2.1_gnu4.2.4_par/lib -L/sw/xt5/szip/2.1/sles10.1_gnu4.2.4/lib -lsz -lz" \
-            --with-netcdf=/sw/xt5/netcdf/3.6.2/sles10.1_gnu4.2.0
 
 else
-    echo "Could not determine what machine is this"
-    echo "This script is for configuring adios on the authors' machines"
-    echo "You can study it to figure out how to configure adios on your system"
+    echo "Could not determine what machine is this."
+    echo "This script is for configuring adios on the authors' machines."
+    echo "You can study it to figure out how to configure adios on your system."
 fi
     
     
diff --git a/src/Makefile.am b/src/Makefile.am
index 1184558..4516974 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -8,25 +8,27 @@ if HAVE_NSSI
 
 bin_PROGRAMS+=nssi-staging-server
 
-nssi_staging_server_SOURCES = nssi_staging_server.cpp aggregation.cpp
+nssi_staging_server_SOURCES = nssi/nssi_staging_server.cpp nssi/aggregation.cpp
 nssi_staging_server_CFLAGS=$(ADIOSLIB_CFLAGS)
-nssi_staging_server_CPPFLAGS=$(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
+nssi_staging_server_CPPFLAGS=$(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
 nssi_staging_server_LDFLAGS = $(ADIOSLIB_LDFLAGS) 
 nssi_staging_server_LDADD = $(top_builddir)/src/libadios.a
 nssi_staging_server_LDADD += $(ADIOSLIB_LDADD) $(NSSI_SERVER_LIBS)
 
 bin_PROGRAMS+=nssi-coupling-server
 
-nssi_coupling_server_SOURCES = nssi_coupling_server.cpp
+nssi_coupling_server_SOURCES = nssi/nssi_coupling_server.cpp
 nssi_coupling_server_CFLAGS=$(ADIOSLIB_CFLAGS)
-nssi_coupling_server_CPPFLAGS=$(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL # -DUSE_TIMERS
+nssi_coupling_server_CPPFLAGS=$(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL # $(MACRODEFFLAG)USE_TIMERS
 nssi_coupling_server_LDFLAGS = $(ADIOSLIB_LDFLAGS) 
 nssi_coupling_server_LDADD = $(top_builddir)/src/libadios.a
 nssi_coupling_server_LDADD += $(ADIOSLIB_LDADD) $(NSSI_SERVER_LIBS)
 
 endif # HAVE_NSSI
 
+CLEANFILES= 
 include_HEADERS=
+nodist_include_HEADERS=
 lib_LIBRARIES=
 
 libadiosread_a_CPPFLAGS=
@@ -41,145 +43,163 @@ libadiosreadf_nompi_a_CFLAGS=
 
 if BUILD_WRITE
 lib_LIBRARIES += libadios.a libadios_nompi.a
-libadios_a_SOURCES = adios.c \
-                     common_adios.c \
-                     adios_transport_hooks.c \
-                     adios_mpi.c \
-                     adios_mpi_lustre.c \
-                     adios_mpi_amr.c \
-                     adios_posix.c \
-                     adios_posix1.c \
-                     adios_internals.c \
-                     adios_internals_mxml.c \
-                     buffer.c \
-                     adios_socket.c \
-                     adios_bp_v1.c  \
-                     adios_endianness.c \
-                     bp_utils.c \
-                     futils.c \
-                     adios_error.c \
-                     adios_read.c \
-                     adios_read_hooks.c \
-                     common_read.c \
-                     read_bp.c \
-                     read_bp_staged.c \
-                     globals.c
-
-libadios_nompi_a_SOURCES = adios.c \
-                     common_adios.c \
-                     adios_transport_hooks.c \
-                     adios_posix.c \
-                     adios_posix1.c \
-                     adios_internals.c \
-                     adios_internals_mxml.c \
-                     buffer.c \
-                     adios_socket.c \
-                     adios_bp_v1.c  \
-                     adios_endianness.c \
-                     bp_utils.c \
-                     futils.c \
-                     adios_error.c \
-                     adios_read.c \
-                     adios_read_hooks.c \
-                     common_read.c \
-                     read_bp.c \
-                     read_bp_staged.c \
-                     globals.c \
-                     mpidummy.c
+libadios_a_SOURCES = core/adios.c \
+                     core/common_adios.c \
+                     core/adios_internals.c \
+                     core/adios_internals_mxml.c \
+                     core/buffer.c \
+                     core/adios_bp_v1.c  \
+                     core/adios_endianness.c \
+                     core/bp_utils.c \
+                     core/futils.c \
+                     core/adios_error.c \
+                     core/adios_read.c \
+                     core/adios_read_v1.c \
+                     core/common_read.c \
+                     core/globals.c \
+                     core/adios_timing.c \
+                     core/adios_read_hooks.c \
+                     core/adios_transport_hooks.c \
+                     core/adios_socket.c \
+                     core/adios_logger.c \
+                     core/util.c \
+                     read/read_bp.c \
+                     read/read_bp_staged.c \
+                     read/read_bp_staged1.c \
+                     write/adios_mpi.c \
+                     write/adios_mpi_lustre.c \
+                     write/adios_mpi_amr.c \
+                     write/adios_posix.c \
+                     write/adios_posix1.c 
+
+
+libadios_nompi_a_SOURCES = core/adios.c \
+                     core/common_adios.c \
+                     core/adios_internals.c \
+                     core/adios_internals_mxml.c \
+                     core/buffer.c \
+                     core/adios_bp_v1.c  \
+                     core/adios_endianness.c \
+                     core/bp_utils.c \
+                     core/futils.c \
+                     core/adios_error.c \
+                     core/adios_read.c \
+                     core/adios_read_v1.c \
+                     core/common_read.c \
+                     core/globals.c \
+                     core/mpidummy.c \
+                     core/adios_timing.c \
+                     core/adios_read_hooks.c \
+                     core/adios_transport_hooks.c \
+                     core/adios_socket.c \
+                     core/adios_logger.c \
+                     core/util.c \
+                     read/read_bp.c \
+                     read/read_bp_staged.c \
+                     read/read_bp_staged1.c \
+                     write/adios_posix.c \
+                     write/adios_posix1.c 
+
+
 
 if BUILD_FORTRAN
-lib_LIBRARIES += libadiosf.a 
-libadiosf_a_SOURCES = adiosf.c \
-                     common_adios.c \
-                     adios_transport_hooks.c \
-                     adios_mpi.c \
-                     adios_mpi_lustre.c \
-                     adios_mpi_amr.c \
-                     adios_posix.c \
-                     adios_posix1.c \
-                     adios_internals.c \
-                     adios_internals_mxml.c \
-                     buffer.c \
-                     adios_socket.c \
-                     adios_bp_v1.c  \
-                     adios_endianness.c\
-                     futils.c \
-                     adios_error.c \
-                     bp_utils.c \
-                     adiosf_read.c \
-                     adios_read_hooks.c \
-                     common_read.c \
-                     read_bp.c \
-                     read_bp_staged.c \
-                     globals.c
+lib_LIBRARIES += libadiosf.a libadiosf_v1.a
+FortranLibSources = core/adiosf.c \
+                     core/common_adios.c \
+                     core/adios_internals.c \
+                     core/adios_internals_mxml.c \
+                     core/buffer.c \
+                     core/adios_bp_v1.c  \
+                     core/adios_endianness.c\
+                     core/futils.c \
+                     core/adios_error.c \
+                     core/bp_utils.c \
+                     core/common_read.c \
+                     core/globals.c \
+                     core/adios_timing.c \
+                     core/adios_read_hooks.c \
+                     core/adios_transport_hooks.c \
+                     core/adios_socket.c \
+                     core/adios_logger.c \
+                     core/util.c \
+                     read/read_bp.c \
+                     read/read_bp_staged.c \
+                     read/read_bp_staged1.c \
+                     write/adios_mpi.c \
+                     write/adios_mpi_lustre.c \
+                     write/adios_mpi_amr.c \
+                     write/adios_posix.c \
+                     write/adios_posix1.c 
+
+
 endif # BUILD_FORTRAN
 
-libadios_a_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # -DUSE_TIMERS
+libadios_a_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # $(MACRODEFFLAG)USE_TIMERS
 libadios_a_CFLAGS = $(ADIOSLIB_CFLAGS) 
-libadios_nompi_a_CPPFLAGS = -D_NOMPI $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_SEQ_CPPFLAGS) # -DUSE_TIMERS
-libadios_nompi_a_CFLAGS = -D_NOMPI $(ADIOSLIB_SEQ_CFLAGS) 
-libadiosf_a_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # -DUSE_TIMERS
+libadios_nompi_a_CPPFLAGS = $(MACRODEFFLAG)_NOMPI $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_SEQ_CPPFLAGS) # $(MACRODEFFLAG)USE_TIMERS
+libadios_nompi_a_CFLAGS = $(MACRODEFFLAG)_NOMPI $(ADIOSLIB_SEQ_CFLAGS) 
+libadiosf_a_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # $(MACRODEFFLAG)USE_TIMERS
 libadiosf_a_CFLAGS = $(ADIOSLIB_CFLAGS) 
 
-if HAVE_DART
-libadios_a_SOURCES += adios_dart.c read_dart.c
-libadios_nompi_a_SOURCES += adios_dart.c read_dart.c
+if HAVE_DATASPACES
+libadios_a_SOURCES += write/adios_dataspaces.c read/read_dataspaces.c
+libadios_nompi_a_SOURCES += write/adios_dataspaces.c read/read_dataspaces.c
 if BUILD_FORTRAN
-libadiosf_a_SOURCES += adios_dart.c read_dart.c
+FortranLibSources += write/adios_dataspaces.c read/read_dataspaces.c
 endif
 endif
 
 if HAVE_DIMES
-libadios_a_SOURCES += adios_dimes.c read_dimes.c
-libadios_nompi_a_SOURCES += adios_dimes.c read_dimes.c
+libadios_a_SOURCES += write/adios_dimes.c read/read_dimes.c
+libadios_nompi_a_SOURCES += write/adios_dimes.c read/read_dimes.c
 if BUILD_FORTRAN
-libadiosf_a_SOURCES += adios_dimes.c read_dimes.c
+FortranLibSources += write/adios_dimes.c read/read_dimes.c
 endif
 endif
 
 if HAVE_DATATAP
-libadios_a_SOURCES += adios_datatap.c read_datatap.c
-libadios_nompi_a_SOURCES += adios_datatap.c read_datatap.c
+libadios_a_SOURCES += write/adios_datatap.c read/read_datatap.c
+libadios_nompi_a_SOURCES += write/adios_datatap.c read/read_datatap.c
 if BUILD_FORTRAN
-libadiosf_a_SOURCES += adios_datatap.c read_datatap.c
+FortranLibSources += write/adios_datatap.c read/read_datatap.c
 endif
 endif 
 
 
 if HAVE_PHDF5
-libadios_a_SOURCES += adios_phdf5.c 
-PHDF5_CPPFLAGS += -DPHDF5 -DH5_USE_16_API 
+libadios_a_SOURCES += write/adios_phdf5.c 
+PHDF5_CPPFLAGS += $(MACRODEFFLAG)PHDF5 $(MACRODEFFLAG)H5_USE_16_API 
 libadios_a_CPPFLAGS += $(PHDF5_CPPFLAGS)
 if BUILD_FORTRAN
-libadiosf_a_SOURCES += adios_phdf5.c 
+FortranLibSources += write/adios_phdf5.c 
 libadiosf_a_CPPFLAGS += $(PHDF5_CPPFLAGS)
 endif
 endif
 
 if HAVE_NC4PAR
-libadios_a_SOURCES += adios_nc4.c 
+libadios_a_SOURCES += write/adios_nc4.c 
 if BUILD_FORTRAN
-libadiosf_a_SOURCES += adios_nc4.c 
+FortranLibSources += write/adios_nc4.c 
 endif
 endif
 
 if HAVE_NSSI
-dist_libadios_a_SOURCES = adios_nssi_args.x
+dist_libadios_a_SOURCES = nssi/adios_nssi_args.x
 nodist_libadios_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
-libadios_a_SOURCES += adios_nssi_config.c adios_nssi.c adios_nssi_filter.c read_nssi.c
-libadios_a_CPPFLAGS += -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
+libadios_a_SOURCES += nssi/adios_nssi_config.c write/adios_nssi.c nssi/adios_nssi_filter.c read/read_nssi.c
+libadios_a_CPPFLAGS += $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
 if BUILD_FORTRAN
 nodist_libadiosf_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
-dist_libadiosf_a_SOURCES = adios_nssi_args.x
-libadiosf_a_SOURCES += adios_nssi_config.c adios_nssi.c adios_nssi_filter.c read_nssi.c
-libadiosf_a_CPPFLAGS += -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
+dist_libadiosf_a_SOURCES = nssi/adios_nssi_args.x
+FortranLibSources += nssi/adios_nssi_config.c write/adios_nssi.c nssi/adios_nssi_filter.c read/read_nssi.c
+libadiosf_a_CPPFLAGS += $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
 endif
 
 # The next line forces automake to build adios_nssi_args.[ch] before compiling adios_nssi_config.c
 # Note, the order of dist_*SOURCES and nodist_*SOURCES above should but does not solve this alone.
 adios_nssi_config.c: adios_nssi_args.c
 
-adios_nssi_args.h:  $(srcdir)/adios_nssi_args.x Makefile.am
+adios_nssi_args.h:  $(srcdir)/nssi/adios_nssi_args.x Makefile.am
 	rm -f $@
 #	@echo "#include <lwfs/lwfs_config.h>" >> $@
 #	@echo "#ifndef LWFS_HAVE_STRUCT_SOCKADDR_IN" >> $@
@@ -188,215 +208,273 @@ adios_nssi_args.h:  $(srcdir)/adios_nssi_args.x Makefile.am
 #	@echo '  int a;' >> $@
 #	@echo '};' >> $@
 #	@echo '#endif' >> $@;
-	rpcgen -h $(srcdir)/adios_nssi_args.x >> $@
+	rpcgen -h $(srcdir)/nssi/adios_nssi_args.x >> $@
 
 adios_nssi_args.c: adios_nssi_args.h 
 	rm -f adios_nssi_args.c
-	rpcgen -c $(srcdir)/adios_nssi_args.x \
+	rpcgen -c $(srcdir)/nssi/adios_nssi_args.x \
 		| grep -v "include \"\.\." > adios_nssi_args.c
 
-CLEANFILES = adios_nssi_args.c adios_nssi_args.h
+CLEANFILES += adios_nssi_args.c adios_nssi_args.h
 
 endif # HAVE_NSSI
 
 
 if RESEARCH_TRANSPORTS
-libadios_a_SOURCES += adios_mpi_stagger.c \
-                      adios_mpi_aggregate.c \
-                      adios_provenance.c \
-                      adios_mpi_cio.c \
-                      adios_mpi_stripe.c \
-                      adios_mpi_amr1.c \
-                      adios_adaptive.c 
+libadios_a_SOURCES += write/adios_mpi_stagger.c \
+                      write/adios_mpi_aggregate.c \
+                      write/adios_provenance.c \
+                      write/adios_mpi_cio.c \
+                      write/adios_mpi_stripe.c \
+                      write/adios_mpi_amr1.c \
+                      write/adios_adaptive.c 
 if BUILD_FORTRAN
-libadiosf_a_SOURCES += adios_mpi_stagger.c \
-                       adios_mpi_aggregate.c \
-                       adios_provenance.c \
-                       adios_mpi_cio.c \
-                       adios_mpi_stripe.c \
-                       adios_mpi_amr1.c \
-                       adios_adaptive.c 
+FortranLibSources += write/adios_mpi_stagger.c \
+                       write/adios_mpi_aggregate.c \
+                       write/adios_provenance.c \
+                       write/adios_mpi_cio.c \
+                       write/adios_mpi_stripe.c \
+                       write/adios_mpi_amr1.c \
+                       write/adios_adaptive.c 
 endif
 else
-libadios_a_CPPFLAGS += -DNO_RESEARCH_TRANSPORTS
-libadios_nompi_a_CPPFLAGS += -DNO_RESEARCH_TRANSPORTS
-libadiosf_a_CPPFLAGS += -DNO_RESEARCH_TRANSPORTS
+libadios_a_CPPFLAGS += $(MACRODEFFLAG)NO_RESEARCH_TRANSPORTS
+libadios_nompi_a_CPPFLAGS += $(MACRODEFFLAG)NO_RESEARCH_TRANSPORTS
+libadiosf_a_CPPFLAGS += $(MACRODEFFLAG)NO_RESEARCH_TRANSPORTS
 endif  # RESEARCH_TRANSPORTS
 
+# Build two different Fortran library, for the two read APIs
+if BUILD_FORTRAN
+libadiosf_a_SOURCES = $(FortranLibSources) core/adiosf_read.c
+libadiosf_v1_a_SOURCES = $(FortranLibSources) core/adiosf_read_v1.c
+libadiosf_v1_a_CPPFLAGS = $(libadiosf_a_CPPFLAGS) 
+libadiosf_v1_a_CFLAGS = $(libadiosf_a_CFLAGS) 
+
+libadiosf_a_SOURCES += core/adiosf_defs_mod.f90 \
+                       core/adiosf_write_mod.f90 \
+                       core/adiosf_read_mod.f90 
+
+libadiosf_v1_a_SOURCES += core/adiosf_defs_mod.f90 \
+                          core/adiosf_write_mod.f90 
+
+#nodist_libadiosreadf_a_SOURCES += adios_write.mod
+nodist_include_HEADERS += adios_write_mod.mod 
+CLEANFILES += adios_write_mod.mod
+
+adios_write_mod.mod: core/adiosf_write_mod.f90 adios_defs_mod.mod
+	$(FC) -c core/adiosf_write_mod.f90
+
+endif
+
+
 endif   # BUILD_WRITE
 
-include_HEADERS += adios.h \
-                   adios_types.h \
-                   adios_read.h \
-                   adios_read_hooks.h \
-                   adios_error.h \
-                   mpidummy.h \
-                   io_timer.h
+include_HEADERS += public/adios.h \
+                   public/adios_types.h \
+                   public/adios_read.h \
+                   public/adios_error.h \
+                   public/mpidummy.h \
+                   public/adios_read_v1.h \
+                   public/adios_read_v1_defs.h \
+                   public/adios_read_v2.h \
+                   public/adios_selection.h
+
 
 lib_LIBRARIES += libadiosread.a
-libadiosread_a_SOURCES = adios_bp_v1.c \
-                      adios_endianness.c \
-                      bp_utils.c \
-                      futils.c \
-                      adios_error.c \
-                      adios_read.c \
-                      adios_read_hooks.c \
-                      common_read.c \
-                      read_bp.c \
-                      read_bp_staged.c \
-                      globals.c
-if HAVE_DART
-libadiosread_a_SOURCES += read_dart.c
+libadiosread_a_SOURCES = core/adios_bp_v1.c \
+                      core/adios_endianness.c \
+                      core/bp_utils.c \
+                      core/futils.c \
+                      core/adios_error.c \
+                      core/adios_read.c \
+                      core/adios_read_v1.c \
+                      core/common_read.c \
+                      core/globals.c \
+                      core/adios_read_hooks.c \
+                      core/adios_logger.c \
+                      core/util.c \
+                      read/read_bp.c \
+                      read/read_bp_staged.c \
+                      read/read_bp_staged1.c 
+if HAVE_DATASPACES
+libadiosread_a_SOURCES += read/read_dataspaces.c
 endif
 if HAVE_DIMES
-libadiosread_a_SOURCES += read_dimes.c
+libadiosread_a_SOURCES += read/read_dimes.c
 endif
 if HAVE_DATATAP
-libadiosread_a_SOURCES += read_datatap.c
+libadiosread_a_SOURCES += read/read_datatap.c
 endif
 if HAVE_NSSI
-dist_libadiosread_a_SOURCES = adios_nssi_args.x
+dist_libadiosread_a_SOURCES = nssi/adios_nssi_args.x
 nodist_libadiosread_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
-libadiosread_a_SOURCES += adios_nssi_config.c read_nssi.c
-libadiosread_a_CPPFLAGS += -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
-#libadiosread_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # -DUSE_TIMERS
+libadiosread_a_SOURCES += nssi/adios_nssi_config.c read/read_nssi.c
+libadiosread_a_CPPFLAGS += $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
+#libadiosread_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # $(MACRODEFFLAG)USE_TIMERS
 libadiosread_a_CFLAGS   += $(ADIOSLIB_CFLAGS) 
 endif
 
 libadiosread_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
 
 if BUILD_FORTRAN
-lib_LIBRARIES += libadiosreadf.a
-libadiosreadf_a_SOURCES = adios_bp_v1.c \
-                      adios_endianness.c \
-                      bp_utils.c \
-                      futils.c \
-                      adios_error.c \
-                      adiosf_read.c \
-                      adios_read_hooks.c \
-                      common_read.c \
-                      read_bp.c \
-                      read_bp_staged.c \
-                      globals.c
+lib_LIBRARIES += libadiosreadf.a libadiosreadf_v1.a
+FortranReadLibSource = core/adios_bp_v1.c \
+                      core/adios_endianness.c \
+                      core/bp_utils.c \
+                      core/futils.c \
+                      core/adios_error.c \
+                      core/common_read.c \
+                      core/globals.c \
+                      core/adios_read_hooks.c \
+                      core/adios_logger.c \
+                      core/util.c \
+                      read/read_bp.c \
+                      read/read_bp_staged.c \
+                      read/read_bp_staged1.c 
                       
-if HAVE_DART
-libadiosreadf_a_SOURCES += read_dart.c
+if HAVE_DATASPACES
+FortranReadLibSource += read/read_dataspaces.c
 endif
 if HAVE_DIMES
-libadiosreadf_a_SOURCES += read_dimes.c
+FortranReadLibSource += read/read_dimes.c
 endif
 if HAVE_DATATAP
-libadiosreadf_a_SOURCES += read_datatap.c
+FortranReadLibSource += read/read_datatap.c
 endif
 if HAVE_NSSI
-dist_libadiosreadf_a_SOURCES = adios_nssi_args.x
+dist_libadiosreadf_a_SOURCES = nssi/adios_nssi_args.x
 nodist_libadiosreadf_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
-libadiosreadf_a_SOURCES += adios_nssi_config.c read_nssi.c
-libadiosreadf_a_CPPFLAGS += -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
-#libadiosreadf_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # -DUSE_TIMERS
+FortranReadLibSource += nssi/adios_nssi_config.c read/read_nssi.c
+libadiosreadf_a_CPPFLAGS += $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
 libadiosreadf_a_CFLAGS   += $(ADIOSLIB_CFLAGS) 
 endif
 
 libadiosreadf_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
 
-# adiosf_read.mod is not really usable, 
-# so it is not used and installed right now
-#libadiosread_a_SOURCES += adiosf_read_mod.F90
-#include_HEADERS += adiosf_read.mod 
+libadiosreadf_a_SOURCES = $(FortranReadLibSource) core/adiosf_read.c
+libadiosreadf_v1_a_SOURCES = $(FortranReadLibSource) core/adiosf_read_v1.c
+libadiosreadf_v1_a_CPPFLAGS = $(libadiosreadf_a_CPPFLAGS)
+libadiosreadf_v1_a_CFLAGS = $(libadiosreadf_a_CFLAGS)
+
+libadiosreadf_a_SOURCES += core/adiosf_defs_mod.f90 \
+                           core/adiosf_read_mod.f90
+
+#nodist_libadiosreadf_a_SOURCES += adios_read_mod.mod
+nodist_include_HEADERS += adios_read_mod.mod adios_defs_mod.mod
+CLEANFILES += adios_read_mod.mod adios_defs_mod.mod
+
+adios_read_mod.mod: core/adiosf_read_mod.f90 adios_defs_mod.mod 
+	$(FC) -c core/adiosf_read_mod.f90
+
+adios_defs_mod.mod: core/adiosf_defs_mod.f90
+	$(FC) -c core/adiosf_defs_mod.f90
+
 endif
 
 lib_LIBRARIES += libadiosread_nompi.a
-libadiosread_nompi_a_SOURCES = mpidummy.c\
-                      adios_bp_v1.c \
-                      adios_endianness.c \
-                      bp_utils.c \
-                      futils.c \
-                      adios_error.c \
-                      adios_read.c \
-                      adios_read_hooks.c \
-                      common_read.c \
-                      read_bp.c \
-                      adios_internals.c \
-                      buffer.c \
-                      adios_transport_hooks.c \
-                      globals.c
-
-if HAVE_DART
-libadiosread_nompi_a_SOURCES += read_dart.c
+libadiosread_nompi_a_SOURCES = core/mpidummy.c\
+                      core/adios_bp_v1.c \
+                      core/adios_endianness.c \
+                      core/bp_utils.c \
+                      core/futils.c \
+                      core/adios_error.c \
+                      core/adios_read.c \
+                      core/adios_read_v1.c \
+                      core/common_read.c \
+                      core/adios_logger.c \
+                      core/buffer.c \
+                      core/globals.c \
+                      core/adios_read_hooks.c \
+                      core/util.c \
+                      read/read_bp.c 
+
+if HAVE_DATASPACES
+libadiosread_nompi_a_SOURCES += read/read_dataspaces.c
 endif
 if HAVE_DIMES
-libadiosread_nompi_a_SOURCES += read_dimes.c
+libadiosread_nompi_a_SOURCES += read/read_dimes.c
 endif
 if HAVE_DATATAP
-libadiosread_nompi_a_SOURCES += read_datatap.c
+libadiosread_nompi_a_SOURCES += read/read_datatap.c
 endif
 if HAVE_NSSI
-dist_libadiosread_nompi_a_SOURCES = adios_nssi_args.x
+dist_libadiosread_nompi_a_SOURCES = nssi/adios_nssi_args.x
 nodist_libadiosread_nompi_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
-libadiosread_nompi_a_SOURCES += adios_nssi_config.c read_nssi.c
-libadiosread_nompi_a_CPPFLAGS += -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
-libadiosread_nompi_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # -DUSE_TIMERS
+libadiosread_nompi_a_SOURCES += nssi/adios_nssi_config.c read/read_nssi.c
+libadiosread_nompi_a_CPPFLAGS += $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
 libadiosread_nompi_a_CFLAGS   += $(ADIOSLIB_CFLAGS) 
 endif
+libadiosread_nompi_a_CPPFLAGS  += $(MACRODEFFLAG)_NOMPI $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
+
 # Note: utils/adios_lint needs to link with adios_internals_mxml.o which depends
 #       on adios_internals.c, buffer.c and adios_transport_hooks.c. 
 #       We put these objects in libadiosread_nompi
 #       so we do not need to make another _nompi lib just for adios_lint
 if BUILD_FORTRAN
-lib_LIBRARIES += libadiosreadf_nompi.a
-libadiosreadf_nompi_a_SOURCES = mpidummy.c\
-                                adios_bp_v1.c \
-                                adios_endianness.c \
-                                bp_utils.c \
-                                futils.c \
-                                adios_error.c \
-                                adiosf_read.c \
-                                adios_read_hooks.c \
-                                common_read.c \
-                                read_bp.c \
-                                globals.c 
-if HAVE_DART
-libadiosreadf_nompi_a_SOURCES += read_dart.c
+lib_LIBRARIES += libadiosreadf_nompi.a libadiosreadf_nompi_v1.a
+FortranReadSeqLibSource = core/mpidummy.c\
+                          core/adios_bp_v1.c \
+                          core/adios_endianness.c \
+                          core/bp_utils.c \
+                          core/futils.c \
+                          core/adios_error.c \
+                          core/adios_logger.c \
+                          core/common_read.c \
+                          core/globals.c \
+                          core/adios_read_hooks.c \
+                          core/util.c \
+                          read/read_bp.c 
+if HAVE_DATASPACES
+FortranReadSeqLibSource += read/read_dataspaces.c
 endif
 if HAVE_DIMES
-libadiosreadf_nompi_a_SOURCES += read_dimes.c
+FortranReadSeqLibSource += read/read_dimes.c
 endif
 if HAVE_DATATAP
-libadiosread_nompi_a_SOURCES += read_datatap.c
+FortranReadSeqLibSource += read/read_datatap.c
 endif
 if HAVE_NSSI
-dist_libadiosreadf_nompi_a_SOURCES = adios_nssi_args.x
+dist_libadiosreadf_nompi_a_SOURCES = nssi/adios_nssi_args.x
 nodist_libadiosreadf_nompi_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
-libadiosreadf_nompi_a_SOURCES += adios_nssi_config.c read_nssi.c
-libadiosreadf_nompi_a_CPPFLAGS += -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
-libadiosreadf_nompi_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # -DUSE_TIMERS
+FortranReadSeqLibSource += nssi/adios_nssi_config.c read/read_nssi.c
+libadiosreadf_nompi_a_CPPFLAGS += $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
+libadiosreadf_nompi_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # $(MACRODEFFLAG)USE_TIMERS
 libadiosreadf_nompi_a_CFLAGS   += $(ADIOSLIB_CFLAGS) 
 endif
+
+libadiosreadf_nompi_a_CPPFLAGS += $(MACRODEFFLAG)_NOMPI $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
+libadiosreadf_nompi_a_SOURCES = $(FortranReadSeqLibSource) core/adiosf_read.c
+libadiosreadf_nompi_v1_a_SOURCES = $(FortranReadSeqLibSource) core/adiosf_read_v1.c
+libadiosreadf_nompi_v1_a_CPPFLAGS = $(libadiosreadf_nompi_a_CPPFLAGS)
+libadiosreadf_nompi_v1_a_CFLAGS = $(libadiosreadf_nompi_a_CFLAGS)
+
 endif  #BUILD_FORTRAN
 
 noinst_LIBRARIES = libadios_internal_nompi.a
-libadios_internal_nompi_a_SOURCES = mpidummy.c \
-                                    adios_bp_v1.c \
-                                    adios_endianness.c \
-                                    bp_utils.c \
-                                    adios_internals.c \
-                                    buffer.c \
-                                    adios_transport_hooks.c \
-                                    adios_error.c \
-                                    adios_internals_mxml.c
-
-
-libadiosread_nompi_a_CPPFLAGS  += -D_NOMPI $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
-libadiosreadf_nompi_a_CPPFLAGS += -D_NOMPI $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
-libadios_internal_nompi_a_CPPFLAGS = -D_INTERNAL $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_CPPFLAGS)
-#Note: -DNOMPI chokes IBM's bgxlf compiler but it can pass -D_NOMPI. 
+libadios_internal_nompi_a_SOURCES = core/mpidummy.c \
+                                    core/adios_bp_v1.c \
+                                    core/adios_endianness.c \
+                                    core/bp_utils.c \
+                                    core/adios_internals.c \
+                                    core/buffer.c \
+                                    core/adios_error.c \
+                                    core/adios_logger.c \
+                                    core/adios_internals_mxml.c \
+                                    core/adios_timing.c \
+                                    core/util.c \
+                                    core/futils.c \
+                                    core/adios_transport_hooks.c 
+
+
+libadios_internal_nompi_a_CPPFLAGS = $(MACRODEFFLAG)_INTERNAL $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_CPPFLAGS)
+#Note: $(MACRODEFFLAG)NOMPI chokes IBM's bgxlf compiler but it can pass $(MACRODEFFLAG)_NOMPI. 
 
 if HAVE_DMALLOC
-libadiosread_a_CPPFLAGS += -DDMALLOC 
-libadiosread_nompi_a_CPPFLAGS += -DDMALLOC 
+libadiosread_a_CPPFLAGS += $(MACRODEFFLAG)DMALLOC 
+libadiosread_nompi_a_CPPFLAGS += $(MACRODEFFLAG)DMALLOC 
 #if BUILD_FORTRAN
-#libadiosreadf_a_CPPFLAGS += -DDMALLOC $(DMALLOC_CPPFLAGS)
-#libadiosreadf_nompi_a_CPPFLAGS += -DDMALLOC $(DMALLOC_CPPFLAGS)
+#libadiosreadf_a_CPPFLAGS += $(MACRODEFFLAG)DMALLOC $(DMALLOC_CPPFLAGS)
+#libadiosreadf_nompi_a_CPPFLAGS += $(MACRODEFFLAG)DMALLOC $(DMALLOC_CPPFLAGS)
 #endif
 endif
 
@@ -424,9 +502,12 @@ CXX=$(MPICXX)
 #adios_flags.c: adios_flags.h
 
 
-EXTRA_DIST = adios_bp_v1.h adios_endianness.h adios_error.h \
-             adios_internals.h adios_internals_mxml.h \
-             adios_nssi_config.h adios_socket.h adios_transport_hooks.h aggregation.h \
-             bp_types.h bp_utils.h buffer.h common_adios.h common_read.h futils.h globals.h \
-             ds_metadata.h
+EXTRA_DIST = core/adios_bp_v1.h core/adios_endianness.h \
+             core/adios_internals.h core/adios_internals_mxml.h core/adios_logger.h \
+             core/adios_read_hooks.h core/adios_socket.h core/adios_timing.h \
+             core/adios_transport_hooks.h \
+             core/bp_types.h core/bp_utils.h core/buffer.h core/common_adios.h \
+             core/common_read.h core/futils.h core/globals.h core/ds_metadata.h \
+             core/util.h \
+             nssi/adios_nssi_config.h nssi/aggregation.h nssi/io_timer.h
 
diff --git a/src/Makefile.in b/src/Makefile.in
index a317cca..7666c52 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -16,15 +17,12 @@
 
 
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -42,94 +40,103 @@ bin_PROGRAMS = $(am__EXEEXT_1)
 @HAVE_NSSI_TRUE at am__append_1 = nssi-staging-server \
 @HAVE_NSSI_TRUE@	nssi-coupling-server
 @BUILD_WRITE_TRUE at am__append_2 = libadios.a libadios_nompi.a
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am__append_3 = libadiosf.a 
- at BUILD_WRITE_TRUE@@HAVE_DART_TRUE at am__append_4 = adios_dart.c read_dart.c
- at BUILD_WRITE_TRUE@@HAVE_DART_TRUE at am__append_5 = adios_dart.c read_dart.c
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DART_TRUE at am__append_6 = adios_dart.c read_dart.c
- at BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__append_7 = adios_dimes.c read_dimes.c
- at BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__append_8 = adios_dimes.c read_dimes.c
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__append_9 = adios_dimes.c read_dimes.c
- at BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__append_10 = adios_datatap.c read_datatap.c
- at BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__append_11 = adios_datatap.c read_datatap.c
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__append_12 = adios_datatap.c read_datatap.c
- at BUILD_WRITE_TRUE@@HAVE_PHDF5_TRUE at am__append_13 = adios_phdf5.c 
- at BUILD_WRITE_TRUE@@HAVE_PHDF5_TRUE at am__append_14 = -DPHDF5 -DH5_USE_16_API 
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am__append_3 = libadiosf.a libadiosf_v1.a
+ at BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE at am__append_4 = write/adios_dataspaces.c read/read_dataspaces.c
+ at BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE at am__append_5 = write/adios_dataspaces.c read/read_dataspaces.c
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE at am__append_6 = write/adios_dataspaces.c read/read_dataspaces.c
+ at BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__append_7 = write/adios_dimes.c read/read_dimes.c
+ at BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__append_8 = write/adios_dimes.c read/read_dimes.c
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__append_9 = write/adios_dimes.c read/read_dimes.c
+ at BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__append_10 = write/adios_datatap.c read/read_datatap.c
+ at BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__append_11 = write/adios_datatap.c read/read_datatap.c
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__append_12 = write/adios_datatap.c read/read_datatap.c
+ at BUILD_WRITE_TRUE@@HAVE_PHDF5_TRUE at am__append_13 = write/adios_phdf5.c 
+ at BUILD_WRITE_TRUE@@HAVE_PHDF5_TRUE at am__append_14 = $(MACRODEFFLAG)PHDF5 $(MACRODEFFLAG)H5_USE_16_API 
 @BUILD_WRITE_TRUE@@HAVE_PHDF5_TRUE at am__append_15 = $(PHDF5_CPPFLAGS)
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_PHDF5_TRUE at am__append_16 = adios_phdf5.c 
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_PHDF5_TRUE at am__append_16 = write/adios_phdf5.c 
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_PHDF5_TRUE at am__append_17 = $(PHDF5_CPPFLAGS)
- at BUILD_WRITE_TRUE@@HAVE_NC4PAR_TRUE at am__append_18 = adios_nc4.c 
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NC4PAR_TRUE at am__append_19 = adios_nc4.c 
- at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__append_20 = adios_nssi_config.c adios_nssi.c adios_nssi_filter.c read_nssi.c
- at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__append_21 = -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__append_22 = adios_nssi_config.c adios_nssi.c adios_nssi_filter.c read_nssi.c
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__append_23 = -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE at am__append_24 = adios_mpi_stagger.c \
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      adios_mpi_aggregate.c \
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      adios_provenance.c \
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      adios_mpi_cio.c \
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      adios_mpi_stripe.c \
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      adios_mpi_amr1.c \
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      adios_adaptive.c 
-
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE at am__append_25 = adios_mpi_stagger.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       adios_mpi_aggregate.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       adios_provenance.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       adios_mpi_cio.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       adios_mpi_stripe.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       adios_mpi_amr1.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       adios_adaptive.c 
-
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_FALSE at am__append_26 = -DNO_RESEARCH_TRANSPORTS
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_FALSE at am__append_27 = -DNO_RESEARCH_TRANSPORTS
- at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_FALSE at am__append_28 = -DNO_RESEARCH_TRANSPORTS
- at HAVE_DART_TRUE@am__append_29 = read_dart.c
- at HAVE_DIMES_TRUE@am__append_30 = read_dimes.c
- at HAVE_DATATAP_TRUE@am__append_31 = read_datatap.c
- at HAVE_NSSI_TRUE@am__append_32 = adios_nssi_config.c read_nssi.c
- at HAVE_NSSI_TRUE@am__append_33 = -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
-#libadiosread_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # -DUSE_TIMERS
- at HAVE_NSSI_TRUE@am__append_34 = $(ADIOSLIB_CFLAGS) 
- at BUILD_FORTRAN_TRUE@am__append_35 = libadiosreadf.a
- at BUILD_FORTRAN_TRUE@@HAVE_DART_TRUE at am__append_36 = read_dart.c
- at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__append_37 = read_dimes.c
- at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__append_38 = read_datatap.c
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_39 = adios_nssi_config.c read_nssi.c
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_40 = -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
-#libadiosreadf_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # -DUSE_TIMERS
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_41 = $(ADIOSLIB_CFLAGS) 
- at BUILD_FORTRAN_TRUE@am__append_42 = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
- at HAVE_DART_TRUE@am__append_43 = read_dart.c
- at HAVE_DIMES_TRUE@am__append_44 = read_dimes.c
- at HAVE_DATATAP_TRUE@am__append_45 = read_datatap.c
- at HAVE_NSSI_TRUE@am__append_46 = adios_nssi_config.c read_nssi.c
- at HAVE_NSSI_TRUE@am__append_47 = -DPTL_IFACE_CLIENT=CRAY_USER_NAL \
- at HAVE_NSSI_TRUE@	-DPTL_IFACE_SERVER=CRAY_USER_NAL \
- at HAVE_NSSI_TRUE@	$(ADIOSLIB_EXTRA_CPPFLAGS) \
- at HAVE_NSSI_TRUE@	$(ADIOSLIB_CPPFLAGS) # -DUSE_TIMERS
- at HAVE_NSSI_TRUE@am__append_48 = $(ADIOSLIB_CFLAGS) 
+ at BUILD_WRITE_TRUE@@HAVE_NC4PAR_TRUE at am__append_18 = write/adios_nc4.c 
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NC4PAR_TRUE at am__append_19 = write/adios_nc4.c 
+ at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__append_20 = nssi/adios_nssi_config.c write/adios_nssi.c nssi/adios_nssi_filter.c read/read_nssi.c
+ at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__append_21 = $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__append_22 = nssi/adios_nssi_config.c write/adios_nssi.c nssi/adios_nssi_filter.c read/read_nssi.c
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__append_23 = $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
+ at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__append_24 = adios_nssi_args.c adios_nssi_args.h
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE at am__append_25 = write/adios_mpi_stagger.c \
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      write/adios_mpi_aggregate.c \
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      write/adios_provenance.c \
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      write/adios_mpi_cio.c \
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      write/adios_mpi_stripe.c \
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      write/adios_mpi_amr1.c \
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                      write/adios_adaptive.c 
+
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE at am__append_26 = write/adios_mpi_stagger.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       write/adios_mpi_aggregate.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       write/adios_provenance.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       write/adios_mpi_cio.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       write/adios_mpi_stripe.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       write/adios_mpi_amr1.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@                       write/adios_adaptive.c 
+
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_FALSE at am__append_27 = $(MACRODEFFLAG)NO_RESEARCH_TRANSPORTS
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_FALSE at am__append_28 = $(MACRODEFFLAG)NO_RESEARCH_TRANSPORTS
+ at BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_FALSE at am__append_29 = $(MACRODEFFLAG)NO_RESEARCH_TRANSPORTS
+
+#nodist_libadiosreadf_a_SOURCES += adios_write.mod
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am__append_30 = adios_write_mod.mod 
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am__append_31 = adios_write_mod.mod
+ at HAVE_DATASPACES_TRUE@am__append_32 = read/read_dataspaces.c
+ at HAVE_DIMES_TRUE@am__append_33 = read/read_dimes.c
+ at HAVE_DATATAP_TRUE@am__append_34 = read/read_datatap.c
+ at HAVE_NSSI_TRUE@am__append_35 = nssi/adios_nssi_config.c read/read_nssi.c
+ at HAVE_NSSI_TRUE@am__append_36 = $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
+#libadiosread_a_CPPFLAGS += $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) # $(MACRODEFFLAG)USE_TIMERS
+ at HAVE_NSSI_TRUE@am__append_37 = $(ADIOSLIB_CFLAGS) 
+ at BUILD_FORTRAN_TRUE@am__append_38 = libadiosreadf.a libadiosreadf_v1.a
+ at BUILD_FORTRAN_TRUE@@HAVE_DATASPACES_TRUE at am__append_39 = read/read_dataspaces.c
+ at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__append_40 = read/read_dimes.c
+ at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__append_41 = read/read_datatap.c
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_42 = nssi/adios_nssi_config.c read/read_nssi.c
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_43 = $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_44 = $(ADIOSLIB_CFLAGS) 
+ at BUILD_FORTRAN_TRUE@am__append_45 = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
+
+#nodist_libadiosreadf_a_SOURCES += adios_read_mod.mod
+ at BUILD_FORTRAN_TRUE@am__append_46 = adios_read_mod.mod adios_defs_mod.mod
+ at BUILD_FORTRAN_TRUE@am__append_47 = adios_read_mod.mod adios_defs_mod.mod
+ at HAVE_DATASPACES_TRUE@am__append_48 = read/read_dataspaces.c
+ at HAVE_DIMES_TRUE@am__append_49 = read/read_dimes.c
+ at HAVE_DATATAP_TRUE@am__append_50 = read/read_datatap.c
+ at HAVE_NSSI_TRUE@am__append_51 = nssi/adios_nssi_config.c read/read_nssi.c
+ at HAVE_NSSI_TRUE@am__append_52 = $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
+ at HAVE_NSSI_TRUE@am__append_53 = $(ADIOSLIB_CFLAGS) 
+
 # Note: utils/adios_lint needs to link with adios_internals_mxml.o which depends
 #       on adios_internals.c, buffer.c and adios_transport_hooks.c. 
 #       We put these objects in libadiosread_nompi
 #       so we do not need to make another _nompi lib just for adios_lint
- at BUILD_FORTRAN_TRUE@am__append_49 = libadiosreadf_nompi.a
- at BUILD_FORTRAN_TRUE@@HAVE_DART_TRUE at am__append_50 = read_dart.c
- at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__append_51 = read_dimes.c
- at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__append_52 = read_datatap.c
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_53 = adios_nssi_config.c read_nssi.c
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_54 = -DPTL_IFACE_CLIENT=CRAY_USER_NAL \
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	-DPTL_IFACE_SERVER=CRAY_USER_NAL \
+ at BUILD_FORTRAN_TRUE@am__append_54 = libadiosreadf_nompi.a libadiosreadf_nompi_v1.a
+ at BUILD_FORTRAN_TRUE@@HAVE_DATASPACES_TRUE at am__append_55 = read/read_dataspaces.c
+ at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__append_56 = read/read_dimes.c
+ at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__append_57 = read/read_datatap.c
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_58 = nssi/adios_nssi_config.c read/read_nssi.c
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_59 = $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL \
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	$(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL \
 @BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	$(ADIOSLIB_EXTRA_CPPFLAGS) \
 @BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	$(ADIOSLIB_CPPFLAGS) # \
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	-DUSE_TIMERS
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_55 = $(ADIOSLIB_CFLAGS) 
-#Note: -DNOMPI chokes IBM's bgxlf compiler but it can pass -D_NOMPI. 
- at HAVE_DMALLOC_TRUE@am__append_56 = -DDMALLOC 
- at HAVE_DMALLOC_TRUE@am__append_57 = -DDMALLOC 
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	$(MACRODEFFLAG)USE_TIMERS
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__append_60 = $(ADIOSLIB_CFLAGS) 
+ at BUILD_FORTRAN_TRUE@am__append_61 = $(MACRODEFFLAG)_NOMPI $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
+#Note: $(MACRODEFFLAG)NOMPI chokes IBM's bgxlf compiler but it can pass $(MACRODEFFLAG)_NOMPI. 
+ at HAVE_DMALLOC_TRUE@am__append_62 = $(MACRODEFFLAG)DMALLOC 
+ at HAVE_DMALLOC_TRUE@am__append_63 = $(MACRODEFFLAG)DMALLOC 
 subdir = src
 DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -151,33 +158,56 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
     *) f=$$p;; \
   esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
+am__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__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
-	"$(DESTDIR)$(includedir)"
-libLIBRARIES_INSTALL = $(INSTALL_DATA)
+	"$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"
 LIBRARIES = $(lib_LIBRARIES) $(noinst_LIBRARIES)
 ARFLAGS = cru
 libadios_a_AR = $(AR) $(ARFLAGS)
 libadios_a_LIBADD =
-am__libadios_a_SOURCES_DIST = adios.c common_adios.c \
-	adios_transport_hooks.c adios_mpi.c adios_mpi_lustre.c \
-	adios_mpi_amr.c adios_posix.c adios_posix1.c adios_internals.c \
-	adios_internals_mxml.c buffer.c adios_socket.c adios_bp_v1.c \
-	adios_endianness.c bp_utils.c futils.c adios_error.c \
-	adios_read.c adios_read_hooks.c common_read.c read_bp.c \
-	read_bp_staged.c globals.c adios_dart.c read_dart.c \
-	adios_dimes.c read_dimes.c adios_datatap.c read_datatap.c \
-	adios_phdf5.c adios_nc4.c adios_nssi_config.c adios_nssi.c \
-	adios_nssi_filter.c read_nssi.c adios_mpi_stagger.c \
-	adios_mpi_aggregate.c adios_provenance.c adios_mpi_cio.c \
-	adios_mpi_stripe.c adios_mpi_amr1.c adios_adaptive.c
- at BUILD_WRITE_TRUE@@HAVE_DART_TRUE at am__objects_1 = libadios_a-adios_dart.$(OBJEXT) \
- at BUILD_WRITE_TRUE@@HAVE_DART_TRUE@	libadios_a-read_dart.$(OBJEXT)
+am__libadios_a_SOURCES_DIST = core/adios.c core/common_adios.c \
+	core/adios_internals.c core/adios_internals_mxml.c \
+	core/buffer.c core/adios_bp_v1.c core/adios_endianness.c \
+	core/bp_utils.c core/futils.c core/adios_error.c \
+	core/adios_read.c core/adios_read_v1.c core/common_read.c \
+	core/globals.c core/adios_timing.c core/adios_read_hooks.c \
+	core/adios_transport_hooks.c core/adios_socket.c \
+	core/adios_logger.c core/util.c read/read_bp.c \
+	read/read_bp_staged.c read/read_bp_staged1.c write/adios_mpi.c \
+	write/adios_mpi_lustre.c write/adios_mpi_amr.c \
+	write/adios_posix.c write/adios_posix1.c \
+	write/adios_dataspaces.c read/read_dataspaces.c \
+	write/adios_dimes.c read/read_dimes.c write/adios_datatap.c \
+	read/read_datatap.c write/adios_phdf5.c write/adios_nc4.c \
+	nssi/adios_nssi_config.c write/adios_nssi.c \
+	nssi/adios_nssi_filter.c read/read_nssi.c \
+	write/adios_mpi_stagger.c write/adios_mpi_aggregate.c \
+	write/adios_provenance.c write/adios_mpi_cio.c \
+	write/adios_mpi_stripe.c write/adios_mpi_amr1.c \
+	write/adios_adaptive.c
+ at BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE at am__objects_1 = libadios_a-adios_dataspaces.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE@	libadios_a-read_dataspaces.$(OBJEXT)
 @BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__objects_2 = libadios_a-adios_dimes.$(OBJEXT) \
 @BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE@	libadios_a-read_dimes.$(OBJEXT)
 @BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__objects_3 = libadios_a-adios_datatap.$(OBJEXT) \
@@ -197,32 +227,37 @@ am__libadios_a_SOURCES_DIST = adios.c common_adios.c \
 @BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadios_a-adios_adaptive.$(OBJEXT)
 @BUILD_WRITE_TRUE at am_libadios_a_OBJECTS = libadios_a-adios.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-common_adios.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_a-adios_transport_hooks.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_a-adios_mpi.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_a-adios_mpi_lustre.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_a-adios_mpi_amr.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_a-adios_posix.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_a-adios_posix1.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-adios_internals.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-adios_internals_mxml.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-buffer.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_a-adios_socket.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-adios_bp_v1.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-adios_endianness.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-bp_utils.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-futils.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-adios_error.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-adios_read.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_read_v1.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-common_read.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-globals.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_timing.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_transport_hooks.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_socket.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_logger.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-util.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-read_bp.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_a-read_bp_staged.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_a-globals.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-read_bp_staged1.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_mpi.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_mpi_lustre.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_mpi_amr.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_posix.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_a-adios_posix1.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	$(am__objects_1) $(am__objects_2) \
 @BUILD_WRITE_TRUE@	$(am__objects_3) $(am__objects_4) \
 @BUILD_WRITE_TRUE@	$(am__objects_5) $(am__objects_6) \
 @BUILD_WRITE_TRUE@	$(am__objects_7)
-am__dist_libadios_a_SOURCES_DIST = adios_nssi_args.x
+am__dist_libadios_a_SOURCES_DIST = nssi/adios_nssi_args.x
 dist_libadios_a_OBJECTS =
 @BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at nodist_libadios_a_OBJECTS = libadios_a-adios_nssi_args.$(OBJEXT)
 libadios_a_OBJECTS = $(am_libadios_a_OBJECTS) \
@@ -236,23 +271,32 @@ am_libadios_internal_nompi_a_OBJECTS =  \
 	libadios_internal_nompi_a-bp_utils.$(OBJEXT) \
 	libadios_internal_nompi_a-adios_internals.$(OBJEXT) \
 	libadios_internal_nompi_a-buffer.$(OBJEXT) \
-	libadios_internal_nompi_a-adios_transport_hooks.$(OBJEXT) \
 	libadios_internal_nompi_a-adios_error.$(OBJEXT) \
-	libadios_internal_nompi_a-adios_internals_mxml.$(OBJEXT)
+	libadios_internal_nompi_a-adios_logger.$(OBJEXT) \
+	libadios_internal_nompi_a-adios_internals_mxml.$(OBJEXT) \
+	libadios_internal_nompi_a-adios_timing.$(OBJEXT) \
+	libadios_internal_nompi_a-util.$(OBJEXT) \
+	libadios_internal_nompi_a-futils.$(OBJEXT) \
+	libadios_internal_nompi_a-adios_transport_hooks.$(OBJEXT)
 libadios_internal_nompi_a_OBJECTS =  \
 	$(am_libadios_internal_nompi_a_OBJECTS)
 libadios_nompi_a_AR = $(AR) $(ARFLAGS)
 libadios_nompi_a_LIBADD =
-am__libadios_nompi_a_SOURCES_DIST = adios.c common_adios.c \
-	adios_transport_hooks.c adios_posix.c adios_posix1.c \
-	adios_internals.c adios_internals_mxml.c buffer.c \
-	adios_socket.c adios_bp_v1.c adios_endianness.c bp_utils.c \
-	futils.c adios_error.c adios_read.c adios_read_hooks.c \
-	common_read.c read_bp.c read_bp_staged.c globals.c mpidummy.c \
-	adios_dart.c read_dart.c adios_dimes.c read_dimes.c \
-	adios_datatap.c read_datatap.c
- at BUILD_WRITE_TRUE@@HAVE_DART_TRUE at am__objects_8 = libadios_nompi_a-adios_dart.$(OBJEXT) \
- at BUILD_WRITE_TRUE@@HAVE_DART_TRUE@	libadios_nompi_a-read_dart.$(OBJEXT)
+am__libadios_nompi_a_SOURCES_DIST = core/adios.c core/common_adios.c \
+	core/adios_internals.c core/adios_internals_mxml.c \
+	core/buffer.c core/adios_bp_v1.c core/adios_endianness.c \
+	core/bp_utils.c core/futils.c core/adios_error.c \
+	core/adios_read.c core/adios_read_v1.c core/common_read.c \
+	core/globals.c core/mpidummy.c core/adios_timing.c \
+	core/adios_read_hooks.c core/adios_transport_hooks.c \
+	core/adios_socket.c core/adios_logger.c core/util.c \
+	read/read_bp.c read/read_bp_staged.c read/read_bp_staged1.c \
+	write/adios_posix.c write/adios_posix1.c \
+	write/adios_dataspaces.c read/read_dataspaces.c \
+	write/adios_dimes.c read/read_dimes.c write/adios_datatap.c \
+	read/read_datatap.c
+ at BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE at am__objects_8 = libadios_nompi_a-adios_dataspaces.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE@	libadios_nompi_a-read_dataspaces.$(OBJEXT)
 @BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__objects_9 = libadios_nompi_a-adios_dimes.$(OBJEXT) \
 @BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE@	libadios_nompi_a-read_dimes.$(OBJEXT)
 @BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__objects_10 = libadios_nompi_a-adios_datatap.$(OBJEXT) \
@@ -260,44 +304,58 @@ am__libadios_nompi_a_SOURCES_DIST = adios.c common_adios.c \
 @BUILD_WRITE_TRUE at am_libadios_nompi_a_OBJECTS =  \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-adios.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-common_adios.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_transport_hooks.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_posix.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_posix1.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-adios_internals.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-adios_internals_mxml.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-buffer.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_socket.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-adios_bp_v1.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-adios_endianness.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-bp_utils.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-futils.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-adios_error.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-adios_read.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_read_v1.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-common_read.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_nompi_a-read_bp.$(OBJEXT) \
- at BUILD_WRITE_TRUE@	libadios_nompi_a-read_bp_staged.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-globals.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	libadios_nompi_a-mpidummy.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_timing.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_transport_hooks.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_socket.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_logger.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-util.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-read_bp.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-read_bp_staged.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-read_bp_staged1.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_posix.$(OBJEXT) \
+ at BUILD_WRITE_TRUE@	libadios_nompi_a-adios_posix1.$(OBJEXT) \
 @BUILD_WRITE_TRUE@	$(am__objects_8) $(am__objects_9) \
 @BUILD_WRITE_TRUE@	$(am__objects_10)
 libadios_nompi_a_OBJECTS = $(am_libadios_nompi_a_OBJECTS)
 libadiosf_a_AR = $(AR) $(ARFLAGS)
 libadiosf_a_LIBADD =
-am__libadiosf_a_SOURCES_DIST = adiosf.c common_adios.c \
-	adios_transport_hooks.c adios_mpi.c adios_mpi_lustre.c \
-	adios_mpi_amr.c adios_posix.c adios_posix1.c adios_internals.c \
-	adios_internals_mxml.c buffer.c adios_socket.c adios_bp_v1.c \
-	adios_endianness.c futils.c adios_error.c bp_utils.c \
-	adiosf_read.c adios_read_hooks.c common_read.c read_bp.c \
-	read_bp_staged.c globals.c adios_dart.c read_dart.c \
-	adios_dimes.c read_dimes.c adios_datatap.c read_datatap.c \
-	adios_phdf5.c adios_nc4.c adios_nssi_config.c adios_nssi.c \
-	adios_nssi_filter.c read_nssi.c adios_mpi_stagger.c \
-	adios_mpi_aggregate.c adios_provenance.c adios_mpi_cio.c \
-	adios_mpi_stripe.c adios_mpi_amr1.c adios_adaptive.c
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DART_TRUE at am__objects_11 = libadiosf_a-adios_dart.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DART_TRUE@	libadiosf_a-read_dart.$(OBJEXT)
+am__libadiosf_a_SOURCES_DIST = core/adiosf.c core/common_adios.c \
+	core/adios_internals.c core/adios_internals_mxml.c \
+	core/buffer.c core/adios_bp_v1.c core/adios_endianness.c \
+	core/futils.c core/adios_error.c core/bp_utils.c \
+	core/common_read.c core/globals.c core/adios_timing.c \
+	core/adios_read_hooks.c core/adios_transport_hooks.c \
+	core/adios_socket.c core/adios_logger.c core/util.c \
+	read/read_bp.c read/read_bp_staged.c read/read_bp_staged1.c \
+	write/adios_mpi.c write/adios_mpi_lustre.c \
+	write/adios_mpi_amr.c write/adios_posix.c write/adios_posix1.c \
+	write/adios_dataspaces.c read/read_dataspaces.c \
+	write/adios_dimes.c read/read_dimes.c write/adios_datatap.c \
+	read/read_datatap.c write/adios_phdf5.c write/adios_nc4.c \
+	nssi/adios_nssi_config.c write/adios_nssi.c \
+	nssi/adios_nssi_filter.c read/read_nssi.c \
+	write/adios_mpi_stagger.c write/adios_mpi_aggregate.c \
+	write/adios_provenance.c write/adios_mpi_cio.c \
+	write/adios_mpi_stripe.c write/adios_mpi_amr1.c \
+	write/adios_adaptive.c core/adiosf_read.c \
+	core/adiosf_defs_mod.f90 core/adiosf_write_mod.f90 \
+	core/adiosf_read_mod.f90
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE at am__objects_11 = libadiosf_a-adios_dataspaces.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE@	libadiosf_a-read_dataspaces.$(OBJEXT)
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__objects_12 = libadiosf_a-adios_dimes.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE@	libadiosf_a-read_dimes.$(OBJEXT)
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__objects_13 = libadiosf_a-adios_datatap.$(OBJEXT) \
@@ -315,29 +373,32 @@ am__libadiosf_a_SOURCES_DIST = adiosf.c common_adios.c \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadiosf_a-adios_mpi_stripe.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadiosf_a-adios_mpi_amr1.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadiosf_a-adios_adaptive.$(OBJEXT)
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am_libadiosf_a_OBJECTS = libadiosf_a-adiosf.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am__objects_18 = libadiosf_a-adiosf.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-common_adios.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_transport_hooks.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_mpi.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_mpi_lustre.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_mpi_amr.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_posix.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_posix1.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_internals.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_internals_mxml.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-buffer.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_socket.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_bp_v1.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_endianness.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-futils.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_error.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-bp_utils.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adiosf_read.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_read_hooks.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-common_read.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-globals.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_timing.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_transport_hooks.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_socket.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_logger.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-util.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-read_bp.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-read_bp_staged.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-globals.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-read_bp_staged1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_mpi.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_mpi_lustre.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_mpi_amr.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_posix.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adios_posix1.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_11) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_12) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_13) \
@@ -345,23 +406,112 @@ am__libadiosf_a_SOURCES_DIST = adiosf.c common_adios.c \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_15) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_16) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_17)
-am__dist_libadiosf_a_SOURCES_DIST = adios_nssi_args.x
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am_libadiosf_a_OBJECTS =  \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_18) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_a-adiosf_read.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adiosf_defs_mod.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adiosf_write_mod.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adiosf_read_mod.$(OBJEXT)
+am__dist_libadiosf_a_SOURCES_DIST = nssi/adios_nssi_args.x
 dist_libadiosf_a_OBJECTS =
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at nodist_libadiosf_a_OBJECTS = libadiosf_a-adios_nssi_args.$(OBJEXT)
 libadiosf_a_OBJECTS = $(am_libadiosf_a_OBJECTS) \
 	$(dist_libadiosf_a_OBJECTS) $(nodist_libadiosf_a_OBJECTS)
+libadiosf_v1_a_AR = $(AR) $(ARFLAGS)
+libadiosf_v1_a_LIBADD =
+am__libadiosf_v1_a_SOURCES_DIST = core/adiosf.c core/common_adios.c \
+	core/adios_internals.c core/adios_internals_mxml.c \
+	core/buffer.c core/adios_bp_v1.c core/adios_endianness.c \
+	core/futils.c core/adios_error.c core/bp_utils.c \
+	core/common_read.c core/globals.c core/adios_timing.c \
+	core/adios_read_hooks.c core/adios_transport_hooks.c \
+	core/adios_socket.c core/adios_logger.c core/util.c \
+	read/read_bp.c read/read_bp_staged.c read/read_bp_staged1.c \
+	write/adios_mpi.c write/adios_mpi_lustre.c \
+	write/adios_mpi_amr.c write/adios_posix.c write/adios_posix1.c \
+	write/adios_dataspaces.c read/read_dataspaces.c \
+	write/adios_dimes.c read/read_dimes.c write/adios_datatap.c \
+	read/read_datatap.c write/adios_phdf5.c write/adios_nc4.c \
+	nssi/adios_nssi_config.c write/adios_nssi.c \
+	nssi/adios_nssi_filter.c read/read_nssi.c \
+	write/adios_mpi_stagger.c write/adios_mpi_aggregate.c \
+	write/adios_provenance.c write/adios_mpi_cio.c \
+	write/adios_mpi_stripe.c write/adios_mpi_amr1.c \
+	write/adios_adaptive.c core/adiosf_read_v1.c \
+	core/adiosf_defs_mod.f90 core/adiosf_write_mod.f90
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE at am__objects_19 = libadiosf_v1_a-adios_dataspaces.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATASPACES_TRUE@	libadiosf_v1_a-read_dataspaces.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE at am__objects_20 = libadiosf_v1_a-adios_dimes.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DIMES_TRUE@	libadiosf_v1_a-read_dimes.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE at am__objects_21 = libadiosf_v1_a-adios_datatap.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_DATATAP_TRUE@	libadiosf_v1_a-read_datatap.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_PHDF5_TRUE at am__objects_22 = libadiosf_v1_a-adios_phdf5.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NC4PAR_TRUE at am__objects_23 = libadiosf_v1_a-adios_nc4.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at am__objects_24 = libadiosf_v1_a-adios_nssi_config.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@	libadiosf_v1_a-adios_nssi.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@	libadiosf_v1_a-adios_nssi_filter.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@	libadiosf_v1_a-read_nssi.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE at am__objects_25 = libadiosf_v1_a-adios_mpi_stagger.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadiosf_v1_a-adios_mpi_aggregate.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadiosf_v1_a-adios_provenance.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadiosf_v1_a-adios_mpi_cio.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadiosf_v1_a-adios_mpi_stripe.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadiosf_v1_a-adios_mpi_amr1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@RESEARCH_TRANSPORTS_TRUE@	libadiosf_v1_a-adios_adaptive.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am__objects_26 = libadiosf_v1_a-adiosf.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-common_adios.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_internals.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_internals_mxml.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-buffer.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_bp_v1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_endianness.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-futils.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_error.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-bp_utils.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-common_read.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-globals.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_timing.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_transport_hooks.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_socket.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_logger.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-util.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-read_bp.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-read_bp_staged.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-read_bp_staged1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_mpi.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_mpi_lustre.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_mpi_amr.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_posix.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adios_posix1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_19) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_20) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_21) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_22) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_23) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_24) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_25)
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am_libadiosf_v1_a_OBJECTS =  \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__objects_26) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	libadiosf_v1_a-adiosf_read_v1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adiosf_defs_mod.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adiosf_write_mod.$(OBJEXT)
+libadiosf_v1_a_OBJECTS = $(am_libadiosf_v1_a_OBJECTS)
 libadiosread_a_AR = $(AR) $(ARFLAGS)
 libadiosread_a_LIBADD =
-am__libadiosread_a_SOURCES_DIST = adios_bp_v1.c adios_endianness.c \
-	bp_utils.c futils.c adios_error.c adios_read.c \
-	adios_read_hooks.c common_read.c read_bp.c read_bp_staged.c \
-	globals.c read_dart.c read_dimes.c read_datatap.c \
-	adios_nssi_config.c read_nssi.c
- at HAVE_DART_TRUE@am__objects_18 = libadiosread_a-read_dart.$(OBJEXT)
- at HAVE_DIMES_TRUE@am__objects_19 = libadiosread_a-read_dimes.$(OBJEXT)
- at HAVE_DATATAP_TRUE@am__objects_20 =  \
+am__libadiosread_a_SOURCES_DIST = core/adios_bp_v1.c \
+	core/adios_endianness.c core/bp_utils.c core/futils.c \
+	core/adios_error.c core/adios_read.c core/adios_read_v1.c \
+	core/common_read.c core/globals.c core/adios_read_hooks.c \
+	core/adios_logger.c core/util.c read/read_bp.c \
+	read/read_bp_staged.c read/read_bp_staged1.c \
+	read/read_dataspaces.c read/read_dimes.c read/read_datatap.c \
+	nssi/adios_nssi_config.c read/read_nssi.c
+ at HAVE_DATASPACES_TRUE@am__objects_27 = libadiosread_a-read_dataspaces.$(OBJEXT)
+ at HAVE_DIMES_TRUE@am__objects_28 = libadiosread_a-read_dimes.$(OBJEXT)
+ at HAVE_DATATAP_TRUE@am__objects_29 =  \
 @HAVE_DATATAP_TRUE@	libadiosread_a-read_datatap.$(OBJEXT)
- at HAVE_NSSI_TRUE@am__objects_21 =  \
+ at HAVE_NSSI_TRUE@am__objects_30 =  \
 @HAVE_NSSI_TRUE@	libadiosread_a-adios_nssi_config.$(OBJEXT) \
 @HAVE_NSSI_TRUE@	libadiosread_a-read_nssi.$(OBJEXT)
 am_libadiosread_a_OBJECTS = libadiosread_a-adios_bp_v1.$(OBJEXT) \
@@ -370,13 +520,16 @@ am_libadiosread_a_OBJECTS = libadiosread_a-adios_bp_v1.$(OBJEXT) \
 	libadiosread_a-futils.$(OBJEXT) \
 	libadiosread_a-adios_error.$(OBJEXT) \
 	libadiosread_a-adios_read.$(OBJEXT) \
-	libadiosread_a-adios_read_hooks.$(OBJEXT) \
+	libadiosread_a-adios_read_v1.$(OBJEXT) \
 	libadiosread_a-common_read.$(OBJEXT) \
-	libadiosread_a-read_bp.$(OBJEXT) \
+	libadiosread_a-globals.$(OBJEXT) \
+	libadiosread_a-adios_read_hooks.$(OBJEXT) \
+	libadiosread_a-adios_logger.$(OBJEXT) \
+	libadiosread_a-util.$(OBJEXT) libadiosread_a-read_bp.$(OBJEXT) \
 	libadiosread_a-read_bp_staged.$(OBJEXT) \
-	libadiosread_a-globals.$(OBJEXT) $(am__objects_18) \
-	$(am__objects_19) $(am__objects_20) $(am__objects_21)
-am__dist_libadiosread_a_SOURCES_DIST = adios_nssi_args.x
+	libadiosread_a-read_bp_staged1.$(OBJEXT) $(am__objects_27) \
+	$(am__objects_28) $(am__objects_29) $(am__objects_30)
+am__dist_libadiosread_a_SOURCES_DIST = nssi/adios_nssi_args.x
 dist_libadiosread_a_OBJECTS =
 @HAVE_NSSI_TRUE at nodist_libadiosread_a_OBJECTS =  \
 @HAVE_NSSI_TRUE@	libadiosread_a-adios_nssi_args.$(OBJEXT)
@@ -385,20 +538,20 @@ libadiosread_a_OBJECTS = $(am_libadiosread_a_OBJECTS) \
 	$(nodist_libadiosread_a_OBJECTS)
 libadiosread_nompi_a_AR = $(AR) $(ARFLAGS)
 libadiosread_nompi_a_LIBADD =
-am__libadiosread_nompi_a_SOURCES_DIST = mpidummy.c adios_bp_v1.c \
-	adios_endianness.c bp_utils.c futils.c adios_error.c \
-	adios_read.c adios_read_hooks.c common_read.c read_bp.c \
-	adios_internals.c buffer.c adios_transport_hooks.c globals.c \
-	read_dart.c read_dimes.c read_datatap.c adios_nssi_config.c \
-	read_nssi.c
- at HAVE_DART_TRUE@am__objects_22 =  \
- at HAVE_DART_TRUE@	libadiosread_nompi_a-read_dart.$(OBJEXT)
- at HAVE_DIMES_TRUE@am__objects_23 =  \
+am__libadiosread_nompi_a_SOURCES_DIST = core/mpidummy.c \
+	core/adios_bp_v1.c core/adios_endianness.c core/bp_utils.c \
+	core/futils.c core/adios_error.c core/adios_read.c \
+	core/adios_read_v1.c core/common_read.c core/adios_logger.c \
+	core/buffer.c core/globals.c core/adios_read_hooks.c \
+	core/util.c read/read_bp.c read/read_dataspaces.c \
+	read/read_dimes.c read/read_datatap.c nssi/adios_nssi_config.c \
+	read/read_nssi.c
+ at HAVE_DATASPACES_TRUE@am__objects_31 = libadiosread_nompi_a-read_dataspaces.$(OBJEXT)
+ at HAVE_DIMES_TRUE@am__objects_32 =  \
 @HAVE_DIMES_TRUE@	libadiosread_nompi_a-read_dimes.$(OBJEXT)
- at HAVE_DATATAP_TRUE@am__objects_24 = libadiosread_nompi_a-read_datatap.$(OBJEXT)
- at HAVE_NSSI_TRUE@am__objects_25 = libadiosread_nompi_a-adios_nssi_config.$(OBJEXT) \
+ at HAVE_DATATAP_TRUE@am__objects_33 = libadiosread_nompi_a-read_datatap.$(OBJEXT)
+ at HAVE_NSSI_TRUE@am__objects_34 = libadiosread_nompi_a-adios_nssi_config.$(OBJEXT) \
 @HAVE_NSSI_TRUE@	libadiosread_nompi_a-read_nssi.$(OBJEXT)
- at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__objects_26 = libadiosread_nompi_a-read_datatap.$(OBJEXT)
 am_libadiosread_nompi_a_OBJECTS =  \
 	libadiosread_nompi_a-mpidummy.$(OBJEXT) \
 	libadiosread_nompi_a-adios_bp_v1.$(OBJEXT) \
@@ -407,16 +560,16 @@ am_libadiosread_nompi_a_OBJECTS =  \
 	libadiosread_nompi_a-futils.$(OBJEXT) \
 	libadiosread_nompi_a-adios_error.$(OBJEXT) \
 	libadiosread_nompi_a-adios_read.$(OBJEXT) \
-	libadiosread_nompi_a-adios_read_hooks.$(OBJEXT) \
+	libadiosread_nompi_a-adios_read_v1.$(OBJEXT) \
 	libadiosread_nompi_a-common_read.$(OBJEXT) \
-	libadiosread_nompi_a-read_bp.$(OBJEXT) \
-	libadiosread_nompi_a-adios_internals.$(OBJEXT) \
+	libadiosread_nompi_a-adios_logger.$(OBJEXT) \
 	libadiosread_nompi_a-buffer.$(OBJEXT) \
-	libadiosread_nompi_a-adios_transport_hooks.$(OBJEXT) \
-	libadiosread_nompi_a-globals.$(OBJEXT) $(am__objects_22) \
-	$(am__objects_23) $(am__objects_24) $(am__objects_25) \
-	$(am__objects_26)
-am__dist_libadiosread_nompi_a_SOURCES_DIST = adios_nssi_args.x
+	libadiosread_nompi_a-globals.$(OBJEXT) \
+	libadiosread_nompi_a-adios_read_hooks.$(OBJEXT) \
+	libadiosread_nompi_a-util.$(OBJEXT) \
+	libadiosread_nompi_a-read_bp.$(OBJEXT) $(am__objects_31) \
+	$(am__objects_32) $(am__objects_33) $(am__objects_34)
+am__dist_libadiosread_nompi_a_SOURCES_DIST = nssi/adios_nssi_args.x
 dist_libadiosread_nompi_a_OBJECTS =
 @HAVE_NSSI_TRUE at nodist_libadiosread_nompi_a_OBJECTS = libadiosread_nompi_a-adios_nssi_args.$(OBJEXT)
 libadiosread_nompi_a_OBJECTS = $(am_libadiosread_nompi_a_OBJECTS) \
@@ -424,31 +577,40 @@ libadiosread_nompi_a_OBJECTS = $(am_libadiosread_nompi_a_OBJECTS) \
 	$(nodist_libadiosread_nompi_a_OBJECTS)
 libadiosreadf_a_AR = $(AR) $(ARFLAGS)
 libadiosreadf_a_LIBADD =
-am__libadiosreadf_a_SOURCES_DIST = adios_bp_v1.c adios_endianness.c \
-	bp_utils.c futils.c adios_error.c adiosf_read.c \
-	adios_read_hooks.c common_read.c read_bp.c read_bp_staged.c \
-	globals.c read_dart.c read_dimes.c read_datatap.c \
-	adios_nssi_config.c read_nssi.c
- at BUILD_FORTRAN_TRUE@@HAVE_DART_TRUE at am__objects_27 = libadiosreadf_a-read_dart.$(OBJEXT)
- at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__objects_28 = libadiosreadf_a-read_dimes.$(OBJEXT)
- at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__objects_29 = libadiosreadf_a-read_datatap.$(OBJEXT)
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__objects_30 = libadiosreadf_a-adios_nssi_config.$(OBJEXT) \
+am__libadiosreadf_a_SOURCES_DIST = core/adios_bp_v1.c \
+	core/adios_endianness.c core/bp_utils.c core/futils.c \
+	core/adios_error.c core/common_read.c core/globals.c \
+	core/adios_read_hooks.c core/adios_logger.c core/util.c \
+	read/read_bp.c read/read_bp_staged.c read/read_bp_staged1.c \
+	read/read_dataspaces.c read/read_dimes.c read/read_datatap.c \
+	nssi/adios_nssi_config.c read/read_nssi.c core/adiosf_read.c \
+	core/adiosf_defs_mod.f90 core/adiosf_read_mod.f90
+ at BUILD_FORTRAN_TRUE@@HAVE_DATASPACES_TRUE at am__objects_35 = libadiosreadf_a-read_dataspaces.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__objects_36 = libadiosreadf_a-read_dimes.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__objects_37 = libadiosreadf_a-read_datatap.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__objects_38 = libadiosreadf_a-adios_nssi_config.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	libadiosreadf_a-read_nssi.$(OBJEXT)
- at BUILD_FORTRAN_TRUE@am_libadiosreadf_a_OBJECTS =  \
+ at BUILD_FORTRAN_TRUE@am__objects_39 =  \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_a-adios_bp_v1.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_a-adios_endianness.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_a-bp_utils.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_a-futils.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_a-adios_error.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@	libadiosreadf_a-adiosf_read.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@	libadiosreadf_a-adios_read_hooks.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_a-common_read.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_a-globals.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_a-adios_logger.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_a-util.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_a-read_bp.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_a-read_bp_staged.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@	libadiosreadf_a-globals.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@	$(am__objects_27) $(am__objects_28) \
- at BUILD_FORTRAN_TRUE@	$(am__objects_29) $(am__objects_30)
-am__dist_libadiosreadf_a_SOURCES_DIST = adios_nssi_args.x
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_a-read_bp_staged1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_35) $(am__objects_36) \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_37) $(am__objects_38)
+ at BUILD_FORTRAN_TRUE@am_libadiosreadf_a_OBJECTS = $(am__objects_39) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_a-adiosf_read.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	adiosf_defs_mod.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	adiosf_read_mod.$(OBJEXT)
+am__dist_libadiosreadf_a_SOURCES_DIST = nssi/adios_nssi_args.x
 dist_libadiosreadf_a_OBJECTS =
 @BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at nodist_libadiosreadf_a_OBJECTS = libadiosreadf_a-adios_nssi_args.$(OBJEXT)
 libadiosreadf_a_OBJECTS = $(am_libadiosreadf_a_OBJECTS) \
@@ -456,79 +618,168 @@ libadiosreadf_a_OBJECTS = $(am_libadiosreadf_a_OBJECTS) \
 	$(nodist_libadiosreadf_a_OBJECTS)
 libadiosreadf_nompi_a_AR = $(AR) $(ARFLAGS)
 libadiosreadf_nompi_a_LIBADD =
-am__libadiosreadf_nompi_a_SOURCES_DIST = mpidummy.c adios_bp_v1.c \
-	adios_endianness.c bp_utils.c futils.c adios_error.c \
-	adiosf_read.c adios_read_hooks.c common_read.c read_bp.c \
-	globals.c read_dart.c read_dimes.c adios_nssi_config.c \
-	read_nssi.c
- at BUILD_FORTRAN_TRUE@@HAVE_DART_TRUE at am__objects_31 = libadiosreadf_nompi_a-read_dart.$(OBJEXT)
- at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__objects_32 = libadiosreadf_nompi_a-read_dimes.$(OBJEXT)
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__objects_33 = libadiosreadf_nompi_a-adios_nssi_config.$(OBJEXT) \
+am__libadiosreadf_nompi_a_SOURCES_DIST = core/mpidummy.c \
+	core/adios_bp_v1.c core/adios_endianness.c core/bp_utils.c \
+	core/futils.c core/adios_error.c core/adios_logger.c \
+	core/common_read.c core/globals.c core/adios_read_hooks.c \
+	core/util.c read/read_bp.c read/read_dataspaces.c \
+	read/read_dimes.c read/read_datatap.c nssi/adios_nssi_config.c \
+	read/read_nssi.c core/adiosf_read.c
+ at BUILD_FORTRAN_TRUE@@HAVE_DATASPACES_TRUE at am__objects_40 = libadiosreadf_nompi_a-read_dataspaces.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__objects_41 = libadiosreadf_nompi_a-read_dimes.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__objects_42 = libadiosreadf_nompi_a-read_datatap.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__objects_43 = libadiosreadf_nompi_a-adios_nssi_config.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	libadiosreadf_nompi_a-read_nssi.$(OBJEXT)
- at BUILD_FORTRAN_TRUE@am_libadiosreadf_nompi_a_OBJECTS =  \
+ at BUILD_FORTRAN_TRUE@am__objects_44 =  \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-mpidummy.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-adios_bp_v1.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-adios_endianness.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-bp_utils.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-futils.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-adios_error.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-adiosf_read.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-adios_logger.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-common_read.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-read_bp.$(OBJEXT) \
 @BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-globals.$(OBJEXT) \
- at BUILD_FORTRAN_TRUE@	$(am__objects_31) $(am__objects_32) \
- at BUILD_FORTRAN_TRUE@	$(am__objects_33)
-am__dist_libadiosreadf_nompi_a_SOURCES_DIST = adios_nssi_args.x
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-util.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-read_bp.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_40) $(am__objects_41) \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_42) $(am__objects_43)
+ at BUILD_FORTRAN_TRUE@am_libadiosreadf_nompi_a_OBJECTS =  \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_44) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_a-adiosf_read.$(OBJEXT)
+am__dist_libadiosreadf_nompi_a_SOURCES_DIST = nssi/adios_nssi_args.x
 dist_libadiosreadf_nompi_a_OBJECTS =
 @BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at nodist_libadiosreadf_nompi_a_OBJECTS = libadiosreadf_nompi_a-adios_nssi_args.$(OBJEXT)
 libadiosreadf_nompi_a_OBJECTS = $(am_libadiosreadf_nompi_a_OBJECTS) \
 	$(dist_libadiosreadf_nompi_a_OBJECTS) \
 	$(nodist_libadiosreadf_nompi_a_OBJECTS)
+libadiosreadf_nompi_v1_a_AR = $(AR) $(ARFLAGS)
+libadiosreadf_nompi_v1_a_LIBADD =
+am__libadiosreadf_nompi_v1_a_SOURCES_DIST = core/mpidummy.c \
+	core/adios_bp_v1.c core/adios_endianness.c core/bp_utils.c \
+	core/futils.c core/adios_error.c core/adios_logger.c \
+	core/common_read.c core/globals.c core/adios_read_hooks.c \
+	core/util.c read/read_bp.c read/read_dataspaces.c \
+	read/read_dimes.c read/read_datatap.c nssi/adios_nssi_config.c \
+	read/read_nssi.c core/adiosf_read_v1.c
+ at BUILD_FORTRAN_TRUE@@HAVE_DATASPACES_TRUE at am__objects_45 = libadiosreadf_nompi_v1_a-read_dataspaces.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__objects_46 = libadiosreadf_nompi_v1_a-read_dimes.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__objects_47 = libadiosreadf_nompi_v1_a-read_datatap.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__objects_48 = libadiosreadf_nompi_v1_a-adios_nssi_config.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	libadiosreadf_nompi_v1_a-read_nssi.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@am__objects_49 = libadiosreadf_nompi_v1_a-mpidummy.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-adios_bp_v1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-adios_endianness.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-bp_utils.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-futils.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-adios_error.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-adios_logger.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-common_read.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-globals.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-util.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-read_bp.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_45) $(am__objects_46) \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_47) $(am__objects_48)
+ at BUILD_FORTRAN_TRUE@am_libadiosreadf_nompi_v1_a_OBJECTS =  \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_49) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_nompi_v1_a-adiosf_read_v1.$(OBJEXT)
+libadiosreadf_nompi_v1_a_OBJECTS =  \
+	$(am_libadiosreadf_nompi_v1_a_OBJECTS)
+libadiosreadf_v1_a_AR = $(AR) $(ARFLAGS)
+libadiosreadf_v1_a_LIBADD =
+am__libadiosreadf_v1_a_SOURCES_DIST = core/adios_bp_v1.c \
+	core/adios_endianness.c core/bp_utils.c core/futils.c \
+	core/adios_error.c core/common_read.c core/globals.c \
+	core/adios_read_hooks.c core/adios_logger.c core/util.c \
+	read/read_bp.c read/read_bp_staged.c read/read_bp_staged1.c \
+	read/read_dataspaces.c read/read_dimes.c read/read_datatap.c \
+	nssi/adios_nssi_config.c read/read_nssi.c \
+	core/adiosf_read_v1.c
+ at BUILD_FORTRAN_TRUE@@HAVE_DATASPACES_TRUE at am__objects_50 = libadiosreadf_v1_a-read_dataspaces.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_DIMES_TRUE at am__objects_51 = libadiosreadf_v1_a-read_dimes.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_DATATAP_TRUE at am__objects_52 = libadiosreadf_v1_a-read_datatap.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at am__objects_53 = libadiosreadf_v1_a-adios_nssi_config.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE@	libadiosreadf_v1_a-read_nssi.$(OBJEXT)
+ at BUILD_FORTRAN_TRUE@am__objects_54 =  \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-adios_bp_v1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-adios_endianness.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-bp_utils.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-futils.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-adios_error.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-common_read.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-globals.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-adios_read_hooks.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-adios_logger.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-util.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-read_bp.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-read_bp_staged.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-read_bp_staged1.$(OBJEXT) \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_50) $(am__objects_51) \
+ at BUILD_FORTRAN_TRUE@	$(am__objects_52) $(am__objects_53)
+ at BUILD_FORTRAN_TRUE@am_libadiosreadf_v1_a_OBJECTS = $(am__objects_54) \
+ at BUILD_FORTRAN_TRUE@	libadiosreadf_v1_a-adiosf_read_v1.$(OBJEXT)
+libadiosreadf_v1_a_OBJECTS = $(am_libadiosreadf_v1_a_OBJECTS)
 @HAVE_NSSI_TRUE at am__EXEEXT_1 = nssi-staging-server$(EXEEXT) \
 @HAVE_NSSI_TRUE@	nssi-coupling-server$(EXEEXT)
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
-am__nssi_coupling_server_SOURCES_DIST = nssi_coupling_server.cpp
+am__nssi_coupling_server_SOURCES_DIST = nssi/nssi_coupling_server.cpp
 @HAVE_NSSI_TRUE at am_nssi_coupling_server_OBJECTS = nssi_coupling_server-nssi_coupling_server.$(OBJEXT)
 nssi_coupling_server_OBJECTS = $(am_nssi_coupling_server_OBJECTS)
 am__DEPENDENCIES_1 =
 @HAVE_NSSI_TRUE at nssi_coupling_server_DEPENDENCIES =  \
 @HAVE_NSSI_TRUE@	$(top_builddir)/src/libadios.a \
 @HAVE_NSSI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-am__nssi_staging_server_SOURCES_DIST = nssi_staging_server.cpp \
-	aggregation.cpp
+nssi_coupling_server_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(nssi_coupling_server_LDFLAGS) $(LDFLAGS) -o $@
+am__nssi_staging_server_SOURCES_DIST = nssi/nssi_staging_server.cpp \
+	nssi/aggregation.cpp
 @HAVE_NSSI_TRUE at am_nssi_staging_server_OBJECTS = nssi_staging_server-nssi_staging_server.$(OBJEXT) \
 @HAVE_NSSI_TRUE@	nssi_staging_server-aggregation.$(OBJEXT)
 nssi_staging_server_OBJECTS = $(am_nssi_staging_server_OBJECTS)
 @HAVE_NSSI_TRUE at nssi_staging_server_DEPENDENCIES =  \
 @HAVE_NSSI_TRUE@	$(top_builddir)/src/libadios.a \
 @HAVE_NSSI_TRUE@	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+nssi_staging_server_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(nssi_staging_server_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
 CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \
-	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS)
+LTFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS)
+FCLD = $(FC)
+FCLINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(libadios_a_SOURCES) $(dist_libadios_a_SOURCES) \
 	$(nodist_libadios_a_SOURCES) \
 	$(libadios_internal_nompi_a_SOURCES) \
 	$(libadios_nompi_a_SOURCES) $(libadiosf_a_SOURCES) \
 	$(dist_libadiosf_a_SOURCES) $(nodist_libadiosf_a_SOURCES) \
-	$(libadiosread_a_SOURCES) $(dist_libadiosread_a_SOURCES) \
+	$(libadiosf_v1_a_SOURCES) $(libadiosread_a_SOURCES) \
+	$(dist_libadiosread_a_SOURCES) \
 	$(nodist_libadiosread_a_SOURCES) \
 	$(libadiosread_nompi_a_SOURCES) \
 	$(dist_libadiosread_nompi_a_SOURCES) \
@@ -538,13 +789,16 @@ SOURCES = $(libadios_a_SOURCES) $(dist_libadios_a_SOURCES) \
 	$(libadiosreadf_nompi_a_SOURCES) \
 	$(dist_libadiosreadf_nompi_a_SOURCES) \
 	$(nodist_libadiosreadf_nompi_a_SOURCES) \
-	$(nssi_coupling_server_SOURCES) $(nssi_staging_server_SOURCES)
+	$(libadiosreadf_nompi_v1_a_SOURCES) \
+	$(libadiosreadf_v1_a_SOURCES) $(nssi_coupling_server_SOURCES) \
+	$(nssi_staging_server_SOURCES)
 DIST_SOURCES = $(am__libadios_a_SOURCES_DIST) \
 	$(am__dist_libadios_a_SOURCES_DIST) \
 	$(libadios_internal_nompi_a_SOURCES) \
 	$(am__libadios_nompi_a_SOURCES_DIST) \
 	$(am__libadiosf_a_SOURCES_DIST) \
 	$(am__dist_libadiosf_a_SOURCES_DIST) \
+	$(am__libadiosf_v1_a_SOURCES_DIST) \
 	$(am__libadiosread_a_SOURCES_DIST) \
 	$(am__dist_libadiosread_a_SOURCES_DIST) \
 	$(am__libadiosread_nompi_a_SOURCES_DIST) \
@@ -553,10 +807,11 @@ DIST_SOURCES = $(am__libadios_a_SOURCES_DIST) \
 	$(am__dist_libadiosreadf_a_SOURCES_DIST) \
 	$(am__libadiosreadf_nompi_a_SOURCES_DIST) \
 	$(am__dist_libadiosreadf_nompi_a_SOURCES_DIST) \
+	$(am__libadiosreadf_nompi_v1_a_SOURCES_DIST) \
+	$(am__libadiosreadf_v1_a_SOURCES_DIST) \
 	$(am__nssi_coupling_server_SOURCES_DIST) \
 	$(am__nssi_staging_server_SOURCES_DIST)
-includeHEADERS_INSTALL = $(INSTALL_HEADER)
-HEADERS = $(include_HEADERS)
+HEADERS = $(include_HEADERS) $(nodist_include_HEADERS)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -582,36 +837,36 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 #if BUILD_FORTRAN
-#libadiosreadf_a_CPPFLAGS += -DDMALLOC $(DMALLOC_CPPFLAGS)
-#libadiosreadf_nompi_a_CPPFLAGS += -DDMALLOC $(DMALLOC_CPPFLAGS)
+#libadiosreadf_a_CPPFLAGS += $(MACRODEFFLAG)DMALLOC $(DMALLOC_CPPFLAGS)
+#libadiosreadf_nompi_a_CPPFLAGS += $(MACRODEFFLAG)DMALLOC $(DMALLOC_CPPFLAGS)
 #endif
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = $(MPICXX)
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -620,72 +875,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -696,11 +926,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -708,7 +938,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -734,26 +967,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -765,178 +991,245 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 INCLUDES = -I$(top_srcdir) 
 AUTOMAKE_OPTIONS = no-dependencies
 METASOURCES = AUTO
- at HAVE_NSSI_TRUE@nssi_staging_server_SOURCES = nssi_staging_server.cpp aggregation.cpp
+ at HAVE_NSSI_TRUE@nssi_staging_server_SOURCES = nssi/nssi_staging_server.cpp nssi/aggregation.cpp
 @HAVE_NSSI_TRUE at nssi_staging_server_CFLAGS = $(ADIOSLIB_CFLAGS)
- at HAVE_NSSI_TRUE@nssi_staging_server_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL
+ at HAVE_NSSI_TRUE@nssi_staging_server_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL
 @HAVE_NSSI_TRUE at nssi_staging_server_LDFLAGS = $(ADIOSLIB_LDFLAGS) 
 @HAVE_NSSI_TRUE at nssi_staging_server_LDADD =  \
 @HAVE_NSSI_TRUE@	$(top_builddir)/src/libadios.a \
 @HAVE_NSSI_TRUE@	$(ADIOSLIB_LDADD) $(NSSI_SERVER_LIBS)
- at HAVE_NSSI_TRUE@nssi_coupling_server_SOURCES = nssi_coupling_server.cpp
+ at HAVE_NSSI_TRUE@nssi_coupling_server_SOURCES = nssi/nssi_coupling_server.cpp
 @HAVE_NSSI_TRUE at nssi_coupling_server_CFLAGS = $(ADIOSLIB_CFLAGS)
- at HAVE_NSSI_TRUE@nssi_coupling_server_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) -DPTL_IFACE_CLIENT=CRAY_USER_NAL -DPTL_IFACE_SERVER=CRAY_USER_NAL # -DUSE_TIMERS
+ at HAVE_NSSI_TRUE@nssi_coupling_server_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_CPPFLAGS) $(MACRODEFFLAG)PTL_IFACE_CLIENT=CRAY_USER_NAL $(MACRODEFFLAG)PTL_IFACE_SERVER=CRAY_USER_NAL # $(MACRODEFFLAG)USE_TIMERS
 @HAVE_NSSI_TRUE at nssi_coupling_server_LDFLAGS = $(ADIOSLIB_LDFLAGS) 
 @HAVE_NSSI_TRUE at nssi_coupling_server_LDADD =  \
 @HAVE_NSSI_TRUE@	$(top_builddir)/src/libadios.a \
 @HAVE_NSSI_TRUE@	$(ADIOSLIB_LDADD) $(NSSI_SERVER_LIBS)
-include_HEADERS = adios.h adios_types.h adios_read.h \
-	adios_read_hooks.h adios_error.h mpidummy.h io_timer.h
-
-# adiosf_read.mod is not really usable, 
-# so it is not used and installed right now
-#libadiosread_a_SOURCES += adiosf_read_mod.F90
-#include_HEADERS += adiosf_read.mod 
+CLEANFILES = $(am__append_24) $(am__append_31) $(am__append_47)
+include_HEADERS = public/adios.h public/adios_types.h \
+	public/adios_read.h public/adios_error.h public/mpidummy.h \
+	public/adios_read_v1.h public/adios_read_v1_defs.h \
+	public/adios_read_v2.h public/adios_selection.h
+nodist_include_HEADERS = $(am__append_30) $(am__append_46)
 lib_LIBRARIES = $(am__append_2) $(am__append_3) libadiosread.a \
-	$(am__append_35) libadiosread_nompi.a $(am__append_49)
-libadiosread_a_CPPFLAGS = $(am__append_33) $(ADIOSLIB_EXTRA_CPPFLAGS) \
-	$(ADIOSREADLIB_CPPFLAGS) $(am__append_56)
-libadiosreadf_a_CPPFLAGS = $(am__append_40) $(am__append_42)
-libadiosread_nompi_a_CPPFLAGS = $(am__append_47) -D_NOMPI \
+	$(am__append_38) libadiosread_nompi.a $(am__append_54)
+libadiosread_a_CPPFLAGS = $(am__append_36) $(ADIOSLIB_EXTRA_CPPFLAGS) \
+	$(ADIOSREADLIB_CPPFLAGS) $(am__append_62)
+libadiosreadf_a_CPPFLAGS = $(am__append_43) $(am__append_45)
+libadiosread_nompi_a_CPPFLAGS = $(am__append_52) $(MACRODEFFLAG)_NOMPI \
 	$(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS) \
-	$(am__append_57)
-libadiosreadf_nompi_a_CPPFLAGS = $(am__append_54) -D_NOMPI \
-	$(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS)
-libadiosread_a_CFLAGS = $(am__append_34)
-libadiosreadf_a_CFLAGS = $(am__append_41)
-libadiosread_nompi_a_CFLAGS = $(am__append_48)
-libadiosreadf_nompi_a_CFLAGS = $(am__append_55)
- at BUILD_WRITE_TRUE@libadios_a_SOURCES = adios.c common_adios.c \
- at BUILD_WRITE_TRUE@	adios_transport_hooks.c adios_mpi.c \
- at BUILD_WRITE_TRUE@	adios_mpi_lustre.c adios_mpi_amr.c \
- at BUILD_WRITE_TRUE@	adios_posix.c adios_posix1.c \
- at BUILD_WRITE_TRUE@	adios_internals.c adios_internals_mxml.c \
- at BUILD_WRITE_TRUE@	buffer.c adios_socket.c adios_bp_v1.c \
- at BUILD_WRITE_TRUE@	adios_endianness.c bp_utils.c futils.c \
- at BUILD_WRITE_TRUE@	adios_error.c adios_read.c \
- at BUILD_WRITE_TRUE@	adios_read_hooks.c common_read.c read_bp.c \
- at BUILD_WRITE_TRUE@	read_bp_staged.c globals.c $(am__append_4) \
+	$(am__append_63)
+libadiosreadf_nompi_a_CPPFLAGS = $(am__append_59) $(am__append_61)
+libadiosread_a_CFLAGS = $(am__append_37)
+libadiosreadf_a_CFLAGS = $(am__append_44)
+libadiosread_nompi_a_CFLAGS = $(am__append_53)
+libadiosreadf_nompi_a_CFLAGS = $(am__append_60)
+ at BUILD_WRITE_TRUE@libadios_a_SOURCES = core/adios.c \
+ at BUILD_WRITE_TRUE@	core/common_adios.c core/adios_internals.c \
+ at BUILD_WRITE_TRUE@	core/adios_internals_mxml.c core/buffer.c \
+ at BUILD_WRITE_TRUE@	core/adios_bp_v1.c core/adios_endianness.c \
+ at BUILD_WRITE_TRUE@	core/bp_utils.c core/futils.c \
+ at BUILD_WRITE_TRUE@	core/adios_error.c core/adios_read.c \
+ at BUILD_WRITE_TRUE@	core/adios_read_v1.c core/common_read.c \
+ at BUILD_WRITE_TRUE@	core/globals.c core/adios_timing.c \
+ at BUILD_WRITE_TRUE@	core/adios_read_hooks.c \
+ at BUILD_WRITE_TRUE@	core/adios_transport_hooks.c \
+ at BUILD_WRITE_TRUE@	core/adios_socket.c core/adios_logger.c \
+ at BUILD_WRITE_TRUE@	core/util.c read/read_bp.c \
+ at BUILD_WRITE_TRUE@	read/read_bp_staged.c read/read_bp_staged1.c \
+ at BUILD_WRITE_TRUE@	write/adios_mpi.c write/adios_mpi_lustre.c \
+ at BUILD_WRITE_TRUE@	write/adios_mpi_amr.c write/adios_posix.c \
+ at BUILD_WRITE_TRUE@	write/adios_posix1.c $(am__append_4) \
 @BUILD_WRITE_TRUE@	$(am__append_7) $(am__append_10) \
 @BUILD_WRITE_TRUE@	$(am__append_13) $(am__append_18) \
- at BUILD_WRITE_TRUE@	$(am__append_20) $(am__append_24)
- at BUILD_WRITE_TRUE@libadios_nompi_a_SOURCES = adios.c common_adios.c \
- at BUILD_WRITE_TRUE@	adios_transport_hooks.c adios_posix.c \
- at BUILD_WRITE_TRUE@	adios_posix1.c adios_internals.c \
- at BUILD_WRITE_TRUE@	adios_internals_mxml.c buffer.c \
- at BUILD_WRITE_TRUE@	adios_socket.c adios_bp_v1.c \
- at BUILD_WRITE_TRUE@	adios_endianness.c bp_utils.c futils.c \
- at BUILD_WRITE_TRUE@	adios_error.c adios_read.c \
- at BUILD_WRITE_TRUE@	adios_read_hooks.c common_read.c read_bp.c \
- at BUILD_WRITE_TRUE@	read_bp_staged.c globals.c mpidummy.c \
+ at BUILD_WRITE_TRUE@	$(am__append_20) $(am__append_25)
+ at BUILD_WRITE_TRUE@libadios_nompi_a_SOURCES = core/adios.c \
+ at BUILD_WRITE_TRUE@	core/common_adios.c core/adios_internals.c \
+ at BUILD_WRITE_TRUE@	core/adios_internals_mxml.c core/buffer.c \
+ at BUILD_WRITE_TRUE@	core/adios_bp_v1.c core/adios_endianness.c \
+ at BUILD_WRITE_TRUE@	core/bp_utils.c core/futils.c \
+ at BUILD_WRITE_TRUE@	core/adios_error.c core/adios_read.c \
+ at BUILD_WRITE_TRUE@	core/adios_read_v1.c core/common_read.c \
+ at BUILD_WRITE_TRUE@	core/globals.c core/mpidummy.c \
+ at BUILD_WRITE_TRUE@	core/adios_timing.c core/adios_read_hooks.c \
+ at BUILD_WRITE_TRUE@	core/adios_transport_hooks.c \
+ at BUILD_WRITE_TRUE@	core/adios_socket.c core/adios_logger.c \
+ at BUILD_WRITE_TRUE@	core/util.c read/read_bp.c \
+ at BUILD_WRITE_TRUE@	read/read_bp_staged.c read/read_bp_staged1.c \
+ at BUILD_WRITE_TRUE@	write/adios_posix.c write/adios_posix1.c \
 @BUILD_WRITE_TRUE@	$(am__append_5) $(am__append_8) \
 @BUILD_WRITE_TRUE@	$(am__append_11)
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at libadiosf_a_SOURCES = adiosf.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	common_adios.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_transport_hooks.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_mpi.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_mpi_lustre.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_mpi_amr.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_posix.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_posix1.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_internals.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_internals_mxml.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	buffer.c adios_socket.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_bp_v1.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_endianness.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	futils.c adios_error.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	bp_utils.c adiosf_read.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	adios_read_hooks.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	common_read.c read_bp.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	read_bp_staged.c \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	globals.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at FortranLibSources =  \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adiosf.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/common_adios.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_internals.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_internals_mxml.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/buffer.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_bp_v1.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_endianness.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/futils.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_error.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/bp_utils.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/common_read.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/globals.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_timing.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_read_hooks.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_transport_hooks.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_socket.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adios_logger.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/util.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	read/read_bp.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	read/read_bp_staged.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	read/read_bp_staged1.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	write/adios_mpi.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	write/adios_mpi_lustre.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	write/adios_mpi_amr.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	write/adios_posix.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	write/adios_posix1.c \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__append_6) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__append_9) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__append_12) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__append_16) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__append_19) \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__append_22) \
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__append_25)
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(am__append_26)
 @BUILD_WRITE_TRUE at libadios_a_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) \
 @BUILD_WRITE_TRUE@	$(ADIOSLIB_CPPFLAGS) $(am__append_15) \
- at BUILD_WRITE_TRUE@	$(am__append_21) $(am__append_26)
+ at BUILD_WRITE_TRUE@	$(am__append_21) $(am__append_27)
 @BUILD_WRITE_TRUE at libadios_a_CFLAGS = $(ADIOSLIB_CFLAGS) 
- at BUILD_WRITE_TRUE@libadios_nompi_a_CPPFLAGS = -D_NOMPI \
+ at BUILD_WRITE_TRUE@libadios_nompi_a_CPPFLAGS = $(MACRODEFFLAG)_NOMPI \
 @BUILD_WRITE_TRUE@	$(ADIOSLIB_EXTRA_CPPFLAGS) \
- at BUILD_WRITE_TRUE@	$(ADIOSLIB_SEQ_CPPFLAGS) $(am__append_27)
- at BUILD_WRITE_TRUE@libadios_nompi_a_CFLAGS = -D_NOMPI $(ADIOSLIB_SEQ_CFLAGS) 
+ at BUILD_WRITE_TRUE@	$(ADIOSLIB_SEQ_CPPFLAGS) $(am__append_28)
+ at BUILD_WRITE_TRUE@libadios_nompi_a_CFLAGS = $(MACRODEFFLAG)_NOMPI $(ADIOSLIB_SEQ_CFLAGS) 
 @BUILD_WRITE_TRUE at libadiosf_a_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) \
 @BUILD_WRITE_TRUE@	$(ADIOSLIB_CPPFLAGS) $(am__append_17) \
- at BUILD_WRITE_TRUE@	$(am__append_23) $(am__append_28)
+ at BUILD_WRITE_TRUE@	$(am__append_23) $(am__append_29)
 @BUILD_WRITE_TRUE at libadiosf_a_CFLAGS = $(ADIOSLIB_CFLAGS) 
- at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at dist_libadios_a_SOURCES = adios_nssi_args.x
+ at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at dist_libadios_a_SOURCES = nssi/adios_nssi_args.x
 @BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at nodist_libadios_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at nodist_libadiosf_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
- at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at dist_libadiosf_a_SOURCES = adios_nssi_args.x
- at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at CLEANFILES = adios_nssi_args.c adios_nssi_args.h
-libadiosread_a_SOURCES = adios_bp_v1.c adios_endianness.c bp_utils.c \
-	futils.c adios_error.c adios_read.c adios_read_hooks.c \
-	common_read.c read_bp.c read_bp_staged.c globals.c \
-	$(am__append_29) $(am__append_30) $(am__append_31) \
-	$(am__append_32)
- at HAVE_NSSI_TRUE@dist_libadiosread_a_SOURCES = adios_nssi_args.x
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at dist_libadiosf_a_SOURCES = nssi/adios_nssi_args.x
+
+# Build two different Fortran library, for the two read APIs
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at libadiosf_a_SOURCES =  \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(FortranLibSources) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adiosf_read.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adiosf_defs_mod.f90 \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adiosf_write_mod.f90 \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adiosf_read_mod.f90
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at libadiosf_v1_a_SOURCES =  \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(FortranLibSources) \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adiosf_read_v1.c \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adiosf_defs_mod.f90 \
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	core/adiosf_write_mod.f90
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at libadiosf_v1_a_CPPFLAGS = $(libadiosf_a_CPPFLAGS) 
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at libadiosf_v1_a_CFLAGS = $(libadiosf_a_CFLAGS) 
+libadiosread_a_SOURCES = core/adios_bp_v1.c core/adios_endianness.c \
+	core/bp_utils.c core/futils.c core/adios_error.c \
+	core/adios_read.c core/adios_read_v1.c core/common_read.c \
+	core/globals.c core/adios_read_hooks.c core/adios_logger.c \
+	core/util.c read/read_bp.c read/read_bp_staged.c \
+	read/read_bp_staged1.c $(am__append_32) $(am__append_33) \
+	$(am__append_34) $(am__append_35)
+ at HAVE_NSSI_TRUE@dist_libadiosread_a_SOURCES = nssi/adios_nssi_args.x
 @HAVE_NSSI_TRUE at nodist_libadiosread_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
- at BUILD_FORTRAN_TRUE@libadiosreadf_a_SOURCES = adios_bp_v1.c \
- at BUILD_FORTRAN_TRUE@	adios_endianness.c bp_utils.c futils.c \
- at BUILD_FORTRAN_TRUE@	adios_error.c adiosf_read.c \
- at BUILD_FORTRAN_TRUE@	adios_read_hooks.c common_read.c read_bp.c \
- at BUILD_FORTRAN_TRUE@	read_bp_staged.c globals.c \
- at BUILD_FORTRAN_TRUE@	$(am__append_36) $(am__append_37) \
- at BUILD_FORTRAN_TRUE@	$(am__append_38) $(am__append_39)
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at dist_libadiosreadf_a_SOURCES = adios_nssi_args.x
+ at BUILD_FORTRAN_TRUE@FortranReadLibSource = core/adios_bp_v1.c \
+ at BUILD_FORTRAN_TRUE@	core/adios_endianness.c core/bp_utils.c \
+ at BUILD_FORTRAN_TRUE@	core/futils.c core/adios_error.c \
+ at BUILD_FORTRAN_TRUE@	core/common_read.c core/globals.c \
+ at BUILD_FORTRAN_TRUE@	core/adios_read_hooks.c \
+ at BUILD_FORTRAN_TRUE@	core/adios_logger.c core/util.c \
+ at BUILD_FORTRAN_TRUE@	read/read_bp.c read/read_bp_staged.c \
+ at BUILD_FORTRAN_TRUE@	read/read_bp_staged1.c $(am__append_39) \
+ at BUILD_FORTRAN_TRUE@	$(am__append_40) $(am__append_41) \
+ at BUILD_FORTRAN_TRUE@	$(am__append_42)
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at dist_libadiosreadf_a_SOURCES = nssi/adios_nssi_args.x
 @BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at nodist_libadiosreadf_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
-libadiosread_nompi_a_SOURCES = mpidummy.c adios_bp_v1.c \
-	adios_endianness.c bp_utils.c futils.c adios_error.c \
-	adios_read.c adios_read_hooks.c common_read.c read_bp.c \
-	adios_internals.c buffer.c adios_transport_hooks.c globals.c \
-	$(am__append_43) $(am__append_44) $(am__append_45) \
-	$(am__append_46) $(am__append_52)
- at HAVE_NSSI_TRUE@dist_libadiosread_nompi_a_SOURCES = adios_nssi_args.x
+ at BUILD_FORTRAN_TRUE@libadiosreadf_a_SOURCES = $(FortranReadLibSource) \
+ at BUILD_FORTRAN_TRUE@	core/adiosf_read.c \
+ at BUILD_FORTRAN_TRUE@	core/adiosf_defs_mod.f90 \
+ at BUILD_FORTRAN_TRUE@	core/adiosf_read_mod.f90
+ at BUILD_FORTRAN_TRUE@libadiosreadf_v1_a_SOURCES = $(FortranReadLibSource) core/adiosf_read_v1.c
+ at BUILD_FORTRAN_TRUE@libadiosreadf_v1_a_CPPFLAGS = $(libadiosreadf_a_CPPFLAGS)
+ at BUILD_FORTRAN_TRUE@libadiosreadf_v1_a_CFLAGS = $(libadiosreadf_a_CFLAGS)
+libadiosread_nompi_a_SOURCES = core/mpidummy.c core/adios_bp_v1.c \
+	core/adios_endianness.c core/bp_utils.c core/futils.c \
+	core/adios_error.c core/adios_read.c core/adios_read_v1.c \
+	core/common_read.c core/adios_logger.c core/buffer.c \
+	core/globals.c core/adios_read_hooks.c core/util.c \
+	read/read_bp.c $(am__append_48) $(am__append_49) \
+	$(am__append_50) $(am__append_51)
+ at HAVE_NSSI_TRUE@dist_libadiosread_nompi_a_SOURCES = nssi/adios_nssi_args.x
 @HAVE_NSSI_TRUE at nodist_libadiosread_nompi_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
- at BUILD_FORTRAN_TRUE@libadiosreadf_nompi_a_SOURCES = mpidummy.c \
- at BUILD_FORTRAN_TRUE@	adios_bp_v1.c adios_endianness.c \
- at BUILD_FORTRAN_TRUE@	bp_utils.c futils.c adios_error.c \
- at BUILD_FORTRAN_TRUE@	adiosf_read.c adios_read_hooks.c \
- at BUILD_FORTRAN_TRUE@	common_read.c read_bp.c globals.c \
- at BUILD_FORTRAN_TRUE@	$(am__append_50) $(am__append_51) \
- at BUILD_FORTRAN_TRUE@	$(am__append_53)
- at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at dist_libadiosreadf_nompi_a_SOURCES = adios_nssi_args.x
+ at BUILD_FORTRAN_TRUE@FortranReadSeqLibSource = core/mpidummy.c \
+ at BUILD_FORTRAN_TRUE@	core/adios_bp_v1.c core/adios_endianness.c \
+ at BUILD_FORTRAN_TRUE@	core/bp_utils.c core/futils.c \
+ at BUILD_FORTRAN_TRUE@	core/adios_error.c core/adios_logger.c \
+ at BUILD_FORTRAN_TRUE@	core/common_read.c core/globals.c \
+ at BUILD_FORTRAN_TRUE@	core/adios_read_hooks.c core/util.c \
+ at BUILD_FORTRAN_TRUE@	read/read_bp.c $(am__append_55) \
+ at BUILD_FORTRAN_TRUE@	$(am__append_56) $(am__append_57) \
+ at BUILD_FORTRAN_TRUE@	$(am__append_58)
+ at BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at dist_libadiosreadf_nompi_a_SOURCES = nssi/adios_nssi_args.x
 @BUILD_FORTRAN_TRUE@@HAVE_NSSI_TRUE at nodist_libadiosreadf_nompi_a_SOURCES = adios_nssi_args.c adios_nssi_args.h
+ at BUILD_FORTRAN_TRUE@libadiosreadf_nompi_a_SOURCES = $(FortranReadSeqLibSource) core/adiosf_read.c
+ at BUILD_FORTRAN_TRUE@libadiosreadf_nompi_v1_a_SOURCES = $(FortranReadSeqLibSource) core/adiosf_read_v1.c
+ at BUILD_FORTRAN_TRUE@libadiosreadf_nompi_v1_a_CPPFLAGS = $(libadiosreadf_nompi_a_CPPFLAGS)
+ at BUILD_FORTRAN_TRUE@libadiosreadf_nompi_v1_a_CFLAGS = $(libadiosreadf_nompi_a_CFLAGS)
 noinst_LIBRARIES = libadios_internal_nompi.a
-libadios_internal_nompi_a_SOURCES = mpidummy.c \
-                                    adios_bp_v1.c \
-                                    adios_endianness.c \
-                                    bp_utils.c \
-                                    adios_internals.c \
-                                    buffer.c \
-                                    adios_transport_hooks.c \
-                                    adios_error.c \
-                                    adios_internals_mxml.c
-
-libadios_internal_nompi_a_CPPFLAGS = -D_INTERNAL $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_CPPFLAGS)
+libadios_internal_nompi_a_SOURCES = core/mpidummy.c \
+                                    core/adios_bp_v1.c \
+                                    core/adios_endianness.c \
+                                    core/bp_utils.c \
+                                    core/adios_internals.c \
+                                    core/buffer.c \
+                                    core/adios_error.c \
+                                    core/adios_logger.c \
+                                    core/adios_internals_mxml.c \
+                                    core/adios_timing.c \
+                                    core/util.c \
+                                    core/futils.c \
+                                    core/adios_transport_hooks.c 
+
+libadios_internal_nompi_a_CPPFLAGS = $(MACRODEFFLAG)_INTERNAL $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_CPPFLAGS)
 
 #bin_PROGRAMS+=adios_flags
 #nodist_adios_flags_SOURCES = adios_flags.h 
@@ -956,28 +1249,31 @@ libadios_internal_nompi_a_CPPFLAGS = -D_INTERNAL $(ADIOSLIB_EXTRA_CPPFLAGS) $(AD
 #	@echo "#define ADIOSREADF_NOMPI_CFLAGS \"$(libadiosreadf_nompi_a_CPPFLAGS)\"" >> $@
 #	@echo "#define ADIOSREADF_NOMPI_LDFLAGS \"$(libadiosreadf_nompi_a_LDFLAGS)\"" >> $@
 #adios_flags.c: adios_flags.h
-EXTRA_DIST = adios_bp_v1.h adios_endianness.h adios_error.h \
-             adios_internals.h adios_internals_mxml.h \
-             adios_nssi_config.h adios_socket.h adios_transport_hooks.h aggregation.h \
-             bp_types.h bp_utils.h buffer.h common_adios.h common_read.h futils.h globals.h \
-             ds_metadata.h
+EXTRA_DIST = core/adios_bp_v1.h core/adios_endianness.h \
+             core/adios_internals.h core/adios_internals_mxml.h core/adios_logger.h \
+             core/adios_read_hooks.h core/adios_socket.h core/adios_timing.h \
+             core/adios_transport_hooks.h \
+             core/bp_types.h core/bp_utils.h core/buffer.h core/common_adios.h \
+             core/common_read.h core/futils.h core/globals.h core/ds_metadata.h \
+             core/util.h \
+             nssi/adios_nssi_config.h nssi/aggregation.h nssi/io_timer.h
 
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .c .cpp .lo .o .obj
+.SUFFIXES: .c .cpp .f90 .lo .o .obj
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  src/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  src/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -995,32 +1291,36 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-libLIBRARIES: $(lib_LIBRARIES)
 	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
-	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
 	  if test -f $$p; then \
-	    f=$(am__strip_dir) \
-	    echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
-	    $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
+	    list2="$$list2 $$p"; \
 	  else :; fi; \
-	done
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(INSTALL_DATA) $$list2 "$(DESTDIR)$(libdir)" || exit $$?; }
 	@$(POST_INSTALL)
-	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
 	  if test -f $$p; then \
-	    p=$(am__strip_dir) \
-	    echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \
-	    $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \
+	    $(am__strip_dir) \
+	    echo " ( cd '$(DESTDIR)$(libdir)' && $(RANLIB) $$f )"; \
+	    ( cd "$(DESTDIR)$(libdir)" && $(RANLIB) $$f ) || exit $$?; \
 	  else :; fi; \
 	done
 
 uninstall-libLIBRARIES:
 	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LIBRARIES)'; for p in $$list; do \
-	  p=$(am__strip_dir) \
-	  echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \
-	  rm -f "$(DESTDIR)$(libdir)/$$p"; \
-	done
+	@list='$(lib_LIBRARIES)'; test -n "$(libdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(libdir)' && rm -f "$$files" )"; \
+	cd "$(DESTDIR)$(libdir)" && rm -f $$files
 
 clean-libLIBRARIES:
 	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
@@ -1043,6 +1343,10 @@ libadiosf.a: $(libadiosf_a_OBJECTS) $(libadiosf_a_DEPENDENCIES)
 	-rm -f libadiosf.a
 	$(libadiosf_a_AR) libadiosf.a $(libadiosf_a_OBJECTS) $(libadiosf_a_LIBADD)
 	$(RANLIB) libadiosf.a
+libadiosf_v1.a: $(libadiosf_v1_a_OBJECTS) $(libadiosf_v1_a_DEPENDENCIES) 
+	-rm -f libadiosf_v1.a
+	$(libadiosf_v1_a_AR) libadiosf_v1.a $(libadiosf_v1_a_OBJECTS) $(libadiosf_v1_a_LIBADD)
+	$(RANLIB) libadiosf_v1.a
 libadiosread.a: $(libadiosread_a_OBJECTS) $(libadiosread_a_DEPENDENCIES) 
 	-rm -f libadiosread.a
 	$(libadiosread_a_AR) libadiosread.a $(libadiosread_a_OBJECTS) $(libadiosread_a_LIBADD)
@@ -1059,40 +1363,63 @@ libadiosreadf_nompi.a: $(libadiosreadf_nompi_a_OBJECTS) $(libadiosreadf_nompi_a_
 	-rm -f libadiosreadf_nompi.a
 	$(libadiosreadf_nompi_a_AR) libadiosreadf_nompi.a $(libadiosreadf_nompi_a_OBJECTS) $(libadiosreadf_nompi_a_LIBADD)
 	$(RANLIB) libadiosreadf_nompi.a
+libadiosreadf_nompi_v1.a: $(libadiosreadf_nompi_v1_a_OBJECTS) $(libadiosreadf_nompi_v1_a_DEPENDENCIES) 
+	-rm -f libadiosreadf_nompi_v1.a
+	$(libadiosreadf_nompi_v1_a_AR) libadiosreadf_nompi_v1.a $(libadiosreadf_nompi_v1_a_OBJECTS) $(libadiosreadf_nompi_v1_a_LIBADD)
+	$(RANLIB) libadiosreadf_nompi_v1.a
+libadiosreadf_v1.a: $(libadiosreadf_v1_a_OBJECTS) $(libadiosreadf_v1_a_DEPENDENCIES) 
+	-rm -f libadiosreadf_v1.a
+	$(libadiosreadf_v1_a_AR) libadiosreadf_v1.a $(libadiosreadf_v1_a_OBJECTS) $(libadiosreadf_v1_a_LIBADD)
+	$(RANLIB) libadiosreadf_v1.a
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	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)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@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)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@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
 nssi-coupling-server$(EXEEXT): $(nssi_coupling_server_OBJECTS) $(nssi_coupling_server_DEPENDENCIES) 
 	@rm -f nssi-coupling-server$(EXEEXT)
-	$(CXXLINK) $(nssi_coupling_server_LDFLAGS) $(nssi_coupling_server_OBJECTS) $(nssi_coupling_server_LDADD) $(LIBS)
+	$(nssi_coupling_server_LINK) $(nssi_coupling_server_OBJECTS) $(nssi_coupling_server_LDADD) $(LIBS)
 nssi-staging-server$(EXEEXT): $(nssi_staging_server_OBJECTS) $(nssi_staging_server_DEPENDENCIES) 
 	@rm -f nssi-staging-server$(EXEEXT)
-	$(CXXLINK) $(nssi_staging_server_LDFLAGS) $(nssi_staging_server_OBJECTS) $(nssi_staging_server_LDADD) $(LIBS)
+	$(nssi_staging_server_LINK) $(nssi_staging_server_OBJECTS) $(nssi_staging_server_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -1109,257 +1436,287 @@ distclean-compile:
 .c.lo:
 	$(LTCOMPILE) -c -o $@ $<
 
-libadios_a-adios.o: adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios.o `test -f 'adios.c' || echo '$(srcdir)/'`adios.c
+libadios_a-adios.o: core/adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios.o `test -f 'core/adios.c' || echo '$(srcdir)/'`core/adios.c
+
+libadios_a-adios.obj: core/adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios.obj `if test -f 'core/adios.c'; then $(CYGPATH_W) 'core/adios.c'; else $(CYGPATH_W) '$(srcdir)/core/adios.c'; fi`
 
-libadios_a-adios.obj: adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios.obj `if test -f 'adios.c'; then $(CYGPATH_W) 'adios.c'; else $(CYGPATH_W) '$(srcdir)/adios.c'; fi`
+libadios_a-common_adios.o: core/common_adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-common_adios.o `test -f 'core/common_adios.c' || echo '$(srcdir)/'`core/common_adios.c
 
-libadios_a-common_adios.o: common_adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-common_adios.o `test -f 'common_adios.c' || echo '$(srcdir)/'`common_adios.c
+libadios_a-common_adios.obj: core/common_adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-common_adios.obj `if test -f 'core/common_adios.c'; then $(CYGPATH_W) 'core/common_adios.c'; else $(CYGPATH_W) '$(srcdir)/core/common_adios.c'; fi`
 
-libadios_a-common_adios.obj: common_adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-common_adios.obj `if test -f 'common_adios.c'; then $(CYGPATH_W) 'common_adios.c'; else $(CYGPATH_W) '$(srcdir)/common_adios.c'; fi`
+libadios_a-adios_internals.o: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_internals.o `test -f 'core/adios_internals.c' || echo '$(srcdir)/'`core/adios_internals.c
 
-libadios_a-adios_transport_hooks.o: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_transport_hooks.o `test -f 'adios_transport_hooks.c' || echo '$(srcdir)/'`adios_transport_hooks.c
+libadios_a-adios_internals.obj: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_internals.obj `if test -f 'core/adios_internals.c'; then $(CYGPATH_W) 'core/adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals.c'; fi`
 
-libadios_a-adios_transport_hooks.obj: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_transport_hooks.obj `if test -f 'adios_transport_hooks.c'; then $(CYGPATH_W) 'adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_transport_hooks.c'; fi`
+libadios_a-adios_internals_mxml.o: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_internals_mxml.o `test -f 'core/adios_internals_mxml.c' || echo '$(srcdir)/'`core/adios_internals_mxml.c
 
-libadios_a-adios_mpi.o: adios_mpi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi.o `test -f 'adios_mpi.c' || echo '$(srcdir)/'`adios_mpi.c
+libadios_a-adios_internals_mxml.obj: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_internals_mxml.obj `if test -f 'core/adios_internals_mxml.c'; then $(CYGPATH_W) 'core/adios_internals_mxml.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals_mxml.c'; fi`
 
-libadios_a-adios_mpi.obj: adios_mpi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi.obj `if test -f 'adios_mpi.c'; then $(CYGPATH_W) 'adios_mpi.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi.c'; fi`
+libadios_a-buffer.o: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-buffer.o `test -f 'core/buffer.c' || echo '$(srcdir)/'`core/buffer.c
 
-libadios_a-adios_mpi_lustre.o: adios_mpi_lustre.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_lustre.o `test -f 'adios_mpi_lustre.c' || echo '$(srcdir)/'`adios_mpi_lustre.c
+libadios_a-buffer.obj: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-buffer.obj `if test -f 'core/buffer.c'; then $(CYGPATH_W) 'core/buffer.c'; else $(CYGPATH_W) '$(srcdir)/core/buffer.c'; fi`
 
-libadios_a-adios_mpi_lustre.obj: adios_mpi_lustre.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_lustre.obj `if test -f 'adios_mpi_lustre.c'; then $(CYGPATH_W) 'adios_mpi_lustre.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_lustre.c'; fi`
+libadios_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
 
-libadios_a-adios_mpi_amr.o: adios_mpi_amr.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_amr.o `test -f 'adios_mpi_amr.c' || echo '$(srcdir)/'`adios_mpi_amr.c
+libadios_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
 
-libadios_a-adios_mpi_amr.obj: adios_mpi_amr.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_amr.obj `if test -f 'adios_mpi_amr.c'; then $(CYGPATH_W) 'adios_mpi_amr.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_amr.c'; fi`
+libadios_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
 
-libadios_a-adios_posix.o: adios_posix.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_posix.o `test -f 'adios_posix.c' || echo '$(srcdir)/'`adios_posix.c
+libadios_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
 
-libadios_a-adios_posix.obj: adios_posix.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_posix.obj `if test -f 'adios_posix.c'; then $(CYGPATH_W) 'adios_posix.c'; else $(CYGPATH_W) '$(srcdir)/adios_posix.c'; fi`
+libadios_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
 
-libadios_a-adios_posix1.o: adios_posix1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_posix1.o `test -f 'adios_posix1.c' || echo '$(srcdir)/'`adios_posix1.c
+libadios_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
 
-libadios_a-adios_posix1.obj: adios_posix1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_posix1.obj `if test -f 'adios_posix1.c'; then $(CYGPATH_W) 'adios_posix1.c'; else $(CYGPATH_W) '$(srcdir)/adios_posix1.c'; fi`
+libadios_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
 
-libadios_a-adios_internals.o: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_internals.o `test -f 'adios_internals.c' || echo '$(srcdir)/'`adios_internals.c
+libadios_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
 
-libadios_a-adios_internals.obj: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_internals.obj `if test -f 'adios_internals.c'; then $(CYGPATH_W) 'adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/adios_internals.c'; fi`
+libadios_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
 
-libadios_a-adios_internals_mxml.o: adios_internals_mxml.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_internals_mxml.o `test -f 'adios_internals_mxml.c' || echo '$(srcdir)/'`adios_internals_mxml.c
+libadios_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
 
-libadios_a-adios_internals_mxml.obj: adios_internals_mxml.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_internals_mxml.obj `if test -f 'adios_internals_mxml.c'; then $(CYGPATH_W) 'adios_internals_mxml.c'; else $(CYGPATH_W) '$(srcdir)/adios_internals_mxml.c'; fi`
+libadios_a-adios_read.o: core/adios_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read.o `test -f 'core/adios_read.c' || echo '$(srcdir)/'`core/adios_read.c
 
-libadios_a-buffer.o: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-buffer.o `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c
+libadios_a-adios_read.obj: core/adios_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read.obj `if test -f 'core/adios_read.c'; then $(CYGPATH_W) 'core/adios_read.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read.c'; fi`
 
-libadios_a-buffer.obj: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-buffer.obj `if test -f 'buffer.c'; then $(CYGPATH_W) 'buffer.c'; else $(CYGPATH_W) '$(srcdir)/buffer.c'; fi`
+libadios_a-adios_read_v1.o: core/adios_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read_v1.o `test -f 'core/adios_read_v1.c' || echo '$(srcdir)/'`core/adios_read_v1.c
 
-libadios_a-adios_socket.o: adios_socket.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_socket.o `test -f 'adios_socket.c' || echo '$(srcdir)/'`adios_socket.c
+libadios_a-adios_read_v1.obj: core/adios_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read_v1.obj `if test -f 'core/adios_read_v1.c'; then $(CYGPATH_W) 'core/adios_read_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_v1.c'; fi`
 
-libadios_a-adios_socket.obj: adios_socket.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_socket.obj `if test -f 'adios_socket.c'; then $(CYGPATH_W) 'adios_socket.c'; else $(CYGPATH_W) '$(srcdir)/adios_socket.c'; fi`
+libadios_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
 
-libadios_a-adios_bp_v1.o: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_bp_v1.o `test -f 'adios_bp_v1.c' || echo '$(srcdir)/'`adios_bp_v1.c
+libadios_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
 
-libadios_a-adios_bp_v1.obj: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_bp_v1.obj `if test -f 'adios_bp_v1.c'; then $(CYGPATH_W) 'adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/adios_bp_v1.c'; fi`
+libadios_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
 
-libadios_a-adios_endianness.o: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_endianness.o `test -f 'adios_endianness.c' || echo '$(srcdir)/'`adios_endianness.c
+libadios_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
 
-libadios_a-adios_endianness.obj: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_endianness.obj `if test -f 'adios_endianness.c'; then $(CYGPATH_W) 'adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/adios_endianness.c'; fi`
+libadios_a-adios_timing.o: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_timing.o `test -f 'core/adios_timing.c' || echo '$(srcdir)/'`core/adios_timing.c
 
-libadios_a-bp_utils.o: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-bp_utils.o `test -f 'bp_utils.c' || echo '$(srcdir)/'`bp_utils.c
+libadios_a-adios_timing.obj: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_timing.obj `if test -f 'core/adios_timing.c'; then $(CYGPATH_W) 'core/adios_timing.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_timing.c'; fi`
 
-libadios_a-bp_utils.obj: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-bp_utils.obj `if test -f 'bp_utils.c'; then $(CYGPATH_W) 'bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/bp_utils.c'; fi`
+libadios_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
 
-libadios_a-futils.o: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-futils.o `test -f 'futils.c' || echo '$(srcdir)/'`futils.c
+libadios_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
 
-libadios_a-futils.obj: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-futils.obj `if test -f 'futils.c'; then $(CYGPATH_W) 'futils.c'; else $(CYGPATH_W) '$(srcdir)/futils.c'; fi`
+libadios_a-adios_transport_hooks.o: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_transport_hooks.o `test -f 'core/adios_transport_hooks.c' || echo '$(srcdir)/'`core/adios_transport_hooks.c
 
-libadios_a-adios_error.o: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_error.o `test -f 'adios_error.c' || echo '$(srcdir)/'`adios_error.c
+libadios_a-adios_transport_hooks.obj: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_transport_hooks.obj `if test -f 'core/adios_transport_hooks.c'; then $(CYGPATH_W) 'core/adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_transport_hooks.c'; fi`
 
-libadios_a-adios_error.obj: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_error.obj `if test -f 'adios_error.c'; then $(CYGPATH_W) 'adios_error.c'; else $(CYGPATH_W) '$(srcdir)/adios_error.c'; fi`
+libadios_a-adios_socket.o: core/adios_socket.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_socket.o `test -f 'core/adios_socket.c' || echo '$(srcdir)/'`core/adios_socket.c
 
-libadios_a-adios_read.o: adios_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read.o `test -f 'adios_read.c' || echo '$(srcdir)/'`adios_read.c
+libadios_a-adios_socket.obj: core/adios_socket.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_socket.obj `if test -f 'core/adios_socket.c'; then $(CYGPATH_W) 'core/adios_socket.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_socket.c'; fi`
 
-libadios_a-adios_read.obj: adios_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read.obj `if test -f 'adios_read.c'; then $(CYGPATH_W) 'adios_read.c'; else $(CYGPATH_W) '$(srcdir)/adios_read.c'; fi`
+libadios_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
 
-libadios_a-adios_read_hooks.o: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read_hooks.o `test -f 'adios_read_hooks.c' || echo '$(srcdir)/'`adios_read_hooks.c
+libadios_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
 
-libadios_a-adios_read_hooks.obj: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_read_hooks.obj `if test -f 'adios_read_hooks.c'; then $(CYGPATH_W) 'adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_hooks.c'; fi`
+libadios_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
 
-libadios_a-common_read.o: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-common_read.o `test -f 'common_read.c' || echo '$(srcdir)/'`common_read.c
+libadios_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
 
-libadios_a-common_read.obj: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-common_read.obj `if test -f 'common_read.c'; then $(CYGPATH_W) 'common_read.c'; else $(CYGPATH_W) '$(srcdir)/common_read.c'; fi`
+libadios_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
 
-libadios_a-read_bp.o: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp.o `test -f 'read_bp.c' || echo '$(srcdir)/'`read_bp.c
+libadios_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
 
-libadios_a-read_bp.obj: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp.obj `if test -f 'read_bp.c'; then $(CYGPATH_W) 'read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read_bp.c'; fi`
+libadios_a-read_bp_staged.o: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp_staged.o `test -f 'read/read_bp_staged.c' || echo '$(srcdir)/'`read/read_bp_staged.c
 
-libadios_a-read_bp_staged.o: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp_staged.o `test -f 'read_bp_staged.c' || echo '$(srcdir)/'`read_bp_staged.c
+libadios_a-read_bp_staged.obj: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp_staged.obj `if test -f 'read/read_bp_staged.c'; then $(CYGPATH_W) 'read/read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged.c'; fi`
 
-libadios_a-read_bp_staged.obj: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp_staged.obj `if test -f 'read_bp_staged.c'; then $(CYGPATH_W) 'read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read_bp_staged.c'; fi`
+libadios_a-read_bp_staged1.o: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp_staged1.o `test -f 'read/read_bp_staged1.c' || echo '$(srcdir)/'`read/read_bp_staged1.c
 
-libadios_a-globals.o: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-globals.o `test -f 'globals.c' || echo '$(srcdir)/'`globals.c
+libadios_a-read_bp_staged1.obj: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_bp_staged1.obj `if test -f 'read/read_bp_staged1.c'; then $(CYGPATH_W) 'read/read_bp_staged1.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged1.c'; fi`
 
-libadios_a-globals.obj: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-globals.obj `if test -f 'globals.c'; then $(CYGPATH_W) 'globals.c'; else $(CYGPATH_W) '$(srcdir)/globals.c'; fi`
+libadios_a-adios_mpi.o: write/adios_mpi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi.o `test -f 'write/adios_mpi.c' || echo '$(srcdir)/'`write/adios_mpi.c
 
-libadios_a-adios_dart.o: adios_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_dart.o `test -f 'adios_dart.c' || echo '$(srcdir)/'`adios_dart.c
+libadios_a-adios_mpi.obj: write/adios_mpi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi.obj `if test -f 'write/adios_mpi.c'; then $(CYGPATH_W) 'write/adios_mpi.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi.c'; fi`
 
-libadios_a-adios_dart.obj: adios_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_dart.obj `if test -f 'adios_dart.c'; then $(CYGPATH_W) 'adios_dart.c'; else $(CYGPATH_W) '$(srcdir)/adios_dart.c'; fi`
+libadios_a-adios_mpi_lustre.o: write/adios_mpi_lustre.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_lustre.o `test -f 'write/adios_mpi_lustre.c' || echo '$(srcdir)/'`write/adios_mpi_lustre.c
 
-libadios_a-read_dart.o: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_dart.o `test -f 'read_dart.c' || echo '$(srcdir)/'`read_dart.c
+libadios_a-adios_mpi_lustre.obj: write/adios_mpi_lustre.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_lustre.obj `if test -f 'write/adios_mpi_lustre.c'; then $(CYGPATH_W) 'write/adios_mpi_lustre.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_lustre.c'; fi`
 
-libadios_a-read_dart.obj: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_dart.obj `if test -f 'read_dart.c'; then $(CYGPATH_W) 'read_dart.c'; else $(CYGPATH_W) '$(srcdir)/read_dart.c'; fi`
+libadios_a-adios_mpi_amr.o: write/adios_mpi_amr.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_amr.o `test -f 'write/adios_mpi_amr.c' || echo '$(srcdir)/'`write/adios_mpi_amr.c
 
-libadios_a-adios_dimes.o: adios_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_dimes.o `test -f 'adios_dimes.c' || echo '$(srcdir)/'`adios_dimes.c
+libadios_a-adios_mpi_amr.obj: write/adios_mpi_amr.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_amr.obj `if test -f 'write/adios_mpi_amr.c'; then $(CYGPATH_W) 'write/adios_mpi_amr.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_amr.c'; fi`
 
-libadios_a-adios_dimes.obj: adios_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_dimes.obj `if test -f 'adios_dimes.c'; then $(CYGPATH_W) 'adios_dimes.c'; else $(CYGPATH_W) '$(srcdir)/adios_dimes.c'; fi`
+libadios_a-adios_posix.o: write/adios_posix.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_posix.o `test -f 'write/adios_posix.c' || echo '$(srcdir)/'`write/adios_posix.c
 
-libadios_a-read_dimes.o: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_dimes.o `test -f 'read_dimes.c' || echo '$(srcdir)/'`read_dimes.c
+libadios_a-adios_posix.obj: write/adios_posix.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_posix.obj `if test -f 'write/adios_posix.c'; then $(CYGPATH_W) 'write/adios_posix.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_posix.c'; fi`
 
-libadios_a-read_dimes.obj: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_dimes.obj `if test -f 'read_dimes.c'; then $(CYGPATH_W) 'read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read_dimes.c'; fi`
+libadios_a-adios_posix1.o: write/adios_posix1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_posix1.o `test -f 'write/adios_posix1.c' || echo '$(srcdir)/'`write/adios_posix1.c
 
-libadios_a-adios_datatap.o: adios_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_datatap.o `test -f 'adios_datatap.c' || echo '$(srcdir)/'`adios_datatap.c
+libadios_a-adios_posix1.obj: write/adios_posix1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_posix1.obj `if test -f 'write/adios_posix1.c'; then $(CYGPATH_W) 'write/adios_posix1.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_posix1.c'; fi`
 
-libadios_a-adios_datatap.obj: adios_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_datatap.obj `if test -f 'adios_datatap.c'; then $(CYGPATH_W) 'adios_datatap.c'; else $(CYGPATH_W) '$(srcdir)/adios_datatap.c'; fi`
+libadios_a-adios_dataspaces.o: write/adios_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_dataspaces.o `test -f 'write/adios_dataspaces.c' || echo '$(srcdir)/'`write/adios_dataspaces.c
 
-libadios_a-read_datatap.o: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_datatap.o `test -f 'read_datatap.c' || echo '$(srcdir)/'`read_datatap.c
+libadios_a-adios_dataspaces.obj: write/adios_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_dataspaces.obj `if test -f 'write/adios_dataspaces.c'; then $(CYGPATH_W) 'write/adios_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_dataspaces.c'; fi`
 
-libadios_a-read_datatap.obj: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_datatap.obj `if test -f 'read_datatap.c'; then $(CYGPATH_W) 'read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read_datatap.c'; fi`
+libadios_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
 
-libadios_a-adios_phdf5.o: adios_phdf5.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_phdf5.o `test -f 'adios_phdf5.c' || echo '$(srcdir)/'`adios_phdf5.c
+libadios_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
 
-libadios_a-adios_phdf5.obj: adios_phdf5.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_phdf5.obj `if test -f 'adios_phdf5.c'; then $(CYGPATH_W) 'adios_phdf5.c'; else $(CYGPATH_W) '$(srcdir)/adios_phdf5.c'; fi`
+libadios_a-adios_dimes.o: write/adios_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_dimes.o `test -f 'write/adios_dimes.c' || echo '$(srcdir)/'`write/adios_dimes.c
 
-libadios_a-adios_nc4.o: adios_nc4.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nc4.o `test -f 'adios_nc4.c' || echo '$(srcdir)/'`adios_nc4.c
+libadios_a-adios_dimes.obj: write/adios_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_dimes.obj `if test -f 'write/adios_dimes.c'; then $(CYGPATH_W) 'write/adios_dimes.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_dimes.c'; fi`
 
-libadios_a-adios_nc4.obj: adios_nc4.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nc4.obj `if test -f 'adios_nc4.c'; then $(CYGPATH_W) 'adios_nc4.c'; else $(CYGPATH_W) '$(srcdir)/adios_nc4.c'; fi`
+libadios_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
 
-libadios_a-adios_nssi_config.o: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_config.o `test -f 'adios_nssi_config.c' || echo '$(srcdir)/'`adios_nssi_config.c
+libadios_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
 
-libadios_a-adios_nssi_config.obj: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_config.obj `if test -f 'adios_nssi_config.c'; then $(CYGPATH_W) 'adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_config.c'; fi`
+libadios_a-adios_datatap.o: write/adios_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_datatap.o `test -f 'write/adios_datatap.c' || echo '$(srcdir)/'`write/adios_datatap.c
 
-libadios_a-adios_nssi.o: adios_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi.o `test -f 'adios_nssi.c' || echo '$(srcdir)/'`adios_nssi.c
+libadios_a-adios_datatap.obj: write/adios_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_datatap.obj `if test -f 'write/adios_datatap.c'; then $(CYGPATH_W) 'write/adios_datatap.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_datatap.c'; fi`
 
-libadios_a-adios_nssi.obj: adios_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi.obj `if test -f 'adios_nssi.c'; then $(CYGPATH_W) 'adios_nssi.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi.c'; fi`
+libadios_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
 
-libadios_a-adios_nssi_filter.o: adios_nssi_filter.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_filter.o `test -f 'adios_nssi_filter.c' || echo '$(srcdir)/'`adios_nssi_filter.c
+libadios_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
 
-libadios_a-adios_nssi_filter.obj: adios_nssi_filter.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_filter.obj `if test -f 'adios_nssi_filter.c'; then $(CYGPATH_W) 'adios_nssi_filter.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_filter.c'; fi`
+libadios_a-adios_phdf5.o: write/adios_phdf5.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_phdf5.o `test -f 'write/adios_phdf5.c' || echo '$(srcdir)/'`write/adios_phdf5.c
 
-libadios_a-read_nssi.o: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_nssi.o `test -f 'read_nssi.c' || echo '$(srcdir)/'`read_nssi.c
+libadios_a-adios_phdf5.obj: write/adios_phdf5.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_phdf5.obj `if test -f 'write/adios_phdf5.c'; then $(CYGPATH_W) 'write/adios_phdf5.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_phdf5.c'; fi`
 
-libadios_a-read_nssi.obj: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_nssi.obj `if test -f 'read_nssi.c'; then $(CYGPATH_W) 'read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read_nssi.c'; fi`
+libadios_a-adios_nc4.o: write/adios_nc4.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nc4.o `test -f 'write/adios_nc4.c' || echo '$(srcdir)/'`write/adios_nc4.c
 
-libadios_a-adios_mpi_stagger.o: adios_mpi_stagger.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_stagger.o `test -f 'adios_mpi_stagger.c' || echo '$(srcdir)/'`adios_mpi_stagger.c
+libadios_a-adios_nc4.obj: write/adios_nc4.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nc4.obj `if test -f 'write/adios_nc4.c'; then $(CYGPATH_W) 'write/adios_nc4.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_nc4.c'; fi`
 
-libadios_a-adios_mpi_stagger.obj: adios_mpi_stagger.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_stagger.obj `if test -f 'adios_mpi_stagger.c'; then $(CYGPATH_W) 'adios_mpi_stagger.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_stagger.c'; fi`
+libadios_a-adios_nssi_config.o: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_config.o `test -f 'nssi/adios_nssi_config.c' || echo '$(srcdir)/'`nssi/adios_nssi_config.c
 
-libadios_a-adios_mpi_aggregate.o: adios_mpi_aggregate.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_aggregate.o `test -f 'adios_mpi_aggregate.c' || echo '$(srcdir)/'`adios_mpi_aggregate.c
+libadios_a-adios_nssi_config.obj: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_config.obj `if test -f 'nssi/adios_nssi_config.c'; then $(CYGPATH_W) 'nssi/adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_config.c'; fi`
 
-libadios_a-adios_mpi_aggregate.obj: adios_mpi_aggregate.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_aggregate.obj `if test -f 'adios_mpi_aggregate.c'; then $(CYGPATH_W) 'adios_mpi_aggregate.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_aggregate.c'; fi`
+libadios_a-adios_nssi.o: write/adios_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi.o `test -f 'write/adios_nssi.c' || echo '$(srcdir)/'`write/adios_nssi.c
 
-libadios_a-adios_provenance.o: adios_provenance.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_provenance.o `test -f 'adios_provenance.c' || echo '$(srcdir)/'`adios_provenance.c
+libadios_a-adios_nssi.obj: write/adios_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi.obj `if test -f 'write/adios_nssi.c'; then $(CYGPATH_W) 'write/adios_nssi.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_nssi.c'; fi`
 
-libadios_a-adios_provenance.obj: adios_provenance.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_provenance.obj `if test -f 'adios_provenance.c'; then $(CYGPATH_W) 'adios_provenance.c'; else $(CYGPATH_W) '$(srcdir)/adios_provenance.c'; fi`
+libadios_a-adios_nssi_filter.o: nssi/adios_nssi_filter.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_filter.o `test -f 'nssi/adios_nssi_filter.c' || echo '$(srcdir)/'`nssi/adios_nssi_filter.c
 
-libadios_a-adios_mpi_cio.o: adios_mpi_cio.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_cio.o `test -f 'adios_mpi_cio.c' || echo '$(srcdir)/'`adios_mpi_cio.c
+libadios_a-adios_nssi_filter.obj: nssi/adios_nssi_filter.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_filter.obj `if test -f 'nssi/adios_nssi_filter.c'; then $(CYGPATH_W) 'nssi/adios_nssi_filter.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_filter.c'; fi`
 
-libadios_a-adios_mpi_cio.obj: adios_mpi_cio.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_cio.obj `if test -f 'adios_mpi_cio.c'; then $(CYGPATH_W) 'adios_mpi_cio.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_cio.c'; fi`
+libadios_a-read_nssi.o: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_nssi.o `test -f 'read/read_nssi.c' || echo '$(srcdir)/'`read/read_nssi.c
 
-libadios_a-adios_mpi_stripe.o: adios_mpi_stripe.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_stripe.o `test -f 'adios_mpi_stripe.c' || echo '$(srcdir)/'`adios_mpi_stripe.c
+libadios_a-read_nssi.obj: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-read_nssi.obj `if test -f 'read/read_nssi.c'; then $(CYGPATH_W) 'read/read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read/read_nssi.c'; fi`
 
-libadios_a-adios_mpi_stripe.obj: adios_mpi_stripe.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_stripe.obj `if test -f 'adios_mpi_stripe.c'; then $(CYGPATH_W) 'adios_mpi_stripe.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_stripe.c'; fi`
+libadios_a-adios_mpi_stagger.o: write/adios_mpi_stagger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_stagger.o `test -f 'write/adios_mpi_stagger.c' || echo '$(srcdir)/'`write/adios_mpi_stagger.c
 
-libadios_a-adios_mpi_amr1.o: adios_mpi_amr1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_amr1.o `test -f 'adios_mpi_amr1.c' || echo '$(srcdir)/'`adios_mpi_amr1.c
+libadios_a-adios_mpi_stagger.obj: write/adios_mpi_stagger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_stagger.obj `if test -f 'write/adios_mpi_stagger.c'; then $(CYGPATH_W) 'write/adios_mpi_stagger.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_stagger.c'; fi`
 
-libadios_a-adios_mpi_amr1.obj: adios_mpi_amr1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_amr1.obj `if test -f 'adios_mpi_amr1.c'; then $(CYGPATH_W) 'adios_mpi_amr1.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_amr1.c'; fi`
+libadios_a-adios_mpi_aggregate.o: write/adios_mpi_aggregate.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_aggregate.o `test -f 'write/adios_mpi_aggregate.c' || echo '$(srcdir)/'`write/adios_mpi_aggregate.c
 
-libadios_a-adios_adaptive.o: adios_adaptive.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_adaptive.o `test -f 'adios_adaptive.c' || echo '$(srcdir)/'`adios_adaptive.c
+libadios_a-adios_mpi_aggregate.obj: write/adios_mpi_aggregate.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_aggregate.obj `if test -f 'write/adios_mpi_aggregate.c'; then $(CYGPATH_W) 'write/adios_mpi_aggregate.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_aggregate.c'; fi`
 
-libadios_a-adios_adaptive.obj: adios_adaptive.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_adaptive.obj `if test -f 'adios_adaptive.c'; then $(CYGPATH_W) 'adios_adaptive.c'; else $(CYGPATH_W) '$(srcdir)/adios_adaptive.c'; fi`
+libadios_a-adios_provenance.o: write/adios_provenance.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_provenance.o `test -f 'write/adios_provenance.c' || echo '$(srcdir)/'`write/adios_provenance.c
+
+libadios_a-adios_provenance.obj: write/adios_provenance.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_provenance.obj `if test -f 'write/adios_provenance.c'; then $(CYGPATH_W) 'write/adios_provenance.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_provenance.c'; fi`
+
+libadios_a-adios_mpi_cio.o: write/adios_mpi_cio.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_cio.o `test -f 'write/adios_mpi_cio.c' || echo '$(srcdir)/'`write/adios_mpi_cio.c
+
+libadios_a-adios_mpi_cio.obj: write/adios_mpi_cio.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_cio.obj `if test -f 'write/adios_mpi_cio.c'; then $(CYGPATH_W) 'write/adios_mpi_cio.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_cio.c'; fi`
+
+libadios_a-adios_mpi_stripe.o: write/adios_mpi_stripe.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_stripe.o `test -f 'write/adios_mpi_stripe.c' || echo '$(srcdir)/'`write/adios_mpi_stripe.c
+
+libadios_a-adios_mpi_stripe.obj: write/adios_mpi_stripe.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_stripe.obj `if test -f 'write/adios_mpi_stripe.c'; then $(CYGPATH_W) 'write/adios_mpi_stripe.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_stripe.c'; fi`
+
+libadios_a-adios_mpi_amr1.o: write/adios_mpi_amr1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_amr1.o `test -f 'write/adios_mpi_amr1.c' || echo '$(srcdir)/'`write/adios_mpi_amr1.c
+
+libadios_a-adios_mpi_amr1.obj: write/adios_mpi_amr1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_mpi_amr1.obj `if test -f 'write/adios_mpi_amr1.c'; then $(CYGPATH_W) 'write/adios_mpi_amr1.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_amr1.c'; fi`
+
+libadios_a-adios_adaptive.o: write/adios_adaptive.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_adaptive.o `test -f 'write/adios_adaptive.c' || echo '$(srcdir)/'`write/adios_adaptive.c
+
+libadios_a-adios_adaptive.obj: write/adios_adaptive.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_adaptive.obj `if test -f 'write/adios_adaptive.c'; then $(CYGPATH_W) 'write/adios_adaptive.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_adaptive.c'; fi`
 
 libadios_a-adios_nssi_args.o: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_args.o `test -f 'adios_nssi_args.c' || echo '$(srcdir)/'`adios_nssi_args.c
@@ -1367,473 +1724,551 @@ libadios_a-adios_nssi_args.o: adios_nssi_args.c
 libadios_a-adios_nssi_args.obj: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_a_CPPFLAGS) $(CPPFLAGS) $(libadios_a_CFLAGS) $(CFLAGS) -c -o libadios_a-adios_nssi_args.obj `if test -f 'adios_nssi_args.c'; then $(CYGPATH_W) 'adios_nssi_args.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_args.c'; fi`
 
-libadios_internal_nompi_a-mpidummy.o: mpidummy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-mpidummy.o `test -f 'mpidummy.c' || echo '$(srcdir)/'`mpidummy.c
+libadios_internal_nompi_a-mpidummy.o: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-mpidummy.o `test -f 'core/mpidummy.c' || echo '$(srcdir)/'`core/mpidummy.c
+
+libadios_internal_nompi_a-mpidummy.obj: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-mpidummy.obj `if test -f 'core/mpidummy.c'; then $(CYGPATH_W) 'core/mpidummy.c'; else $(CYGPATH_W) '$(srcdir)/core/mpidummy.c'; fi`
+
+libadios_internal_nompi_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
+
+libadios_internal_nompi_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
+
+libadios_internal_nompi_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
+
+libadios_internal_nompi_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
+
+libadios_internal_nompi_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
+
+libadios_internal_nompi_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
+
+libadios_internal_nompi_a-adios_internals.o: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_internals.o `test -f 'core/adios_internals.c' || echo '$(srcdir)/'`core/adios_internals.c
+
+libadios_internal_nompi_a-adios_internals.obj: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_internals.obj `if test -f 'core/adios_internals.c'; then $(CYGPATH_W) 'core/adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals.c'; fi`
+
+libadios_internal_nompi_a-buffer.o: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-buffer.o `test -f 'core/buffer.c' || echo '$(srcdir)/'`core/buffer.c
+
+libadios_internal_nompi_a-buffer.obj: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-buffer.obj `if test -f 'core/buffer.c'; then $(CYGPATH_W) 'core/buffer.c'; else $(CYGPATH_W) '$(srcdir)/core/buffer.c'; fi`
+
+libadios_internal_nompi_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
+
+libadios_internal_nompi_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
 
-libadios_internal_nompi_a-mpidummy.obj: mpidummy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-mpidummy.obj `if test -f 'mpidummy.c'; then $(CYGPATH_W) 'mpidummy.c'; else $(CYGPATH_W) '$(srcdir)/mpidummy.c'; fi`
+libadios_internal_nompi_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
 
-libadios_internal_nompi_a-adios_bp_v1.o: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_bp_v1.o `test -f 'adios_bp_v1.c' || echo '$(srcdir)/'`adios_bp_v1.c
+libadios_internal_nompi_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
 
-libadios_internal_nompi_a-adios_bp_v1.obj: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_bp_v1.obj `if test -f 'adios_bp_v1.c'; then $(CYGPATH_W) 'adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/adios_bp_v1.c'; fi`
+libadios_internal_nompi_a-adios_internals_mxml.o: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_internals_mxml.o `test -f 'core/adios_internals_mxml.c' || echo '$(srcdir)/'`core/adios_internals_mxml.c
 
-libadios_internal_nompi_a-adios_endianness.o: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_endianness.o `test -f 'adios_endianness.c' || echo '$(srcdir)/'`adios_endianness.c
+libadios_internal_nompi_a-adios_internals_mxml.obj: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_internals_mxml.obj `if test -f 'core/adios_internals_mxml.c'; then $(CYGPATH_W) 'core/adios_internals_mxml.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals_mxml.c'; fi`
 
-libadios_internal_nompi_a-adios_endianness.obj: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_endianness.obj `if test -f 'adios_endianness.c'; then $(CYGPATH_W) 'adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/adios_endianness.c'; fi`
+libadios_internal_nompi_a-adios_timing.o: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_timing.o `test -f 'core/adios_timing.c' || echo '$(srcdir)/'`core/adios_timing.c
 
-libadios_internal_nompi_a-bp_utils.o: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-bp_utils.o `test -f 'bp_utils.c' || echo '$(srcdir)/'`bp_utils.c
+libadios_internal_nompi_a-adios_timing.obj: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_timing.obj `if test -f 'core/adios_timing.c'; then $(CYGPATH_W) 'core/adios_timing.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_timing.c'; fi`
 
-libadios_internal_nompi_a-bp_utils.obj: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-bp_utils.obj `if test -f 'bp_utils.c'; then $(CYGPATH_W) 'bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/bp_utils.c'; fi`
+libadios_internal_nompi_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
 
-libadios_internal_nompi_a-adios_internals.o: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_internals.o `test -f 'adios_internals.c' || echo '$(srcdir)/'`adios_internals.c
+libadios_internal_nompi_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
 
-libadios_internal_nompi_a-adios_internals.obj: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_internals.obj `if test -f 'adios_internals.c'; then $(CYGPATH_W) 'adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/adios_internals.c'; fi`
+libadios_internal_nompi_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
 
-libadios_internal_nompi_a-buffer.o: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-buffer.o `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c
+libadios_internal_nompi_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
 
-libadios_internal_nompi_a-buffer.obj: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-buffer.obj `if test -f 'buffer.c'; then $(CYGPATH_W) 'buffer.c'; else $(CYGPATH_W) '$(srcdir)/buffer.c'; fi`
+libadios_internal_nompi_a-adios_transport_hooks.o: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_transport_hooks.o `test -f 'core/adios_transport_hooks.c' || echo '$(srcdir)/'`core/adios_transport_hooks.c
 
-libadios_internal_nompi_a-adios_transport_hooks.o: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_transport_hooks.o `test -f 'adios_transport_hooks.c' || echo '$(srcdir)/'`adios_transport_hooks.c
+libadios_internal_nompi_a-adios_transport_hooks.obj: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_transport_hooks.obj `if test -f 'core/adios_transport_hooks.c'; then $(CYGPATH_W) 'core/adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_transport_hooks.c'; fi`
 
-libadios_internal_nompi_a-adios_transport_hooks.obj: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_transport_hooks.obj `if test -f 'adios_transport_hooks.c'; then $(CYGPATH_W) 'adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_transport_hooks.c'; fi`
+libadios_nompi_a-adios.o: core/adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios.o `test -f 'core/adios.c' || echo '$(srcdir)/'`core/adios.c
 
-libadios_internal_nompi_a-adios_error.o: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_error.o `test -f 'adios_error.c' || echo '$(srcdir)/'`adios_error.c
+libadios_nompi_a-adios.obj: core/adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios.obj `if test -f 'core/adios.c'; then $(CYGPATH_W) 'core/adios.c'; else $(CYGPATH_W) '$(srcdir)/core/adios.c'; fi`
 
-libadios_internal_nompi_a-adios_error.obj: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_error.obj `if test -f 'adios_error.c'; then $(CYGPATH_W) 'adios_error.c'; else $(CYGPATH_W) '$(srcdir)/adios_error.c'; fi`
+libadios_nompi_a-common_adios.o: core/common_adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-common_adios.o `test -f 'core/common_adios.c' || echo '$(srcdir)/'`core/common_adios.c
 
-libadios_internal_nompi_a-adios_internals_mxml.o: adios_internals_mxml.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_internals_mxml.o `test -f 'adios_internals_mxml.c' || echo '$(srcdir)/'`adios_internals_mxml.c
+libadios_nompi_a-common_adios.obj: core/common_adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-common_adios.obj `if test -f 'core/common_adios.c'; then $(CYGPATH_W) 'core/common_adios.c'; else $(CYGPATH_W) '$(srcdir)/core/common_adios.c'; fi`
 
-libadios_internal_nompi_a-adios_internals_mxml.obj: adios_internals_mxml.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_internal_nompi_a_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libadios_internal_nompi_a-adios_internals_mxml.obj `if test -f 'adios_internals_mxml.c'; then $(CYGPATH_W) 'adios_internals_mxml.c'; else $(CYGPATH_W) '$(srcdir)/adios_internals_mxml.c'; fi`
+libadios_nompi_a-adios_internals.o: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_internals.o `test -f 'core/adios_internals.c' || echo '$(srcdir)/'`core/adios_internals.c
 
-libadios_nompi_a-adios.o: adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios.o `test -f 'adios.c' || echo '$(srcdir)/'`adios.c
+libadios_nompi_a-adios_internals.obj: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_internals.obj `if test -f 'core/adios_internals.c'; then $(CYGPATH_W) 'core/adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals.c'; fi`
 
-libadios_nompi_a-adios.obj: adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios.obj `if test -f 'adios.c'; then $(CYGPATH_W) 'adios.c'; else $(CYGPATH_W) '$(srcdir)/adios.c'; fi`
+libadios_nompi_a-adios_internals_mxml.o: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_internals_mxml.o `test -f 'core/adios_internals_mxml.c' || echo '$(srcdir)/'`core/adios_internals_mxml.c
 
-libadios_nompi_a-common_adios.o: common_adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-common_adios.o `test -f 'common_adios.c' || echo '$(srcdir)/'`common_adios.c
+libadios_nompi_a-adios_internals_mxml.obj: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_internals_mxml.obj `if test -f 'core/adios_internals_mxml.c'; then $(CYGPATH_W) 'core/adios_internals_mxml.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals_mxml.c'; fi`
 
-libadios_nompi_a-common_adios.obj: common_adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-common_adios.obj `if test -f 'common_adios.c'; then $(CYGPATH_W) 'common_adios.c'; else $(CYGPATH_W) '$(srcdir)/common_adios.c'; fi`
+libadios_nompi_a-buffer.o: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-buffer.o `test -f 'core/buffer.c' || echo '$(srcdir)/'`core/buffer.c
 
-libadios_nompi_a-adios_transport_hooks.o: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_transport_hooks.o `test -f 'adios_transport_hooks.c' || echo '$(srcdir)/'`adios_transport_hooks.c
+libadios_nompi_a-buffer.obj: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-buffer.obj `if test -f 'core/buffer.c'; then $(CYGPATH_W) 'core/buffer.c'; else $(CYGPATH_W) '$(srcdir)/core/buffer.c'; fi`
 
-libadios_nompi_a-adios_transport_hooks.obj: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_transport_hooks.obj `if test -f 'adios_transport_hooks.c'; then $(CYGPATH_W) 'adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_transport_hooks.c'; fi`
+libadios_nompi_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
 
-libadios_nompi_a-adios_posix.o: adios_posix.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_posix.o `test -f 'adios_posix.c' || echo '$(srcdir)/'`adios_posix.c
+libadios_nompi_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
 
-libadios_nompi_a-adios_posix.obj: adios_posix.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_posix.obj `if test -f 'adios_posix.c'; then $(CYGPATH_W) 'adios_posix.c'; else $(CYGPATH_W) '$(srcdir)/adios_posix.c'; fi`
+libadios_nompi_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
 
-libadios_nompi_a-adios_posix1.o: adios_posix1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_posix1.o `test -f 'adios_posix1.c' || echo '$(srcdir)/'`adios_posix1.c
+libadios_nompi_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
 
-libadios_nompi_a-adios_posix1.obj: adios_posix1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_posix1.obj `if test -f 'adios_posix1.c'; then $(CYGPATH_W) 'adios_posix1.c'; else $(CYGPATH_W) '$(srcdir)/adios_posix1.c'; fi`
+libadios_nompi_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
 
-libadios_nompi_a-adios_internals.o: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_internals.o `test -f 'adios_internals.c' || echo '$(srcdir)/'`adios_internals.c
+libadios_nompi_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
 
-libadios_nompi_a-adios_internals.obj: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_internals.obj `if test -f 'adios_internals.c'; then $(CYGPATH_W) 'adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/adios_internals.c'; fi`
+libadios_nompi_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
 
-libadios_nompi_a-adios_internals_mxml.o: adios_internals_mxml.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_internals_mxml.o `test -f 'adios_internals_mxml.c' || echo '$(srcdir)/'`adios_internals_mxml.c
+libadios_nompi_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
 
-libadios_nompi_a-adios_internals_mxml.obj: adios_internals_mxml.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_internals_mxml.obj `if test -f 'adios_internals_mxml.c'; then $(CYGPATH_W) 'adios_internals_mxml.c'; else $(CYGPATH_W) '$(srcdir)/adios_internals_mxml.c'; fi`
+libadios_nompi_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
 
-libadios_nompi_a-buffer.o: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-buffer.o `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c
+libadios_nompi_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
 
-libadios_nompi_a-buffer.obj: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-buffer.obj `if test -f 'buffer.c'; then $(CYGPATH_W) 'buffer.c'; else $(CYGPATH_W) '$(srcdir)/buffer.c'; fi`
+libadios_nompi_a-adios_read.o: core/adios_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read.o `test -f 'core/adios_read.c' || echo '$(srcdir)/'`core/adios_read.c
 
-libadios_nompi_a-adios_socket.o: adios_socket.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_socket.o `test -f 'adios_socket.c' || echo '$(srcdir)/'`adios_socket.c
+libadios_nompi_a-adios_read.obj: core/adios_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read.obj `if test -f 'core/adios_read.c'; then $(CYGPATH_W) 'core/adios_read.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read.c'; fi`
 
-libadios_nompi_a-adios_socket.obj: adios_socket.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_socket.obj `if test -f 'adios_socket.c'; then $(CYGPATH_W) 'adios_socket.c'; else $(CYGPATH_W) '$(srcdir)/adios_socket.c'; fi`
+libadios_nompi_a-adios_read_v1.o: core/adios_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read_v1.o `test -f 'core/adios_read_v1.c' || echo '$(srcdir)/'`core/adios_read_v1.c
 
-libadios_nompi_a-adios_bp_v1.o: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_bp_v1.o `test -f 'adios_bp_v1.c' || echo '$(srcdir)/'`adios_bp_v1.c
+libadios_nompi_a-adios_read_v1.obj: core/adios_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read_v1.obj `if test -f 'core/adios_read_v1.c'; then $(CYGPATH_W) 'core/adios_read_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_v1.c'; fi`
 
-libadios_nompi_a-adios_bp_v1.obj: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_bp_v1.obj `if test -f 'adios_bp_v1.c'; then $(CYGPATH_W) 'adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/adios_bp_v1.c'; fi`
+libadios_nompi_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
 
-libadios_nompi_a-adios_endianness.o: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_endianness.o `test -f 'adios_endianness.c' || echo '$(srcdir)/'`adios_endianness.c
+libadios_nompi_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
 
-libadios_nompi_a-adios_endianness.obj: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_endianness.obj `if test -f 'adios_endianness.c'; then $(CYGPATH_W) 'adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/adios_endianness.c'; fi`
+libadios_nompi_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
 
-libadios_nompi_a-bp_utils.o: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-bp_utils.o `test -f 'bp_utils.c' || echo '$(srcdir)/'`bp_utils.c
+libadios_nompi_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
 
-libadios_nompi_a-bp_utils.obj: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-bp_utils.obj `if test -f 'bp_utils.c'; then $(CYGPATH_W) 'bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/bp_utils.c'; fi`
+libadios_nompi_a-mpidummy.o: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-mpidummy.o `test -f 'core/mpidummy.c' || echo '$(srcdir)/'`core/mpidummy.c
 
-libadios_nompi_a-futils.o: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-futils.o `test -f 'futils.c' || echo '$(srcdir)/'`futils.c
+libadios_nompi_a-mpidummy.obj: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-mpidummy.obj `if test -f 'core/mpidummy.c'; then $(CYGPATH_W) 'core/mpidummy.c'; else $(CYGPATH_W) '$(srcdir)/core/mpidummy.c'; fi`
 
-libadios_nompi_a-futils.obj: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-futils.obj `if test -f 'futils.c'; then $(CYGPATH_W) 'futils.c'; else $(CYGPATH_W) '$(srcdir)/futils.c'; fi`
+libadios_nompi_a-adios_timing.o: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_timing.o `test -f 'core/adios_timing.c' || echo '$(srcdir)/'`core/adios_timing.c
 
-libadios_nompi_a-adios_error.o: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_error.o `test -f 'adios_error.c' || echo '$(srcdir)/'`adios_error.c
+libadios_nompi_a-adios_timing.obj: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_timing.obj `if test -f 'core/adios_timing.c'; then $(CYGPATH_W) 'core/adios_timing.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_timing.c'; fi`
 
-libadios_nompi_a-adios_error.obj: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_error.obj `if test -f 'adios_error.c'; then $(CYGPATH_W) 'adios_error.c'; else $(CYGPATH_W) '$(srcdir)/adios_error.c'; fi`
+libadios_nompi_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
 
-libadios_nompi_a-adios_read.o: adios_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read.o `test -f 'adios_read.c' || echo '$(srcdir)/'`adios_read.c
+libadios_nompi_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
 
-libadios_nompi_a-adios_read.obj: adios_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read.obj `if test -f 'adios_read.c'; then $(CYGPATH_W) 'adios_read.c'; else $(CYGPATH_W) '$(srcdir)/adios_read.c'; fi`
+libadios_nompi_a-adios_transport_hooks.o: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_transport_hooks.o `test -f 'core/adios_transport_hooks.c' || echo '$(srcdir)/'`core/adios_transport_hooks.c
 
-libadios_nompi_a-adios_read_hooks.o: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read_hooks.o `test -f 'adios_read_hooks.c' || echo '$(srcdir)/'`adios_read_hooks.c
+libadios_nompi_a-adios_transport_hooks.obj: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_transport_hooks.obj `if test -f 'core/adios_transport_hooks.c'; then $(CYGPATH_W) 'core/adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_transport_hooks.c'; fi`
 
-libadios_nompi_a-adios_read_hooks.obj: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_read_hooks.obj `if test -f 'adios_read_hooks.c'; then $(CYGPATH_W) 'adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_hooks.c'; fi`
+libadios_nompi_a-adios_socket.o: core/adios_socket.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_socket.o `test -f 'core/adios_socket.c' || echo '$(srcdir)/'`core/adios_socket.c
 
-libadios_nompi_a-common_read.o: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-common_read.o `test -f 'common_read.c' || echo '$(srcdir)/'`common_read.c
+libadios_nompi_a-adios_socket.obj: core/adios_socket.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_socket.obj `if test -f 'core/adios_socket.c'; then $(CYGPATH_W) 'core/adios_socket.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_socket.c'; fi`
 
-libadios_nompi_a-common_read.obj: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-common_read.obj `if test -f 'common_read.c'; then $(CYGPATH_W) 'common_read.c'; else $(CYGPATH_W) '$(srcdir)/common_read.c'; fi`
+libadios_nompi_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
 
-libadios_nompi_a-read_bp.o: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp.o `test -f 'read_bp.c' || echo '$(srcdir)/'`read_bp.c
+libadios_nompi_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
 
-libadios_nompi_a-read_bp.obj: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp.obj `if test -f 'read_bp.c'; then $(CYGPATH_W) 'read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read_bp.c'; fi`
+libadios_nompi_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
 
-libadios_nompi_a-read_bp_staged.o: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp_staged.o `test -f 'read_bp_staged.c' || echo '$(srcdir)/'`read_bp_staged.c
+libadios_nompi_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
 
-libadios_nompi_a-read_bp_staged.obj: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp_staged.obj `if test -f 'read_bp_staged.c'; then $(CYGPATH_W) 'read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read_bp_staged.c'; fi`
+libadios_nompi_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
 
-libadios_nompi_a-globals.o: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-globals.o `test -f 'globals.c' || echo '$(srcdir)/'`globals.c
+libadios_nompi_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
 
-libadios_nompi_a-globals.obj: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-globals.obj `if test -f 'globals.c'; then $(CYGPATH_W) 'globals.c'; else $(CYGPATH_W) '$(srcdir)/globals.c'; fi`
+libadios_nompi_a-read_bp_staged.o: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp_staged.o `test -f 'read/read_bp_staged.c' || echo '$(srcdir)/'`read/read_bp_staged.c
 
-libadios_nompi_a-mpidummy.o: mpidummy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-mpidummy.o `test -f 'mpidummy.c' || echo '$(srcdir)/'`mpidummy.c
+libadios_nompi_a-read_bp_staged.obj: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp_staged.obj `if test -f 'read/read_bp_staged.c'; then $(CYGPATH_W) 'read/read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged.c'; fi`
 
-libadios_nompi_a-mpidummy.obj: mpidummy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-mpidummy.obj `if test -f 'mpidummy.c'; then $(CYGPATH_W) 'mpidummy.c'; else $(CYGPATH_W) '$(srcdir)/mpidummy.c'; fi`
+libadios_nompi_a-read_bp_staged1.o: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp_staged1.o `test -f 'read/read_bp_staged1.c' || echo '$(srcdir)/'`read/read_bp_staged1.c
 
-libadios_nompi_a-adios_dart.o: adios_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_dart.o `test -f 'adios_dart.c' || echo '$(srcdir)/'`adios_dart.c
+libadios_nompi_a-read_bp_staged1.obj: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_bp_staged1.obj `if test -f 'read/read_bp_staged1.c'; then $(CYGPATH_W) 'read/read_bp_staged1.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged1.c'; fi`
 
-libadios_nompi_a-adios_dart.obj: adios_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_dart.obj `if test -f 'adios_dart.c'; then $(CYGPATH_W) 'adios_dart.c'; else $(CYGPATH_W) '$(srcdir)/adios_dart.c'; fi`
+libadios_nompi_a-adios_posix.o: write/adios_posix.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_posix.o `test -f 'write/adios_posix.c' || echo '$(srcdir)/'`write/adios_posix.c
 
-libadios_nompi_a-read_dart.o: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_dart.o `test -f 'read_dart.c' || echo '$(srcdir)/'`read_dart.c
+libadios_nompi_a-adios_posix.obj: write/adios_posix.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_posix.obj `if test -f 'write/adios_posix.c'; then $(CYGPATH_W) 'write/adios_posix.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_posix.c'; fi`
 
-libadios_nompi_a-read_dart.obj: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_dart.obj `if test -f 'read_dart.c'; then $(CYGPATH_W) 'read_dart.c'; else $(CYGPATH_W) '$(srcdir)/read_dart.c'; fi`
+libadios_nompi_a-adios_posix1.o: write/adios_posix1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_posix1.o `test -f 'write/adios_posix1.c' || echo '$(srcdir)/'`write/adios_posix1.c
 
-libadios_nompi_a-adios_dimes.o: adios_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_dimes.o `test -f 'adios_dimes.c' || echo '$(srcdir)/'`adios_dimes.c
+libadios_nompi_a-adios_posix1.obj: write/adios_posix1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_posix1.obj `if test -f 'write/adios_posix1.c'; then $(CYGPATH_W) 'write/adios_posix1.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_posix1.c'; fi`
 
-libadios_nompi_a-adios_dimes.obj: adios_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_dimes.obj `if test -f 'adios_dimes.c'; then $(CYGPATH_W) 'adios_dimes.c'; else $(CYGPATH_W) '$(srcdir)/adios_dimes.c'; fi`
+libadios_nompi_a-adios_dataspaces.o: write/adios_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_dataspaces.o `test -f 'write/adios_dataspaces.c' || echo '$(srcdir)/'`write/adios_dataspaces.c
 
-libadios_nompi_a-read_dimes.o: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_dimes.o `test -f 'read_dimes.c' || echo '$(srcdir)/'`read_dimes.c
+libadios_nompi_a-adios_dataspaces.obj: write/adios_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_dataspaces.obj `if test -f 'write/adios_dataspaces.c'; then $(CYGPATH_W) 'write/adios_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_dataspaces.c'; fi`
 
-libadios_nompi_a-read_dimes.obj: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_dimes.obj `if test -f 'read_dimes.c'; then $(CYGPATH_W) 'read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read_dimes.c'; fi`
+libadios_nompi_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
 
-libadios_nompi_a-adios_datatap.o: adios_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_datatap.o `test -f 'adios_datatap.c' || echo '$(srcdir)/'`adios_datatap.c
+libadios_nompi_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
 
-libadios_nompi_a-adios_datatap.obj: adios_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_datatap.obj `if test -f 'adios_datatap.c'; then $(CYGPATH_W) 'adios_datatap.c'; else $(CYGPATH_W) '$(srcdir)/adios_datatap.c'; fi`
+libadios_nompi_a-adios_dimes.o: write/adios_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_dimes.o `test -f 'write/adios_dimes.c' || echo '$(srcdir)/'`write/adios_dimes.c
 
-libadios_nompi_a-read_datatap.o: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_datatap.o `test -f 'read_datatap.c' || echo '$(srcdir)/'`read_datatap.c
+libadios_nompi_a-adios_dimes.obj: write/adios_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_dimes.obj `if test -f 'write/adios_dimes.c'; then $(CYGPATH_W) 'write/adios_dimes.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_dimes.c'; fi`
 
-libadios_nompi_a-read_datatap.obj: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_datatap.obj `if test -f 'read_datatap.c'; then $(CYGPATH_W) 'read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read_datatap.c'; fi`
+libadios_nompi_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
 
-libadiosf_a-adiosf.o: adiosf.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adiosf.o `test -f 'adiosf.c' || echo '$(srcdir)/'`adiosf.c
+libadios_nompi_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
 
-libadiosf_a-adiosf.obj: adiosf.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adiosf.obj `if test -f 'adiosf.c'; then $(CYGPATH_W) 'adiosf.c'; else $(CYGPATH_W) '$(srcdir)/adiosf.c'; fi`
+libadios_nompi_a-adios_datatap.o: write/adios_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_datatap.o `test -f 'write/adios_datatap.c' || echo '$(srcdir)/'`write/adios_datatap.c
 
-libadiosf_a-common_adios.o: common_adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-common_adios.o `test -f 'common_adios.c' || echo '$(srcdir)/'`common_adios.c
+libadios_nompi_a-adios_datatap.obj: write/adios_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-adios_datatap.obj `if test -f 'write/adios_datatap.c'; then $(CYGPATH_W) 'write/adios_datatap.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_datatap.c'; fi`
 
-libadiosf_a-common_adios.obj: common_adios.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-common_adios.obj `if test -f 'common_adios.c'; then $(CYGPATH_W) 'common_adios.c'; else $(CYGPATH_W) '$(srcdir)/common_adios.c'; fi`
+libadios_nompi_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
 
-libadiosf_a-adios_transport_hooks.o: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_transport_hooks.o `test -f 'adios_transport_hooks.c' || echo '$(srcdir)/'`adios_transport_hooks.c
+libadios_nompi_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadios_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadios_nompi_a_CFLAGS) $(CFLAGS) -c -o libadios_nompi_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
 
-libadiosf_a-adios_transport_hooks.obj: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_transport_hooks.obj `if test -f 'adios_transport_hooks.c'; then $(CYGPATH_W) 'adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_transport_hooks.c'; fi`
+libadiosf_a-adiosf.o: core/adiosf.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adiosf.o `test -f 'core/adiosf.c' || echo '$(srcdir)/'`core/adiosf.c
 
-libadiosf_a-adios_mpi.o: adios_mpi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi.o `test -f 'adios_mpi.c' || echo '$(srcdir)/'`adios_mpi.c
+libadiosf_a-adiosf.obj: core/adiosf.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adiosf.obj `if test -f 'core/adiosf.c'; then $(CYGPATH_W) 'core/adiosf.c'; else $(CYGPATH_W) '$(srcdir)/core/adiosf.c'; fi`
 
-libadiosf_a-adios_mpi.obj: adios_mpi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi.obj `if test -f 'adios_mpi.c'; then $(CYGPATH_W) 'adios_mpi.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi.c'; fi`
+libadiosf_a-common_adios.o: core/common_adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-common_adios.o `test -f 'core/common_adios.c' || echo '$(srcdir)/'`core/common_adios.c
 
-libadiosf_a-adios_mpi_lustre.o: adios_mpi_lustre.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_lustre.o `test -f 'adios_mpi_lustre.c' || echo '$(srcdir)/'`adios_mpi_lustre.c
+libadiosf_a-common_adios.obj: core/common_adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-common_adios.obj `if test -f 'core/common_adios.c'; then $(CYGPATH_W) 'core/common_adios.c'; else $(CYGPATH_W) '$(srcdir)/core/common_adios.c'; fi`
 
-libadiosf_a-adios_mpi_lustre.obj: adios_mpi_lustre.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_lustre.obj `if test -f 'adios_mpi_lustre.c'; then $(CYGPATH_W) 'adios_mpi_lustre.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_lustre.c'; fi`
+libadiosf_a-adios_internals.o: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_internals.o `test -f 'core/adios_internals.c' || echo '$(srcdir)/'`core/adios_internals.c
 
-libadiosf_a-adios_mpi_amr.o: adios_mpi_amr.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_amr.o `test -f 'adios_mpi_amr.c' || echo '$(srcdir)/'`adios_mpi_amr.c
+libadiosf_a-adios_internals.obj: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_internals.obj `if test -f 'core/adios_internals.c'; then $(CYGPATH_W) 'core/adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals.c'; fi`
 
-libadiosf_a-adios_mpi_amr.obj: adios_mpi_amr.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_amr.obj `if test -f 'adios_mpi_amr.c'; then $(CYGPATH_W) 'adios_mpi_amr.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_amr.c'; fi`
+libadiosf_a-adios_internals_mxml.o: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_internals_mxml.o `test -f 'core/adios_internals_mxml.c' || echo '$(srcdir)/'`core/adios_internals_mxml.c
 
-libadiosf_a-adios_posix.o: adios_posix.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_posix.o `test -f 'adios_posix.c' || echo '$(srcdir)/'`adios_posix.c
+libadiosf_a-adios_internals_mxml.obj: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_internals_mxml.obj `if test -f 'core/adios_internals_mxml.c'; then $(CYGPATH_W) 'core/adios_internals_mxml.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals_mxml.c'; fi`
 
-libadiosf_a-adios_posix.obj: adios_posix.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_posix.obj `if test -f 'adios_posix.c'; then $(CYGPATH_W) 'adios_posix.c'; else $(CYGPATH_W) '$(srcdir)/adios_posix.c'; fi`
+libadiosf_a-buffer.o: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-buffer.o `test -f 'core/buffer.c' || echo '$(srcdir)/'`core/buffer.c
 
-libadiosf_a-adios_posix1.o: adios_posix1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_posix1.o `test -f 'adios_posix1.c' || echo '$(srcdir)/'`adios_posix1.c
+libadiosf_a-buffer.obj: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-buffer.obj `if test -f 'core/buffer.c'; then $(CYGPATH_W) 'core/buffer.c'; else $(CYGPATH_W) '$(srcdir)/core/buffer.c'; fi`
 
-libadiosf_a-adios_posix1.obj: adios_posix1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_posix1.obj `if test -f 'adios_posix1.c'; then $(CYGPATH_W) 'adios_posix1.c'; else $(CYGPATH_W) '$(srcdir)/adios_posix1.c'; fi`
+libadiosf_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
 
-libadiosf_a-adios_internals.o: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_internals.o `test -f 'adios_internals.c' || echo '$(srcdir)/'`adios_internals.c
+libadiosf_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
 
-libadiosf_a-adios_internals.obj: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_internals.obj `if test -f 'adios_internals.c'; then $(CYGPATH_W) 'adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/adios_internals.c'; fi`
+libadiosf_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
 
-libadiosf_a-adios_internals_mxml.o: adios_internals_mxml.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_internals_mxml.o `test -f 'adios_internals_mxml.c' || echo '$(srcdir)/'`adios_internals_mxml.c
+libadiosf_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
 
-libadiosf_a-adios_internals_mxml.obj: adios_internals_mxml.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_internals_mxml.obj `if test -f 'adios_internals_mxml.c'; then $(CYGPATH_W) 'adios_internals_mxml.c'; else $(CYGPATH_W) '$(srcdir)/adios_internals_mxml.c'; fi`
+libadiosf_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
 
-libadiosf_a-buffer.o: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-buffer.o `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c
+libadiosf_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
 
-libadiosf_a-buffer.obj: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-buffer.obj `if test -f 'buffer.c'; then $(CYGPATH_W) 'buffer.c'; else $(CYGPATH_W) '$(srcdir)/buffer.c'; fi`
+libadiosf_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
 
-libadiosf_a-adios_socket.o: adios_socket.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_socket.o `test -f 'adios_socket.c' || echo '$(srcdir)/'`adios_socket.c
+libadiosf_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
 
-libadiosf_a-adios_socket.obj: adios_socket.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_socket.obj `if test -f 'adios_socket.c'; then $(CYGPATH_W) 'adios_socket.c'; else $(CYGPATH_W) '$(srcdir)/adios_socket.c'; fi`
+libadiosf_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
 
-libadiosf_a-adios_bp_v1.o: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_bp_v1.o `test -f 'adios_bp_v1.c' || echo '$(srcdir)/'`adios_bp_v1.c
+libadiosf_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
 
-libadiosf_a-adios_bp_v1.obj: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_bp_v1.obj `if test -f 'adios_bp_v1.c'; then $(CYGPATH_W) 'adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/adios_bp_v1.c'; fi`
+libadiosf_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
 
-libadiosf_a-adios_endianness.o: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_endianness.o `test -f 'adios_endianness.c' || echo '$(srcdir)/'`adios_endianness.c
+libadiosf_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
 
-libadiosf_a-adios_endianness.obj: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_endianness.obj `if test -f 'adios_endianness.c'; then $(CYGPATH_W) 'adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/adios_endianness.c'; fi`
+libadiosf_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
 
-libadiosf_a-futils.o: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-futils.o `test -f 'futils.c' || echo '$(srcdir)/'`futils.c
+libadiosf_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
 
-libadiosf_a-futils.obj: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-futils.obj `if test -f 'futils.c'; then $(CYGPATH_W) 'futils.c'; else $(CYGPATH_W) '$(srcdir)/futils.c'; fi`
+libadiosf_a-adios_timing.o: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_timing.o `test -f 'core/adios_timing.c' || echo '$(srcdir)/'`core/adios_timing.c
 
-libadiosf_a-adios_error.o: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_error.o `test -f 'adios_error.c' || echo '$(srcdir)/'`adios_error.c
+libadiosf_a-adios_timing.obj: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_timing.obj `if test -f 'core/adios_timing.c'; then $(CYGPATH_W) 'core/adios_timing.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_timing.c'; fi`
 
-libadiosf_a-adios_error.obj: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_error.obj `if test -f 'adios_error.c'; then $(CYGPATH_W) 'adios_error.c'; else $(CYGPATH_W) '$(srcdir)/adios_error.c'; fi`
+libadiosf_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
 
-libadiosf_a-bp_utils.o: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-bp_utils.o `test -f 'bp_utils.c' || echo '$(srcdir)/'`bp_utils.c
+libadiosf_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
 
-libadiosf_a-bp_utils.obj: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-bp_utils.obj `if test -f 'bp_utils.c'; then $(CYGPATH_W) 'bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/bp_utils.c'; fi`
+libadiosf_a-adios_transport_hooks.o: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_transport_hooks.o `test -f 'core/adios_transport_hooks.c' || echo '$(srcdir)/'`core/adios_transport_hooks.c
 
-libadiosf_a-adiosf_read.o: adiosf_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adiosf_read.o `test -f 'adiosf_read.c' || echo '$(srcdir)/'`adiosf_read.c
+libadiosf_a-adios_transport_hooks.obj: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_transport_hooks.obj `if test -f 'core/adios_transport_hooks.c'; then $(CYGPATH_W) 'core/adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_transport_hooks.c'; fi`
 
-libadiosf_a-adiosf_read.obj: adiosf_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adiosf_read.obj `if test -f 'adiosf_read.c'; then $(CYGPATH_W) 'adiosf_read.c'; else $(CYGPATH_W) '$(srcdir)/adiosf_read.c'; fi`
+libadiosf_a-adios_socket.o: core/adios_socket.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_socket.o `test -f 'core/adios_socket.c' || echo '$(srcdir)/'`core/adios_socket.c
 
-libadiosf_a-adios_read_hooks.o: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_read_hooks.o `test -f 'adios_read_hooks.c' || echo '$(srcdir)/'`adios_read_hooks.c
+libadiosf_a-adios_socket.obj: core/adios_socket.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_socket.obj `if test -f 'core/adios_socket.c'; then $(CYGPATH_W) 'core/adios_socket.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_socket.c'; fi`
 
-libadiosf_a-adios_read_hooks.obj: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_read_hooks.obj `if test -f 'adios_read_hooks.c'; then $(CYGPATH_W) 'adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_hooks.c'; fi`
+libadiosf_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
 
-libadiosf_a-common_read.o: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-common_read.o `test -f 'common_read.c' || echo '$(srcdir)/'`common_read.c
+libadiosf_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
 
-libadiosf_a-common_read.obj: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-common_read.obj `if test -f 'common_read.c'; then $(CYGPATH_W) 'common_read.c'; else $(CYGPATH_W) '$(srcdir)/common_read.c'; fi`
+libadiosf_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
 
-libadiosf_a-read_bp.o: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp.o `test -f 'read_bp.c' || echo '$(srcdir)/'`read_bp.c
+libadiosf_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
 
-libadiosf_a-read_bp.obj: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp.obj `if test -f 'read_bp.c'; then $(CYGPATH_W) 'read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read_bp.c'; fi`
+libadiosf_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
 
-libadiosf_a-read_bp_staged.o: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp_staged.o `test -f 'read_bp_staged.c' || echo '$(srcdir)/'`read_bp_staged.c
+libadiosf_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
 
-libadiosf_a-read_bp_staged.obj: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp_staged.obj `if test -f 'read_bp_staged.c'; then $(CYGPATH_W) 'read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read_bp_staged.c'; fi`
+libadiosf_a-read_bp_staged.o: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp_staged.o `test -f 'read/read_bp_staged.c' || echo '$(srcdir)/'`read/read_bp_staged.c
 
-libadiosf_a-globals.o: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-globals.o `test -f 'globals.c' || echo '$(srcdir)/'`globals.c
+libadiosf_a-read_bp_staged.obj: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp_staged.obj `if test -f 'read/read_bp_staged.c'; then $(CYGPATH_W) 'read/read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged.c'; fi`
 
-libadiosf_a-globals.obj: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-globals.obj `if test -f 'globals.c'; then $(CYGPATH_W) 'globals.c'; else $(CYGPATH_W) '$(srcdir)/globals.c'; fi`
+libadiosf_a-read_bp_staged1.o: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp_staged1.o `test -f 'read/read_bp_staged1.c' || echo '$(srcdir)/'`read/read_bp_staged1.c
 
-libadiosf_a-adios_dart.o: adios_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_dart.o `test -f 'adios_dart.c' || echo '$(srcdir)/'`adios_dart.c
+libadiosf_a-read_bp_staged1.obj: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_bp_staged1.obj `if test -f 'read/read_bp_staged1.c'; then $(CYGPATH_W) 'read/read_bp_staged1.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged1.c'; fi`
 
-libadiosf_a-adios_dart.obj: adios_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_dart.obj `if test -f 'adios_dart.c'; then $(CYGPATH_W) 'adios_dart.c'; else $(CYGPATH_W) '$(srcdir)/adios_dart.c'; fi`
+libadiosf_a-adios_mpi.o: write/adios_mpi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi.o `test -f 'write/adios_mpi.c' || echo '$(srcdir)/'`write/adios_mpi.c
 
-libadiosf_a-read_dart.o: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_dart.o `test -f 'read_dart.c' || echo '$(srcdir)/'`read_dart.c
+libadiosf_a-adios_mpi.obj: write/adios_mpi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi.obj `if test -f 'write/adios_mpi.c'; then $(CYGPATH_W) 'write/adios_mpi.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi.c'; fi`
 
-libadiosf_a-read_dart.obj: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_dart.obj `if test -f 'read_dart.c'; then $(CYGPATH_W) 'read_dart.c'; else $(CYGPATH_W) '$(srcdir)/read_dart.c'; fi`
+libadiosf_a-adios_mpi_lustre.o: write/adios_mpi_lustre.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_lustre.o `test -f 'write/adios_mpi_lustre.c' || echo '$(srcdir)/'`write/adios_mpi_lustre.c
 
-libadiosf_a-adios_dimes.o: adios_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_dimes.o `test -f 'adios_dimes.c' || echo '$(srcdir)/'`adios_dimes.c
+libadiosf_a-adios_mpi_lustre.obj: write/adios_mpi_lustre.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_lustre.obj `if test -f 'write/adios_mpi_lustre.c'; then $(CYGPATH_W) 'write/adios_mpi_lustre.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_lustre.c'; fi`
 
-libadiosf_a-adios_dimes.obj: adios_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_dimes.obj `if test -f 'adios_dimes.c'; then $(CYGPATH_W) 'adios_dimes.c'; else $(CYGPATH_W) '$(srcdir)/adios_dimes.c'; fi`
+libadiosf_a-adios_mpi_amr.o: write/adios_mpi_amr.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_amr.o `test -f 'write/adios_mpi_amr.c' || echo '$(srcdir)/'`write/adios_mpi_amr.c
 
-libadiosf_a-read_dimes.o: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_dimes.o `test -f 'read_dimes.c' || echo '$(srcdir)/'`read_dimes.c
+libadiosf_a-adios_mpi_amr.obj: write/adios_mpi_amr.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_amr.obj `if test -f 'write/adios_mpi_amr.c'; then $(CYGPATH_W) 'write/adios_mpi_amr.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_amr.c'; fi`
 
-libadiosf_a-read_dimes.obj: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_dimes.obj `if test -f 'read_dimes.c'; then $(CYGPATH_W) 'read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read_dimes.c'; fi`
+libadiosf_a-adios_posix.o: write/adios_posix.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_posix.o `test -f 'write/adios_posix.c' || echo '$(srcdir)/'`write/adios_posix.c
 
-libadiosf_a-adios_datatap.o: adios_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_datatap.o `test -f 'adios_datatap.c' || echo '$(srcdir)/'`adios_datatap.c
+libadiosf_a-adios_posix.obj: write/adios_posix.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_posix.obj `if test -f 'write/adios_posix.c'; then $(CYGPATH_W) 'write/adios_posix.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_posix.c'; fi`
 
-libadiosf_a-adios_datatap.obj: adios_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_datatap.obj `if test -f 'adios_datatap.c'; then $(CYGPATH_W) 'adios_datatap.c'; else $(CYGPATH_W) '$(srcdir)/adios_datatap.c'; fi`
+libadiosf_a-adios_posix1.o: write/adios_posix1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_posix1.o `test -f 'write/adios_posix1.c' || echo '$(srcdir)/'`write/adios_posix1.c
 
-libadiosf_a-read_datatap.o: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_datatap.o `test -f 'read_datatap.c' || echo '$(srcdir)/'`read_datatap.c
+libadiosf_a-adios_posix1.obj: write/adios_posix1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_posix1.obj `if test -f 'write/adios_posix1.c'; then $(CYGPATH_W) 'write/adios_posix1.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_posix1.c'; fi`
 
-libadiosf_a-read_datatap.obj: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_datatap.obj `if test -f 'read_datatap.c'; then $(CYGPATH_W) 'read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read_datatap.c'; fi`
+libadiosf_a-adios_dataspaces.o: write/adios_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_dataspaces.o `test -f 'write/adios_dataspaces.c' || echo '$(srcdir)/'`write/adios_dataspaces.c
 
-libadiosf_a-adios_phdf5.o: adios_phdf5.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_phdf5.o `test -f 'adios_phdf5.c' || echo '$(srcdir)/'`adios_phdf5.c
+libadiosf_a-adios_dataspaces.obj: write/adios_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_dataspaces.obj `if test -f 'write/adios_dataspaces.c'; then $(CYGPATH_W) 'write/adios_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_dataspaces.c'; fi`
 
-libadiosf_a-adios_phdf5.obj: adios_phdf5.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_phdf5.obj `if test -f 'adios_phdf5.c'; then $(CYGPATH_W) 'adios_phdf5.c'; else $(CYGPATH_W) '$(srcdir)/adios_phdf5.c'; fi`
+libadiosf_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
 
-libadiosf_a-adios_nc4.o: adios_nc4.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nc4.o `test -f 'adios_nc4.c' || echo '$(srcdir)/'`adios_nc4.c
+libadiosf_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
 
-libadiosf_a-adios_nc4.obj: adios_nc4.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nc4.obj `if test -f 'adios_nc4.c'; then $(CYGPATH_W) 'adios_nc4.c'; else $(CYGPATH_W) '$(srcdir)/adios_nc4.c'; fi`
+libadiosf_a-adios_dimes.o: write/adios_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_dimes.o `test -f 'write/adios_dimes.c' || echo '$(srcdir)/'`write/adios_dimes.c
 
-libadiosf_a-adios_nssi_config.o: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_config.o `test -f 'adios_nssi_config.c' || echo '$(srcdir)/'`adios_nssi_config.c
+libadiosf_a-adios_dimes.obj: write/adios_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_dimes.obj `if test -f 'write/adios_dimes.c'; then $(CYGPATH_W) 'write/adios_dimes.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_dimes.c'; fi`
 
-libadiosf_a-adios_nssi_config.obj: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_config.obj `if test -f 'adios_nssi_config.c'; then $(CYGPATH_W) 'adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_config.c'; fi`
+libadiosf_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
 
-libadiosf_a-adios_nssi.o: adios_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi.o `test -f 'adios_nssi.c' || echo '$(srcdir)/'`adios_nssi.c
+libadiosf_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
 
-libadiosf_a-adios_nssi.obj: adios_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi.obj `if test -f 'adios_nssi.c'; then $(CYGPATH_W) 'adios_nssi.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi.c'; fi`
+libadiosf_a-adios_datatap.o: write/adios_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_datatap.o `test -f 'write/adios_datatap.c' || echo '$(srcdir)/'`write/adios_datatap.c
 
-libadiosf_a-adios_nssi_filter.o: adios_nssi_filter.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_filter.o `test -f 'adios_nssi_filter.c' || echo '$(srcdir)/'`adios_nssi_filter.c
+libadiosf_a-adios_datatap.obj: write/adios_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_datatap.obj `if test -f 'write/adios_datatap.c'; then $(CYGPATH_W) 'write/adios_datatap.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_datatap.c'; fi`
 
-libadiosf_a-adios_nssi_filter.obj: adios_nssi_filter.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_filter.obj `if test -f 'adios_nssi_filter.c'; then $(CYGPATH_W) 'adios_nssi_filter.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_filter.c'; fi`
+libadiosf_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
 
-libadiosf_a-read_nssi.o: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_nssi.o `test -f 'read_nssi.c' || echo '$(srcdir)/'`read_nssi.c
+libadiosf_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
 
-libadiosf_a-read_nssi.obj: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_nssi.obj `if test -f 'read_nssi.c'; then $(CYGPATH_W) 'read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read_nssi.c'; fi`
+libadiosf_a-adios_phdf5.o: write/adios_phdf5.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_phdf5.o `test -f 'write/adios_phdf5.c' || echo '$(srcdir)/'`write/adios_phdf5.c
 
-libadiosf_a-adios_mpi_stagger.o: adios_mpi_stagger.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_stagger.o `test -f 'adios_mpi_stagger.c' || echo '$(srcdir)/'`adios_mpi_stagger.c
+libadiosf_a-adios_phdf5.obj: write/adios_phdf5.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_phdf5.obj `if test -f 'write/adios_phdf5.c'; then $(CYGPATH_W) 'write/adios_phdf5.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_phdf5.c'; fi`
 
-libadiosf_a-adios_mpi_stagger.obj: adios_mpi_stagger.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_stagger.obj `if test -f 'adios_mpi_stagger.c'; then $(CYGPATH_W) 'adios_mpi_stagger.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_stagger.c'; fi`
+libadiosf_a-adios_nc4.o: write/adios_nc4.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nc4.o `test -f 'write/adios_nc4.c' || echo '$(srcdir)/'`write/adios_nc4.c
 
-libadiosf_a-adios_mpi_aggregate.o: adios_mpi_aggregate.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_aggregate.o `test -f 'adios_mpi_aggregate.c' || echo '$(srcdir)/'`adios_mpi_aggregate.c
+libadiosf_a-adios_nc4.obj: write/adios_nc4.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nc4.obj `if test -f 'write/adios_nc4.c'; then $(CYGPATH_W) 'write/adios_nc4.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_nc4.c'; fi`
 
-libadiosf_a-adios_mpi_aggregate.obj: adios_mpi_aggregate.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_aggregate.obj `if test -f 'adios_mpi_aggregate.c'; then $(CYGPATH_W) 'adios_mpi_aggregate.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_aggregate.c'; fi`
+libadiosf_a-adios_nssi_config.o: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_config.o `test -f 'nssi/adios_nssi_config.c' || echo '$(srcdir)/'`nssi/adios_nssi_config.c
 
-libadiosf_a-adios_provenance.o: adios_provenance.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_provenance.o `test -f 'adios_provenance.c' || echo '$(srcdir)/'`adios_provenance.c
+libadiosf_a-adios_nssi_config.obj: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_config.obj `if test -f 'nssi/adios_nssi_config.c'; then $(CYGPATH_W) 'nssi/adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_config.c'; fi`
 
-libadiosf_a-adios_provenance.obj: adios_provenance.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_provenance.obj `if test -f 'adios_provenance.c'; then $(CYGPATH_W) 'adios_provenance.c'; else $(CYGPATH_W) '$(srcdir)/adios_provenance.c'; fi`
+libadiosf_a-adios_nssi.o: write/adios_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi.o `test -f 'write/adios_nssi.c' || echo '$(srcdir)/'`write/adios_nssi.c
 
-libadiosf_a-adios_mpi_cio.o: adios_mpi_cio.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_cio.o `test -f 'adios_mpi_cio.c' || echo '$(srcdir)/'`adios_mpi_cio.c
+libadiosf_a-adios_nssi.obj: write/adios_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi.obj `if test -f 'write/adios_nssi.c'; then $(CYGPATH_W) 'write/adios_nssi.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_nssi.c'; fi`
 
-libadiosf_a-adios_mpi_cio.obj: adios_mpi_cio.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_cio.obj `if test -f 'adios_mpi_cio.c'; then $(CYGPATH_W) 'adios_mpi_cio.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_cio.c'; fi`
+libadiosf_a-adios_nssi_filter.o: nssi/adios_nssi_filter.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_filter.o `test -f 'nssi/adios_nssi_filter.c' || echo '$(srcdir)/'`nssi/adios_nssi_filter.c
 
-libadiosf_a-adios_mpi_stripe.o: adios_mpi_stripe.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_stripe.o `test -f 'adios_mpi_stripe.c' || echo '$(srcdir)/'`adios_mpi_stripe.c
+libadiosf_a-adios_nssi_filter.obj: nssi/adios_nssi_filter.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_filter.obj `if test -f 'nssi/adios_nssi_filter.c'; then $(CYGPATH_W) 'nssi/adios_nssi_filter.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_filter.c'; fi`
 
-libadiosf_a-adios_mpi_stripe.obj: adios_mpi_stripe.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_stripe.obj `if test -f 'adios_mpi_stripe.c'; then $(CYGPATH_W) 'adios_mpi_stripe.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_stripe.c'; fi`
+libadiosf_a-read_nssi.o: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_nssi.o `test -f 'read/read_nssi.c' || echo '$(srcdir)/'`read/read_nssi.c
 
-libadiosf_a-adios_mpi_amr1.o: adios_mpi_amr1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_amr1.o `test -f 'adios_mpi_amr1.c' || echo '$(srcdir)/'`adios_mpi_amr1.c
+libadiosf_a-read_nssi.obj: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-read_nssi.obj `if test -f 'read/read_nssi.c'; then $(CYGPATH_W) 'read/read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read/read_nssi.c'; fi`
 
-libadiosf_a-adios_mpi_amr1.obj: adios_mpi_amr1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_amr1.obj `if test -f 'adios_mpi_amr1.c'; then $(CYGPATH_W) 'adios_mpi_amr1.c'; else $(CYGPATH_W) '$(srcdir)/adios_mpi_amr1.c'; fi`
+libadiosf_a-adios_mpi_stagger.o: write/adios_mpi_stagger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_stagger.o `test -f 'write/adios_mpi_stagger.c' || echo '$(srcdir)/'`write/adios_mpi_stagger.c
 
-libadiosf_a-adios_adaptive.o: adios_adaptive.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_adaptive.o `test -f 'adios_adaptive.c' || echo '$(srcdir)/'`adios_adaptive.c
+libadiosf_a-adios_mpi_stagger.obj: write/adios_mpi_stagger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_stagger.obj `if test -f 'write/adios_mpi_stagger.c'; then $(CYGPATH_W) 'write/adios_mpi_stagger.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_stagger.c'; fi`
 
-libadiosf_a-adios_adaptive.obj: adios_adaptive.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_adaptive.obj `if test -f 'adios_adaptive.c'; then $(CYGPATH_W) 'adios_adaptive.c'; else $(CYGPATH_W) '$(srcdir)/adios_adaptive.c'; fi`
+libadiosf_a-adios_mpi_aggregate.o: write/adios_mpi_aggregate.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_aggregate.o `test -f 'write/adios_mpi_aggregate.c' || echo '$(srcdir)/'`write/adios_mpi_aggregate.c
+
+libadiosf_a-adios_mpi_aggregate.obj: write/adios_mpi_aggregate.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_aggregate.obj `if test -f 'write/adios_mpi_aggregate.c'; then $(CYGPATH_W) 'write/adios_mpi_aggregate.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_aggregate.c'; fi`
+
+libadiosf_a-adios_provenance.o: write/adios_provenance.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_provenance.o `test -f 'write/adios_provenance.c' || echo '$(srcdir)/'`write/adios_provenance.c
+
+libadiosf_a-adios_provenance.obj: write/adios_provenance.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_provenance.obj `if test -f 'write/adios_provenance.c'; then $(CYGPATH_W) 'write/adios_provenance.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_provenance.c'; fi`
+
+libadiosf_a-adios_mpi_cio.o: write/adios_mpi_cio.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_cio.o `test -f 'write/adios_mpi_cio.c' || echo '$(srcdir)/'`write/adios_mpi_cio.c
+
+libadiosf_a-adios_mpi_cio.obj: write/adios_mpi_cio.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_cio.obj `if test -f 'write/adios_mpi_cio.c'; then $(CYGPATH_W) 'write/adios_mpi_cio.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_cio.c'; fi`
+
+libadiosf_a-adios_mpi_stripe.o: write/adios_mpi_stripe.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_stripe.o `test -f 'write/adios_mpi_stripe.c' || echo '$(srcdir)/'`write/adios_mpi_stripe.c
+
+libadiosf_a-adios_mpi_stripe.obj: write/adios_mpi_stripe.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_stripe.obj `if test -f 'write/adios_mpi_stripe.c'; then $(CYGPATH_W) 'write/adios_mpi_stripe.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_stripe.c'; fi`
+
+libadiosf_a-adios_mpi_amr1.o: write/adios_mpi_amr1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_amr1.o `test -f 'write/adios_mpi_amr1.c' || echo '$(srcdir)/'`write/adios_mpi_amr1.c
+
+libadiosf_a-adios_mpi_amr1.obj: write/adios_mpi_amr1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_mpi_amr1.obj `if test -f 'write/adios_mpi_amr1.c'; then $(CYGPATH_W) 'write/adios_mpi_amr1.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_amr1.c'; fi`
+
+libadiosf_a-adios_adaptive.o: write/adios_adaptive.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_adaptive.o `test -f 'write/adios_adaptive.c' || echo '$(srcdir)/'`write/adios_adaptive.c
+
+libadiosf_a-adios_adaptive.obj: write/adios_adaptive.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_adaptive.obj `if test -f 'write/adios_adaptive.c'; then $(CYGPATH_W) 'write/adios_adaptive.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_adaptive.c'; fi`
+
+libadiosf_a-adiosf_read.o: core/adiosf_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adiosf_read.o `test -f 'core/adiosf_read.c' || echo '$(srcdir)/'`core/adiosf_read.c
+
+libadiosf_a-adiosf_read.obj: core/adiosf_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adiosf_read.obj `if test -f 'core/adiosf_read.c'; then $(CYGPATH_W) 'core/adiosf_read.c'; else $(CYGPATH_W) '$(srcdir)/core/adiosf_read.c'; fi`
 
 libadiosf_a-adios_nssi_args.o: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_args.o `test -f 'adios_nssi_args.c' || echo '$(srcdir)/'`adios_nssi_args.c
@@ -1841,101 +2276,401 @@ libadiosf_a-adios_nssi_args.o: adios_nssi_args.c
 libadiosf_a-adios_nssi_args.obj: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_a_CFLAGS) $(CFLAGS) -c -o libadiosf_a-adios_nssi_args.obj `if test -f 'adios_nssi_args.c'; then $(CYGPATH_W) 'adios_nssi_args.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_args.c'; fi`
 
-libadiosread_a-adios_bp_v1.o: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_bp_v1.o `test -f 'adios_bp_v1.c' || echo '$(srcdir)/'`adios_bp_v1.c
+libadiosf_v1_a-adiosf.o: core/adiosf.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adiosf.o `test -f 'core/adiosf.c' || echo '$(srcdir)/'`core/adiosf.c
+
+libadiosf_v1_a-adiosf.obj: core/adiosf.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adiosf.obj `if test -f 'core/adiosf.c'; then $(CYGPATH_W) 'core/adiosf.c'; else $(CYGPATH_W) '$(srcdir)/core/adiosf.c'; fi`
+
+libadiosf_v1_a-common_adios.o: core/common_adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-common_adios.o `test -f 'core/common_adios.c' || echo '$(srcdir)/'`core/common_adios.c
+
+libadiosf_v1_a-common_adios.obj: core/common_adios.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-common_adios.obj `if test -f 'core/common_adios.c'; then $(CYGPATH_W) 'core/common_adios.c'; else $(CYGPATH_W) '$(srcdir)/core/common_adios.c'; fi`
+
+libadiosf_v1_a-adios_internals.o: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_internals.o `test -f 'core/adios_internals.c' || echo '$(srcdir)/'`core/adios_internals.c
+
+libadiosf_v1_a-adios_internals.obj: core/adios_internals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_internals.obj `if test -f 'core/adios_internals.c'; then $(CYGPATH_W) 'core/adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals.c'; fi`
+
+libadiosf_v1_a-adios_internals_mxml.o: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_internals_mxml.o `test -f 'core/adios_internals_mxml.c' || echo '$(srcdir)/'`core/adios_internals_mxml.c
+
+libadiosf_v1_a-adios_internals_mxml.obj: core/adios_internals_mxml.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_internals_mxml.obj `if test -f 'core/adios_internals_mxml.c'; then $(CYGPATH_W) 'core/adios_internals_mxml.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_internals_mxml.c'; fi`
+
+libadiosf_v1_a-buffer.o: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-buffer.o `test -f 'core/buffer.c' || echo '$(srcdir)/'`core/buffer.c
+
+libadiosf_v1_a-buffer.obj: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-buffer.obj `if test -f 'core/buffer.c'; then $(CYGPATH_W) 'core/buffer.c'; else $(CYGPATH_W) '$(srcdir)/core/buffer.c'; fi`
+
+libadiosf_v1_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
+
+libadiosf_v1_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
+
+libadiosf_v1_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
+
+libadiosf_v1_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
+
+libadiosf_v1_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
+
+libadiosf_v1_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
+
+libadiosf_v1_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
+
+libadiosf_v1_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
+
+libadiosf_v1_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
+
+libadiosf_v1_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
+
+libadiosf_v1_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
+
+libadiosf_v1_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
+
+libadiosf_v1_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
+
+libadiosf_v1_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
+
+libadiosf_v1_a-adios_timing.o: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_timing.o `test -f 'core/adios_timing.c' || echo '$(srcdir)/'`core/adios_timing.c
+
+libadiosf_v1_a-adios_timing.obj: core/adios_timing.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_timing.obj `if test -f 'core/adios_timing.c'; then $(CYGPATH_W) 'core/adios_timing.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_timing.c'; fi`
+
+libadiosf_v1_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
+
+libadiosf_v1_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
+
+libadiosf_v1_a-adios_transport_hooks.o: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_transport_hooks.o `test -f 'core/adios_transport_hooks.c' || echo '$(srcdir)/'`core/adios_transport_hooks.c
+
+libadiosf_v1_a-adios_transport_hooks.obj: core/adios_transport_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_transport_hooks.obj `if test -f 'core/adios_transport_hooks.c'; then $(CYGPATH_W) 'core/adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_transport_hooks.c'; fi`
+
+libadiosf_v1_a-adios_socket.o: core/adios_socket.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_socket.o `test -f 'core/adios_socket.c' || echo '$(srcdir)/'`core/adios_socket.c
+
+libadiosf_v1_a-adios_socket.obj: core/adios_socket.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_socket.obj `if test -f 'core/adios_socket.c'; then $(CYGPATH_W) 'core/adios_socket.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_socket.c'; fi`
+
+libadiosf_v1_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
+
+libadiosf_v1_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
+
+libadiosf_v1_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
+
+libadiosf_v1_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
+
+libadiosf_v1_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
+
+libadiosf_v1_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
+
+libadiosf_v1_a-read_bp_staged.o: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_bp_staged.o `test -f 'read/read_bp_staged.c' || echo '$(srcdir)/'`read/read_bp_staged.c
+
+libadiosf_v1_a-read_bp_staged.obj: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_bp_staged.obj `if test -f 'read/read_bp_staged.c'; then $(CYGPATH_W) 'read/read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged.c'; fi`
+
+libadiosf_v1_a-read_bp_staged1.o: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_bp_staged1.o `test -f 'read/read_bp_staged1.c' || echo '$(srcdir)/'`read/read_bp_staged1.c
+
+libadiosf_v1_a-read_bp_staged1.obj: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_bp_staged1.obj `if test -f 'read/read_bp_staged1.c'; then $(CYGPATH_W) 'read/read_bp_staged1.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged1.c'; fi`
+
+libadiosf_v1_a-adios_mpi.o: write/adios_mpi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi.o `test -f 'write/adios_mpi.c' || echo '$(srcdir)/'`write/adios_mpi.c
+
+libadiosf_v1_a-adios_mpi.obj: write/adios_mpi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi.obj `if test -f 'write/adios_mpi.c'; then $(CYGPATH_W) 'write/adios_mpi.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi.c'; fi`
+
+libadiosf_v1_a-adios_mpi_lustre.o: write/adios_mpi_lustre.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_lustre.o `test -f 'write/adios_mpi_lustre.c' || echo '$(srcdir)/'`write/adios_mpi_lustre.c
+
+libadiosf_v1_a-adios_mpi_lustre.obj: write/adios_mpi_lustre.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_lustre.obj `if test -f 'write/adios_mpi_lustre.c'; then $(CYGPATH_W) 'write/adios_mpi_lustre.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_lustre.c'; fi`
+
+libadiosf_v1_a-adios_mpi_amr.o: write/adios_mpi_amr.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_amr.o `test -f 'write/adios_mpi_amr.c' || echo '$(srcdir)/'`write/adios_mpi_amr.c
+
+libadiosf_v1_a-adios_mpi_amr.obj: write/adios_mpi_amr.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_amr.obj `if test -f 'write/adios_mpi_amr.c'; then $(CYGPATH_W) 'write/adios_mpi_amr.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_amr.c'; fi`
+
+libadiosf_v1_a-adios_posix.o: write/adios_posix.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_posix.o `test -f 'write/adios_posix.c' || echo '$(srcdir)/'`write/adios_posix.c
+
+libadiosf_v1_a-adios_posix.obj: write/adios_posix.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_posix.obj `if test -f 'write/adios_posix.c'; then $(CYGPATH_W) 'write/adios_posix.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_posix.c'; fi`
+
+libadiosf_v1_a-adios_posix1.o: write/adios_posix1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_posix1.o `test -f 'write/adios_posix1.c' || echo '$(srcdir)/'`write/adios_posix1.c
+
+libadiosf_v1_a-adios_posix1.obj: write/adios_posix1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_posix1.obj `if test -f 'write/adios_posix1.c'; then $(CYGPATH_W) 'write/adios_posix1.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_posix1.c'; fi`
 
-libadiosread_a-adios_bp_v1.obj: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_bp_v1.obj `if test -f 'adios_bp_v1.c'; then $(CYGPATH_W) 'adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/adios_bp_v1.c'; fi`
+libadiosf_v1_a-adios_dataspaces.o: write/adios_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_dataspaces.o `test -f 'write/adios_dataspaces.c' || echo '$(srcdir)/'`write/adios_dataspaces.c
 
-libadiosread_a-adios_endianness.o: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_endianness.o `test -f 'adios_endianness.c' || echo '$(srcdir)/'`adios_endianness.c
+libadiosf_v1_a-adios_dataspaces.obj: write/adios_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_dataspaces.obj `if test -f 'write/adios_dataspaces.c'; then $(CYGPATH_W) 'write/adios_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_dataspaces.c'; fi`
 
-libadiosread_a-adios_endianness.obj: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_endianness.obj `if test -f 'adios_endianness.c'; then $(CYGPATH_W) 'adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/adios_endianness.c'; fi`
+libadiosf_v1_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
 
-libadiosread_a-bp_utils.o: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-bp_utils.o `test -f 'bp_utils.c' || echo '$(srcdir)/'`bp_utils.c
+libadiosf_v1_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
 
-libadiosread_a-bp_utils.obj: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-bp_utils.obj `if test -f 'bp_utils.c'; then $(CYGPATH_W) 'bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/bp_utils.c'; fi`
+libadiosf_v1_a-adios_dimes.o: write/adios_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_dimes.o `test -f 'write/adios_dimes.c' || echo '$(srcdir)/'`write/adios_dimes.c
 
-libadiosread_a-futils.o: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-futils.o `test -f 'futils.c' || echo '$(srcdir)/'`futils.c
+libadiosf_v1_a-adios_dimes.obj: write/adios_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_dimes.obj `if test -f 'write/adios_dimes.c'; then $(CYGPATH_W) 'write/adios_dimes.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_dimes.c'; fi`
 
-libadiosread_a-futils.obj: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-futils.obj `if test -f 'futils.c'; then $(CYGPATH_W) 'futils.c'; else $(CYGPATH_W) '$(srcdir)/futils.c'; fi`
+libadiosf_v1_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
 
-libadiosread_a-adios_error.o: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_error.o `test -f 'adios_error.c' || echo '$(srcdir)/'`adios_error.c
+libadiosf_v1_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
 
-libadiosread_a-adios_error.obj: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_error.obj `if test -f 'adios_error.c'; then $(CYGPATH_W) 'adios_error.c'; else $(CYGPATH_W) '$(srcdir)/adios_error.c'; fi`
+libadiosf_v1_a-adios_datatap.o: write/adios_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_datatap.o `test -f 'write/adios_datatap.c' || echo '$(srcdir)/'`write/adios_datatap.c
 
-libadiosread_a-adios_read.o: adios_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read.o `test -f 'adios_read.c' || echo '$(srcdir)/'`adios_read.c
+libadiosf_v1_a-adios_datatap.obj: write/adios_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_datatap.obj `if test -f 'write/adios_datatap.c'; then $(CYGPATH_W) 'write/adios_datatap.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_datatap.c'; fi`
 
-libadiosread_a-adios_read.obj: adios_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read.obj `if test -f 'adios_read.c'; then $(CYGPATH_W) 'adios_read.c'; else $(CYGPATH_W) '$(srcdir)/adios_read.c'; fi`
+libadiosf_v1_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
 
-libadiosread_a-adios_read_hooks.o: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read_hooks.o `test -f 'adios_read_hooks.c' || echo '$(srcdir)/'`adios_read_hooks.c
+libadiosf_v1_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
 
-libadiosread_a-adios_read_hooks.obj: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read_hooks.obj `if test -f 'adios_read_hooks.c'; then $(CYGPATH_W) 'adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_hooks.c'; fi`
+libadiosf_v1_a-adios_phdf5.o: write/adios_phdf5.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_phdf5.o `test -f 'write/adios_phdf5.c' || echo '$(srcdir)/'`write/adios_phdf5.c
 
-libadiosread_a-common_read.o: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-common_read.o `test -f 'common_read.c' || echo '$(srcdir)/'`common_read.c
+libadiosf_v1_a-adios_phdf5.obj: write/adios_phdf5.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_phdf5.obj `if test -f 'write/adios_phdf5.c'; then $(CYGPATH_W) 'write/adios_phdf5.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_phdf5.c'; fi`
 
-libadiosread_a-common_read.obj: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-common_read.obj `if test -f 'common_read.c'; then $(CYGPATH_W) 'common_read.c'; else $(CYGPATH_W) '$(srcdir)/common_read.c'; fi`
+libadiosf_v1_a-adios_nc4.o: write/adios_nc4.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_nc4.o `test -f 'write/adios_nc4.c' || echo '$(srcdir)/'`write/adios_nc4.c
 
-libadiosread_a-read_bp.o: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp.o `test -f 'read_bp.c' || echo '$(srcdir)/'`read_bp.c
+libadiosf_v1_a-adios_nc4.obj: write/adios_nc4.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_nc4.obj `if test -f 'write/adios_nc4.c'; then $(CYGPATH_W) 'write/adios_nc4.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_nc4.c'; fi`
 
-libadiosread_a-read_bp.obj: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp.obj `if test -f 'read_bp.c'; then $(CYGPATH_W) 'read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read_bp.c'; fi`
+libadiosf_v1_a-adios_nssi_config.o: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_nssi_config.o `test -f 'nssi/adios_nssi_config.c' || echo '$(srcdir)/'`nssi/adios_nssi_config.c
 
-libadiosread_a-read_bp_staged.o: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp_staged.o `test -f 'read_bp_staged.c' || echo '$(srcdir)/'`read_bp_staged.c
+libadiosf_v1_a-adios_nssi_config.obj: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_nssi_config.obj `if test -f 'nssi/adios_nssi_config.c'; then $(CYGPATH_W) 'nssi/adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_config.c'; fi`
 
-libadiosread_a-read_bp_staged.obj: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp_staged.obj `if test -f 'read_bp_staged.c'; then $(CYGPATH_W) 'read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read_bp_staged.c'; fi`
+libadiosf_v1_a-adios_nssi.o: write/adios_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_nssi.o `test -f 'write/adios_nssi.c' || echo '$(srcdir)/'`write/adios_nssi.c
 
-libadiosread_a-globals.o: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-globals.o `test -f 'globals.c' || echo '$(srcdir)/'`globals.c
+libadiosf_v1_a-adios_nssi.obj: write/adios_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_nssi.obj `if test -f 'write/adios_nssi.c'; then $(CYGPATH_W) 'write/adios_nssi.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_nssi.c'; fi`
 
-libadiosread_a-globals.obj: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-globals.obj `if test -f 'globals.c'; then $(CYGPATH_W) 'globals.c'; else $(CYGPATH_W) '$(srcdir)/globals.c'; fi`
+libadiosf_v1_a-adios_nssi_filter.o: nssi/adios_nssi_filter.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_nssi_filter.o `test -f 'nssi/adios_nssi_filter.c' || echo '$(srcdir)/'`nssi/adios_nssi_filter.c
 
-libadiosread_a-read_dart.o: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_dart.o `test -f 'read_dart.c' || echo '$(srcdir)/'`read_dart.c
+libadiosf_v1_a-adios_nssi_filter.obj: nssi/adios_nssi_filter.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_nssi_filter.obj `if test -f 'nssi/adios_nssi_filter.c'; then $(CYGPATH_W) 'nssi/adios_nssi_filter.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_filter.c'; fi`
 
-libadiosread_a-read_dart.obj: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_dart.obj `if test -f 'read_dart.c'; then $(CYGPATH_W) 'read_dart.c'; else $(CYGPATH_W) '$(srcdir)/read_dart.c'; fi`
+libadiosf_v1_a-read_nssi.o: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_nssi.o `test -f 'read/read_nssi.c' || echo '$(srcdir)/'`read/read_nssi.c
 
-libadiosread_a-read_dimes.o: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_dimes.o `test -f 'read_dimes.c' || echo '$(srcdir)/'`read_dimes.c
+libadiosf_v1_a-read_nssi.obj: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-read_nssi.obj `if test -f 'read/read_nssi.c'; then $(CYGPATH_W) 'read/read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read/read_nssi.c'; fi`
 
-libadiosread_a-read_dimes.obj: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_dimes.obj `if test -f 'read_dimes.c'; then $(CYGPATH_W) 'read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read_dimes.c'; fi`
+libadiosf_v1_a-adios_mpi_stagger.o: write/adios_mpi_stagger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_stagger.o `test -f 'write/adios_mpi_stagger.c' || echo '$(srcdir)/'`write/adios_mpi_stagger.c
 
-libadiosread_a-read_datatap.o: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_datatap.o `test -f 'read_datatap.c' || echo '$(srcdir)/'`read_datatap.c
+libadiosf_v1_a-adios_mpi_stagger.obj: write/adios_mpi_stagger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_stagger.obj `if test -f 'write/adios_mpi_stagger.c'; then $(CYGPATH_W) 'write/adios_mpi_stagger.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_stagger.c'; fi`
 
-libadiosread_a-read_datatap.obj: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_datatap.obj `if test -f 'read_datatap.c'; then $(CYGPATH_W) 'read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read_datatap.c'; fi`
+libadiosf_v1_a-adios_mpi_aggregate.o: write/adios_mpi_aggregate.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_aggregate.o `test -f 'write/adios_mpi_aggregate.c' || echo '$(srcdir)/'`write/adios_mpi_aggregate.c
 
-libadiosread_a-adios_nssi_config.o: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_nssi_config.o `test -f 'adios_nssi_config.c' || echo '$(srcdir)/'`adios_nssi_config.c
+libadiosf_v1_a-adios_mpi_aggregate.obj: write/adios_mpi_aggregate.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_aggregate.obj `if test -f 'write/adios_mpi_aggregate.c'; then $(CYGPATH_W) 'write/adios_mpi_aggregate.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_aggregate.c'; fi`
 
-libadiosread_a-adios_nssi_config.obj: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_nssi_config.obj `if test -f 'adios_nssi_config.c'; then $(CYGPATH_W) 'adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_config.c'; fi`
+libadiosf_v1_a-adios_provenance.o: write/adios_provenance.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_provenance.o `test -f 'write/adios_provenance.c' || echo '$(srcdir)/'`write/adios_provenance.c
 
-libadiosread_a-read_nssi.o: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_nssi.o `test -f 'read_nssi.c' || echo '$(srcdir)/'`read_nssi.c
+libadiosf_v1_a-adios_provenance.obj: write/adios_provenance.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_provenance.obj `if test -f 'write/adios_provenance.c'; then $(CYGPATH_W) 'write/adios_provenance.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_provenance.c'; fi`
 
-libadiosread_a-read_nssi.obj: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_nssi.obj `if test -f 'read_nssi.c'; then $(CYGPATH_W) 'read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read_nssi.c'; fi`
+libadiosf_v1_a-adios_mpi_cio.o: write/adios_mpi_cio.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_cio.o `test -f 'write/adios_mpi_cio.c' || echo '$(srcdir)/'`write/adios_mpi_cio.c
+
+libadiosf_v1_a-adios_mpi_cio.obj: write/adios_mpi_cio.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_cio.obj `if test -f 'write/adios_mpi_cio.c'; then $(CYGPATH_W) 'write/adios_mpi_cio.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_cio.c'; fi`
+
+libadiosf_v1_a-adios_mpi_stripe.o: write/adios_mpi_stripe.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_stripe.o `test -f 'write/adios_mpi_stripe.c' || echo '$(srcdir)/'`write/adios_mpi_stripe.c
+
+libadiosf_v1_a-adios_mpi_stripe.obj: write/adios_mpi_stripe.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_stripe.obj `if test -f 'write/adios_mpi_stripe.c'; then $(CYGPATH_W) 'write/adios_mpi_stripe.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_stripe.c'; fi`
+
+libadiosf_v1_a-adios_mpi_amr1.o: write/adios_mpi_amr1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_amr1.o `test -f 'write/adios_mpi_amr1.c' || echo '$(srcdir)/'`write/adios_mpi_amr1.c
+
+libadiosf_v1_a-adios_mpi_amr1.obj: write/adios_mpi_amr1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_mpi_amr1.obj `if test -f 'write/adios_mpi_amr1.c'; then $(CYGPATH_W) 'write/adios_mpi_amr1.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_mpi_amr1.c'; fi`
+
+libadiosf_v1_a-adios_adaptive.o: write/adios_adaptive.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_adaptive.o `test -f 'write/adios_adaptive.c' || echo '$(srcdir)/'`write/adios_adaptive.c
+
+libadiosf_v1_a-adios_adaptive.obj: write/adios_adaptive.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adios_adaptive.obj `if test -f 'write/adios_adaptive.c'; then $(CYGPATH_W) 'write/adios_adaptive.c'; else $(CYGPATH_W) '$(srcdir)/write/adios_adaptive.c'; fi`
+
+libadiosf_v1_a-adiosf_read_v1.o: core/adiosf_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adiosf_read_v1.o `test -f 'core/adiosf_read_v1.c' || echo '$(srcdir)/'`core/adiosf_read_v1.c
+
+libadiosf_v1_a-adiosf_read_v1.obj: core/adiosf_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosf_v1_a-adiosf_read_v1.obj `if test -f 'core/adiosf_read_v1.c'; then $(CYGPATH_W) 'core/adiosf_read_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adiosf_read_v1.c'; fi`
+
+libadiosread_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
+
+libadiosread_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
+
+libadiosread_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
+
+libadiosread_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
+
+libadiosread_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
+
+libadiosread_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
+
+libadiosread_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
+
+libadiosread_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
+
+libadiosread_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
+
+libadiosread_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
+
+libadiosread_a-adios_read.o: core/adios_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read.o `test -f 'core/adios_read.c' || echo '$(srcdir)/'`core/adios_read.c
+
+libadiosread_a-adios_read.obj: core/adios_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read.obj `if test -f 'core/adios_read.c'; then $(CYGPATH_W) 'core/adios_read.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read.c'; fi`
+
+libadiosread_a-adios_read_v1.o: core/adios_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read_v1.o `test -f 'core/adios_read_v1.c' || echo '$(srcdir)/'`core/adios_read_v1.c
+
+libadiosread_a-adios_read_v1.obj: core/adios_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read_v1.obj `if test -f 'core/adios_read_v1.c'; then $(CYGPATH_W) 'core/adios_read_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_v1.c'; fi`
+
+libadiosread_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
+
+libadiosread_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
+
+libadiosread_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
+
+libadiosread_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
+
+libadiosread_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
+
+libadiosread_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
+
+libadiosread_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
+
+libadiosread_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
+
+libadiosread_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
+
+libadiosread_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
+
+libadiosread_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
+
+libadiosread_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
+
+libadiosread_a-read_bp_staged.o: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp_staged.o `test -f 'read/read_bp_staged.c' || echo '$(srcdir)/'`read/read_bp_staged.c
+
+libadiosread_a-read_bp_staged.obj: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp_staged.obj `if test -f 'read/read_bp_staged.c'; then $(CYGPATH_W) 'read/read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged.c'; fi`
+
+libadiosread_a-read_bp_staged1.o: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp_staged1.o `test -f 'read/read_bp_staged1.c' || echo '$(srcdir)/'`read/read_bp_staged1.c
+
+libadiosread_a-read_bp_staged1.obj: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_bp_staged1.obj `if test -f 'read/read_bp_staged1.c'; then $(CYGPATH_W) 'read/read_bp_staged1.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged1.c'; fi`
+
+libadiosread_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
+
+libadiosread_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
+
+libadiosread_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
+
+libadiosread_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
+
+libadiosread_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
+
+libadiosread_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
+
+libadiosread_a-adios_nssi_config.o: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_nssi_config.o `test -f 'nssi/adios_nssi_config.c' || echo '$(srcdir)/'`nssi/adios_nssi_config.c
+
+libadiosread_a-adios_nssi_config.obj: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_nssi_config.obj `if test -f 'nssi/adios_nssi_config.c'; then $(CYGPATH_W) 'nssi/adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_config.c'; fi`
+
+libadiosread_a-read_nssi.o: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_nssi.o `test -f 'read/read_nssi.c' || echo '$(srcdir)/'`read/read_nssi.c
+
+libadiosread_a-read_nssi.obj: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-read_nssi.obj `if test -f 'read/read_nssi.c'; then $(CYGPATH_W) 'read/read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read/read_nssi.c'; fi`
 
 libadiosread_a-adios_nssi_args.o: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_nssi_args.o `test -f 'adios_nssi_args.c' || echo '$(srcdir)/'`adios_nssi_args.c
@@ -1943,119 +2678,125 @@ libadiosread_a-adios_nssi_args.o: adios_nssi_args.c
 libadiosread_a-adios_nssi_args.obj: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_a_CFLAGS) $(CFLAGS) -c -o libadiosread_a-adios_nssi_args.obj `if test -f 'adios_nssi_args.c'; then $(CYGPATH_W) 'adios_nssi_args.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_args.c'; fi`
 
-libadiosread_nompi_a-mpidummy.o: mpidummy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-mpidummy.o `test -f 'mpidummy.c' || echo '$(srcdir)/'`mpidummy.c
+libadiosread_nompi_a-mpidummy.o: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-mpidummy.o `test -f 'core/mpidummy.c' || echo '$(srcdir)/'`core/mpidummy.c
+
+libadiosread_nompi_a-mpidummy.obj: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-mpidummy.obj `if test -f 'core/mpidummy.c'; then $(CYGPATH_W) 'core/mpidummy.c'; else $(CYGPATH_W) '$(srcdir)/core/mpidummy.c'; fi`
 
-libadiosread_nompi_a-mpidummy.obj: mpidummy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-mpidummy.obj `if test -f 'mpidummy.c'; then $(CYGPATH_W) 'mpidummy.c'; else $(CYGPATH_W) '$(srcdir)/mpidummy.c'; fi`
+libadiosread_nompi_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
 
-libadiosread_nompi_a-adios_bp_v1.o: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_bp_v1.o `test -f 'adios_bp_v1.c' || echo '$(srcdir)/'`adios_bp_v1.c
+libadiosread_nompi_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
 
-libadiosread_nompi_a-adios_bp_v1.obj: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_bp_v1.obj `if test -f 'adios_bp_v1.c'; then $(CYGPATH_W) 'adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/adios_bp_v1.c'; fi`
+libadiosread_nompi_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
 
-libadiosread_nompi_a-adios_endianness.o: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_endianness.o `test -f 'adios_endianness.c' || echo '$(srcdir)/'`adios_endianness.c
+libadiosread_nompi_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
 
-libadiosread_nompi_a-adios_endianness.obj: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_endianness.obj `if test -f 'adios_endianness.c'; then $(CYGPATH_W) 'adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/adios_endianness.c'; fi`
+libadiosread_nompi_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
 
-libadiosread_nompi_a-bp_utils.o: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-bp_utils.o `test -f 'bp_utils.c' || echo '$(srcdir)/'`bp_utils.c
+libadiosread_nompi_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
 
-libadiosread_nompi_a-bp_utils.obj: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-bp_utils.obj `if test -f 'bp_utils.c'; then $(CYGPATH_W) 'bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/bp_utils.c'; fi`
+libadiosread_nompi_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
 
-libadiosread_nompi_a-futils.o: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-futils.o `test -f 'futils.c' || echo '$(srcdir)/'`futils.c
+libadiosread_nompi_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
 
-libadiosread_nompi_a-futils.obj: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-futils.obj `if test -f 'futils.c'; then $(CYGPATH_W) 'futils.c'; else $(CYGPATH_W) '$(srcdir)/futils.c'; fi`
+libadiosread_nompi_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
 
-libadiosread_nompi_a-adios_error.o: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_error.o `test -f 'adios_error.c' || echo '$(srcdir)/'`adios_error.c
+libadiosread_nompi_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
 
-libadiosread_nompi_a-adios_error.obj: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_error.obj `if test -f 'adios_error.c'; then $(CYGPATH_W) 'adios_error.c'; else $(CYGPATH_W) '$(srcdir)/adios_error.c'; fi`
+libadiosread_nompi_a-adios_read.o: core/adios_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read.o `test -f 'core/adios_read.c' || echo '$(srcdir)/'`core/adios_read.c
 
-libadiosread_nompi_a-adios_read.o: adios_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read.o `test -f 'adios_read.c' || echo '$(srcdir)/'`adios_read.c
+libadiosread_nompi_a-adios_read.obj: core/adios_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read.obj `if test -f 'core/adios_read.c'; then $(CYGPATH_W) 'core/adios_read.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read.c'; fi`
 
-libadiosread_nompi_a-adios_read.obj: adios_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read.obj `if test -f 'adios_read.c'; then $(CYGPATH_W) 'adios_read.c'; else $(CYGPATH_W) '$(srcdir)/adios_read.c'; fi`
+libadiosread_nompi_a-adios_read_v1.o: core/adios_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read_v1.o `test -f 'core/adios_read_v1.c' || echo '$(srcdir)/'`core/adios_read_v1.c
 
-libadiosread_nompi_a-adios_read_hooks.o: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read_hooks.o `test -f 'adios_read_hooks.c' || echo '$(srcdir)/'`adios_read_hooks.c
+libadiosread_nompi_a-adios_read_v1.obj: core/adios_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read_v1.obj `if test -f 'core/adios_read_v1.c'; then $(CYGPATH_W) 'core/adios_read_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_v1.c'; fi`
 
-libadiosread_nompi_a-adios_read_hooks.obj: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read_hooks.obj `if test -f 'adios_read_hooks.c'; then $(CYGPATH_W) 'adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_hooks.c'; fi`
+libadiosread_nompi_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
 
-libadiosread_nompi_a-common_read.o: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-common_read.o `test -f 'common_read.c' || echo '$(srcdir)/'`common_read.c
+libadiosread_nompi_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
 
-libadiosread_nompi_a-common_read.obj: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-common_read.obj `if test -f 'common_read.c'; then $(CYGPATH_W) 'common_read.c'; else $(CYGPATH_W) '$(srcdir)/common_read.c'; fi`
+libadiosread_nompi_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
 
-libadiosread_nompi_a-read_bp.o: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_bp.o `test -f 'read_bp.c' || echo '$(srcdir)/'`read_bp.c
+libadiosread_nompi_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
 
-libadiosread_nompi_a-read_bp.obj: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_bp.obj `if test -f 'read_bp.c'; then $(CYGPATH_W) 'read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read_bp.c'; fi`
+libadiosread_nompi_a-buffer.o: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-buffer.o `test -f 'core/buffer.c' || echo '$(srcdir)/'`core/buffer.c
 
-libadiosread_nompi_a-adios_internals.o: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_internals.o `test -f 'adios_internals.c' || echo '$(srcdir)/'`adios_internals.c
+libadiosread_nompi_a-buffer.obj: core/buffer.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-buffer.obj `if test -f 'core/buffer.c'; then $(CYGPATH_W) 'core/buffer.c'; else $(CYGPATH_W) '$(srcdir)/core/buffer.c'; fi`
 
-libadiosread_nompi_a-adios_internals.obj: adios_internals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_internals.obj `if test -f 'adios_internals.c'; then $(CYGPATH_W) 'adios_internals.c'; else $(CYGPATH_W) '$(srcdir)/adios_internals.c'; fi`
+libadiosread_nompi_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
 
-libadiosread_nompi_a-buffer.o: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-buffer.o `test -f 'buffer.c' || echo '$(srcdir)/'`buffer.c
+libadiosread_nompi_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
 
-libadiosread_nompi_a-buffer.obj: buffer.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-buffer.obj `if test -f 'buffer.c'; then $(CYGPATH_W) 'buffer.c'; else $(CYGPATH_W) '$(srcdir)/buffer.c'; fi`
+libadiosread_nompi_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
 
-libadiosread_nompi_a-adios_transport_hooks.o: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_transport_hooks.o `test -f 'adios_transport_hooks.c' || echo '$(srcdir)/'`adios_transport_hooks.c
+libadiosread_nompi_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
 
-libadiosread_nompi_a-adios_transport_hooks.obj: adios_transport_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_transport_hooks.obj `if test -f 'adios_transport_hooks.c'; then $(CYGPATH_W) 'adios_transport_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_transport_hooks.c'; fi`
+libadiosread_nompi_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
 
-libadiosread_nompi_a-globals.o: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-globals.o `test -f 'globals.c' || echo '$(srcdir)/'`globals.c
+libadiosread_nompi_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
 
-libadiosread_nompi_a-globals.obj: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-globals.obj `if test -f 'globals.c'; then $(CYGPATH_W) 'globals.c'; else $(CYGPATH_W) '$(srcdir)/globals.c'; fi`
+libadiosread_nompi_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
 
-libadiosread_nompi_a-read_dart.o: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_dart.o `test -f 'read_dart.c' || echo '$(srcdir)/'`read_dart.c
+libadiosread_nompi_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
 
-libadiosread_nompi_a-read_dart.obj: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_dart.obj `if test -f 'read_dart.c'; then $(CYGPATH_W) 'read_dart.c'; else $(CYGPATH_W) '$(srcdir)/read_dart.c'; fi`
+libadiosread_nompi_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
 
-libadiosread_nompi_a-read_dimes.o: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_dimes.o `test -f 'read_dimes.c' || echo '$(srcdir)/'`read_dimes.c
+libadiosread_nompi_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
 
-libadiosread_nompi_a-read_dimes.obj: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_dimes.obj `if test -f 'read_dimes.c'; then $(CYGPATH_W) 'read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read_dimes.c'; fi`
+libadiosread_nompi_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
 
-libadiosread_nompi_a-read_datatap.o: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_datatap.o `test -f 'read_datatap.c' || echo '$(srcdir)/'`read_datatap.c
+libadiosread_nompi_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
 
-libadiosread_nompi_a-read_datatap.obj: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_datatap.obj `if test -f 'read_datatap.c'; then $(CYGPATH_W) 'read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read_datatap.c'; fi`
+libadiosread_nompi_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
 
-libadiosread_nompi_a-adios_nssi_config.o: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_nssi_config.o `test -f 'adios_nssi_config.c' || echo '$(srcdir)/'`adios_nssi_config.c
+libadiosread_nompi_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
 
-libadiosread_nompi_a-adios_nssi_config.obj: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_nssi_config.obj `if test -f 'adios_nssi_config.c'; then $(CYGPATH_W) 'adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_config.c'; fi`
+libadiosread_nompi_a-adios_nssi_config.o: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_nssi_config.o `test -f 'nssi/adios_nssi_config.c' || echo '$(srcdir)/'`nssi/adios_nssi_config.c
 
-libadiosread_nompi_a-read_nssi.o: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_nssi.o `test -f 'read_nssi.c' || echo '$(srcdir)/'`read_nssi.c
+libadiosread_nompi_a-adios_nssi_config.obj: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_nssi_config.obj `if test -f 'nssi/adios_nssi_config.c'; then $(CYGPATH_W) 'nssi/adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_config.c'; fi`
 
-libadiosread_nompi_a-read_nssi.obj: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_nssi.obj `if test -f 'read_nssi.c'; then $(CYGPATH_W) 'read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read_nssi.c'; fi`
+libadiosread_nompi_a-read_nssi.o: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_nssi.o `test -f 'read/read_nssi.c' || echo '$(srcdir)/'`read/read_nssi.c
+
+libadiosread_nompi_a-read_nssi.obj: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-read_nssi.obj `if test -f 'read/read_nssi.c'; then $(CYGPATH_W) 'read/read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read/read_nssi.c'; fi`
 
 libadiosread_nompi_a-adios_nssi_args.o: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_nssi_args.o `test -f 'adios_nssi_args.c' || echo '$(srcdir)/'`adios_nssi_args.c
@@ -2063,101 +2804,119 @@ libadiosread_nompi_a-adios_nssi_args.o: adios_nssi_args.c
 libadiosread_nompi_a-adios_nssi_args.obj: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosread_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosread_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosread_nompi_a-adios_nssi_args.obj `if test -f 'adios_nssi_args.c'; then $(CYGPATH_W) 'adios_nssi_args.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_args.c'; fi`
 
-libadiosreadf_a-adios_bp_v1.o: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_bp_v1.o `test -f 'adios_bp_v1.c' || echo '$(srcdir)/'`adios_bp_v1.c
+libadiosreadf_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
+
+libadiosreadf_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
+
+libadiosreadf_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
+
+libadiosreadf_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
+
+libadiosreadf_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
 
-libadiosreadf_a-adios_bp_v1.obj: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_bp_v1.obj `if test -f 'adios_bp_v1.c'; then $(CYGPATH_W) 'adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/adios_bp_v1.c'; fi`
+libadiosreadf_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
 
-libadiosreadf_a-adios_endianness.o: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_endianness.o `test -f 'adios_endianness.c' || echo '$(srcdir)/'`adios_endianness.c
+libadiosreadf_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
 
-libadiosreadf_a-adios_endianness.obj: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_endianness.obj `if test -f 'adios_endianness.c'; then $(CYGPATH_W) 'adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/adios_endianness.c'; fi`
+libadiosreadf_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
 
-libadiosreadf_a-bp_utils.o: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-bp_utils.o `test -f 'bp_utils.c' || echo '$(srcdir)/'`bp_utils.c
+libadiosreadf_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
 
-libadiosreadf_a-bp_utils.obj: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-bp_utils.obj `if test -f 'bp_utils.c'; then $(CYGPATH_W) 'bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/bp_utils.c'; fi`
+libadiosreadf_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
 
-libadiosreadf_a-futils.o: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-futils.o `test -f 'futils.c' || echo '$(srcdir)/'`futils.c
+libadiosreadf_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
 
-libadiosreadf_a-futils.obj: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-futils.obj `if test -f 'futils.c'; then $(CYGPATH_W) 'futils.c'; else $(CYGPATH_W) '$(srcdir)/futils.c'; fi`
+libadiosreadf_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
 
-libadiosreadf_a-adios_error.o: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_error.o `test -f 'adios_error.c' || echo '$(srcdir)/'`adios_error.c
+libadiosreadf_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
 
-libadiosreadf_a-adios_error.obj: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_error.obj `if test -f 'adios_error.c'; then $(CYGPATH_W) 'adios_error.c'; else $(CYGPATH_W) '$(srcdir)/adios_error.c'; fi`
+libadiosreadf_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
 
-libadiosreadf_a-adiosf_read.o: adiosf_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adiosf_read.o `test -f 'adiosf_read.c' || echo '$(srcdir)/'`adiosf_read.c
+libadiosreadf_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
 
-libadiosreadf_a-adiosf_read.obj: adiosf_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adiosf_read.obj `if test -f 'adiosf_read.c'; then $(CYGPATH_W) 'adiosf_read.c'; else $(CYGPATH_W) '$(srcdir)/adiosf_read.c'; fi`
+libadiosreadf_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
 
-libadiosreadf_a-adios_read_hooks.o: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_read_hooks.o `test -f 'adios_read_hooks.c' || echo '$(srcdir)/'`adios_read_hooks.c
+libadiosreadf_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
 
-libadiosreadf_a-adios_read_hooks.obj: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_read_hooks.obj `if test -f 'adios_read_hooks.c'; then $(CYGPATH_W) 'adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_hooks.c'; fi`
+libadiosreadf_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
 
-libadiosreadf_a-common_read.o: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-common_read.o `test -f 'common_read.c' || echo '$(srcdir)/'`common_read.c
+libadiosreadf_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
 
-libadiosreadf_a-common_read.obj: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-common_read.obj `if test -f 'common_read.c'; then $(CYGPATH_W) 'common_read.c'; else $(CYGPATH_W) '$(srcdir)/common_read.c'; fi`
+libadiosreadf_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
 
-libadiosreadf_a-read_bp.o: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp.o `test -f 'read_bp.c' || echo '$(srcdir)/'`read_bp.c
+libadiosreadf_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
 
-libadiosreadf_a-read_bp.obj: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp.obj `if test -f 'read_bp.c'; then $(CYGPATH_W) 'read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read_bp.c'; fi`
+libadiosreadf_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
 
-libadiosreadf_a-read_bp_staged.o: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp_staged.o `test -f 'read_bp_staged.c' || echo '$(srcdir)/'`read_bp_staged.c
+libadiosreadf_a-read_bp_staged.o: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp_staged.o `test -f 'read/read_bp_staged.c' || echo '$(srcdir)/'`read/read_bp_staged.c
 
-libadiosreadf_a-read_bp_staged.obj: read_bp_staged.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp_staged.obj `if test -f 'read_bp_staged.c'; then $(CYGPATH_W) 'read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read_bp_staged.c'; fi`
+libadiosreadf_a-read_bp_staged.obj: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp_staged.obj `if test -f 'read/read_bp_staged.c'; then $(CYGPATH_W) 'read/read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged.c'; fi`
 
-libadiosreadf_a-globals.o: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-globals.o `test -f 'globals.c' || echo '$(srcdir)/'`globals.c
+libadiosreadf_a-read_bp_staged1.o: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp_staged1.o `test -f 'read/read_bp_staged1.c' || echo '$(srcdir)/'`read/read_bp_staged1.c
 
-libadiosreadf_a-globals.obj: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-globals.obj `if test -f 'globals.c'; then $(CYGPATH_W) 'globals.c'; else $(CYGPATH_W) '$(srcdir)/globals.c'; fi`
+libadiosreadf_a-read_bp_staged1.obj: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_bp_staged1.obj `if test -f 'read/read_bp_staged1.c'; then $(CYGPATH_W) 'read/read_bp_staged1.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged1.c'; fi`
 
-libadiosreadf_a-read_dart.o: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_dart.o `test -f 'read_dart.c' || echo '$(srcdir)/'`read_dart.c
+libadiosreadf_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
 
-libadiosreadf_a-read_dart.obj: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_dart.obj `if test -f 'read_dart.c'; then $(CYGPATH_W) 'read_dart.c'; else $(CYGPATH_W) '$(srcdir)/read_dart.c'; fi`
+libadiosreadf_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
 
-libadiosreadf_a-read_dimes.o: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_dimes.o `test -f 'read_dimes.c' || echo '$(srcdir)/'`read_dimes.c
+libadiosreadf_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
 
-libadiosreadf_a-read_dimes.obj: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_dimes.obj `if test -f 'read_dimes.c'; then $(CYGPATH_W) 'read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read_dimes.c'; fi`
+libadiosreadf_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
 
-libadiosreadf_a-read_datatap.o: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_datatap.o `test -f 'read_datatap.c' || echo '$(srcdir)/'`read_datatap.c
+libadiosreadf_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
 
-libadiosreadf_a-read_datatap.obj: read_datatap.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_datatap.obj `if test -f 'read_datatap.c'; then $(CYGPATH_W) 'read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read_datatap.c'; fi`
+libadiosreadf_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
 
-libadiosreadf_a-adios_nssi_config.o: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_nssi_config.o `test -f 'adios_nssi_config.c' || echo '$(srcdir)/'`adios_nssi_config.c
+libadiosreadf_a-adios_nssi_config.o: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_nssi_config.o `test -f 'nssi/adios_nssi_config.c' || echo '$(srcdir)/'`nssi/adios_nssi_config.c
 
-libadiosreadf_a-adios_nssi_config.obj: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_nssi_config.obj `if test -f 'adios_nssi_config.c'; then $(CYGPATH_W) 'adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_config.c'; fi`
+libadiosreadf_a-adios_nssi_config.obj: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_nssi_config.obj `if test -f 'nssi/adios_nssi_config.c'; then $(CYGPATH_W) 'nssi/adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_config.c'; fi`
 
-libadiosreadf_a-read_nssi.o: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_nssi.o `test -f 'read_nssi.c' || echo '$(srcdir)/'`read_nssi.c
+libadiosreadf_a-read_nssi.o: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_nssi.o `test -f 'read/read_nssi.c' || echo '$(srcdir)/'`read/read_nssi.c
 
-libadiosreadf_a-read_nssi.obj: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_nssi.obj `if test -f 'read_nssi.c'; then $(CYGPATH_W) 'read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read_nssi.c'; fi`
+libadiosreadf_a-read_nssi.obj: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-read_nssi.obj `if test -f 'read/read_nssi.c'; then $(CYGPATH_W) 'read/read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read/read_nssi.c'; fi`
+
+libadiosreadf_a-adiosf_read.o: core/adiosf_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adiosf_read.o `test -f 'core/adiosf_read.c' || echo '$(srcdir)/'`core/adiosf_read.c
+
+libadiosreadf_a-adiosf_read.obj: core/adiosf_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adiosf_read.obj `if test -f 'core/adiosf_read.c'; then $(CYGPATH_W) 'core/adiosf_read.c'; else $(CYGPATH_W) '$(srcdir)/core/adiosf_read.c'; fi`
 
 libadiosreadf_a-adios_nssi_args.o: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_nssi_args.o `test -f 'adios_nssi_args.c' || echo '$(srcdir)/'`adios_nssi_args.c
@@ -2165,95 +2924,113 @@ libadiosreadf_a-adios_nssi_args.o: adios_nssi_args.c
 libadiosreadf_a-adios_nssi_args.obj: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_a-adios_nssi_args.obj `if test -f 'adios_nssi_args.c'; then $(CYGPATH_W) 'adios_nssi_args.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_args.c'; fi`
 
-libadiosreadf_nompi_a-mpidummy.o: mpidummy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-mpidummy.o `test -f 'mpidummy.c' || echo '$(srcdir)/'`mpidummy.c
+libadiosreadf_nompi_a-mpidummy.o: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-mpidummy.o `test -f 'core/mpidummy.c' || echo '$(srcdir)/'`core/mpidummy.c
+
+libadiosreadf_nompi_a-mpidummy.obj: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-mpidummy.obj `if test -f 'core/mpidummy.c'; then $(CYGPATH_W) 'core/mpidummy.c'; else $(CYGPATH_W) '$(srcdir)/core/mpidummy.c'; fi`
+
+libadiosreadf_nompi_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
+
+libadiosreadf_nompi_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
+
+libadiosreadf_nompi_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
 
-libadiosreadf_nompi_a-mpidummy.obj: mpidummy.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-mpidummy.obj `if test -f 'mpidummy.c'; then $(CYGPATH_W) 'mpidummy.c'; else $(CYGPATH_W) '$(srcdir)/mpidummy.c'; fi`
+libadiosreadf_nompi_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
 
-libadiosreadf_nompi_a-adios_bp_v1.o: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_bp_v1.o `test -f 'adios_bp_v1.c' || echo '$(srcdir)/'`adios_bp_v1.c
+libadiosreadf_nompi_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
 
-libadiosreadf_nompi_a-adios_bp_v1.obj: adios_bp_v1.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_bp_v1.obj `if test -f 'adios_bp_v1.c'; then $(CYGPATH_W) 'adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/adios_bp_v1.c'; fi`
+libadiosreadf_nompi_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
 
-libadiosreadf_nompi_a-adios_endianness.o: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_endianness.o `test -f 'adios_endianness.c' || echo '$(srcdir)/'`adios_endianness.c
+libadiosreadf_nompi_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
 
-libadiosreadf_nompi_a-adios_endianness.obj: adios_endianness.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_endianness.obj `if test -f 'adios_endianness.c'; then $(CYGPATH_W) 'adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/adios_endianness.c'; fi`
+libadiosreadf_nompi_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
 
-libadiosreadf_nompi_a-bp_utils.o: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-bp_utils.o `test -f 'bp_utils.c' || echo '$(srcdir)/'`bp_utils.c
+libadiosreadf_nompi_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
 
-libadiosreadf_nompi_a-bp_utils.obj: bp_utils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-bp_utils.obj `if test -f 'bp_utils.c'; then $(CYGPATH_W) 'bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/bp_utils.c'; fi`
+libadiosreadf_nompi_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
 
-libadiosreadf_nompi_a-futils.o: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-futils.o `test -f 'futils.c' || echo '$(srcdir)/'`futils.c
+libadiosreadf_nompi_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
 
-libadiosreadf_nompi_a-futils.obj: futils.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-futils.obj `if test -f 'futils.c'; then $(CYGPATH_W) 'futils.c'; else $(CYGPATH_W) '$(srcdir)/futils.c'; fi`
+libadiosreadf_nompi_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
 
-libadiosreadf_nompi_a-adios_error.o: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_error.o `test -f 'adios_error.c' || echo '$(srcdir)/'`adios_error.c
+libadiosreadf_nompi_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
 
-libadiosreadf_nompi_a-adios_error.obj: adios_error.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_error.obj `if test -f 'adios_error.c'; then $(CYGPATH_W) 'adios_error.c'; else $(CYGPATH_W) '$(srcdir)/adios_error.c'; fi`
+libadiosreadf_nompi_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
 
-libadiosreadf_nompi_a-adiosf_read.o: adiosf_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adiosf_read.o `test -f 'adiosf_read.c' || echo '$(srcdir)/'`adiosf_read.c
+libadiosreadf_nompi_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
 
-libadiosreadf_nompi_a-adiosf_read.obj: adiosf_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adiosf_read.obj `if test -f 'adiosf_read.c'; then $(CYGPATH_W) 'adiosf_read.c'; else $(CYGPATH_W) '$(srcdir)/adiosf_read.c'; fi`
+libadiosreadf_nompi_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
 
-libadiosreadf_nompi_a-adios_read_hooks.o: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_read_hooks.o `test -f 'adios_read_hooks.c' || echo '$(srcdir)/'`adios_read_hooks.c
+libadiosreadf_nompi_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
 
-libadiosreadf_nompi_a-adios_read_hooks.obj: adios_read_hooks.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_read_hooks.obj `if test -f 'adios_read_hooks.c'; then $(CYGPATH_W) 'adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/adios_read_hooks.c'; fi`
+libadiosreadf_nompi_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
 
-libadiosreadf_nompi_a-common_read.o: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-common_read.o `test -f 'common_read.c' || echo '$(srcdir)/'`common_read.c
+libadiosreadf_nompi_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
 
-libadiosreadf_nompi_a-common_read.obj: common_read.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-common_read.obj `if test -f 'common_read.c'; then $(CYGPATH_W) 'common_read.c'; else $(CYGPATH_W) '$(srcdir)/common_read.c'; fi`
+libadiosreadf_nompi_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
 
-libadiosreadf_nompi_a-read_bp.o: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_bp.o `test -f 'read_bp.c' || echo '$(srcdir)/'`read_bp.c
+libadiosreadf_nompi_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
 
-libadiosreadf_nompi_a-read_bp.obj: read_bp.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_bp.obj `if test -f 'read_bp.c'; then $(CYGPATH_W) 'read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read_bp.c'; fi`
+libadiosreadf_nompi_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
 
-libadiosreadf_nompi_a-globals.o: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-globals.o `test -f 'globals.c' || echo '$(srcdir)/'`globals.c
+libadiosreadf_nompi_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
 
-libadiosreadf_nompi_a-globals.obj: globals.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-globals.obj `if test -f 'globals.c'; then $(CYGPATH_W) 'globals.c'; else $(CYGPATH_W) '$(srcdir)/globals.c'; fi`
+libadiosreadf_nompi_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
 
-libadiosreadf_nompi_a-read_dart.o: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_dart.o `test -f 'read_dart.c' || echo '$(srcdir)/'`read_dart.c
+libadiosreadf_nompi_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
 
-libadiosreadf_nompi_a-read_dart.obj: read_dart.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_dart.obj `if test -f 'read_dart.c'; then $(CYGPATH_W) 'read_dart.c'; else $(CYGPATH_W) '$(srcdir)/read_dart.c'; fi`
+libadiosreadf_nompi_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
 
-libadiosreadf_nompi_a-read_dimes.o: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_dimes.o `test -f 'read_dimes.c' || echo '$(srcdir)/'`read_dimes.c
+libadiosreadf_nompi_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
 
-libadiosreadf_nompi_a-read_dimes.obj: read_dimes.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_dimes.obj `if test -f 'read_dimes.c'; then $(CYGPATH_W) 'read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read_dimes.c'; fi`
+libadiosreadf_nompi_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
 
-libadiosreadf_nompi_a-adios_nssi_config.o: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_nssi_config.o `test -f 'adios_nssi_config.c' || echo '$(srcdir)/'`adios_nssi_config.c
+libadiosreadf_nompi_a-adios_nssi_config.o: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_nssi_config.o `test -f 'nssi/adios_nssi_config.c' || echo '$(srcdir)/'`nssi/adios_nssi_config.c
 
-libadiosreadf_nompi_a-adios_nssi_config.obj: adios_nssi_config.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_nssi_config.obj `if test -f 'adios_nssi_config.c'; then $(CYGPATH_W) 'adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_config.c'; fi`
+libadiosreadf_nompi_a-adios_nssi_config.obj: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_nssi_config.obj `if test -f 'nssi/adios_nssi_config.c'; then $(CYGPATH_W) 'nssi/adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_config.c'; fi`
 
-libadiosreadf_nompi_a-read_nssi.o: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_nssi.o `test -f 'read_nssi.c' || echo '$(srcdir)/'`read_nssi.c
+libadiosreadf_nompi_a-read_nssi.o: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_nssi.o `test -f 'read/read_nssi.c' || echo '$(srcdir)/'`read/read_nssi.c
 
-libadiosreadf_nompi_a-read_nssi.obj: read_nssi.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_nssi.obj `if test -f 'read_nssi.c'; then $(CYGPATH_W) 'read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read_nssi.c'; fi`
+libadiosreadf_nompi_a-read_nssi.obj: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-read_nssi.obj `if test -f 'read/read_nssi.c'; then $(CYGPATH_W) 'read/read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read/read_nssi.c'; fi`
+
+libadiosreadf_nompi_a-adiosf_read.o: core/adiosf_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adiosf_read.o `test -f 'core/adiosf_read.c' || echo '$(srcdir)/'`core/adiosf_read.c
+
+libadiosreadf_nompi_a-adiosf_read.obj: core/adiosf_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adiosf_read.obj `if test -f 'core/adiosf_read.c'; then $(CYGPATH_W) 'core/adiosf_read.c'; else $(CYGPATH_W) '$(srcdir)/core/adiosf_read.c'; fi`
 
 libadiosreadf_nompi_a-adios_nssi_args.o: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_nssi_args.o `test -f 'adios_nssi_args.c' || echo '$(srcdir)/'`adios_nssi_args.c
@@ -2261,6 +3038,228 @@ libadiosreadf_nompi_a-adios_nssi_args.o: adios_nssi_args.c
 libadiosreadf_nompi_a-adios_nssi_args.obj: adios_nssi_args.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_a-adios_nssi_args.obj `if test -f 'adios_nssi_args.c'; then $(CYGPATH_W) 'adios_nssi_args.c'; else $(CYGPATH_W) '$(srcdir)/adios_nssi_args.c'; fi`
 
+libadiosreadf_nompi_v1_a-mpidummy.o: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-mpidummy.o `test -f 'core/mpidummy.c' || echo '$(srcdir)/'`core/mpidummy.c
+
+libadiosreadf_nompi_v1_a-mpidummy.obj: core/mpidummy.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-mpidummy.obj `if test -f 'core/mpidummy.c'; then $(CYGPATH_W) 'core/mpidummy.c'; else $(CYGPATH_W) '$(srcdir)/core/mpidummy.c'; fi`
+
+libadiosreadf_nompi_v1_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
+
+libadiosreadf_nompi_v1_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
+
+libadiosreadf_nompi_v1_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
+
+libadiosreadf_nompi_v1_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
+
+libadiosreadf_nompi_v1_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
+
+libadiosreadf_nompi_v1_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
+
+libadiosreadf_nompi_v1_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
+
+libadiosreadf_nompi_v1_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
+
+libadiosreadf_nompi_v1_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
+
+libadiosreadf_nompi_v1_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
+
+libadiosreadf_nompi_v1_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
+
+libadiosreadf_nompi_v1_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
+
+libadiosreadf_nompi_v1_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
+
+libadiosreadf_nompi_v1_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
+
+libadiosreadf_nompi_v1_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
+
+libadiosreadf_nompi_v1_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
+
+libadiosreadf_nompi_v1_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
+
+libadiosreadf_nompi_v1_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
+
+libadiosreadf_nompi_v1_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
+
+libadiosreadf_nompi_v1_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
+
+libadiosreadf_nompi_v1_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
+
+libadiosreadf_nompi_v1_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
+
+libadiosreadf_nompi_v1_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
+
+libadiosreadf_nompi_v1_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
+
+libadiosreadf_nompi_v1_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
+
+libadiosreadf_nompi_v1_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
+
+libadiosreadf_nompi_v1_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
+
+libadiosreadf_nompi_v1_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
+
+libadiosreadf_nompi_v1_a-adios_nssi_config.o: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_nssi_config.o `test -f 'nssi/adios_nssi_config.c' || echo '$(srcdir)/'`nssi/adios_nssi_config.c
+
+libadiosreadf_nompi_v1_a-adios_nssi_config.obj: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adios_nssi_config.obj `if test -f 'nssi/adios_nssi_config.c'; then $(CYGPATH_W) 'nssi/adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_config.c'; fi`
+
+libadiosreadf_nompi_v1_a-read_nssi.o: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_nssi.o `test -f 'read/read_nssi.c' || echo '$(srcdir)/'`read/read_nssi.c
+
+libadiosreadf_nompi_v1_a-read_nssi.obj: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-read_nssi.obj `if test -f 'read/read_nssi.c'; then $(CYGPATH_W) 'read/read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read/read_nssi.c'; fi`
+
+libadiosreadf_nompi_v1_a-adiosf_read_v1.o: core/adiosf_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adiosf_read_v1.o `test -f 'core/adiosf_read_v1.c' || echo '$(srcdir)/'`core/adiosf_read_v1.c
+
+libadiosreadf_nompi_v1_a-adiosf_read_v1.obj: core/adiosf_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_nompi_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_nompi_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_nompi_v1_a-adiosf_read_v1.obj `if test -f 'core/adiosf_read_v1.c'; then $(CYGPATH_W) 'core/adiosf_read_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adiosf_read_v1.c'; fi`
+
+libadiosreadf_v1_a-adios_bp_v1.o: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_bp_v1.o `test -f 'core/adios_bp_v1.c' || echo '$(srcdir)/'`core/adios_bp_v1.c
+
+libadiosreadf_v1_a-adios_bp_v1.obj: core/adios_bp_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_bp_v1.obj `if test -f 'core/adios_bp_v1.c'; then $(CYGPATH_W) 'core/adios_bp_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_bp_v1.c'; fi`
+
+libadiosreadf_v1_a-adios_endianness.o: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_endianness.o `test -f 'core/adios_endianness.c' || echo '$(srcdir)/'`core/adios_endianness.c
+
+libadiosreadf_v1_a-adios_endianness.obj: core/adios_endianness.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_endianness.obj `if test -f 'core/adios_endianness.c'; then $(CYGPATH_W) 'core/adios_endianness.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_endianness.c'; fi`
+
+libadiosreadf_v1_a-bp_utils.o: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-bp_utils.o `test -f 'core/bp_utils.c' || echo '$(srcdir)/'`core/bp_utils.c
+
+libadiosreadf_v1_a-bp_utils.obj: core/bp_utils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-bp_utils.obj `if test -f 'core/bp_utils.c'; then $(CYGPATH_W) 'core/bp_utils.c'; else $(CYGPATH_W) '$(srcdir)/core/bp_utils.c'; fi`
+
+libadiosreadf_v1_a-futils.o: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-futils.o `test -f 'core/futils.c' || echo '$(srcdir)/'`core/futils.c
+
+libadiosreadf_v1_a-futils.obj: core/futils.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-futils.obj `if test -f 'core/futils.c'; then $(CYGPATH_W) 'core/futils.c'; else $(CYGPATH_W) '$(srcdir)/core/futils.c'; fi`
+
+libadiosreadf_v1_a-adios_error.o: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_error.o `test -f 'core/adios_error.c' || echo '$(srcdir)/'`core/adios_error.c
+
+libadiosreadf_v1_a-adios_error.obj: core/adios_error.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_error.obj `if test -f 'core/adios_error.c'; then $(CYGPATH_W) 'core/adios_error.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_error.c'; fi`
+
+libadiosreadf_v1_a-common_read.o: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-common_read.o `test -f 'core/common_read.c' || echo '$(srcdir)/'`core/common_read.c
+
+libadiosreadf_v1_a-common_read.obj: core/common_read.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-common_read.obj `if test -f 'core/common_read.c'; then $(CYGPATH_W) 'core/common_read.c'; else $(CYGPATH_W) '$(srcdir)/core/common_read.c'; fi`
+
+libadiosreadf_v1_a-globals.o: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-globals.o `test -f 'core/globals.c' || echo '$(srcdir)/'`core/globals.c
+
+libadiosreadf_v1_a-globals.obj: core/globals.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-globals.obj `if test -f 'core/globals.c'; then $(CYGPATH_W) 'core/globals.c'; else $(CYGPATH_W) '$(srcdir)/core/globals.c'; fi`
+
+libadiosreadf_v1_a-adios_read_hooks.o: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_read_hooks.o `test -f 'core/adios_read_hooks.c' || echo '$(srcdir)/'`core/adios_read_hooks.c
+
+libadiosreadf_v1_a-adios_read_hooks.obj: core/adios_read_hooks.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_read_hooks.obj `if test -f 'core/adios_read_hooks.c'; then $(CYGPATH_W) 'core/adios_read_hooks.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_read_hooks.c'; fi`
+
+libadiosreadf_v1_a-adios_logger.o: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_logger.o `test -f 'core/adios_logger.c' || echo '$(srcdir)/'`core/adios_logger.c
+
+libadiosreadf_v1_a-adios_logger.obj: core/adios_logger.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_logger.obj `if test -f 'core/adios_logger.c'; then $(CYGPATH_W) 'core/adios_logger.c'; else $(CYGPATH_W) '$(srcdir)/core/adios_logger.c'; fi`
+
+libadiosreadf_v1_a-util.o: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-util.o `test -f 'core/util.c' || echo '$(srcdir)/'`core/util.c
+
+libadiosreadf_v1_a-util.obj: core/util.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-util.obj `if test -f 'core/util.c'; then $(CYGPATH_W) 'core/util.c'; else $(CYGPATH_W) '$(srcdir)/core/util.c'; fi`
+
+libadiosreadf_v1_a-read_bp.o: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_bp.o `test -f 'read/read_bp.c' || echo '$(srcdir)/'`read/read_bp.c
+
+libadiosreadf_v1_a-read_bp.obj: read/read_bp.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_bp.obj `if test -f 'read/read_bp.c'; then $(CYGPATH_W) 'read/read_bp.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp.c'; fi`
+
+libadiosreadf_v1_a-read_bp_staged.o: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_bp_staged.o `test -f 'read/read_bp_staged.c' || echo '$(srcdir)/'`read/read_bp_staged.c
+
+libadiosreadf_v1_a-read_bp_staged.obj: read/read_bp_staged.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_bp_staged.obj `if test -f 'read/read_bp_staged.c'; then $(CYGPATH_W) 'read/read_bp_staged.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged.c'; fi`
+
+libadiosreadf_v1_a-read_bp_staged1.o: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_bp_staged1.o `test -f 'read/read_bp_staged1.c' || echo '$(srcdir)/'`read/read_bp_staged1.c
+
+libadiosreadf_v1_a-read_bp_staged1.obj: read/read_bp_staged1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_bp_staged1.obj `if test -f 'read/read_bp_staged1.c'; then $(CYGPATH_W) 'read/read_bp_staged1.c'; else $(CYGPATH_W) '$(srcdir)/read/read_bp_staged1.c'; fi`
+
+libadiosreadf_v1_a-read_dataspaces.o: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_dataspaces.o `test -f 'read/read_dataspaces.c' || echo '$(srcdir)/'`read/read_dataspaces.c
+
+libadiosreadf_v1_a-read_dataspaces.obj: read/read_dataspaces.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_dataspaces.obj `if test -f 'read/read_dataspaces.c'; then $(CYGPATH_W) 'read/read_dataspaces.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dataspaces.c'; fi`
+
+libadiosreadf_v1_a-read_dimes.o: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_dimes.o `test -f 'read/read_dimes.c' || echo '$(srcdir)/'`read/read_dimes.c
+
+libadiosreadf_v1_a-read_dimes.obj: read/read_dimes.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_dimes.obj `if test -f 'read/read_dimes.c'; then $(CYGPATH_W) 'read/read_dimes.c'; else $(CYGPATH_W) '$(srcdir)/read/read_dimes.c'; fi`
+
+libadiosreadf_v1_a-read_datatap.o: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_datatap.o `test -f 'read/read_datatap.c' || echo '$(srcdir)/'`read/read_datatap.c
+
+libadiosreadf_v1_a-read_datatap.obj: read/read_datatap.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_datatap.obj `if test -f 'read/read_datatap.c'; then $(CYGPATH_W) 'read/read_datatap.c'; else $(CYGPATH_W) '$(srcdir)/read/read_datatap.c'; fi`
+
+libadiosreadf_v1_a-adios_nssi_config.o: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_nssi_config.o `test -f 'nssi/adios_nssi_config.c' || echo '$(srcdir)/'`nssi/adios_nssi_config.c
+
+libadiosreadf_v1_a-adios_nssi_config.obj: nssi/adios_nssi_config.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adios_nssi_config.obj `if test -f 'nssi/adios_nssi_config.c'; then $(CYGPATH_W) 'nssi/adios_nssi_config.c'; else $(CYGPATH_W) '$(srcdir)/nssi/adios_nssi_config.c'; fi`
+
+libadiosreadf_v1_a-read_nssi.o: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_nssi.o `test -f 'read/read_nssi.c' || echo '$(srcdir)/'`read/read_nssi.c
+
+libadiosreadf_v1_a-read_nssi.obj: read/read_nssi.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-read_nssi.obj `if test -f 'read/read_nssi.c'; then $(CYGPATH_W) 'read/read_nssi.c'; else $(CYGPATH_W) '$(srcdir)/read/read_nssi.c'; fi`
+
+libadiosreadf_v1_a-adiosf_read_v1.o: core/adiosf_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adiosf_read_v1.o `test -f 'core/adiosf_read_v1.c' || echo '$(srcdir)/'`core/adiosf_read_v1.c
+
+libadiosreadf_v1_a-adiosf_read_v1.obj: core/adiosf_read_v1.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libadiosreadf_v1_a_CPPFLAGS) $(CPPFLAGS) $(libadiosreadf_v1_a_CFLAGS) $(CFLAGS) -c -o libadiosreadf_v1_a-adiosf_read_v1.obj `if test -f 'core/adiosf_read_v1.c'; then $(CYGPATH_W) 'core/adiosf_read_v1.c'; else $(CYGPATH_W) '$(srcdir)/core/adiosf_read_v1.c'; fi`
+
 .cpp.o:
 	$(CXXCOMPILE) -c -o $@ $<
 
@@ -2270,123 +3269,176 @@ libadiosreadf_nompi_a-adios_nssi_args.obj: adios_nssi_args.c
 .cpp.lo:
 	$(LTCXXCOMPILE) -c -o $@ $<
 
-nssi_coupling_server-nssi_coupling_server.o: nssi_coupling_server.cpp
-	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_coupling_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_coupling_server-nssi_coupling_server.o `test -f 'nssi_coupling_server.cpp' || echo '$(srcdir)/'`nssi_coupling_server.cpp
+nssi_coupling_server-nssi_coupling_server.o: nssi/nssi_coupling_server.cpp
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_coupling_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_coupling_server-nssi_coupling_server.o `test -f 'nssi/nssi_coupling_server.cpp' || echo '$(srcdir)/'`nssi/nssi_coupling_server.cpp
+
+nssi_coupling_server-nssi_coupling_server.obj: nssi/nssi_coupling_server.cpp
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_coupling_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_coupling_server-nssi_coupling_server.obj `if test -f 'nssi/nssi_coupling_server.cpp'; then $(CYGPATH_W) 'nssi/nssi_coupling_server.cpp'; else $(CYGPATH_W) '$(srcdir)/nssi/nssi_coupling_server.cpp'; fi`
+
+nssi_staging_server-nssi_staging_server.o: nssi/nssi_staging_server.cpp
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_staging_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_staging_server-nssi_staging_server.o `test -f 'nssi/nssi_staging_server.cpp' || echo '$(srcdir)/'`nssi/nssi_staging_server.cpp
+
+nssi_staging_server-nssi_staging_server.obj: nssi/nssi_staging_server.cpp
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_staging_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_staging_server-nssi_staging_server.obj `if test -f 'nssi/nssi_staging_server.cpp'; then $(CYGPATH_W) 'nssi/nssi_staging_server.cpp'; else $(CYGPATH_W) '$(srcdir)/nssi/nssi_staging_server.cpp'; fi`
+
+nssi_staging_server-aggregation.o: nssi/aggregation.cpp
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_staging_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_staging_server-aggregation.o `test -f 'nssi/aggregation.cpp' || echo '$(srcdir)/'`nssi/aggregation.cpp
 
-nssi_coupling_server-nssi_coupling_server.obj: nssi_coupling_server.cpp
-	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_coupling_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_coupling_server-nssi_coupling_server.obj `if test -f 'nssi_coupling_server.cpp'; then $(CYGPATH_W) 'nssi_coupling_server.cpp'; else $(CYGPATH_W) '$(srcdir)/nssi_coupling_server.cpp'; fi`
+nssi_staging_server-aggregation.obj: nssi/aggregation.cpp
+	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_staging_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_staging_server-aggregation.obj `if test -f 'nssi/aggregation.cpp'; then $(CYGPATH_W) 'nssi/aggregation.cpp'; else $(CYGPATH_W) '$(srcdir)/nssi/aggregation.cpp'; fi`
 
-nssi_staging_server-nssi_staging_server.o: nssi_staging_server.cpp
-	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_staging_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_staging_server-nssi_staging_server.o `test -f 'nssi_staging_server.cpp' || echo '$(srcdir)/'`nssi_staging_server.cpp
+.f90.o:
+	$(FCCOMPILE) -c -o $@ $<
 
-nssi_staging_server-nssi_staging_server.obj: nssi_staging_server.cpp
-	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_staging_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_staging_server-nssi_staging_server.obj `if test -f 'nssi_staging_server.cpp'; then $(CYGPATH_W) 'nssi_staging_server.cpp'; else $(CYGPATH_W) '$(srcdir)/nssi_staging_server.cpp'; fi`
+.f90.obj:
+	$(FCCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
-nssi_staging_server-aggregation.o: aggregation.cpp
-	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_staging_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_staging_server-aggregation.o `test -f 'aggregation.cpp' || echo '$(srcdir)/'`aggregation.cpp
+.f90.lo:
+	$(LTFCCOMPILE) -c -o $@ $<
 
-nssi_staging_server-aggregation.obj: aggregation.cpp
-	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(nssi_staging_server_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o nssi_staging_server-aggregation.obj `if test -f 'aggregation.cpp'; then $(CYGPATH_W) 'aggregation.cpp'; else $(CYGPATH_W) '$(srcdir)/aggregation.cpp'; fi`
+adiosf_defs_mod.o: core/adiosf_defs_mod.f90
+	$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o adiosf_defs_mod.o `test -f 'core/adiosf_defs_mod.f90' || echo '$(srcdir)/'`core/adiosf_defs_mod.f90
+
+adiosf_defs_mod.obj: core/adiosf_defs_mod.f90
+	$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o adiosf_defs_mod.obj `if test -f 'core/adiosf_defs_mod.f90'; then $(CYGPATH_W) 'core/adiosf_defs_mod.f90'; else $(CYGPATH_W) '$(srcdir)/core/adiosf_defs_mod.f90'; fi`
+
+adiosf_write_mod.o: core/adiosf_write_mod.f90
+	$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o adiosf_write_mod.o `test -f 'core/adiosf_write_mod.f90' || echo '$(srcdir)/'`core/adiosf_write_mod.f90
+
+adiosf_write_mod.obj: core/adiosf_write_mod.f90
+	$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o adiosf_write_mod.obj `if test -f 'core/adiosf_write_mod.f90'; then $(CYGPATH_W) 'core/adiosf_write_mod.f90'; else $(CYGPATH_W) '$(srcdir)/core/adiosf_write_mod.f90'; fi`
+
+adiosf_read_mod.o: core/adiosf_read_mod.f90
+	$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o adiosf_read_mod.o `test -f 'core/adiosf_read_mod.f90' || echo '$(srcdir)/'`core/adiosf_read_mod.f90
+
+adiosf_read_mod.obj: core/adiosf_read_mod.f90
+	$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o adiosf_read_mod.obj `if test -f 'core/adiosf_read_mod.f90'; then $(CYGPATH_W) 'core/adiosf_read_mod.f90'; else $(CYGPATH_W) '$(srcdir)/core/adiosf_read_mod.f90'; fi`
 
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
 install-includeHEADERS: $(include_HEADERS)
 	@$(NORMAL_INSTALL)
-	test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)"
-	@list='$(include_HEADERS)'; for p in $$list; do \
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	for p in $$list; do \
 	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  f=$(am__strip_dir) \
-	  echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \
-	  $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
 	done
 
 uninstall-includeHEADERS:
 	@$(NORMAL_UNINSTALL)
-	@list='$(include_HEADERS)'; for p in $$list; do \
-	  f=$(am__strip_dir) \
-	  echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(includedir)/$$f"; \
+	@list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+install-nodist_includeHEADERS: $(nodist_include_HEADERS)
+	@$(NORMAL_INSTALL)
+	test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+	@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || 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_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
 	done
 
+uninstall-nodist_includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(includedir)" && rm -f $$files
+
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -2394,8 +3446,8 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
 installdirs:
-	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -2418,6 +3470,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -2430,7 +3483,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libLIBRARIES \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -2438,18 +3491,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
-install-data-am: install-includeHEADERS
+install-data-am: install-includeHEADERS install-nodist_includeHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
 
 install-exec-am: install-binPROGRAMS install-libLIBRARIES
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -2470,29 +3543,34 @@ ps: ps-am
 ps-am:
 
 uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
-	uninstall-info-am uninstall-libLIBRARIES
+	uninstall-libLIBRARIES uninstall-nodist_includeHEADERS
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic clean-libLIBRARIES clean-libtool \
 	clean-noinstLIBRARIES ctags distclean distclean-compile \
 	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-exec \
-	install-exec-am install-includeHEADERS install-info \
-	install-info-am install-libLIBRARIES install-man install-strip \
-	installcheck installcheck-am installdirs maintainer-clean \
+	install-binPROGRAMS 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-libLIBRARIES install-man \
+	install-nodist_includeHEADERS install-pdf install-pdf-am \
+	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-info-am \
-	uninstall-libLIBRARIES
+	uninstall-includeHEADERS uninstall-libLIBRARIES \
+	uninstall-nodist_includeHEADERS
 
 
 # The next line forces automake to build adios_nssi_args.[ch] before compiling adios_nssi_config.c
 # Note, the order of dist_*SOURCES and nodist_*SOURCES above should but does not solve this alone.
 @BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at adios_nssi_config.c: adios_nssi_args.c
 
- at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at adios_nssi_args.h:  $(srcdir)/adios_nssi_args.x Makefile.am
+ at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at adios_nssi_args.h:  $(srcdir)/nssi/adios_nssi_args.x Makefile.am
 @BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@	rm -f $@
 #	@echo "#include <lwfs/lwfs_config.h>" >> $@
 #	@echo "#ifndef LWFS_HAVE_STRUCT_SOCKADDR_IN" >> $@
@@ -2501,12 +3579,22 @@ uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \
 #	@echo '  int a;' >> $@
 #	@echo '};' >> $@
 #	@echo '#endif' >> $@;
- at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@	rpcgen -h $(srcdir)/adios_nssi_args.x >> $@
+ at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@	rpcgen -h $(srcdir)/nssi/adios_nssi_args.x >> $@
 
 @BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE at adios_nssi_args.c: adios_nssi_args.h 
 @BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@	rm -f adios_nssi_args.c
- at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@	rpcgen -c $(srcdir)/adios_nssi_args.x \
+ at BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@	rpcgen -c $(srcdir)/nssi/adios_nssi_args.x \
 @BUILD_WRITE_TRUE@@HAVE_NSSI_TRUE@		| grep -v "include \"\.\." > adios_nssi_args.c
+
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at adios_write_mod.mod: core/adiosf_write_mod.f90 adios_defs_mod.mod
+ at BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	$(FC) -c core/adiosf_write_mod.f90
+
+ at BUILD_FORTRAN_TRUE@adios_read_mod.mod: core/adiosf_read_mod.f90 adios_defs_mod.mod 
+ at BUILD_FORTRAN_TRUE@	$(FC) -c core/adiosf_read_mod.f90
+
+ at BUILD_FORTRAN_TRUE@adios_defs_mod.mod: core/adiosf_defs_mod.f90
+ at BUILD_FORTRAN_TRUE@	$(FC) -c core/adiosf_defs_mod.f90
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/src/adios.h b/src/adios.h
deleted file mode 100644
index 80b4cb4..0000000
--- a/src/adios.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-#ifndef ADIOS_H
-#define ADIOS_H
-
-#include "adios_types.h"
-#include <stdint.h>
-
-#ifdef _NOMPI
-/* Sequential processes can use the library compiled with -D_NOMPI */
-#   include "mpidummy.h"
-#else
-/* Parallel applications should use MPI to communicate file info and slices of data */
-#   include "mpi.h"
-#endif
-
-// ADIOS - Adaptable IO System
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-    // Global setup using the XML file
-    int adios_init (const char * config);
-
-    int adios_finalize (int mype);
-
-    // end user calls for each I/O operation
-    // modes = "r" = "read", "w" = "write", "a" = "append", "u" = "update"
-    int adios_open (int64_t * fd, const char * group_name, const char * name
-            ,const char * mode, void * comm
-            );
-
-    int adios_group_size (int64_t fd_p, uint64_t data_size
-            ,uint64_t * total_size
-            );
-
-    int adios_write (int64_t fd_p, const char * name, void * var);
-
-    int adios_get_write_buffer (int64_t fd_p, const char * name
-            ,uint64_t * size
-            ,void ** buffer
-            );
-
-    int adios_read (int64_t fd_p, const char * name, void * buffer
-            ,uint64_t buffer_size
-            );
-
-    int adios_set_path (int64_t fd_p, const char * path);
-
-    int adios_set_path_var (int64_t fd_p, const char * path, const char * name);
-
-    int adios_end_iteration (void);
-
-    int adios_start_calculation (void);
-
-    int adios_stop_calculation (void);
-
-    int adios_close (int64_t fd_p);
-
-    // ADIOS No-XML API's
-    int adios_init_noxml (void);
-
-    // To allocate ADIOS buffer
-    int adios_allocate_buffer (enum ADIOS_BUFFER_ALLOC_WHEN adios_buffer_alloc_when
-            ,uint64_t buffer_size);
-
-    // To declare a ADIOS group
-    int adios_declare_group (int64_t * id, const char * name
-            ,const char * time_index
-            ,enum ADIOS_FLAG stats
-            );
-    // To free a ADIOS group
-    int adios_free_group (int64_t id);
-
-    // To select a I/O method for a ADIOS group
-    int adios_select_method (int64_t group, const char * method
-            ,const char * parameters
-            ,const char * base_path
-            );
-
-    // To define a ADIOS variable
-    int adios_define_var (int64_t group_id, const char * name
-            ,const char * path, int type
-            ,const char * dimensions
-            ,const char * global_dimensions
-                     ,const char * local_offsets
-                     );
-
-int adios_define_attribute (int64_t group, const char * name
-                           ,const char * path, enum ADIOS_DATATYPES type
-                           ,const char * value, const char * var
-                           );
-
-/** Set the application's ID for adios_read_init()
- *  when using a staging method (DART, DIMES, NSSI or DATATAP).
- *  The ID should be unique for each application accessing the staging area
- *  IN:  id   a number unique for this application
- *  RETURN:       0 if accepted, <0 on error
- *  It is optional to use it before calling adios_init. Default is 1. 
- *  It has no effect for file based methods.
- *  Note: this function is defined both in adios.h and adios_read.h so that
- *  writing-only and reading-only applications can both use it.
- */ 
-int adios_set_application_id (int id);
-
-
-/********************************************/
-/*           F O R T R A N  A P I           */
-/********************************************/
-/* In fortran, you do not need to include this header file.
-   Just link the code with the adios library.
-*/
-/*
-void FC_FUNC_(adiosf_init, ADIOSF_INIT) (const char * config, int* err, int config_size);
-void FC_FUNC_(adiosf_init_local, ADIOSF_INIT_LOCAL) (int * err);
-void FC_FUNC_(adiosf_finalize, ADIOSF_FINALIZE) (int * mype, int * err);
-void FC_FUNC_(adiosf_allocate_buffer, ADIOSF_ALLOCATE_BUFFER) (int * err);
-void FC_FUNC_(adiosf_open, ADIOSF_OPEN) (int64_t * fd, const char * group_name, const char * name
-                 ,const char * mode, int * err
-                 ,int group_name_size, int name_size, int mode_size
-                 );
-void FC_FUNC_(adiosf_group_size, ADIOSF_GROUP_SIZE) (int64_t * fd_p, int64_t * data_size
-                       ,int64_t * total_size, void * comm, int * err
-                       );
-void FC_FUNC_(adiosf_write, ADIOSF_WRITE) (int64_t * fd_p, const char * name, void * var, int * err
-                  ,int name_size
-                  );
-void FC_FUNC_(adiosf_get_write_buffer, ADIOSF_GET_WRITE_BUFFER) (int64_t * fd_p, const char * name
-                             ,int64_t * size
-                             ,void ** buffer, int * err, int name_size
-                             );
-void FC_FUNC_(adiosf_read, ADIOSF_READ) (int64_t * fd_p, const char * name, void * buffer
-                 ,int64_t * buffer_size, int * err, int name_size
-                 );
-void FC_FUNC_(adiosf_set_path, ADIOSF_SET_PATH) (int64_t * fd_p, const char * path, int * err
-                     ,int path_size
-                     );
-void FC_FUNC_(adiosf_set_path_var, ADIOSF_SET_PATH_VAR) (int64_t * fd_p, const char * path
-                         ,const char * name, int * err
-                         ,int path_size, int name_size
-                         );
-void FC_FUNC_(adiosf_end_iteration, ADIOSF_END_ITERATION) (int * err);
-void FC_FUNC_(adiosf_start_calculation, ADIOSF_START_CALCULATION) (int * err);
-void FC_FUNC_(adiosf_stop_calculation, ADIOSF_STOP_CALCULATION) (int * err);
-void FC_FUNC_(adiosf_close, ADIOSF_CLOSE) (int64_t * fd_p, int * err);
-void FC_FUNC_(adiosf_declare_group, ADIOSF_DECLARE_GROUP) (int64_t * id, const char * name
-                          ,const char * coordination_comm
-                          ,const char * coordination_var
-                          ,const char * time_index, int * err
-                          ,int name_size, int coordination_comm_size
-                          ,int coordination_var_size, int time_index_size
-                          );
-void FC_FUNC_(adiosf_define_var, ADIOSF_DEFINE_VAR) (int64_t * group_id, const char * name
-                       ,const char * path, int * type
-                       ,const char * dimensions
-                       ,const char * global_dimensions
-                       ,const char * local_offsets, int * err
-                       ,int name_size, int path_size, int dimensions_size
-                       ,int global_dimensions_size, int local_offsets_size
-                       );
-void FC_FUNC_(adiosf_define_attribute, ADIOSF_DEFINE_ATTRIBUTE) (int64_t * group, const char * name
-                             ,const char * path, int type, const char * value
-                             ,const char * var, int * err
-                             ,int name_size, int path_size, int value_size
-                             ,int var_size
-                             );
-void FC_FUNC_(adiosf_select_method, ADIOSF_SELECT_METHOD) (int * priority, const char * method
-                          ,const char * parameters, const char * type
-                          ,const char * base_path, int * iters, int * err
-                          ,int method_size
-                          ,int parameters_size, int type_size
-                          ,int base_path_size
-                          );
-void FC_FUNC_(adiosf_select_method, ADIOSF_SELECT_METHOD) (int * priority, const char * method
-                          ,const char * parameters, const char * type
-                          ,const char * base_path, int * iters, int * err
-                          ,int method_size
-                          ,int parameters_size, int type_size
-                          ,int base_path_size
-                          );
-*/
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
diff --git a/src/adios_error.h b/src/adios_error.h
deleted file mode 100644
index 13dae1d..0000000
--- a/src/adios_error.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* 
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-#ifndef __ADIOS_ERROR_H_
-#define __ADIOS_ERROR_H_
-
-enum ADIOS_ERRCODES {
-     err_no_error = 0
-    ,err_no_memory
-    ,err_MPI_open_error
-    ,err_file_not_found_error
-    ,err_invalid_file_pointer
-    ,err_invalid_group
-    ,err_invalid_group_struct
-    ,err_invalid_varid
-    ,err_invalid_varname
-    ,err_corrupted_variable
-    ,err_invalid_attrid
-    ,err_invalid_attrname
-    ,err_corrupted_attribute
-    ,err_invalid_attribute_reference
-    ,err_invalid_timestep
-    ,err_no_data_at_timestep
-    ,err_time_at_wrong_dimension
-    ,err_invalid_read_method
-    ,err_connection_failed
-    ,err_out_of_bound
-    ,err_operation_not_supported
-    ,err_end_of_file    // stream: fopen() returns if reached end of stream
-    ,err_too_many_files  // DART allows for using only a fixed number of different filenames
-    ,err_unspecified
-};
-
-void adios_error (enum ADIOS_ERRCODES errno, char *fmt, ...);
-void adios_error_at_line (enum ADIOS_ERRCODES errno, const char* filename, unsigned int linenum, char *fmt, ...);
-
-const char* adios_get_last_errmsg (void);
-
-#endif
diff --git a/src/adios_internals_mxml.c b/src/adios_internals_mxml.c
deleted file mode 100644
index 3166696..0000000
--- a/src/adios_internals_mxml.c
+++ /dev/null
@@ -1,3437 +0,0 @@
-/* 
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdint.h>
-#include <sys/stat.h> /* struct stat */
-
-// xml parser
-#include <mxml.h>
-
-#ifdef _NOMPI
-    /* Sequential processes can use the library compiled with -D_NOMPI */
-#   include "mpidummy.h"
-#else
-    /* Parallel applications should use MPI to communicate  */
-#   include "mpi.h"
-#endif
-
-#include "adios.h"
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
-#include "adios_internals.h"
-#include "adios_internals_mxml.h"
-#include "buffer.h"
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-static enum ADIOS_FLAG adios_host_language_fortran = adios_flag_yes;
-
-struct adios_method_list_struct * adios_methods = 0;
-struct adios_group_list_struct * adios_groups = 0;
-
-//extern struct adios_method_list_struct * adios_methods;
-//extern struct adios_group_list_struct * adios_groups;
-
-struct adios_transport_struct * adios_transports = 0;
-static int adios_transports_initialized = 0;
-
-// this macro makes getting the attributes easier
-// fix the bgp bugs
-#define GET_ATTR(n,attr,var,en)                              \
-if (!strcasecmp (n, attr->name)) {                           \
-    if (!var)                                                \
-    {                                                        \
-        var = attr->value;                                   \
-        continue;                                            \
-    }                                                        \
-    else                                                     \
-    {                                                        \
-        fprintf (stderr, "xml: duplicate attribute %s on %s (ignored)",n,en); \
-        continue;                                            \
-    }                                                        \
-}
-
-static enum ADIOS_DATATYPES parseType (const char * type, const char * name)
-{
-    if (   !strcasecmp (type, "byte")
-        || !strcasecmp (type, "integer*1")
-       )
-        return adios_byte;
-
-    if (   !strcasecmp (type, "short")
-        || !strcasecmp (type, "integer*2")
-       )
-        return adios_short;
-
-    if (   !strcasecmp (type, "integer")
-        || !strcasecmp (type, "integer*4")
-       )
-        return adios_integer;
-
-    if (   !strcasecmp (type, "long")
-        || !strcasecmp (type, "integer*8")
-       )
-        return adios_long;
-
-    if (   !strcasecmp (type, "unsigned byte")
-        || !strcasecmp (type, "unsigned integer*1")
-       )
-        return adios_unsigned_byte;
-
-    if (   !strcasecmp (type, "unsigned short")
-        || !strcasecmp (type, "unsigned integer*2")
-       )
-        return adios_unsigned_short;
-
-    if (   !strcasecmp (type, "unsigned integer")
-        || !strcasecmp (type, "unsigned integer*4")
-       )
-        return adios_unsigned_integer;
-
-    if (   !strcasecmp (type, "unsigned long")
-        || !strcasecmp (type, "unsigned integer*8")
-       )
-        return adios_unsigned_long;
-
-    if (   !strcasecmp (type, "real")
-        || !strcasecmp (type, "real*4")
-        || !strcasecmp (type, "float")
-       )
-        return adios_real;
-
-    if (   !strcasecmp (type, "real*8")
-        || !strcasecmp (type, "double")
-        || !strcasecmp (type, "long float")
-       )
-        return adios_double;
-
-    if (   !strcasecmp (type, "real*16")
-        || !strcasecmp (type, "long double")
-       )
-        return adios_long_double;
-
-    if (!strcasecmp (type, "string"))
-        return adios_string;
-
-    if (   !strcasecmp (type, "complex")
-        || !strcasecmp (type, "complex*8")
-       )
-        return adios_complex;
-
-    if (   !strcasecmp (type, "double complex")
-        || !strcasecmp (type, "complex*16")
-       )
-        return adios_double_complex;
-
-    fprintf (stderr, "config.xml: invalid type: %s in var %s\n", type, name);
-
-    return adios_unknown;
-}
-
-static enum ADIOS_FLAG parseFlag (const char * attr_name, const char * flag
-                                 ,enum ADIOS_FLAG default_value
-                                 )
-{
-    if (!flag)
-        return default_value;
-
-    if (!strcasecmp (flag, "yes"))
-        return adios_flag_yes;
-
-    if (!strcasecmp (flag, "no"))
-        return adios_flag_no;
-
-    fprintf (stderr, "config.xml: %s must have a value of 'yes' or 'no' "
-                     "not: %s\n", attr_name, flag
-            );
-
-    return adios_flag_unknown;
-}
-
-
-static void adios_append_mesh_item (struct adios_mesh_item_list_struct ** root
-                                   ,struct adios_mesh_item_list_struct * item
-                                   )
-{
-    while (root)
-    {
-        if (!*root)
-        {
-            *root = item;
-            root = 0;
-        }
-        else
-        {
-            root = &(*root)->next;
-        }
-    }
-}
-
-static void adios_append_mesh_var (struct adios_mesh_var_list_struct ** root
-                                  ,struct adios_mesh_var_list_struct * var
-                                  )
-{
-    while (root)
-    {
-        if (!*root)
-        {
-            *root = var;
-            root = 0;
-        }
-        else
-        {
-            root = &(*root)->next;
-        }
-    }
-}
-
-static void adios_append_mesh_cell_list
-                           (struct adios_mesh_cell_list_list_struct ** root
-                           ,struct adios_mesh_cell_list_list_struct * cell_list
-                           )
-{
-    while (root)
-    {
-        if (!*root)
-        {
-            *root = cell_list;
-            root = 0;
-        }
-        else
-        {
-            root = &(*root)->next;
-        }
-    }
-}
-
-
-// dimensions is a comma separated list of dimension magnitudes
-static int parseMeshUniformDimensions (const char * dimensions
-                                      ,struct adios_group_struct * new_group
-                                      ,struct adios_mesh_uniform_struct * mesh
-                                      )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    char * tmp;
-    struct adios_mesh_item_list_struct * item = 0;
-
-    if (!dimensions)
-    {
-        fprintf (stderr, "config.xml: mesh uniform dimensions value "
-                         "required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (dimensions);
-
-    c = d1;
-    tmp = c;
-
-    while (c && *c)
-    {
-        if (*c == ',')
-        {
-            item = (struct adios_mesh_item_list_struct *) malloc
-                            (sizeof (struct adios_mesh_item_list_struct));
-            item->next = 0;
-
-            if (!item)
-            {
-                fprintf (stderr, "Out of memory parseMeshUniformDimensions\n");
-                free (d1);
-
-                return 0;
-            }
-
-            *c = '\0';
-            if (adios_int_is_num (tmp))
-            {
-                item->item.rank = strtod (tmp, 0);
-                item->item.var = 0;
-            }
-            else
-            {
-                item->item.rank = 0.0;
-                item->item.var =
-                    adios_find_var_by_name (new_group->vars, tmp
-                                           ,new_group->all_unique_var_names
-                                           );
-                if (!item->item.var)
-                {
-                    fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                            ,tmp
-                            );
-                    free (d1);
-
-                    return 0;
-                }
-            }
-            adios_append_mesh_item (&(mesh->dimensions), item);
-            tmp = c + 1;
-        }
-        else
-            c++;
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshUniformOrigin (const char * origin
-                                  ,struct adios_group_struct * new_group
-                                  ,struct adios_mesh_uniform_struct * mesh
-                                  )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    struct adios_mesh_item_list_struct * item = 0;
-
-    if (!origin)
-    {
-        fprintf (stderr, "config.xml: mesh uniform origin value "
-                         "required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (origin);
-
-    c = strtok (d1, ",");
-
-    while (c)
-    {
-        item = (struct adios_mesh_item_list_struct *) malloc
-                            (sizeof (struct adios_mesh_item_list_struct));
-        item->next = 0;
-
-        if (!item)
-        {
-            fprintf (stderr, "Out of memory parseMeshUniformOrigin\n");
-            free (d1);
-
-            return 0;
-        }
-
-        if (adios_int_is_var (c))
-        {
-            item->item.rank = 0.0;
-            item->item.var =
-                    adios_find_var_by_name (new_group->vars, c
-                                           ,new_group->all_unique_var_names
-                                           );
-            if (!item->item.var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            item->item.rank = strtod (c, 0);
-            item->item.var = 0;
-        }
-
-        adios_append_mesh_item (&(mesh->origin), item);
-
-        c = strtok (NULL, ",");
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshUniformSpacing (const char * spacing
-                                   ,struct adios_group_struct * new_group
-                                   ,struct adios_mesh_uniform_struct * mesh
-                                   )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    char * tmp;
-    struct adios_mesh_item_list_struct * item = 0;
-
-    if (!spacing)
-    {
-        fprintf (stderr, "config.xml: mesh uniform spacing value "
-                         "required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (spacing);
-
-    c = d1;
-    tmp = c;
-
-    while (c && *c)
-    {
-        if (*c == ',')
-        {
-            item = (struct adios_mesh_item_list_struct *) malloc
-                            (sizeof (struct adios_mesh_item_list_struct));
-            item->next = 0;
-
-            if (!item)
-            {
-                fprintf (stderr, "Out of memory parseMeshUniformSpacing\n");
-                free (d1);
-
-                return 0;
-            }
-
-            *c = '\0';
-            if (adios_int_is_num (tmp))
-            {
-                item->item.rank = strtod (tmp, 0);
-                item->item.var = 0;
-            }
-            else
-            {
-                item->item.rank = 0.0;
-                item->item.var =
-                    adios_find_var_by_name (new_group->vars, tmp
-                                           ,new_group->all_unique_var_names
-                                           );
-                if (!item->item.var)
-                {
-                    fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                            ,tmp
-                            );
-                    free (d1);
-
-                    return 0;
-                }
-            }
-            adios_append_mesh_item (&(mesh->spacing), item);
-            tmp = c + 1;
-        }
-        else
-            c++;
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshRectilinearDimensions (const char * dimensions
-                                          ,struct adios_group_struct * new_group
-                                          ,struct adios_mesh_rectilinear_struct * mesh
-                                          )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    char * tmp;
-    struct adios_mesh_item_list_struct * item = 0;
-
-    if (!dimensions)
-    {
-        fprintf (stderr, "config.xml: mesh rectilinear dimensions value "
-                         "required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (dimensions);
-
-    c = d1;
-    tmp = c;
-
-    while (c && *c)
-    {
-        if (*c == ',')
-        {
-            item = (struct adios_mesh_item_list_struct *) malloc
-                            (sizeof (struct adios_mesh_item_list_struct));
-            item->next = 0;
-
-            if (!item)
-            {
-                fprintf (stderr, "Out of memory parseMeshRectilinearDimensions\n");
-                free (d1);
-
-                return 0;
-            }
-
-            *c = '\0';
-            if (adios_int_is_num (tmp))
-            {
-                item->item.rank = strtod (tmp, 0);
-                item->item.var = 0;
-            }
-            else
-            {
-                item->item.rank = 0.0;
-                item->item.var =
-                    adios_find_var_by_name (new_group->vars, tmp
-                                           ,new_group->all_unique_var_names
-                                           );
-                if (!item->item.var)
-                {
-                    fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                            ,tmp
-                            );
-                    free (d1);
-
-                    return 0;
-                }
-            }
-            adios_append_mesh_item (&(mesh->dimensions), item);
-            tmp = c + 1;
-        }
-        else
-            c++;
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshRectilinearCoordinatesMultiVar (const char * coordinates
-                                                   ,struct adios_group_struct * new_group
-                                                   ,struct adios_mesh_rectilinear_struct * mesh
-                                                   )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    char * tmp;
-    struct adios_mesh_var_list_struct * var = 0;
-
-    if (!coordinates)
-    {
-        fprintf (stderr, "config.xml: mesh rectilinear coordinates-multi-var "
-                         "value required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (coordinates);
-
-    c = d1;
-    tmp = c;
-
-    while (c && *c)
-    {
-        if (*c == ',')
-        {
-            var = (struct adios_mesh_var_list_struct *) malloc
-                            (sizeof (struct adios_mesh_var_list_struct));
-            var->next = 0;
-
-            if (!var)
-            {
-                fprintf (stderr, "Out of memory "
-                                 "parseMeshRectilinearCoordinatesMultiVar\n"
-                        );
-                free (d1);
-
-                return 0;
-            }
-
-            *c = '\0';
-            if (adios_int_is_var (tmp))
-            {
-                var->var =
-                    adios_find_var_by_name (new_group->vars, tmp
-                                           ,new_group->all_unique_var_names
-                                           );
-                if (!var->var)
-                {
-                    fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                            ,tmp
-                            );
-                    free (d1);
-
-                    return 0;
-                }
-            }
-            adios_append_mesh_var (&(mesh->coordinates), var);
-            tmp = c + 1;
-        }
-        else
-            c++;
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshRectilinearCoordinatesSingleVar (const char * coordinates
-                                                    ,struct adios_group_struct * new_group
-                                                    ,struct adios_mesh_rectilinear_struct * mesh
-                                                    )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    char * tmp;
-    struct adios_mesh_var_list_struct * var = 0;
-
-    if (!coordinates)
-    {
-        fprintf (stderr, "config.xml: mesh rectilinear coordinates-single-var "
-                         "value required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (coordinates);
-
-    c = d1;
-    tmp = c;
-
-    while (c && *c)
-    {
-        if (*c == ',')
-        {
-            var = (struct adios_mesh_var_list_struct *) malloc
-                            (sizeof (struct adios_mesh_var_list_struct));
-            var->next = 0;
-
-            if (!var)
-            {
-                fprintf (stderr, "Out of memory "
-                                 "parseMeshRectilinearCoordinatesSingleVar\n"
-                        );
-                free (d1);
-
-                return 0;
-            }
-
-            *c = '\0';
-            if (adios_int_is_var (tmp))
-            {
-                var->var =
-                    adios_find_var_by_name (new_group->vars, tmp
-                                           ,new_group->all_unique_var_names
-                                           );
-                if (!var->var)
-                {
-                    fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                            ,tmp
-                            );
-                    free (d1);
-
-                    return 0;
-                }
-            }
-            adios_append_mesh_var (&(mesh->coordinates), var);
-            tmp = c + 1;
-        }
-        else
-            c++;
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshStructuredNspace (const char * nspace
-                                     ,struct adios_group_struct * new_group
-                                     ,struct adios_mesh_structured_struct * mesh
-                                     )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    struct adios_mesh_item_struct * item = 0;
-
-    if (!nspace)
-    {
-        fprintf (stderr, "config.xml: mesh structured nspace value "
-                         "required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (nspace);
-
-    c = strtok (d1, ",");
-
-    while (c)
-    {
-        item = (struct adios_mesh_item_struct *) malloc
-                            (sizeof (struct adios_mesh_item_struct));
-
-        if (!item)
-        {
-            fprintf (stderr, "Out of memory parseMeshStructuredNspace\n");
-            free (d1);
-
-            return 0;
-        }
-
-        if (adios_int_is_var (c))
-        {
-            item->rank = 0.0;
-            item->var =
-                    adios_find_var_by_name (new_group->vars, c
-                                           ,new_group->all_unique_var_names
-                                           );
-            if (!item->var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            item->rank = strtod (c, 0);
-            item->var = 0;
-        }
-
-        mesh->nspace = item;
-
-        c = strtok (NULL, ",");
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshStructuredDimensions (const char * dimensions
-                                         ,struct adios_group_struct * new_group
-                                         ,struct adios_mesh_structured_struct * mesh
-                                         )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    struct adios_mesh_item_list_struct * item = 0;
-
-    if (!dimensions)
-    {
-        fprintf (stderr, "config.xml: mesh structured dimensions value "
-                         "required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (dimensions);
-
-    c = strtok (d1, ",");
-
-    while (c)
-    {
-        item = (struct adios_mesh_item_list_struct *) malloc
-                            (sizeof (struct adios_mesh_item_list_struct));
-        item->next = 0;
-
-        if (!item)
-        {
-            fprintf (stderr, "Out of memory parseMeshStructuredDimensions\n");
-            free (d1);
-
-            return 0;
-        }
-
-        if (adios_int_is_var (c))
-        {
-            item->item.rank = 0.0;
-            item->item.var =
-                    adios_find_var_by_name (new_group->vars, c
-                                           ,new_group->all_unique_var_names
-                                           );
-            if (!item->item.var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            item->item.rank = strtod (c, 0);
-            item->item.var = 0;
-        }
-
-        adios_append_mesh_item (&(mesh->dimensions), item);
-
-        c = strtok (NULL, ",");
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshStructuredPointsMultiVar (const char * points
-                                             ,struct adios_group_struct * new_group
-                                             ,struct adios_mesh_structured_struct * mesh
-                                             )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    struct adios_mesh_var_list_struct * var = 0;
-
-    if (!points)
-    {
-        fprintf (stderr, "config.xml: mesh structured points-multi-var value "
-                         "required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (points);
-
-    c = strtok (d1, ",");
-
-    while (c)
-    {
-        var = (struct adios_mesh_var_list_struct *) malloc
-                        (sizeof (struct adios_mesh_var_list_struct));
-        var->next = 0;
-
-        if (!var)
-        {
-            fprintf (stderr, "Out of memory parseMeshStructuredPointsMultiVar\n");
-            free (d1);
-
-            return 0;
-        }
-
-        if (adios_int_is_var (c))
-        {
-            var->var =
-                    adios_find_var_by_name (new_group->vars, c
-                                           ,new_group->all_unique_var_names
-                                           );
-            if (!var->var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            var->var = 0;
-        }
-
-        adios_append_mesh_var (&(mesh->points), var);
-
-        c = strtok (NULL, ",");
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshStructuredPointsSingleVar (const char * points
-                                              ,struct adios_group_struct * new_group
-                                              ,struct adios_mesh_structured_struct * mesh
-                                              )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    struct adios_mesh_var_list_struct * var = 0;
-
-    if (!points)
-    {
-        fprintf (stderr, "config.xml: mesh structured points-single-var value "
-                         "required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (points);
-
-    c = strtok (d1, ",");
-
-    while (c)
-    {
-        var = (struct adios_mesh_var_list_struct *) malloc
-                        (sizeof (struct adios_mesh_var_list_struct));
-        var->next = 0;
-
-        if (!var)
-        {
-            fprintf (stderr, "Out of memory parseMeshStructuredPointsSingleVar\n");
-            free (d1);
-
-            return 0;
-        }
-
-        if (adios_int_is_var (c))
-        {
-            var->var =
-                    adios_find_var_by_name (new_group->vars, c
-                                           ,new_group->all_unique_var_names
-                                           );
-            if (!var->var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            var->var = 0;
-        }
-
-        adios_append_mesh_var (&(mesh->points), var);
-
-        c = strtok (NULL, ",");
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshUnstructuredPoints (const char * components
-                                       ,const char * number_of_points
-                                       ,const char * value
-                                       ,struct adios_group_struct * new_group
-                                       ,struct adios_mesh_unstructured_struct * mesh
-                                       )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    struct adios_var_struct * var = 0;
-
-    if (!components)
-    {
-        fprintf (stderr, "config.xml: mesh structured points-single-var value "
-                         "required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (components);
-
-    c = strtok (d1, ",");
-
-    while (c)
-    {
-        if (adios_int_is_var (c))
-        {
-            var = adios_find_var_by_name (new_group->vars, c
-                                         ,new_group->all_unique_var_names
-                                         );
-            if (!var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            var = 0;
-        }
-
-        mesh->points = var;
-
-        c = strtok (NULL, ",");
-    }
-
-    free (d1);
-
-    return 1;
-}
-
-static int parseMeshUnstructuredUniformCells (const char * count
-                                             ,const char * data
-                                             ,const char * type
-                                             ,struct adios_group_struct * new_group
-                                             ,struct adios_mesh_unstructured_struct * mesh
-                                             )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    struct adios_mesh_cell_list_list_struct * cell_list = 0;
-
-    if (!count)
-    {
-        fprintf (stderr, "config.xml: mesh unstructured uniform-cells "
-                         "count value required\n"
-                );
-
-        return 0;
-    }
-    if (!data)
-    {
-        fprintf (stderr, "config.xml: mesh unstructured uniform-cells "
-                         "data value required\n"
-                );
-
-        return 0;
-    }
-    if (!type)
-    {
-        fprintf (stderr, "config.xml: mesh unstructured uniform-cells "
-                         "type value required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (count);
-    c = strtok (d1, ",");
-
-    cell_list = (struct adios_mesh_cell_list_list_struct *) malloc
-                        (sizeof (struct adios_mesh_cell_list_list_struct));
-    cell_list->next = 0;
-
-    if (!cell_list)
-    {
-        fprintf (stderr, "Out of memory parseMeshStructuredPointsSingleVar\n");
-        free (d1);
-
-        return 0;
-    }
-
-    while (c)
-    {
-        if (adios_int_is_var (c))
-        {
-            cell_list->cell_list.count.var =
-                    adios_find_var_by_name (new_group->vars, c
-                                           ,new_group->all_unique_var_names
-                                           );
-            cell_list->cell_list.count.rank = 0;
-            if (!cell_list->cell_list.count.var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            cell_list->cell_list.count.var = 0;
-            cell_list->cell_list.count.rank = strtod (c, 0);
-        }
-
-        c = strtok (NULL, ",");
-    }
-    free (d1);
-
-    d1 = strdup (data);
-    c = strtok (d1, ",");
-    while (c)
-    {
-        if (adios_int_is_var (c))
-        {
-            cell_list->cell_list.data =
-                 adios_find_var_by_name (new_group->vars, c
-                                        ,new_group->all_unique_var_names
-                                        );
-            if (!cell_list->cell_list.data)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            cell_list->cell_list.data = 0;
-        }
-
-        c = strtok (NULL, ",");
-    }
-    free (d1);
-
-    d1 = strdup (type);
-    c = strtok (d1, ",");
-    while (c)
-    {
-        if (adios_int_is_var (c))
-        {
-            cell_list->cell_list.type.var =
-                     adios_find_var_by_name (new_group->vars, c
-                                            ,new_group->all_unique_var_names
-                                            );
-            cell_list->cell_list.type.rank = 0;
-            if (!cell_list->cell_list.type.var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            cell_list->cell_list.type.var = 0;
-            cell_list->cell_list.type.rank = strtod (c, 0);
-        }
-
-        c = strtok (NULL, ",");
-    }
-    free (d1);
-
-    adios_append_mesh_cell_list (&(mesh->cell_list), cell_list);
-
-    return 1;
-}
-
-static int parseMeshUnstructuredMixedCells (const char * count
-                                           ,const char * data
-                                           ,const char * types
-                                           ,struct adios_group_struct * new_group
-                                           ,struct adios_mesh_unstructured_struct * mesh
-                                           )
-{
-    char * c;  // comma location
-    char * d1; // save of strdup
-    struct adios_mesh_cell_list_list_struct * cell_list = 0;
-
-    if (!count)
-    {
-        fprintf (stderr, "config.xml: mesh unstructured uniform-cells "
-                         "count value required\n"
-                );
-
-        return 0;
-    }
-    if (!data)
-    {
-        fprintf (stderr, "config.xml: mesh unstructured uniform-cells "
-                         "data value required\n"
-                );
-
-        return 0;
-    }
-    if (!types)
-    {
-        fprintf (stderr, "config.xml: mesh unstructured uniform-cells "
-                         "types value required\n"
-                );
-
-        return 0;
-    }
-
-    d1 = strdup (count);
-    c = strtok (d1, ",");
-
-    cell_list = (struct adios_mesh_cell_list_list_struct *) malloc
-                        (sizeof (struct adios_mesh_cell_list_list_struct));
-    cell_list->next = 0;
-
-    if (!cell_list)
-    {
-        fprintf (stderr, "Out of memory parseMeshStructuredPointsSingleVar\n");
-        free (d1);
-
-        return 0;
-    }
-
-    while (c)
-    {
-        if (adios_int_is_var (c))
-        {
-            cell_list->cell_list.count.var =
-                   adios_find_var_by_name (new_group->vars, c
-                                          ,new_group->all_unique_var_names
-                                          );
-            cell_list->cell_list.count.rank = 0;
-            if (!cell_list->cell_list.count.var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            cell_list->cell_list.count.var = 0;
-            cell_list->cell_list.count.rank = strtod (c, 0);
-        }
-
-        c = strtok (NULL, ",");
-    }
-    free (d1);
-
-    d1 = strdup (data);
-    c = strtok (d1, ",");
-    while (c)
-    {
-        if (adios_int_is_var (c))
-        {
-            cell_list->cell_list.data =
-                   adios_find_var_by_name (new_group->vars, c
-                                          ,new_group->all_unique_var_names
-                                          );
-            if (!cell_list->cell_list.data)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            cell_list->cell_list.data = 0;
-        }
-
-        c = strtok (NULL, ",");
-    }
-    free (d1);
-
-    d1 = strdup (types);
-    c = strtok (d1, ",");
-    while (c)
-    {
-        if (adios_int_is_var (c))
-        {
-            cell_list->cell_list.type.var =
-                   adios_find_var_by_name (new_group->vars, c
-                                          ,new_group->all_unique_var_names
-                                          );
-            cell_list->cell_list.type.rank = 0;
-            if (!cell_list->cell_list.type.var)
-            {
-                fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                        ,c
-                        );
-                free (d1);
-
-                return 0;
-            }
-        }
-        else
-        {
-            cell_list->cell_list.type.var = 0;
-            cell_list->cell_list.type.rank = strtod (c, 0);
-        }
-
-        c = strtok (NULL, ",");
-    }
-    free (d1);
-
-    adios_append_mesh_cell_list (&(mesh->cell_list), cell_list);
-
-    return 1;
-}
-
-// primary mesh XML parsing
-static int parseMeshUniform (mxml_node_t * node
-                            ,struct adios_group_struct * new_group
-                            ,struct adios_mesh_uniform_struct ** mesh
-                            )
-{
-    mxml_node_t * n;
-    int saw_dimensions = 0;
-    int saw_origin = 0;
-    int saw_spacing = 0;
-
-    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
-        ;n
-        ;n = mxmlWalkNext (n, node, MXML_DESCEND)
-        )
-    {
-        if (n->type != MXML_ELEMENT)
-        {
-            continue;
-        }
-
-        if (!strcasecmp (n->value.element.name, "dimensions"))
-        {
-            const char * dimensions;
-
-            if (saw_dimensions)
-            {
-                fprintf (stderr, "config.xml: only one dimensions "
-                 "definition allowed per mesh sructured-points\n"
-                        );
-
-                return 0;
-            }
-
-            saw_dimensions = 1;
-            dimensions = mxmlElementGetAttr (n, "value");
-
-            if (!dimensions)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "dimensions required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshUniformDimensions (dimensions, new_group, *mesh))
-                return 0;
-        } else
-        if (!strcasecmp (n->value.element.name, "origin"))
-        {
-            const char * value;
-
-            if (saw_origin)
-            {
-                fprintf (stderr, "config.xml: only one origin "
-                                 "definition allowed per mesh uniform\n"
-                        );
-
-                return 0;
-            }
-
-            saw_origin = 1;
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "origin required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshUniformOrigin (value, new_group, *mesh))
-                return 0;
-        } else
-        if (!strcasecmp (n->value.element.name, "spacing"))
-        {
-            const char * value;
-
-            if (saw_spacing)
-            {
-                fprintf (stderr, "config.xml: only one spacing "
-                                 "definition allowed per mesh uniform\n"
-                        );
-
-                return 0;
-            }
-
-            saw_spacing = 1;
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "spacing required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshUniformSpacing (value, new_group, *mesh))
-                return 0;
-        } else
-        {
-            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
-            {
-                continue;
-            }
-        }
-    }
-
-    if (!saw_dimensions)
-    {
-        fprintf (stderr, "config.xml: dimensions required on mesh "
-                         "type=uniform\n"
-                );
-
-        return 0;
-    }
-
-    return 1;
-}
-
-static int parseMeshRectilinear (mxml_node_t * node
-                               ,struct adios_group_struct * new_group
-                               ,struct adios_mesh_rectilinear_struct ** mesh
-                               )
-{
-    mxml_node_t * n;
-    int saw_dimensions = 0;
-    int saw_coordinates_multi_var = 0;
-    int saw_coordinates_single_var = 0;
-
-    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
-        ;n
-        ;n = mxmlWalkNext (n, node, MXML_DESCEND)
-        )
-    {
-        if (n->type != MXML_ELEMENT)
-        {
-            continue;
-        }
-
-        if (!strcasecmp (n->value.element.name, "dimensions"))
-        {
-            const char * value;
-
-            if (saw_dimensions)
-            {
-                fprintf (stderr, "config.xml: only one dimensions "
-                                 "definition allowed per mesh rectilinear\n"
-                        );
-
-                return 0;
-            }
-
-            saw_dimensions = 1;
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "dimensions required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshRectilinearDimensions (value, new_group, *mesh))
-                return 0;
-        } else
-        if (!strcasecmp (n->value.element.name, "coordinates-multi-var"))
-        {
-            const char * value;
-
-            if (saw_coordinates_multi_var || saw_coordinates_single_var)
-            {
-                fprintf (stderr, "config.xml: only one coordinates "
-                                 "definition allowed per mesh rectilinear\n"
-                        );
-
-                return 0;
-            }
-
-            saw_coordinates_multi_var = 1;
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "coordinates-multi-var required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshRectilinearCoordinatesMultiVar (value, new_group, *mesh))
-                return 0;
-            (*mesh)->coordinates_single_var = adios_flag_no;
-        } else
-        if (!strcasecmp (n->value.element.name, "coordinates-single-var"))
-        {
-            const char * value;
-
-            if (saw_coordinates_single_var || saw_coordinates_multi_var)
-            {
-                fprintf (stderr, "config.xml: only one coordinates "
-                                 "definition allowed per mesh rectilinear\n"
-                        );
-
-                return 0;
-            }
-
-            saw_coordinates_single_var = 1;
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "coordinates-single-var required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshRectilinearCoordinatesSingleVar (value, new_group, *mesh))
-                return 0;
-            (*mesh)->coordinates_single_var = adios_flag_yes;
-        } else
-        {
-            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
-            {
-                continue;
-            }
-        }
-    }
-
-    if (!saw_dimensions)
-    {
-        fprintf (stderr, "config.xml: dimensions required on mesh "
-                         "type=rectilinear\n"
-                );
-
-        return 0;
-    }
-    if (!saw_coordinates_multi_var && !saw_coordinates_single_var)
-    {
-        fprintf (stderr, "config.xml: coordinates-multi-var or "
-                         "coordinates-single-var required on mesh "
-                         "type=rectilinear\n"
-                );
-
-        return 0;
-    }
-
-    return 1;
-}
-
-static int parseMeshStructured (mxml_node_t * node
-                               ,struct adios_group_struct * new_group
-                               ,struct adios_mesh_structured_struct ** mesh
-                               )
-{
-    mxml_node_t * n;
-    int saw_nspace = 0;
-    int saw_dimensions = 0;
-    int saw_points_multi_var = 0;
-    int saw_points_single_var = 0;
-
-    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
-        ;n
-        ;n = mxmlWalkNext (n, node, MXML_DESCEND)
-        )
-    {
-        if (n->type != MXML_ELEMENT)
-        {
-            continue;
-        }
-
-        if (!strcasecmp (n->value.element.name, "nspace"))
-        {
-            const char * value;
-
-            if (saw_nspace)
-            {
-                fprintf (stderr, "config.xml: only one nspace "
-                                 "definition allowed per mesh structured\n"
-                        );
-
-                return 0;
-            }
-
-            saw_nspace = 1;
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "nspace required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshStructuredNspace (value, new_group, *mesh))
-                return 0;
-        } else
-        if (!strcasecmp (n->value.element.name, "dimensions"))
-        {
-            const char * value;
-
-            if (saw_dimensions)
-            {
-                fprintf (stderr, "config.xml: only one dimensions "
-                                 "definition allowed per mesh structured\n"
-                        );
-
-                return 0;
-            }
-
-            saw_dimensions = 1;
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "dimensions required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshStructuredDimensions (value, new_group, *mesh))
-                return 0;
-        } else
-        if (!strcasecmp (n->value.element.name, "points-multi-var"))
-        {
-            const char * value;
-
-            if (saw_points_multi_var || saw_points_single_var)
-            {
-                fprintf (stderr, "config.xml: only one points "
-                                 "definition allowed per mesh structured\n"
-                        );
-
-                return 0;
-            }
-
-            saw_points_multi_var = 1;
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "points-multi-var required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshStructuredPointsMultiVar (value, new_group, *mesh))
-                return 0;
-            (*mesh)->points_single_var = adios_flag_no;
-        } else
-        if (!strcasecmp (n->value.element.name, "points-single-var"))
-        {
-            const char * value;
-
-            if (saw_points_multi_var || saw_points_single_var)
-            {
-                fprintf (stderr, "config.xml: only one points "
-                                 "definition allowed per mesh structured\n"
-                        );
-
-                return 0;
-            }
-
-            saw_points_single_var = 1;
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "points-single-var required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshStructuredPointsSingleVar (value, new_group, *mesh))
-                return 0;
-            (*mesh)->points_single_var = adios_flag_yes;
-        } else
-        {
-            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
-            {
-                continue;
-            }
-        }
-    }
-
-    if (!saw_dimensions)
-    {
-        fprintf (stderr, "config.xml: dimensions required on mesh "
-                         "type=structured\n"
-                );
-
-        return 0;
-    }
-    if (!saw_points_multi_var && !saw_points_single_var)
-    {
-        fprintf (stderr, "config.xml: points-single-var or points-multi-var "
-                         "required on mesh type=structured\n"
-                );
-
-        return 0;
-    }
-
-    return 1;
-}
-
-static int parseMeshUnstructured (mxml_node_t * node
-                                 ,struct adios_group_struct * new_group
-                                 ,struct adios_mesh_unstructured_struct ** mesh
-                                 )
-{
-    mxml_node_t * n;
-    int saw_points = 0;
-    int saw_cell_set = 0;
-
-    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
-        ;n
-        ;n = mxmlWalkNext (n, node, MXML_DESCEND)
-        )
-    {
-        if (n->type != MXML_ELEMENT)
-        {
-            continue;
-        }
-
-        if (!strcasecmp (n->value.element.name, "points"))
-        {
-            const char * components;
-            const char * number_of_points;
-            const char * value;
-
-            if (saw_points)
-            {
-                fprintf (stderr, "config.xml: only one points "
-                                 "definition allowed per mesh unstructured\n"
-                        );
-
-                return 0;
-            }
-
-            saw_points = 1;
-            components = mxmlElementGetAttr (n, "components");
-            number_of_points = mxmlElementGetAttr (n, "number-of-points");
-            value = mxmlElementGetAttr (n, "value");
-
-            if (!components)
-            {
-                fprintf (stderr, "config.xml: components attribute on "
-                                 "points required\n"
-                        );
-
-                return 0;
-            }
-            if (!number_of_points)
-            {
-                fprintf (stderr, "config.xml: number-of-points attribute on "
-                                 "points required\n"
-                        );
-
-                return 0;
-            }
-            if (!value)
-            {
-                fprintf (stderr, "config.xml: value attribute on "
-                                 "points required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshUnstructuredPoints (components, number_of_points
-                                             ,value, new_group, *mesh
-                                             )
-               )
-                return 0;
-        } else
-        if (!strcasecmp (n->value.element.name, "uniform-cells"))
-        {
-            const char * count;
-            const char * data;
-            const char * type;
-
-            saw_cell_set = 1;
-            count = mxmlElementGetAttr (n, "count");
-            data = mxmlElementGetAttr (n, "data");
-            type = mxmlElementGetAttr (n, "type");
-
-            if (!count)
-            {
-                fprintf (stderr, "config.xml: count attribute on "
-                                 "uniform-cells required\n"
-                        );
-
-                return 0;
-            }
-            if (!data)
-            {
-                fprintf (stderr, "config.xml: data attribute on "
-                                 "uniform-cells required\n"
-                        );
-
-                return 0;
-            }
-            if (!type)
-            {
-                fprintf (stderr, "config.xml: type attribute on "
-                                 "uniform-cells required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshUnstructuredUniformCells (count, data, type
-                                                   ,new_group, *mesh
-                                                   )
-               )
-                return 0;
-        } else
-        if (!strcasecmp (n->value.element.name, "mixed-cells"))
-        {
-            const char * count;
-            const char * data;
-            const char * types;
-
-            saw_cell_set = 1;
-            count = mxmlElementGetAttr (n, "count");
-            data = mxmlElementGetAttr (n, "data");
-            types = mxmlElementGetAttr (n, "types");
-
-            if (!count)
-            {
-                fprintf (stderr, "config.xml: count attribute on "
-                                 "mixed-cells required\n"
-                        );
-
-                return 0;
-            }
-            if (!data)
-            {
-                fprintf (stderr, "config.xml: data attribute on "
-                                 "mixed-cells required\n"
-                        );
-
-                return 0;
-            }
-            if (!types)
-            {
-                fprintf (stderr, "config.xml: types attribute on "
-                                 "mixed-cells required\n"
-                        );
-
-                return 0;
-            }
-
-            if (!parseMeshUnstructuredMixedCells (count, data, types
-                                                   ,new_group, *mesh
-                                                   )
-               )
-                return 0;
-        } else
-        {
-            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
-            {
-                continue;
-            }
-        }
-    }
-
-    if (!saw_points)
-    {
-        fprintf (stderr, "config.xml: grid-nodes required on mesh "
-                         "type=unstructured\n"
-                );
-
-        return 0;
-    }
-    if (!saw_cell_set)
-    {
-        fprintf (stderr, "config.xml: at least one cell-set required on "
-                         "mesh type=unstructured\n"
-                );
-
-        return 0;
-    }
-
-    return 1;
-}
-
-static int validatePath (const struct adios_var_struct * vars
-                        ,const char * test_path
-                        )
-{
-    // if it is a default path, it is ok by default
-    if (!strcmp (test_path, "/"))
-    {
-        return 1;
-    }
-
-    char * path = strdup (test_path);
-    int len = strlen (path);
-    char * path_only;
-    char * var_only;
-    char * last_slash = strrchr (path, '/'); // find the last '/'
-    path_only = (char *) malloc (len + 1);
-    var_only = (char *) malloc (len + 1);
-    memset (path_only, 0, len + 1);
-    memset (var_only, 0, len + 1);
-    if (last_slash == path + len - 1)  // if it is a trailing '/', remove
-    {
-        last_slash = '\0';
-        last_slash = strrchr (path, '/');
-    }
-    if (last_slash == 0)
-    {
-        strcpy (path_only, "/");
-        strcpy (var_only, path);
-    }
-    else
-    {
-        strncpy (path_only, path, (last_slash - path));
-        strncpy (var_only, last_slash + 1, (len - (last_slash - path + 1)));
-    }
-
-    while (vars)
-    {
-        int path_only_len = strlen (path_only);
-        int var_path_len = strlen (vars->path);
-        int var_name_len = strlen (vars->name);
-        char full_path_matches = (!strcasecmp (vars->path, path));
-        char path_matches = (!strcasecmp (vars->path, path_only));
-        char var_matches = (!strcasecmp (vars->name, var_only));
-        char prefix_matches = 0;
-        char * path_var;
-        path_var = (char *) malloc (var_path_len + var_name_len + 2);
-        sprintf (path_var, "%s/%s", vars->path, vars->name);
-        char path_var_matches = (!strcasecmp (path_var, path));
-
-        if (var_path_len >= len && path_only_len > 0)
-            prefix_matches = (!strncmp (vars->path, path_only, path_only_len));
-        if (!prefix_matches)
-            prefix_matches = (!strncmp (vars->path, path, len));
-        int var_len = strlen (var_only);
-
-        if (   (path_matches && var_matches)
-            || (path_matches && var_len == 0)
-            || (full_path_matches)
-            || (prefix_matches)
-            || (path_var_matches)
-           )
-        {
-            free (path);
-            free (path_only);
-            free (var_only);
-            free (path_var);
-
-            return 1;
-        }
-        vars = vars->next;
-        free (path_var);
-    }
-
-    // not found
-    free (path);
-    free (path_only);
-    free (var_only);
-
-    return 0;
-}
-
-static int parseGroup (mxml_node_t * node)
-{
-    mxml_node_t * n;
-
-    const char * datagroup_name = 0;
-    const char * coordination_comm = 0;
-    const char * coordination_var = 0;
-    const char * host_language = 0;
-    const char * time_index_name = 0;
-    const char * stats = 0;
-
-    int64_t      ptr_new_group;
-    struct adios_group_struct * new_group;
-    enum ADIOS_FLAG host_language_fortran = adios_flag_yes, enable_stats = adios_flag_yes;
-    int i;
-
-    for (i = 0; i < node->value.element.num_attrs; i++)
-    {
-        mxml_attr_t * attr = &node->value.element.attrs [i];
-
-        GET_ATTR("name",attr,datagroup_name,"adios-group")
-        // JL: 1-2010
-        // Although this is not used, we aer leaving in the retrevial
-        // of this to avoid messages from all of the existing XML files.
-        // In a few months, once everything has been updated, we can remove
-        // this code
-        GET_ATTR("coordination-communicator",attr,coordination_comm,"adios-group")
-        GET_ATTR("coordination-var",attr,coordination_var,"adios-group")
-        GET_ATTR("host-language",attr,host_language,"adios-group")
-        GET_ATTR("time-index",attr,time_index_name,"adios-group")
-        GET_ATTR("stats",attr,stats,"adios-group")
-        fprintf (stderr, "config.xml: unknown attribute '%s' on %s "
-                         "(ignored)\n"
-                ,attr->name
-                ,"adios-group"
-                );
-    }
-
-    if (!datagroup_name)
-    {
-        fprintf (stderr,
-                 "config.xml: name attribute required on adios-group\n");
-
-        return 0;
-    }
-    if (!host_language)
-    {
-        host_language_fortran = adios_host_language_fortran;
-    }
-    else
-    {
-        if (!strcasecmp (host_language, "Fortran"))
-        {
-            host_language_fortran = adios_flag_yes;
-        }
-        else
-        {
-            if (!strcasecmp (host_language, "C"))
-            {
-                host_language_fortran = adios_flag_no;
-            }
-            else
-            {
-                fprintf (stderr, "config.xml: invalid host-language %s"
-                        ,host_language
-                        );
-
-                return 0;
-            }
-        }
-    }
-
-    if (!stats)
-    {
-        enable_stats = adios_flag_yes;
-    }
-    else
-    {
-        if (!strcasecmp (stats, "On"))
-        {
-            enable_stats = adios_flag_yes;
-        }
-        else if (!strcasecmp (stats, "Off"))
-        {
-            enable_stats = adios_flag_no;
-        }
-        else
-        {
-            fprintf (stderr, "config.xml, invalid stats %s"
-                    ,stats
-                    );
-            return 0;
-        }
-    }
-
-// fix the bgp bugs 
-/*
-    adios_common_declare_group ((int64_t *) &new_group, datagroup_name
-                               ,host_language_fortran, coordination_comm
-                               ,coordination_var, time_index_name
-                               );
-*/
-    adios_common_declare_group (&ptr_new_group, datagroup_name
-                               ,host_language_fortran, coordination_comm
-                               ,coordination_var, time_index_name
-                               ,enable_stats
-                               );
-     new_group = (struct adios_group_struct *)ptr_new_group;
-
-    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
-        ;n
-        ;n = mxmlWalkNext (n, node, MXML_NO_DESCEND)
-        )
-    {
-        const char * gb_global_dimensions = "";
-        const char * gb_local_offsets = "";
-
-        if (n->type != MXML_ELEMENT)
-        {
-            continue;
-        }
-
-        if (!strcasecmp (n->value.element.name, "var"))
-        {
-            const char * name = 0;
-            const char * path = 0;
-            const char * type = 0;
-            const char * dimensions = 0;
-            const char * dimension = 0;
-            const char * gread = 0;
-            const char * gwrite = 0;
-            const char * read_flag = 0;
-            enum ADIOS_DATATYPES t1;
-
-            for (i = 0; i < n->value.element.num_attrs; i++)
-            {
-                mxml_attr_t * attr = &n->value.element.attrs [i];
-
-                GET_ATTR("name",attr,name,"var")
-                GET_ATTR("path",attr,path,"var")
-                GET_ATTR("type",attr,type,"var")
-                GET_ATTR("dimensions",attr,dimensions,"var")
-                GET_ATTR("dimension",attr,dimension,"var")
-                GET_ATTR("gwrite",attr,gwrite,"var")
-                GET_ATTR("gread",attr,gread,"var")
-                GET_ATTR("read",attr,read_flag,"var")
-                fprintf (stderr, "config.xml: unknown attribute '%s' on %s "
-                                 "(ignored)\n"
-                        ,attr->name
-                        ,"var"
-                        );
-            }
-
-            if (!name)
-                name = "";  // this will catch the error
-            if (!path)
-                path = "/";
-            if (!type)
-                type = ""; // this will catch the error
-            t1 = parseType (type, name);
-
-            if (!dimensions)
-            {
-                dimensions = dimension;
-                if (!dimensions)
-                    dimensions = "";
-            }
-
-            if (read_flag)
-                parseFlag ("read", read_flag, adios_flag_no);
-
-// fix the bgp bugs
-//            if (!adios_common_define_var (*(int64_t *) &new_group, name
-            if (!adios_common_define_var (ptr_new_group, name
-                                         ,path, t1, dimensions
-                                         ,gb_global_dimensions
-                                         ,gb_local_offsets
-                                         )
-               )
-            {
-                return 0;
-            }
-        } else
-        if (!strcasecmp (n->value.element.name, "global-bounds"))
-        {
-            mxml_node_t * n1;   // used for global_bounds
-            struct adios_global_bounds_struct * new_global_bounds = 0;
-
-            const char * dimensions = 0;
-            const char * dimension = 0;
-            const char * global_dimensions = 0;
-            const char * global_dimension = 0;
-            const char * offsets = 0;
-            const char * offset = 0;
-            const char * local_offsets = 0;
-            const char * local_offset = 0;
-
-            for (i = 0; i < n->value.element.num_attrs; i++)
-            {
-                mxml_attr_t * attr = &n->value.element.attrs [i];
-
-                GET_ATTR("dimensions",attr,dimensions,"var")
-                GET_ATTR("dimension",attr,dimension,"var")
-
-                GET_ATTR("global-dimensions",attr,global_dimensions,"var")
-                GET_ATTR("global-dimension",attr,global_dimension,"var")
-
-                GET_ATTR("offsets",attr,offsets,"var")
-                GET_ATTR("offset",attr,offset,"var")
-
-                GET_ATTR("local-offsets",attr,local_offsets,"var")
-                GET_ATTR("local-offset",attr,local_offset,"var")
-
-                fprintf (stderr, "config.xml: unknown attribute '%s' on %s "
-                                 "(ignored)\n"
-                        ,attr->name
-                        ,"global-bounds"
-                        );
-            }
-
-            if (!dimensions)
-            {
-                dimensions = (dimension ? dimension : global_dimensions);
-                dimensions = (dimensions ? dimensions : global_dimension);
-                if (!dimensions)
-                {
-                    fprintf (stderr, "config.xml: dimensions required on "
-                                     "global-bounds\n"
-                            );
-
-                    return 0;
-                }
-            }
-            if (!offsets)
-            {
-                offsets = (offset ? offset : local_offsets);
-                offsets = (offsets ? offsets : local_offset);
-                fprintf (stderr, "config.xml: offsets required on "
-                                 "global-bounds\n"
-                        );
-
-                return 0;
-            }
-
-            gb_global_dimensions = dimensions;
-            gb_local_offsets = offsets;
-
-            for (n1 = mxmlWalkNext (n, n, MXML_DESCEND)
-                ;n1
-                ;n1 = mxmlWalkNext (n1, n, MXML_DESCEND)
-                )
-            {
-                if (n1->type != MXML_ELEMENT)
-                {
-                    continue;
-                }
-
-                if (!strcasecmp (n1->value.element.name, "var"))
-                {
-                    const char * name = 0;
-                    const char * path = 0;
-                    const char * type = 0;
-                    const char * dimension = 0;
-                    const char * dimensions = 0;
-                    const char * gwrite = 0;
-                    const char * gread = 0;
-                    const char * read_flag = 0;
-                    enum ADIOS_DATATYPES t1;
-
-                    for (i = 0; i < n1->value.element.num_attrs; i++)
-                    {
-                        mxml_attr_t * attr = &n1->value.element.attrs [i];
-
-                        GET_ATTR("name",attr,name,"var")
-                        GET_ATTR("path",attr,path,"var")
-                        GET_ATTR("type",attr,type,"global-bounds var")
-                        GET_ATTR("dimensions",attr,dimensions,"var")
-                        GET_ATTR("dimension",attr,dimension,"var")
-                        GET_ATTR("gwrite",attr,gwrite,"var")
-                        GET_ATTR("gread",attr,gread,"var")
-                        GET_ATTR("read",attr,read_flag,"var")
-                        fprintf (stderr, "config.xml: unknown attribute '%s' "
-                                         "on %s (ignored)\n"
-                                ,attr->name
-                                ,"var"
-                                );
-                    }
-
-                    if (!name)
-                        name = "";  // this will catch the error
-                    if (!path)
-                        path = "/";
-                    if (!type)
-                        type = ""; // this will catch the error
-                    t1 = parseType (type, name);
-                    if (!dimensions)
-                        dimensions = dimension;
-
-                    if (read_flag)
-                        parseFlag ("read", read_flag, adios_flag_no);
-// fix the bgp bugs
-//                    if (!adios_common_define_var (*(int64_t *) &new_group
-                    if (!adios_common_define_var (ptr_new_group
-                                                 ,name
-                                                 ,path, t1, dimensions
-                                                 ,gb_global_dimensions
-                                                 ,gb_local_offsets
-                                                 )
-                       )
-                    {
-                        return 0;
-                    }
-                } else
-                {
-                    if (!strncmp (n1->value.element.name, "!--", 3)) // comment
-                    {
-                        continue;
-                    }
-                    else
-                    {
-                        fprintf (stderr, "config.xml: invalid xml element: "
-                                         "'%s'\n"
-                                ,n1->value.element.name
-                                );
-
-                        return 0;
-                    }
-                }
-            }
-
-            gb_global_dimensions = "";
-            gb_local_offsets = "";
-        } else
-        if (!strcasecmp (n->value.element.name, "attribute"))
-        {
-            const char * name = 0;
-            const char * path = 0;
-            const char * value = 0;
-            const char * type = 0;
-            const char * var = 0;
-            enum ADIOS_DATATYPES t1;
-
-            for (i = 0; i < n->value.element.num_attrs; i++)
-            {
-                mxml_attr_t * attr = &n->value.element.attrs [i];
-
-                GET_ATTR("name",attr,name,"var")
-                GET_ATTR("path",attr,path,"var")
-                GET_ATTR("type",attr,type,"var")
-                GET_ATTR("value",attr,value,"var")
-                GET_ATTR("var",attr,var,"var")
-                fprintf (stderr, "config.xml: unknown attribute '%s' on %s "
-                                 "(ignored)\n"
-                        ,attr->name
-                        ,"attribute"
-                        );
-            }
-
-            if (!name)
-            {
-                fprintf (stderr, "config.xml: attribute element requires "
-                                 "name\n");
-
-                return 0;
-            }
-            if (!path)
-            {
-                fprintf (stderr, "config.xml: attribute element requires "
-                                 "path\n");
-
-                return 0;
-            }
-            if ((!value && !var) || (value && var))
-            {
-                fprintf (stderr, "config.xml: attriute element '%s' "
-                                 "requires either value OR var\n"
-                        ,name
-                        );
-
-                return 0;
-            }
-            if (var && type)
-            {
-                fprintf (stderr, "config.xml: attriute element '%s'. "
-                                 "The type of an associated var is part "
-                                 "of the associated var element and cannot "
-                                 "be provided as part of the attribute "
-                                 "element."
-                                 "\n"
-                        ,name
-                        );
-
-                return 0;
-            }
-            if (!type && value)
-            {
-                type = "string";
-            }
-            if (!var)
-            {
-                t1 = parseType (type, name);
-            }
-            else
-            {
-                t1 = adios_unknown;
-            }
-// fix the bgp bugs
-//            if (!adios_common_define_attribute (*(int64_t *) &new_group, name
-            if (!adios_common_define_attribute (ptr_new_group, name
-                                               ,path, t1, value, var
-                                               )
-               )
-            {
-                return 0;
-            }
-        } else
-        if (!strcasecmp (n->value.element.name, "mesh"))
-        {
-            const char * type;
-            const char * time_varying;
-
-            new_group->mesh = (struct adios_mesh_struct *) malloc
-                                           (sizeof (struct adios_mesh_struct));
-            type = mxmlElementGetAttr (n, "type");
-            time_varying = mxmlElementGetAttr (n, "time-varying");
-
-            if (!type)
-                type = "";
-
-            if (!strcasecmp (type, "uniform"))
-            {
-                new_group->mesh->type = ADIOS_MESH_UNIFORM;
-                new_group->mesh->uniform =
-                    (struct adios_mesh_uniform_struct *)
-                         calloc (1, sizeof (struct adios_mesh_uniform_struct));
-                parseMeshUniform (n, new_group, &new_group->mesh->uniform);
-            } else
-            if (!strcasecmp (type, "structured"))
-            {
-                new_group->mesh->type = ADIOS_MESH_STRUCTURED;
-                new_group->mesh->structured =
-                    (struct adios_mesh_structured_struct *)
-                       calloc (1, sizeof (struct adios_mesh_structured_struct));
-                parseMeshStructured (n, new_group
-                                    ,&new_group->mesh->structured);
-            } else
-            if (!strcasecmp (type, "rectilinear"))
-            {
-                new_group->mesh->type = ADIOS_MESH_RECTILINEAR;
-                new_group->mesh->rectilinear =
-                    (struct adios_mesh_rectilinear_struct *)
-                      calloc (1, sizeof (struct adios_mesh_rectilinear_struct));
-                parseMeshRectilinear (n, new_group
-                                     ,&new_group->mesh->rectilinear);
-            } else
-            if (!strcasecmp (type, "unstructured"))
-            {
-                new_group->mesh->type = ADIOS_MESH_UNSTRUCTURED;
-                new_group->mesh->unstructured =
-                    (struct adios_mesh_unstructured_struct *)
-                     calloc (1, sizeof (struct adios_mesh_unstructured_struct));
-
-                parseMeshUnstructured (n, new_group
-                                      ,&new_group->mesh->unstructured);
-            } else
-            {
-                fprintf (stderr, "config.xml: invalid mesh type: '%s'\n"
-                        ,type
-                        );
-
-                return 0;
-            }
-
-            new_group->mesh->time_varying = parseFlag
-                               ("time-varying", time_varying, adios_flag_no);
-
-            if (new_group->mesh->time_varying == adios_flag_unknown)
-            {
-                return 1;
-            }
-        } else
-        if (!strcasecmp (n->value.element.name, "gwrite"))
-        {
-            const char * src = 0;
-
-            for (i = 0; i < n->value.element.num_attrs; i++)
-            {
-                mxml_attr_t * attr = &n->value.element.attrs [i];
-
-                GET_ATTR("src",attr,src,"var")
-                fprintf (stderr, "config.xml: unknown attribute '%s' on %s "
-                                 "(ignored)\n"
-                        ,attr->name
-                        ,"gwrite"
-                        );
-            }
-            if (!src)
-            {
-                fprintf (stderr, "config.xml: gwrite element requires "
-                                 "src\n");
-
-                return 0;
-            }
-        } else
-        {
-            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
-            {
-                continue;
-            }
-            else
-            {
-                fprintf (stderr, "config.xml: invalid xml element: '%s'\n"
-                        ,n->value.element.name
-                        );
-
-                return 0;
-            }
-        }
-    }
-
-    // now that we have declared the whole group, validate that the
-    // paths specified in attributes refer to real things or give
-    // a warning
-    struct adios_attribute_struct * a = new_group->attributes;
-    while (a)
-    {
-        if (!validatePath (new_group->vars, a->path))
-        {
-/*
-            fprintf (stderr, "config.xml warning: attribute element '%s' "
-                             "has path '%s' that does not match "
-                             "any var path or name.\n"
-                    ,a->name, a->path
-                    );
-*/
-        }
-
-        a = a->next;
-    }
-
-    return 1;
-}
-
-static int parseAnalysis (mxml_node_t * node)
-{
-    mxml_node_t * n;
-
-    const char * group = 0;
-    const char * var = 0;
-    const char * bin_intervals = 0;
-    const char * bin_count = 0;
-    const char * bin_min = 0;
-    const char * bin_max = 0;
-
-    int i;
-    int64_t group_id;
-    struct adios_group_struct * g;
-
-    for (i = 0; i < node->value.element.num_attrs; i++)
-    {
-        mxml_attr_t * attr = &node->value.element.attrs [i];
-
-        GET_ATTR("adios-group",attr,group,"analysis")
-        GET_ATTR("var",attr,var,"analysis")
-        GET_ATTR("break-points",attr,bin_intervals,"analysis")
-        GET_ATTR("min",attr,bin_min,"analysis")
-        GET_ATTR("max",attr,bin_max,"analysis")
-        GET_ATTR("count",attr,bin_count,"analysis")
-        fprintf (stderr, "config.xml: unknown attribute '%s' on %s "
-                         "(ignored)\n"
-                ,attr->name
-                ,"method"
-                );
-    }
-
-    if (!var)
-    {
-        fprintf (stderr, "config.xml: variable name must be given\n");
-        return 0;
-    }
-
-    if (!group)
-    {
-        fprintf (stderr, "config.xml: adios-group name must be given\n");
-        return 0;
-    }
-
-    adios_common_get_group (&group_id, group);
-    g = (struct adios_group_struct *) group_id;
-
-    if (!g)
-    {
-        fprintf (stderr, "config.xml: Didn't find group %s for analysis\n", group);
-        return 0;
-    }
-    if(!adios_common_define_var_characteristics(g, var, bin_intervals, bin_min, bin_max, bin_count))
-        return 0;
-
-    return 1;
-}
-
-static int parseMethod (mxml_node_t * node)
-{
-    mxml_node_t * n;
-
-    const char * priority = 0;
-    const char * iterations = 0;
-    const char * base_path = 0;
-    const char * method = 0;
-    const char * group = 0;
-    const char * parameters = 0;
-    int p1;
-    int i1;
-    int i;
-
-    for (i = 0; i < node->value.element.num_attrs; i++)
-    {
-        mxml_attr_t * attr = &node->value.element.attrs [i];
-
-        GET_ATTR("priority",attr,priority,"method")
-        GET_ATTR("iterations",attr,iterations,"method")
-        GET_ATTR("base-path",attr,base_path,"method")
-        GET_ATTR("method",attr,method,"method")
-        GET_ATTR("group",attr,group,"method")
-        fprintf (stderr, "config.xml: unknown attribute '%s' on %s "
-                         "(ignored)\n"
-                ,attr->name
-                ,"method"
-                );
-    }
-
-    // Check for parameters, if they exist
-    n = mxmlWalkNext (node, node, MXML_DESCEND);
-    if (n != NULL)
-    {
-        parameters = n->value.text.string;
-    }
-    else
-    {
-        parameters = NULL;
-    }
-
-    if (!priority)
-        p1 = 1;
-    else
-        p1 = atoi (priority);
-    if (!iterations)
-        i1 = 1;
-    else
-        i1 = atoi (iterations);
-    if (!parameters)
-        parameters = "";
-    if (!base_path)
-        base_path = "";
-    else
-    {
-        uint16_t len = strlen (base_path);
-        if (len > 0 && base_path [len - 1] != '/')
-        {
-            fprintf (stderr, "config.xml: method %s for group %s base-path "
-                             "must end with a '/' character\n"
-                    ,method, group
-                    );
-
-            return 0;
-        }
-    }
-    if (!group)
-        group = "";
-    if (!method)
-        method = "";
-
-    if (!adios_common_select_method (p1, method, parameters, group
-                                    ,base_path, i1
-                                    )
-       )
-    {
-        return 0;
-    }
-
-    return 1;
-}
-
-static int parseBuffer (mxml_node_t * node)
-{
-    const char * size_MB = 0;
-    const char * free_memory_percentage = 0;
-    const char * allocate_time = 0;
-
-    int i;
-
-    int size = -1;
-
-    for (i = 0; i < node->value.element.num_attrs; i++)
-    {
-        mxml_attr_t * attr = &node->value.element.attrs [i];
-
-        GET_ATTR("size-MB",attr,size_MB,"method")
-        GET_ATTR("free-memory-percentage",attr,free_memory_percentage,"method")
-        GET_ATTR("allocate-time",attr,allocate_time,"method")
-        fprintf (stderr, "config.xml: unknown attribute '%s' on %s "
-                         "(ignored)\n"
-                ,attr->name
-                ,"buffer"
-                );
-    }
-
-
-
-    if ((!size_MB && !free_memory_percentage) || !allocate_time)
-    {
-        fprintf (stderr, "config.xml: must define allocate-time and either "
-                         "size-MB or free-memory-percentage for "
-                         "buffer element\n"
-                );
-
-        return 0;
-    }
-    else
-    {
-        if (!strcasecmp (allocate_time, "now"))
-        {
-            adios_buffer_alloc_when_set (ADIOS_BUFFER_ALLOC_NOW);
-        }
-        else
-        {
-            if (!strcasecmp (allocate_time, "oncall"))
-            {
-                adios_buffer_alloc_when_set (ADIOS_BUFFER_ALLOC_LATER);
-            }
-            else
-            {
-                fprintf (stderr, "config.xml: buffer allocate-time %s "
-                                 "invalid. ('now' or 'oncall')\n"
-                        ,allocate_time
-                        );
-
-                return 0;
-            }
-        }
-
-        if (size_MB)
-        {
-            adios_buffer_alloc_percentage_set (0);
-            size = atoi (size_MB);
-            if (size_MB == 0)
-            {
-                fprintf (stderr, "config.xml: buffer size-MB is either 0 or "
-                                 "cannot be parsed: %s"
-                        ,size_MB
-                        );
-
-                return 0;
-            }
-
-            if (size < 1)
-                size = 1; // we need a minimum 1 MB buffer
-
-            adios_buffer_size_requested_set ((uint64_t) size * 1024 * 1024);
-        }
-        else
-        {
-            adios_buffer_alloc_percentage_set (1);
-            size = atoi (free_memory_percentage);
-            if (size > 0 && size <= 100)
-            {
-                adios_buffer_size_requested_set ((uint64_t) size);
-            }
-            else
-            {
-                fprintf (stderr, "config.xml: buffer free-memory-percentage %s "
-                                 "is not an integer between 1 and 100\n"
-                        ,free_memory_percentage
-                        );
-
-                return 0;
-            }
-        }
-
-        if (adios_buffer_alloc_when_get() == ADIOS_BUFFER_ALLOC_NOW)
-        {
-
-// Do not attempt to allocate the buffer when this is being called from adios_lint
-#ifndef _INTERNAL
-            return adios_set_buffer_size ();
-#endif
-
-        }
-    }
-
-    return 1;
-}
-
-int adios_parse_config (const char * config)
-{
-    FILE * fp = 0;
-    mxml_node_t * doc = NULL;
-    mxml_node_t * node = NULL;
-    mxml_node_t * root = NULL;
-    int saw_datagroup = 0;
-    int saw_method = 0;
-    int saw_buffer = 0;
-
-    if (!adios_transports_initialized)
-    {
-        adios_transports_initialized = 1;
-        adios_init_transports (&adios_transports);
-    }
-
-    char * buffer = NULL;
-//#if HAVE_MPI
-    int buffer_size = 0;
-    int rank;
-    MPI_Comm_rank (MPI_COMM_WORLD, &rank);
-    if (rank == 0)
-    {
-//#endif
-        fp = fopen (config, "r");
-        if (!fp)
-        {
-            fprintf (stderr, "missing config file %s\n", config);
-
-            return 0;
-        }
-        struct stat s;
-        if (stat (config, &s) == 0)
-        {
-            buffer = malloc (s.st_size + 1);
-            buffer [s.st_size] = 0;
-        }
-        if (buffer)
-        {
-            size_t bytes_read = fread (buffer, 1, s.st_size, fp);
-            if (bytes_read != s.st_size)
-            {
-                fprintf (stderr, "error reading config file: %s. Expected %d Got %d\n"
-                        ,config, s.st_size, bytes_read );
-
-                return 0;
-            }
-        }
-        else
-        {
-            fprintf (stderr, "error allocating %d for reading config.\n"
-                    ,s.st_size + 1
-                    );
-
-            return 0;
-        }
-        fclose (fp);
-//#if HAVE_MPI
-        buffer_size = s.st_size;
-        MPI_Bcast (&buffer_size, 1, MPI_INT, 0, MPI_COMM_WORLD);
-        MPI_Bcast (buffer, buffer_size, MPI_BYTE, 0, MPI_COMM_WORLD);
-    }
-    else
-    {
-        MPI_Bcast (&buffer_size, 1, MPI_INT, 0, MPI_COMM_WORLD);
-        buffer = malloc (buffer_size + 1);
-        if (!buffer)
-        {
-            fprintf (stderr, "cannot allocate %d bytes to receive config file\n"
-                    ,buffer_size + 1
-                    );
-
-            return 0;
-        }
-        MPI_Bcast (buffer, buffer_size, MPI_BYTE, 0, MPI_COMM_WORLD);
-        buffer [buffer_size] = 0;
-    }
-//#endif
-
-    doc = mxmlLoadString (NULL, buffer, MXML_TEXT_CALLBACK);
-    free (buffer);
-    buffer = NULL;
-
-    if (!doc)
-    {
-        fprintf (stderr, "config.xml: unknown error parsing XML "
-                         "(probably structural)\n"
-                         "Did you remember to start the file with\n"
-                         "<?xml version=\"1.0\"?>\n");
-
-        return 0;
-    }
-
-    root = doc;
-
-    while (root && root->type != MXML_ELEMENT)
-    {
-        root = mxmlWalkNext (root, doc, MXML_DESCEND);
-    }
-
-    while (!strncmp (root->value.element.name, "!--", 3))
-    {
-        root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
-        root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
-    }
-
-    if (strcasecmp (root->value.element.name, "adios-config"))
-    {
-        if (strncmp (root->value.element.name, "?xml", 4))
-        {
-            fprintf (stderr, "config.xml: invalid root xml element: %s\n"
-                    ,root->value.element.name
-                    );
-
-            mxmlRelease (doc);
-
-            return 0;
-        }
-        else
-        {
-            while (!strncmp (root->value.element.name, "!--", 3))
-            {
-                root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
-            }
-
-            root = mxmlWalkNext (root, doc, MXML_DESCEND);  // skip ver num
-            root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);  // get next
-            while (!strncmp (root->value.element.name, "!--", 3))
-            {
-                root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
-                root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
-            }
-        }
-    }
-    else
-    {
-        //printf ("it is adios-config\n");
-    }
-
-
-    if (strcasecmp (root->value.element.name, "adios-config"))
-    {
-        fprintf (stderr, "config.xml: invalid root xml element: %s\n"
-                ,root->value.element.name
-                );
-
-        mxmlRelease (doc);
-
-        return 0;
-    }
-    else
-    {
-        const char * host_language = 0;
-        int i;
-
-        for (i = 0; i < root->value.element.num_attrs; i++)
-        {
-            mxml_attr_t * attr = &root->value.element.attrs [i];
-
-            GET_ATTR("host-language",attr,host_language,"var")
-            fprintf (stderr, "config.xml: unknown attribute '%s' on %s "
-                             "(ignored)\n"
-                    ,attr->name
-                    ,"adios-config"
-                    );
-        }
-
-        if (!host_language)
-        {
-            host_language = "Fortran";
-        }
-
-        if (!strcasecmp (host_language, "Fortran"))
-        {
-            adios_host_language_fortran = adios_flag_yes;
-        }
-        else
-        {
-            if (!strcasecmp (host_language, "C"))
-            {
-                adios_host_language_fortran = adios_flag_no;
-            }
-            else
-            {
-                fprintf (stderr, "config.xml: invalid host-language %s"
-                        ,host_language
-                        );
-
-                mxmlRelease (doc);
-
-                return 0;
-            }
-        }
-    }
-
-    for (node = mxmlWalkNext (root, doc, MXML_DESCEND_FIRST)
-        ;node
-        ;node = mxmlWalkNext (node, root, MXML_NO_DESCEND)
-        )
-    {
-        if (node->type != MXML_ELEMENT)
-        {
-            continue;
-        }
-
-        if (!strcasecmp (node->value.element.name, "adios-group"))
-        {
-            if (!parseGroup (node))
-                break;
-            saw_datagroup = 1;
-        }
-        else
-        {
-            if (   !strcasecmp (node->value.element.name, "transport")
-                || !strcasecmp (node->value.element.name, "method")
-               )
-            {
-                if (!parseMethod (node))
-                    break;
-                saw_method = 1;
-            }
-            else
-            {
-                if (!strcasecmp (node->value.element.name, "buffer"))
-                {
-                    if (!parseBuffer (node))
-                        break;
-                    saw_buffer = 1;
-                }
-				else
-				{
-                    if (!strcasecmp (node->value.element.name, "analysis"))
-                    {
-                        if (!parseAnalysis(node))
-                            break;
-                    }
-                	else
-                	{
-                	    if (!strncmp (node->value.element.name, "!--", 3))
-                	    {
-                	        continue;
-                	    }
-                	    else
-                	    {
-                	        fprintf (stderr, "config.xml: invalid element: %s\n"
-                	                ,node->value.element.name
-                	                );
-
-                	        break;
-                	    }
-					}
-                }
-            }
-        }
-    }
-
-    mxmlRelease (doc);
-
-    if (!saw_datagroup)
-    {
-        fprintf (stderr, "config.xml: must define at least 1 adios-group in "
-                         "config.xml\n"
-                );
-
-        return 0;
-    }
-    if (!saw_method)
-    {
-        fprintf (stderr, "config.xml: must define at least 1 method for "
-                         "the adios-group in config.xml\n"
-                );
-
-        return 0;
-    }
-    if (!saw_buffer)
-    {
-        fprintf (stderr, "config.xml: must define the buffer element in "
-                         "config.xml\n"
-                );
-
-        return 0;
-    }
-
-    return 1;
-}
-
-int adios_local_config ()
-{
-    if (!adios_transports_initialized)
-    {
-        adios_transports_initialized = 1;
-        adios_init_transports (&adios_transports);
-    }
-
-    return 1;
-}
-
-int adios_common_select_method (int priority, const char * method
-                               ,const char * parameters, const char * group
-                               ,const char * base_path, int iters
-                               )
-{
-    int64_t group_id;
-    struct adios_group_struct * g;
-    struct adios_method_struct * new_method;
-    int requires_group_comm = 0;
-
-    new_method = (struct adios_method_struct *)
-                           malloc (sizeof (struct adios_method_struct));
-    
-    new_method->m = ADIOS_METHOD_UNKNOWN;
-    new_method->base_path = strdup (base_path);
-    new_method->method = strdup (method);
-    new_method->parameters = strdup (parameters);
-    new_method->iterations = iters;
-    new_method->priority = priority;
-    new_method->method_data = 0;
-    new_method->group = 0;
-
-    if (adios_parse_method (method, &new_method->m, &requires_group_comm))
-    {
-        if (   new_method->m != ADIOS_METHOD_UNKNOWN
-            && new_method->m != ADIOS_METHOD_NULL
-            && adios_transports [new_method->m].adios_init_fn
-           )
-        {
-            adios_transports [new_method->m].adios_init_fn
-                                       (parameters, new_method);
-        }
-    }
-    else
-    {
-        fprintf (stderr, "config.xml: invalid transport: %s\n", method);
-
-        free (new_method->base_path);
-        free (new_method->method);
-        free (new_method->parameters);
-        free (new_method);
-
-        return 0;
-    }
-
-    adios_common_get_group (&group_id, group);
-    g = (struct adios_group_struct *) group_id;
-    if (!g)
-    {
-        fprintf (stderr, "config.xml: Didn't find group: %s for transport: %s\n"
-                ,group, method
-                );
-
-        free (new_method->base_path);
-        free (new_method->method);
-        free (new_method->parameters);
-        free (new_method);
-
-        return 0;
-    }
-    else
-    {
-        // JL: 1-2010
-        // we no longer require this since we moved the coordiantion
-        // communicator to the open call. Leaving code here, just in case.
-        // once this has been validated thoroughly, remove this block of code.
-        //if (requires_group_comm && !g->group_comm)
-        //{
-        //    fprintf (stderr, "config.xml: method %s for group %s.  Group does "
-        //                     "not have the required coordination-communicator"
-        //                     ".\n"
-        //            ,method, group
-        //            );
-
-        //    free (new_method->base_path);
-        //    free (new_method->method);
-        //    free (new_method->parameters);
-        //    free (new_method);
-
-        //    return 0;
-        //}
-        adios_add_method_to_group (&g->methods, new_method);
-        new_method->group = g;
-    }
-
-    adios_append_method (new_method);
-
-    return 1;
-}
-
-int adios_common_select_method_by_group_id (int priority, const char * method
-                                           ,const char * parameters, int64_t group_id
-                                           ,const char * base_path, int iters
-                                           )
-{
-    struct adios_group_struct * g;
-    struct adios_method_struct * new_method;
-    int requires_group_comm = 0;
-
-    new_method = (struct adios_method_struct *)
-                           malloc (sizeof (struct adios_method_struct));
-
-    new_method->m = ADIOS_METHOD_UNKNOWN;
-    new_method->base_path = strdup (base_path);
-    new_method->method = strdup (method);
-    new_method->parameters = strdup (parameters);
-    new_method->iterations = iters;
-    new_method->priority = priority;
-    new_method->method_data = 0;
-    new_method->group = 0;
-
-    if (adios_parse_method (method, &new_method->m, &requires_group_comm))
-    {
-        if (   new_method->m != ADIOS_METHOD_UNKNOWN
-            && new_method->m != ADIOS_METHOD_NULL
-            && adios_transports [new_method->m].adios_init_fn
-           )
-        {
-            adios_transports [new_method->m].adios_init_fn
-                                       (parameters, new_method);
-        }
-    }
-    else
-    {
-        fprintf (stderr, "config.xml: invalid transport: %s\n", method);
-
-        free (new_method->base_path);
-        free (new_method->method);
-        free (new_method->parameters);
-        free (new_method);
-
-        return 0;
-    }
-
-    g = (struct adios_group_struct *) group_id;
-    if (!g)
-    {
-        fprintf (stderr, "config.xml: invalid group id: %llu for transport: %s\n"
-                ,group_id, method
-                );
-
-        free (new_method->base_path);
-        free (new_method->method);
-        free (new_method->parameters);
-        free (new_method);
-
-        return 0;
-    }
-    else
-    {
-        if (requires_group_comm && !g->group_comm)
-        {
-            fprintf (stderr, "config.xml: method %s for group %s.  Group does "
-                             "not have the required coordination-communicator"
-                             ".\n"
-                    ,method, g->name
-                    );
-
-            free (new_method->base_path);
-            free (new_method->method);
-            free (new_method->parameters);
-            free (new_method);
-
-            return 0;
-        }
-        adios_add_method_to_group (&g->methods, new_method);
-        new_method->group = g;
-    }
-
-    adios_append_method (new_method);
-
-    return 1;
-}
-
-void adios_cleanup ()
-{
-    adios_transports_initialized = 0;
-    if (adios_transports)
-        free (adios_transports);
-    adios_transports = 0;
-
-    while (adios_methods)
-    {
-        struct adios_method_list_struct * methods = adios_methods->next;
-        if (adios_methods->method->base_path)
-            free (adios_methods->method->base_path);
-        if (adios_methods->method->method)
-            free (adios_methods->method->method);
-        if (adios_methods->method->method_data)
-            free (adios_methods->method->method_data);
-        if (adios_methods->method->parameters)
-            free (adios_methods->method->parameters);
-        free (adios_methods->method);
-        free (adios_methods);
-        adios_methods = methods;
-    }
-
-    while (adios_groups)
-    {
-        struct adios_group_list_struct * groups = adios_groups->next;
-
-        if (adios_groups->group->name)
-            free (adios_groups->group->name);
-
-        while (adios_groups->group->vars)
-        {
-            struct adios_var_struct * vars = adios_groups->group->vars->next;
-
-            if (adios_groups->group->vars->name)
-                free (adios_groups->group->vars->name);
-            if (adios_groups->group->vars->path)
-                free (adios_groups->group->vars->path);
-
-            while (adios_groups->group->vars->dimensions)
-            {
-                struct adios_dimension_struct * dimensions
-                                = adios_groups->group->vars->dimensions->next;
-
-                free (adios_groups->group->vars->dimensions);
-                adios_groups->group->vars->dimensions = dimensions;
-            }
-
-			// NCSU - Clean up stat
-            if (adios_groups->group->vars->stats)
-			{
-				int j, idx;
-				int c, count = 1;
-
-				if (adios_groups->group->vars->type == adios_complex || adios_groups->group->vars->type == adios_double_complex)
-					count = 3;
-
-				for (c = 0; c < count; c ++)
-				{
-					j = idx = 0;
-					while (adios_groups->group->vars->bitmap >> j)
-					{
-						if (adios_groups->group->vars->bitmap >> j & 1)
-						{
-                            if (j == adios_statistic_hist)
-                            {
-								struct adios_index_characteristics_hist_struct * hist = (struct adios_index_characteristics_hist_struct *) adios_groups->group->vars->stats[c][idx].data;
-								free (hist->breaks);
-								free (hist->frequencies);
-								free (hist);
-							}
-						    else
-								free (adios_groups->group->vars->stats[c][idx].data);
-							idx ++;
-						}
-						j ++;
-					}
-					free (adios_groups->group->vars->stats[c]);
-				}
-
-                free (adios_groups->group->vars->stats);
-			}
-            if (adios_groups->group->vars->data)
-                free (adios_groups->group->vars->data);
-
-            free (adios_groups->group->vars);
-            adios_groups->group->vars = vars;
-        }
-
-        while (adios_groups->group->attributes)
-        {
-            struct adios_attribute_struct * attributes
-                                        = adios_groups->group->attributes->next;
-
-            if (adios_groups->group->attributes->name)
-                free (adios_groups->group->attributes->name);
-            if (adios_groups->group->attributes->path)
-                free (adios_groups->group->attributes->path);
-            if (adios_groups->group->attributes->value)
-                free (adios_groups->group->attributes->value);
-
-            free (adios_groups->group->attributes);
-            adios_groups->group->attributes = attributes;
-        }
-
-        if (adios_groups->group->group_comm)
-            free (adios_groups->group->group_comm);
-        if (adios_groups->group->group_by)
-            free (adios_groups->group->group_by);
-        if (adios_groups->group->time_index_name)
-            free (adios_groups->group->time_index_name);
-
-        while (adios_groups->group->methods)
-        {
-            struct adios_method_list_struct * m = adios_groups->group->methods->next;
-            free (adios_groups->group->methods);
-            adios_groups->group->methods = m;
-        }
-
-        if (adios_groups->group->mesh)
-        {
-            switch (adios_groups->group->mesh->type)
-            {
-                case ADIOS_MESH_UNIFORM:
-                {
-                    struct adios_mesh_item_list_struct * i;
-                    while (adios_groups->group->mesh->uniform->dimensions)
-                    {
-                        i = adios_groups->group->mesh->uniform->dimensions->next;
-                        free (adios_groups->group->mesh->uniform->dimensions);
-                        adios_groups->group->mesh->uniform->dimensions = i;
-                    }
-                    while (adios_groups->group->mesh->uniform->origin)
-                    {
-                        i = adios_groups->group->mesh->uniform->origin->next;
-                        free (adios_groups->group->mesh->uniform->origin);
-                        adios_groups->group->mesh->uniform->origin = i;
-                    }
-                    while (adios_groups->group->mesh->uniform->spacing)
-                    {
-                        i = adios_groups->group->mesh->uniform->spacing->next;
-                        free (adios_groups->group->mesh->uniform->spacing);
-                        adios_groups->group->mesh->uniform->spacing = i;
-                    }
-
-                    break;
-                }
-
-                case ADIOS_MESH_STRUCTURED:
-                {
-                    struct adios_mesh_item_list_struct * i;
-                    struct adios_mesh_var_list_struct * v;
-                    while (adios_groups->group->mesh->structured->dimensions)
-                    {
-                        i = adios_groups->group->mesh->structured->dimensions->next;
-                        free (adios_groups->group->mesh->structured->dimensions);
-                        adios_groups->group->mesh->structured->dimensions = i;
-                    }
-                    while (adios_groups->group->mesh->structured->points)
-                    {
-                        v = adios_groups->group->mesh->structured->points->next;
-                        free (adios_groups->group->mesh->structured->points);
-                        adios_groups->group->mesh->structured->points = v;
-                    }
-                    if (adios_groups->group->mesh->structured->nspace)
-                        free (adios_groups->group->mesh->structured->nspace);
-
-                    break;
-                }
-
-                case ADIOS_MESH_RECTILINEAR:
-                {
-                    struct adios_mesh_item_list_struct * i;
-                    struct adios_mesh_var_list_struct * v;
-                    while (adios_groups->group->mesh->rectilinear->dimensions)
-                    {
-                        i = adios_groups->group->mesh->rectilinear->dimensions->next;
-                        free (adios_groups->group->mesh->rectilinear->dimensions);
-                        adios_groups->group->mesh->rectilinear->dimensions = i;
-                    }
-                    while (adios_groups->group->mesh->rectilinear->coordinates)
-                    {
-                        v = adios_groups->group->mesh->rectilinear->coordinates->next;
-                        free (adios_groups->group->mesh->rectilinear->coordinates);
-                        adios_groups->group->mesh->rectilinear->coordinates = v;
-                    }
-
-                    break;
-                }
-
-                case ADIOS_MESH_UNSTRUCTURED:
-                {
-                    if (adios_groups->group->mesh->unstructured->components)
-                        free (adios_groups->group->mesh->unstructured->components);
-                    if (adios_groups->group->mesh->unstructured->points_count)
-                        free (adios_groups->group->mesh->unstructured->points_count);
-                    while (adios_groups->group->mesh->unstructured->cell_list)
-                    {
-                        struct adios_mesh_cell_list_list_struct * next
-                          = adios_groups->group->mesh->unstructured->cell_list->next;
-                        free (adios_groups->group->mesh->unstructured->cell_list);
-                        adios_groups->group->mesh->unstructured->cell_list = next;
-                    }
-
-                    break;
-                }
-            }
-
-            free (adios_groups->group->mesh);
-        }
-
-        free (adios_groups->group);
-        free (adios_groups);
-        adios_groups = groups;
-    }
-}
-
-
diff --git a/src/adios_read.c b/src/adios_read.c
deleted file mode 100644
index 4b6ebb9..0000000
--- a/src/adios_read.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/* 
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include "adios.h"
-#include "bp_utils.h"
-#include "bp_types.h"
-#include "adios_read.h"
-#include "common_read.h"
-#include "adios_error.h"
-#include "futils.h"
-#define BYTE_ALIGN 8
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-const char *adios_errmsg ()
-{
-    return adios_get_last_errmsg();
-}
-
-int adios_set_read_method (enum ADIOS_READ_METHOD method)
-{
-    return common_read_set_read_method (method);
-} 
-
-int adios_read_init(MPI_Comm comm)
-{
-    return common_read_init (comm);
-}
-
-int adios_read_finalize()
-{
-    return common_read_finalize();
-}
-
-ADIOS_FILE * adios_fopen (const char * fname, MPI_Comm comm)
-{
-    return common_read_fopen (fname, comm);
-}
-
-int adios_fclose (ADIOS_FILE *fp) 
-{
-    return common_read_fclose (fp);
-}
-
-
-ADIOS_GROUP * adios_gopen (ADIOS_FILE *fp, const char * grpname)
-{
-    return common_read_gopen (fp, grpname);
-}
-
-ADIOS_GROUP * adios_gopen_byid (ADIOS_FILE *fp, int grpid)
-{
-    return common_read_gopen_byid (fp, grpid);
-}
-                   
-int adios_gclose (ADIOS_GROUP *gp)
-{
-    return common_read_gclose (gp);
-}
-
-
-int adios_get_attr (ADIOS_GROUP * gp, const char * attrname, enum ADIOS_DATATYPES * type,
-                    int * size, void ** data)
-{
-    return common_read_get_attr (gp, attrname, type, size, data);
-}
-
-int adios_get_attr_byid (ADIOS_GROUP * gp, int attrid, 
-                    enum ADIOS_DATATYPES * type, int * size, void ** data)
-{
-    return common_read_get_attr_byid (gp, attrid, type, size, data);
-}
-
-
-ADIOS_VARINFO * adios_inq_var (ADIOS_GROUP *gp, const char * varname) 
-{
-    return common_read_inq_var (gp, varname);
-}
-
-ADIOS_VARINFO * adios_inq_var_byid (ADIOS_GROUP *gp, int varid)
-{
-    return common_read_inq_var_byid (gp, varid);
-}
-
-void adios_free_varinfo (ADIOS_VARINFO *vp)
-{
-    common_read_free_varinfo (vp);
-}
-
-int64_t adios_read_var (ADIOS_GROUP * gp, const char * varname,
-                        const uint64_t * start, const uint64_t * count,
-                        void * data)
-{
-    return common_read_read_var (gp, varname, start, count, data);
-}
-
-int64_t adios_read_local_var (ADIOS_GROUP    * gp,
-                              const char     * varname,
-                              int            idx,
-                              const uint64_t * start,
-                              const uint64_t * count,
-                              void           * data)
-{
-    return common_read_read_local_var (gp, varname, idx, start, count, data);
-}
-
-int64_t adios_read_var_byid (ADIOS_GROUP    * gp,
-                             int              varid,
-                             const uint64_t  * start,
-                             const uint64_t  * count,
-                             void           * data)
-{
-    return common_read_read_var_byid (gp, varid, start, count, data);
-}
-
-const char * adios_type_to_string (enum ADIOS_DATATYPES type)
-{
-    return common_read_type_to_string (type);
-}
-
-int adios_type_size(enum ADIOS_DATATYPES type, void *data)
-{
-    return common_read_type_size(type, data);
-}
-
-
-void adios_print_groupinfo (ADIOS_GROUP *gp) 
-{
-    common_read_print_groupinfo(gp);
-}
-
-
-void adios_print_fileinfo (ADIOS_FILE *fp) 
-{
-    common_read_print_fileinfo(fp);
-}
-
diff --git a/src/adios_read_hooks.h b/src/adios_read_hooks.h
deleted file mode 100644
index 640855b..0000000
--- a/src/adios_read_hooks.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-#ifndef ADIOS_READ_HOOKS_H
-#define ADIOS_READ_HOOKS_H
-
-#include "config.h"
-#include <stdint.h>
-#include <string.h>
-#include "adios_read.h"
-
-#define FORWARD_DECLARE(a) \
-int adios_read_##a##_init (MPI_Comm comm); \
-int adios_read_##a##_finalize (); \
-int adios_read_##a##_fclose (ADIOS_FILE *fp); \
-ADIOS_FILE * adios_read_##a##_fopen (const char * fname, MPI_Comm comm); \
-int adios_read_##a##_fclose (ADIOS_FILE *fp); \
-ADIOS_GROUP * adios_read_##a##_gopen (ADIOS_FILE *fp, const char * grpname); \
-ADIOS_GROUP * adios_read_##a##_gopen_byid (ADIOS_FILE *fp, int grpid); \
-int adios_read_##a##_gclose (ADIOS_GROUP *gp); \
-ADIOS_VARINFO * adios_read_##a##_inq_var (ADIOS_GROUP *gp, const char * varname); \
-ADIOS_VARINFO * adios_read_##a##_inq_var_byid (ADIOS_GROUP *gp, int varid); \
-int64_t adios_read_##a##_read_var (ADIOS_GROUP * gp, const char * varname, const uint64_t * start, const uint64_t * count, void * data); \
-int64_t adios_read_##a##_read_local_var (ADIOS_GROUP * gp, const char * varname, int idx, const uint64_t * start, const uint64_t * count, void * data); \
-int64_t adios_read_##a##_read_var_byid (ADIOS_GROUP * gp, int varid, const uint64_t * start, const uint64_t * count, void * data); \
-int adios_read_##a##_get_attr (ADIOS_GROUP * gp, const char * attrname, enum ADIOS_DATATYPES * type, int * size, void ** data); \
-int adios_read_##a##_get_attr_byid (ADIOS_GROUP * gp, int attrid, enum ADIOS_DATATYPES * type, int * size, void ** data); \
-void adios_read_##a##_reset_dimension_order (ADIOS_FILE *fp, int is_fortran); \
-
-//////////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////
-//// SETUP YOUR NEW READ METHODS BELOW (FOLLOW THE PATTERN):                  ////
-//// 1. Add an entry to the adios_read.h/ADIOS_READ_METHOD                    ////
-//// 2. Update the ADIOS_METHOD_COUNT                                         ////
-//// 2. Add a FOWARD_DECLARE line (assuming standard naming)                  ////
-//////////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////////
-
-#define ADIOS_READ_METHOD_COUNT 7
-
-// forward declare the functions (or dummies for internals use)
-FORWARD_DECLARE(bp)
-FORWARD_DECLARE(bp_staged)
-FORWARD_DECLARE(hdf5)
-#if HAVE_DART
-FORWARD_DECLARE(dart)
-#endif
-#if HAVE_DIMES
-FORWARD_DECLARE(dimes)
-#endif
-#if HAVE_NSSI
-FORWARD_DECLARE(nssi)
-#endif
-#if HAVE_NSSI
-FORWARD_DECLARE(datatap)
-#endif
-
-
-typedef int (* ADIOS_INIT_FN) (MPI_Comm comm);
-typedef int (* ADIOS_FINALIZE_FN) ();
-typedef ADIOS_FILE * (* ADIOS_FOPEN_FN) (const char * fname, MPI_Comm comm);
-typedef int (* ADIOS_FCLOSE_FN) (ADIOS_FILE *fp);
-typedef ADIOS_GROUP * (* ADIOS_GOPEN_FN) (ADIOS_FILE *fp, const char * grpname);
-typedef ADIOS_GROUP * (* ADIOS_GOPEN_BYID_FN) (ADIOS_FILE *fp, int grpid);
-typedef int (* ADIOS_GCLOSE_FN) (ADIOS_GROUP *gp);
-typedef ADIOS_VARINFO * (* ADIOS_INQ_VAR_FN) (ADIOS_GROUP *gp, const char * varname);
-typedef ADIOS_VARINFO * (* ADIOS_INQ_VAR_BYID_FN) (ADIOS_GROUP *gp, int varid);
-typedef int64_t (* ADIOS_READ_VAR_FN) (ADIOS_GROUP * gp, const char * varname, const uint64_t * start, const uint64_t * count, void * data);
-typedef int64_t (* ADIOS_READ_LOCAL_VAR_FN) (ADIOS_GROUP * gp, const char * varname, int idx, const uint64_t * start, const uint64_t * count, void * data);
-typedef int64_t (* ADIOS_READ_VAR_BYID_FN) (ADIOS_GROUP * gp, int varid, const uint64_t * start, const uint64_t * count, void * data);
-typedef int (* ADIOS_GET_ATTR_FN) (ADIOS_GROUP * gp, const char * attrname, enum ADIOS_DATATYPES * type, int * size, void ** data);
-typedef int (* ADIOS_GET_ATTR_BYID_FN) (ADIOS_GROUP * gp, int attrid, enum ADIOS_DATATYPES * type, int * size, void ** data);
-typedef void (* ADIOS_RESET_DIMENSION_ORDER_FN) ();
-
-struct adios_read_hooks_struct
-{
-    ADIOS_INIT_FN           adios_init_fn;
-    ADIOS_FINALIZE_FN       adios_finalize_fn;
-    ADIOS_FOPEN_FN          adios_fopen_fn;
-    ADIOS_FCLOSE_FN         adios_fclose_fn;
-    ADIOS_GOPEN_FN          adios_gopen_fn;
-    ADIOS_GOPEN_BYID_FN     adios_gopen_byid_fn;
-    ADIOS_GCLOSE_FN         adios_gclose_fn;
-    ADIOS_INQ_VAR_FN        adios_inq_var_fn;
-    ADIOS_INQ_VAR_BYID_FN   adios_inq_var_byid_fn;
-    ADIOS_READ_VAR_FN       adios_read_var_fn;
-    ADIOS_READ_LOCAL_VAR_FN adios_read_local_var_fn;
-    ADIOS_READ_VAR_BYID_FN  adios_read_var_byid_fn;
-    ADIOS_GET_ATTR_FN       adios_get_attr_fn;
-    ADIOS_GET_ATTR_BYID_FN  adios_get_attr_byid_fn;
-    ADIOS_RESET_DIMENSION_ORDER_FN adios_reset_dimension_order_fn;
-};
-
-#undef FORWARD_DECLARE
-#endif
diff --git a/src/adiosf.c b/src/adiosf.c
deleted file mode 100644
index 9c41836..0000000
--- a/src/adiosf.c
+++ /dev/null
@@ -1,524 +0,0 @@
-/* 
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-#include "../config.h"
-#include <string.h>
-#include <unistd.h>
-#include <stdint.h>
-
-#include "common_adios.h"
-#include "adios_internals.h"
-#include "adios_internals_mxml.h"
-#include "adios_transport_hooks.h"
-#include "futils.h"
-#include "globals.h"
-
-#ifdef __cplusplus
-extern "C"  /* prevent C++ name mangling */
-#endif
-
-extern int adios_errno;
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_set_application_id, adios_SET_APPLICATION_ID) (int *id, int * err)
-{
-    globals_adios_set_application_id (*id);
-    if (err != 0) *err = 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_init, adios_INIT) (const char * config, int * err, int config_size)
-{
-    char * buf1 = 0;
-
-    buf1 = futils_fstr_to_cstr (config, config_size);
-    if (buf1 != 0) {
-        *err = common_adios_init (buf1);
-        free (buf1);
-    } else {
-        *err = -adios_errno;
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_init_noxml, adios_INIT_LOCAL) (int * err)
-{
-    *err = common_adios_init_noxml ();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_finalize, adios_FINALIZE) (int * mype, int * err)
-{
-    *err = common_adios_finalize (*mype);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_allocate_buffer, adios_ALLOCATE_BUFFER) (int *sizeMB, int * err)
-{
-    //FIX
-    *err = common_adios_allocate_buffer (1 /*NOW*/, *sizeMB);
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_open, adios_OPEN) 
-    (int64_t * fd, const char * group_name, const char * name
-    ,const char * mode, void * comm, int * err
-    ,int group_name_size, int name_size, int mode_size
-    )
-{
-    char * buf1 = 0;
-    char * buf2 = 0;
-    char * buf3 = 0;
-
-    buf1 = futils_fstr_to_cstr (group_name, group_name_size);
-    buf2 = futils_fstr_to_cstr (name, name_size);
-    buf3 = futils_fstr_to_cstr (mode, mode_size);
-
-    if (buf1 != 0 && buf2 != 0 && buf3 != 0) {
-        *err = common_adios_open (fd, buf1, buf2, buf3, comm);
-        free (buf1);
-        free (buf2);
-        free (buf3);
-    } else {
-        *err = -adios_errno;
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_group_size, adios_GROUP_SIZE) 
-    (int64_t * fd_p, int64_t * data_size
-    ,int64_t * total_size, int * err
-    )
-{
-    *err = common_adios_group_size (*fd_p, (uint64_t) *data_size
-                            ,(uint64_t *) total_size
-                            );
-}
-
-///////////////////////////////////////////////////////////////////////////////
-#include "stdio.h"
-/* This Fortran api function is a bit different from the C api funcion, but
- * they call the same common_adios_write().
- * Difference: if the variable is string type then we need to convert
- * the void * var to a C string (add \0 to the end)
- * We rely on the assumption/fact that Fortran compilers pass on the 
- * length of a character array in an extra integer argument, even if
- * the C function declares a void* array in the argument list. 
- */
-void FC_FUNC_(adios_write, adios_WRITE) 
-    (int64_t * fd_p, const char * name, void * var, int * err
-    ,int name_size, int var_size
-    )
-{
-    struct adios_file_struct * fd = (struct adios_file_struct *) *fd_p;
-    if (!fd)
-    {
-        fprintf (stderr, "Invalid handle passed to adios_write\n");
-        *err = 1;
-        return;
-    }
-
-    struct adios_var_struct * v = fd->group->vars;
-    struct adios_method_list_struct * m = fd->group->methods;
-
-    if (m && m->next == NULL && m->method->m == ADIOS_METHOD_NULL)
-    {
-        // nothing to do so just return
-        *err = 0;
-        return;
-    }
-
-    char * buf1 = 0;
-    buf1 = futils_fstr_to_cstr (name, name_size);
-
-    //printf("  -- adios_write: name=[%s] var size = %d\n", buf1, var_size);
-
-    if (!buf1) {
-        *err = -adios_errno;
-        return;
-    }
-
-    v = adios_find_var_by_name (v, buf1, fd->group->all_unique_var_names);
-
-    if (!v)
-    {
-        fprintf (stderr, "Bad var name (ignored): '%s'\n", buf1);
-        *err = 1;
-        free (buf1);
-        return;
-    }
-
-    if (fd->mode == adios_mode_read)
-    {
-        if (   strcasecmp (buf1, fd->group->group_comm)
-            && v->is_dim != adios_flag_yes
-           )
-        {
-            fprintf (stderr, "write attempted on %s in %s.  This was opened for read\n" ,buf1 , fd->name);
-            *err = 1;
-            free (buf1);
-            return;
-        }
-    }
-
-    if (!var)
-    {
-        fprintf (stderr, "Invalid data: %s\n", buf1);
-        *err = 1;
-        free (buf1);
-        return;
-    }
-
-    if (v->data)
-    {
-        free (v->data);
-        v->data = 0;
-    }
-
-    // Q.L. 10-2010. To fix a memory leak problem.
-    if (v->stats)
-    {   
-        int j, idx;
-        int c, count = 1;
-
-        if (v->type == adios_complex || v->type == adios_double_complex)
-            count = 3;
-
-        for (c = 0; c < count; c ++)
-        {   
-            j = idx = 0;
-            while (v->bitmap >> j)
-            {   
-                if (v->bitmap >> j & 1)
-                {   
-                    if (j == adios_statistic_hist)
-                    {   
-                        struct adios_index_characteristics_hist_struct * hist =
-                            (struct adios_index_characteristics_hist_struct *) v->stats[c][idx].data;
-                        free (hist->breaks);
-                        free (hist->frequencies);
-                        free (hist);
-                        v->stats[c][idx].data = 0;
-                    }
-                    else
-                    {   
-                        free (v->stats[c][idx].data);
-                        v->stats[c][idx].data = 0;
-                    }
-                    idx ++;
-                }
-                j ++;
-            }
-        }
-    }
-
-    if (v->dimensions)
-    {
-        v->data = var;
-    }
-    else
-    {
-        uint64_t element_size = adios_get_type_size (v->type, var);
-
-        switch (v->type)
-        {
-            case adios_byte:
-            case adios_short:
-            case adios_integer:
-            case adios_long:
-            case adios_unsigned_byte:
-            case adios_unsigned_short:
-            case adios_unsigned_integer:
-            case adios_unsigned_long:
-            case adios_real:
-            case adios_double:
-            case adios_long_double:
-            case adios_complex:
-            case adios_double_complex:
-                v->data = malloc (element_size);
-                if (!v->data)
-                {
-                    fprintf (stderr, "cannot allocate %llu bytes to copy "
-                                     "scalar %s\n"
-                            ,element_size
-                            ,v->name
-                            );
-
-                    *err = 1;
-                    free (buf1);
-                    return;
-                }
-
-                memcpy ((char *) v->data, var, element_size);
-                break;
-            case adios_string:
-                v->data = futils_fstr_to_cstr (var, var_size);
-                if (!v->data)
-                {
-                    fprintf (stderr, "cannot allocate %llu bytes to copy "
-                                     "scalar %s\n"
-                            ,element_size
-                            ,v->name
-                            );
-
-                    *err = 1;
-                    free (buf1);
-                    return;
-                }
-                break;
-
-            default:
-                v->data = 0;
-                break;
-        }
-    }
-
-    *err = common_adios_write (fd, v, var);
-    if (fd->mode == adios_mode_write || fd->mode == adios_mode_append)
-    {
-        adios_copy_var_written (&fd->group->vars_written, v, fd);
-    }
-
-    free (buf1);
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_get_write_buffer, adios_GET_WRITE_BUFFER) 
-    (int64_t * fd_p, const char * name
-    ,int64_t * size
-    ,void ** buffer, int * err, int name_size
-    )
-{
-    char * buf1 = 0;
-
-    buf1 = futils_fstr_to_cstr (name, name_size);
-
-    if (buf1 != 0) {
-        *err = common_adios_get_write_buffer (*fd_p, buf1, (uint64_t *) size, buffer);
-        free (buf1);
-    } else {
-        *err = -adios_errno;
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_read, adios_READ) 
-    (int64_t * fd_p, const char * name, void * buffer
-    ,int64_t * buffer_size, int * err, int name_size
-    )
-{
-    char * buf1 = 0;
-
-    buf1 = futils_fstr_to_cstr (name, name_size);
-
-    if (buf1 != 0) {
-        *err = common_adios_read (*fd_p, buf1, buffer, *buffer_size);
-        free (buf1);
-    } else {
-        *err = -adios_errno;
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_set_path, adios_SET_PATH) 
-    (int64_t * fd_p, const char * path, int * err, int path_size)
-{
-    char * buf1 = 0;
-
-    buf1 = futils_fstr_to_cstr (path, path_size);
-
-    if (buf1 != 0) {
-        *err = common_adios_set_path (*fd_p, buf1);
-        free (buf1);
-    } else {
-        *err = -adios_errno;
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_set_path_var, adios_SET_PATH_VAR) 
-    (int64_t * fd_p, const char * path, const char * name, int * err, int path_size, int name_size)
-{
-    char * buf1 = 0;
-    char * buf2 = 0;
-
-    buf1 = futils_fstr_to_cstr (path, path_size);
-    buf2 = futils_fstr_to_cstr (name, name_size);
-
-    if (buf1 != 0 && buf2 != 0) {
-        *err = common_adios_set_path_var (*fd_p, buf1, buf2);
-        free (buf1);
-        free (buf2);
-    } else {
-        *err = -adios_errno;
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// hint that we reached the end of an iteration (for asynchronous pacing)
-void FC_FUNC_(adios_end_iteration, adios_END_ITERATION) (int * err)
-{
-    *err = common_adios_end_iteration ();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// hint to start communicating
-void FC_FUNC_(adios_start_calculation, adios_START_CALCULATION) (int * err)
-{
-    *err = common_adios_start_calculation ();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// hint to stop communicating
-void FC_FUNC_(adios_stop_calculation, adios_STOP_CALCULATION) (int * err)
-{
-    *err = common_adios_stop_calculation ();
-}
-
-///////////////////////////////////////////////////////////////////////////////
-void FC_FUNC_(adios_close, adios_CLOSE) (int64_t * fd_p, int * err)
-{
-    *err = common_adios_close (*fd_p);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-// Methods normally only called by the XML parser
-//////////////////////////////////////////////////////////////////////////////
-
-
-///////////////////////////////////////////////////////////////////////////////
-// adios_common_declare_group is in adios_internals.c
-// group a list of vars into a composite group
-void FC_FUNC_(adios_declare_group, adios_DECLARE_GROUP) 
-    (int64_t * id, const char * name
-    ,const char * time_index, enum ADIOS_FLAG stats
-    ,int * err, int name_size, int time_index_size
-    )
-{
-    char * buf1 = 0;
-    char * buf2 = 0;
-
-    buf1 = futils_fstr_to_cstr (name, name_size);
-    buf2 = futils_fstr_to_cstr (time_index, time_index_size);
-
-    if (buf1 != 0 && buf2 != 0) {
-        *err = adios_common_declare_group (id, buf1, adios_flag_yes, "", "", buf2, stats);
-        free (buf1);
-        free (buf2);
-        if (*err == 1) {
-            struct adios_group_struct * g = (struct adios_group_struct *) *id;
-            g->all_unique_var_names = adios_flag_no;
-        }
-    } else {
-        *err = -adios_errno;
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// adios_common_define_var is in adios_internals.c
-// declare a single var as an entry in a group
-void FC_FUNC_(adios_define_var, adios_DEFINE_VAR) 
-    (int64_t * group_id, const char * name
-    ,const char * path, int * type
-    ,const char * dimensions
-    ,const char * global_dimensions
-    ,const char * local_offsets, int * err
-    ,int name_size, int path_size, int dimensions_size
-    ,int global_dimensions_size, int local_offsets_size
-    )
-{
-    char * buf1 = 0;
-    char * buf2 = 0;
-    char * buf3 = 0;
-    char * buf4 = 0;
-    char * buf5 = 0;
-
-    buf1 = futils_fstr_to_cstr (name, name_size);
-    buf2 = futils_fstr_to_cstr (path, path_size);
-    buf3 = futils_fstr_to_cstr (dimensions, dimensions_size);
-    buf4 = futils_fstr_to_cstr (global_dimensions, global_dimensions_size);
-    buf5 = futils_fstr_to_cstr (local_offsets, local_offsets_size);
-
-    if (buf1 != 0 && buf2 != 0) {
-        *err = adios_common_define_var (*group_id, buf1, buf2
-                                       ,(enum ADIOS_DATATYPES) *type
-                                       ,buf3, buf4, buf5
-                                       );
-
-        free (buf1);
-        free (buf2);
-        free (buf3);
-        free (buf4);
-        free (buf5);
-    } else {
-        *err = -adios_errno;
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// adios_common_define_attribute is in adios_internals.c
-void FC_FUNC_(adios_define_attribute, adios_DEFINE_ATTRIBUTE) 
-    (int64_t * group, const char * name
-    ,const char * path, int * type, const char * value
-    ,const char * var, int * err
-    ,int name_size, int path_size, int value_size
-    ,int var_size
-    )
-{
-    char * buf1 = 0;
-    char * buf2 = 0;
-    char * buf3 = 0;
-    char * buf4 = 0;
-
-    buf1 = futils_fstr_to_cstr (name, name_size);
-    buf2 = futils_fstr_to_cstr (path, path_size);
-    buf3 = futils_fstr_to_cstr (value, value_size);
-    buf4 = futils_fstr_to_cstr (var, var_size);
-
-    if (buf1 != 0 && buf2 != 0 && buf3 != 0 && buf4 != 0) {
-        *err = adios_common_define_attribute (*group, buf1, buf2
-                                             ,(enum ADIOS_DATATYPES) *type, buf3
-                                             ,buf4
-                                             );
-
-        free (buf1);
-        free (buf2);
-        free (buf3);
-        free (buf4);
-    } else {
-        *err = -adios_errno;
-    }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// adios_common_select_method is in adios_internals_mxml.c
-void FC_FUNC_(adios_select_method, adios_SELECT_METHOD) 
-    (int64_t * group, const char * method
-    ,const char * parameters, const char * base_path
-    ,int * err, int method_size, int parameters_size
-    ,int base_path_size
-    )
-{
-    char * buf1 = 0;
-    char * buf2 = 0;
-    char * buf3 = 0;
-    buf1 = futils_fstr_to_cstr (method, method_size);
-    buf2 = futils_fstr_to_cstr (parameters, parameters_size);
-    buf3 = futils_fstr_to_cstr (base_path, base_path_size);
-
-    if (buf1 != 0 && buf2 != 0 && buf3 != 0) {
-        struct adios_group_struct * g = (struct adios_group_struct *) (* group);
-        *err = adios_common_select_method (0, buf1, buf2, g->name, buf3, 0);
-
-        free (buf1);
-        free (buf2);
-        free (buf3);
-    } else {
-        *err = -adios_errno;
-    }
-}
diff --git a/src/bp_utils.h b/src/bp_utils.h
deleted file mode 100644
index 8e6aa3b..0000000
--- a/src/bp_utils.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* 
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-#ifndef __BP_UTILS_H__
-#define __BP_UTILS_H__
-
-#include <stdio.h>
-#include <sys/types.h>
-#ifdef _NOMPI
-#   include "mpidummy.h"
-#else
-#   include "mpi.h"
-#endif
-#include "bp_types.h"
-#define VARS_MINIHEADER_SIZE 10
-
-void bp_alloc_aligned (struct adios_bp_buffer_struct_v1 * b, uint64_t size);
-void bp_realloc_aligned (struct adios_bp_buffer_struct_v1 * b, uint64_t size);
-int bp_parse_characteristics (struct adios_bp_buffer_struct_v1 * b,
-		  	      struct adios_index_var_struct_v1 ** root,
-			      uint64_t j);
-int bp_get_characteristics_data (void ** ptr_data,
-				 void * buffer,
-				 int data_size,
-				 enum ADIOS_DATATYPES type);
-int bp_read_close (struct adios_bp_buffer_struct_v1 * b);
-int bp_read_open (const char * filename,
-	 	  MPI_Comm comm, 
-		  struct BP_FILE * fh);
-
-int bp_read_minifooter (struct BP_FILE * bp_struct);
-int bp_parse_pgs (struct BP_FILE * fh);
-int bp_parse_attrs (struct BP_FILE * fh);
-int bp_parse_vars (struct BP_FILE * fh);
-
-const char * bp_value_to_string (enum ADIOS_DATATYPES type, void * data);
-int bp_get_type_size (enum ADIOS_DATATYPES type, void * var);
-void change_endianness( void *data, uint64_t slice_size, enum ADIOS_DATATYPES type);
-
-void print_process_group_index (
-                         struct adios_index_process_group_struct_v1 * pg_root
-                         );
-
-void copy_data (void *dst, void *src,
-        int idim,
-        int ndim,
-        uint64_t* size_in_dset,
-        uint64_t* ldims,
-        const uint64_t * readsize,
-        uint64_t dst_stride,
-        uint64_t src_stride,
-        uint64_t dst_offset,
-        uint64_t src_offset,
-        uint64_t ele_num,
-                int      size_of_type
-                );
-
-/* Return 1 if a < b wrt. the given type, otherwise 0 */
-int adios_lt(int type, void *a, void *b);
-double bp_value_to_double(enum ADIOS_DATATYPES type, void * data);
-void alloc_namelist (char ***namelist, int length);
-void free_namelist (char **namelist, int length);
-#endif
diff --git a/src/common_read.c b/src/common_read.c
deleted file mode 100644
index 37bc362..0000000
--- a/src/common_read.c
+++ /dev/null
@@ -1,383 +0,0 @@
-/* 
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "adios.h"
-#include "common_read.h"
-#include "adios_read.h"
-#include "adios_error.h"
-#include "adios_read_hooks.h"
-#include "futils.h"
-#define BYTE_ALIGN 8
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-
-/* Note: MATLAB reloads the mex64 files each time, so all static variables get the original value.
-   Therefore static variables cannot be used to pass info between two Matlab/ADIOS calls */
-static struct adios_read_hooks_struct * adios_read_hooks = 0;
-static enum ADIOS_READ_METHOD selected_method = ADIOS_READ_METHOD_BP;
-
-struct common_read_internals_struct {
-    enum ADIOS_READ_METHOD method;
-    struct adios_read_hooks_struct * read_hooks; /* Save adios_read_hooks for each fopen for Matlab */
-};
-
-
-int common_read_set_read_method(enum ADIOS_READ_METHOD method)
-{
-    int retval = 0;
-    if ((int)method < 0 || (int)method >= ADIOS_READ_METHOD_COUNT) {
-        adios_error (err_invalid_read_method, "Invalid read method (=%d) passed to adios_set_read_method().", (int)method);
-        retval = -err_invalid_read_method;
-    } else {
-        selected_method = method;
-    }
-    return retval;
-}
-
-
-int common_read_init(MPI_Comm comm)
-{
-    adios_read_hooks_init (&adios_read_hooks); // init the adios_read_hooks_struct if not yet initialized    
-    return adios_read_hooks[selected_method].adios_init_fn (comm);
-}
-
-int common_read_finalize()
-{
-    return adios_read_hooks[selected_method].adios_finalize_fn ();
-}
-
-ADIOS_FILE * common_read_fopen (const char * fname, MPI_Comm comm)
-{
-    ADIOS_FILE * fp;
-    struct common_read_internals_struct * internals = 
-            (struct common_read_internals_struct *) calloc(1,sizeof(struct common_read_internals_struct));
-
-    adios_errno = 0;
-    adios_read_hooks_init (&adios_read_hooks); // init the adios_read_hooks_struct if not yet initialized    
-
-    internals->method = selected_method;
-    internals->read_hooks = adios_read_hooks;
-
-    fp = adios_read_hooks[internals->method].adios_fopen_fn (fname, comm);
-
-
-    // save the method in fp->internal_data
-    if (fp)
-        fp->internal_data = (void *)internals;
-    return fp;
-}
-
-int common_read_fclose (ADIOS_FILE *fp) 
-{
-    struct common_read_internals_struct * internals;
-    int retval;
-    
-    adios_errno = 0;
-    if (fp) {
-        internals = (struct common_read_internals_struct *) fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_fclose_fn (fp);
-        free (internals);
-    } else {
-        adios_error ( err_invalid_file_pointer, "Invalid file pointer at adios_fclose()");
-        retval = -err_invalid_file_pointer;
-    }
-    return retval;
-}
-
-void common_read_reset_dimension_order (ADIOS_FILE *fp, int is_fortran)
-{
-    struct common_read_internals_struct * internals;
-
-    adios_errno = 0;
-    if (fp) {
-        internals = (struct common_read_internals_struct *) fp->internal_data;
-        internals->read_hooks[internals->method].adios_reset_dimension_order_fn (fp);
-    } else {
-        adios_error ( err_invalid_file_pointer, "Invalid file pointer at adios_reset_dimension_order()");
-    }
-}
-
-ADIOS_GROUP * common_read_gopen (ADIOS_FILE *fp, const char * grpname)
-{
-    struct common_read_internals_struct * internals;
-    ADIOS_GROUP * retval;
-    
-    adios_errno = 0;
-    if (fp) {
-        internals = (struct common_read_internals_struct *) fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_gopen_fn (fp, grpname);
-    } else {
-        adios_error ( err_invalid_file_pointer, "Invalid file pointer at adios_gopen()");
-        retval = NULL;
-    }
-    return retval;
-}
-
-ADIOS_GROUP * common_read_gopen_byid (ADIOS_FILE *fp, int grpid)
-{
-    struct common_read_internals_struct * internals;
-    ADIOS_GROUP * retval;
-    
-    adios_errno = 0;
-    if (fp) {
-        internals = (struct common_read_internals_struct *) fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_gopen_byid_fn (fp, grpid);
-    } else {
-        adios_error ( err_invalid_file_pointer, "Invalid file pointer at adios_gopen()");
-        retval = NULL;
-    }
-    //printf("%s: gp=%x, gp->fp=%x, gp->gh=%x\n",__func__, retval, retval->fp, retval->gh);
-    return retval;
-}
-                   
-int common_read_gclose (ADIOS_GROUP *gp)
-{
-    struct common_read_internals_struct * internals;
-    int retval;
-    
-    adios_errno = 0;
-    if (gp) {
-        //printf("%s: gp=%x, gp->fp=%x, gp->gh=%x\n",__func__, gp, gp->fp, gp->gh);
-        internals = (struct common_read_internals_struct *) gp->fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_gclose_fn (gp);
-    } else {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_gclose()");
-        retval = -err_invalid_group_struct;
-    }
-    return retval;
-}
-
-int common_read_get_attr (ADIOS_GROUP * gp, const char * attrname, enum ADIOS_DATATYPES * type,
-                    int * size, void ** data)
-{
-    struct common_read_internals_struct * internals;
-    int retval;
-    
-    adios_errno = 0;
-    if (gp) {
-        internals = (struct common_read_internals_struct *) gp->fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_get_attr_fn (gp, attrname, type, size, data);
-    } else {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_get_attr()");
-        retval = -err_invalid_group_struct;
-    }
-    return retval;
-}
-
-int common_read_get_attr_byid (ADIOS_GROUP * gp, int attrid, 
-                    enum ADIOS_DATATYPES * type, int * size, void ** data)
-{
-    struct common_read_internals_struct * internals;
-    int retval;
-    
-    adios_errno = 0;
-    if (gp) {
-        internals = (struct common_read_internals_struct *) gp->fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_get_attr_byid_fn (gp, attrid, type, size, data);
-    } else {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_get_attr_byid()");
-        retval = -err_invalid_group_struct;
-    }
-    return retval;
-}
-
-ADIOS_VARINFO * common_read_inq_var (ADIOS_GROUP *gp, const char * varname) 
-{
-    struct common_read_internals_struct * internals;
-    ADIOS_VARINFO * retval;
-    
-    adios_errno = 0;
-    if (gp) {
-        internals = (struct common_read_internals_struct *) gp->fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_inq_var_fn (gp, varname);
-    } else {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_inq_var_byid()");
-        retval = NULL;
-    }
-    return retval;
-}
-
-ADIOS_VARINFO * common_read_inq_var_byid (ADIOS_GROUP *gp, int varid)
-{
-    struct common_read_internals_struct * internals;
-    ADIOS_VARINFO * retval;
-    
-    adios_errno = 0;
-    if (gp) {
-        internals = (struct common_read_internals_struct *) gp->fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_inq_var_byid_fn (gp, varid);
-    } else {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_inq_var_byid()");
-        retval = NULL;
-    }
-    return retval;
-}
-
-void common_read_free_varinfo (ADIOS_VARINFO *vp)
-{
-    if (vp) {
-        if (vp->dims)   free(vp->dims);
-        if (vp->value)  free(vp->value);
-        if (vp->gmin && vp->gmin != vp->value)   free(vp->gmin);
-        if (vp->gmax && vp->gmax != vp->value)   free(vp->gmax);
-        //if (vp->mins)   free(vp->mins);
-        //if (vp->maxs)   free(vp->maxs);
-        free(vp);
-    }
-}
-
-
-int64_t common_read_read_var (ADIOS_GROUP * gp, const char * varname,
-                        const uint64_t * start, const uint64_t * count,
-                        void * data)
-{
-    struct common_read_internals_struct * internals;
-    int64_t retval;
-    
-    adios_errno = 0;
-    if (gp) {
-        internals = (struct common_read_internals_struct *) gp->fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_read_var_fn (gp, varname, start, count, data);
-    } else {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_read_var()");
-        retval = -err_invalid_group_struct;
-    }
-    return retval;
-}
-
-int64_t common_read_read_local_var (ADIOS_GROUP    * gp,
-                                    const char     * varname,
-                                    int            idx,
-                                    const uint64_t * start,
-                                    const uint64_t * count,
-                                    void           * data)
-{
-    struct common_read_internals_struct * internals;
-    int64_t retval;
-
-    adios_errno = 0;
-    if (gp) {
-        internals = (struct common_read_internals_struct *) gp->fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_read_local_var_fn (gp, varname, idx, start, count, data);
-    } else {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_read_local_var()");
-        retval = -err_invalid_group_struct;
-    }
-    return retval;
-}
-
-int64_t common_read_read_var_byid (ADIOS_GROUP    * gp,
-                             int              varid,
-                             const uint64_t  * start,
-                             const uint64_t  * count,
-                             void           * data)
-{
-    struct common_read_internals_struct * internals;
-    int64_t retval;
-    
-    adios_errno = 0;
-    if (gp) {
-        internals = (struct common_read_internals_struct *) gp->fp->internal_data;
-        retval = internals->read_hooks[internals->method].adios_read_var_byid_fn (gp, varid, start, count, data);
-    } else {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_read_var_byid()");
-        retval = -err_invalid_group_struct;
-    }
-    return retval;
-}
-
-const char * common_read_type_to_string (enum ADIOS_DATATYPES type)
-{
-    switch (type)
-    {
-        case adios_unsigned_byte:    return "unsigned byte";
-        case adios_unsigned_short:   return "unsigned short";
-        case adios_unsigned_integer: return "unsigned integer";
-        case adios_unsigned_long:    return "unsigned long long";
-
-        case adios_byte:             return "byte";
-        case adios_short:            return "short";
-        case adios_integer:          return "integer";
-        case adios_long:             return "long long";
-
-        case adios_real:             return "real";
-        case adios_double:           return "double";
-        case adios_long_double:      return "long double";
-
-        case adios_string:           return "string";
-        case adios_complex:          return "complex";
-        case adios_double_complex:   return "double complex";
-
-        default:
-        {
-            static char buf [50];
-            sprintf (buf, "(unknown: %d)", type);
-            return buf;
-        }
-    }
-}
-
-int common_read_type_size(enum ADIOS_DATATYPES type, void *data)
-{
-    return bp_get_type_size(type, data);
-}
-
-
-void common_read_print_groupinfo (ADIOS_GROUP *gp) 
-{
-    int i;
-    printf ("---------------------------\n");
-    printf ("     var information\n");
-    printf ("---------------------------\n");
-    printf ("    var id\tname\n");
-    if (gp->var_namelist) {
-        for (i=0; i<gp->vars_count; i++)
-            printf("\t%d)\t%s\n", i, gp->var_namelist[i]);
-    }
-    printf ("---------------------------\n");
-    printf ("     attribute information\n");
-    printf ("---------------------------\n");
-    printf ("    attr id\tname\n");
-    if (gp->attr_namelist) {
-        for (i=0; i<gp->attrs_count; i++)
-            printf("\t%d)\t%s\n", i, gp->attr_namelist[i]);
-    }
-    return;
-}
-
-
-void common_read_print_fileinfo (ADIOS_FILE *fp) 
-{
-    int i;
-    printf ("---------------------------\n");
-    printf ("     group information\n");
-    printf ("---------------------------\n");
-    printf ("\t# of groups:\t%d\n"
-        "\t# of variables:\t%d\n"
-        "\t# of attributes:%d\n"
-        "\t# of timesteps:\t%d starting from %d\n",
-        fp->groups_count,
-        fp->vars_count,
-        fp->attrs_count,
-        fp->ntimesteps,
-        fp->tidx_start);
-    printf ("\t----------------\n");
-    printf ("\tgroup id\tname\n");
-    if (fp->group_namelist) {
-        for (i=0; i<fp->groups_count; i++)
-            printf("\t  %d)\t%s\n", i, fp->group_namelist[i]);
-    }
-    return;
-}
-
-
diff --git a/src/common_read.h b/src/common_read.h
deleted file mode 100644
index 21f88ac..0000000
--- a/src/common_read.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* 
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-/*
- *   Internal read API for C and Fortran read APIs
- */
-#ifndef __COMMON_READ_H__
-#define __COMMON_READ_H__
-
-#include "adios_types.h"
-#include "adios_read.h"  /* C API's struct's are used here */
-
-#ifdef _NOMPI
-    /* Sequential processes can use the library compiled with -D_NOMPI */
-#   include "mpidummy.h"
-#else
-    /* Parallel applications should use MPI to communicate file info and slices of data */
-#   include "mpi.h"
-#endif
-
-#include <stdint.h>
-
-int common_read_set_read_method (enum ADIOS_READ_METHOD method);
-ADIOS_FILE * common_read_fopen (const char * fname, MPI_Comm comm);
-int common_read_fclose (ADIOS_FILE *fp);
-void common_read_reset_dimension_order (ADIOS_FILE *fp, int is_fortran);
-ADIOS_GROUP * common_read_gopen (ADIOS_FILE *fp, const char * grpname);
-ADIOS_GROUP * common_read_gopen_byid (ADIOS_FILE *fp, int grpid);
-int common_read_gclose (ADIOS_GROUP *gp);
-ADIOS_VARINFO * common_read_inq_var (ADIOS_GROUP *gp, const char * varname);
-ADIOS_VARINFO * common_read_inq_var_byid (ADIOS_GROUP *gp, int varid);
-void common_read_free_varinfo (ADIOS_VARINFO *cp);
-int64_t common_read_read_var (ADIOS_GROUP    * gp, 
-                        const char     * varname, 
-                        const uint64_t * start,
-                        const uint64_t * count, 
-                        void           * data);
-int64_t common_read_read_local_var (ADIOS_GROUP    * gp,
-                                    const char     * varname,
-                                    int            idx,
-                                    const uint64_t * start,
-                                    const uint64_t * count,
-                                    void           * data);
-int64_t common_read_read_var_byid (ADIOS_GROUP * gp, int varid,
-                             const uint64_t * start, const uint64_t * count, 
-                             void * data);
-int common_read_get_attr (ADIOS_GROUP           * gp,
-                    const char            * attrname,
-                    enum ADIOS_DATATYPES  * type,
-                    int                   * size,
-                    void                 ** data);
-
-int common_read_get_attr_byid (ADIOS_GROUP * gp, int attrid, enum ADIOS_DATATYPES * type, 
-                         int * size, void ** data); 
-
-const char * common_read_type_to_string (enum ADIOS_DATATYPES type);
-int common_read_type_size(enum ADIOS_DATATYPES type, void *data);
-
-void common_read_print_groupinfo (ADIOS_GROUP *gp);
-void common_read_print_fileinfo (ADIOS_FILE *fp);
-#endif
diff --git a/src/adios.c b/src/core/adios.c
similarity index 70%
rename from src/adios.c
rename to src/core/adios.c
index 888ebed..47cda8e 100644
--- a/src/adios.c
+++ b/src/core/adios.c
@@ -5,7 +5,7 @@
  * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
  */
 
-#include "../config.h"
+#include "config.h"
 #include <stdlib.h>
 #include <math.h>
 #include <string.h>
@@ -15,13 +15,15 @@
 // xml parser
 #include <mxml.h>
 
-#include "adios.h"
-#include "common_adios.h"
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
-#include "adios_internals.h"
-#include "adios_internals_mxml.h"
-#include "globals.h"
+#include "public/adios.h"
+#include "public/adios_error.h"
+#include "core/globals.h"
+#include "core/common_adios.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_internals.h"
+#include "core/adios_internals_mxml.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_logger.h"
 
 #ifdef DMALLOC
 #include "dmalloc.h"
@@ -79,6 +81,16 @@ int adios_group_size (int64_t fd_p, uint64_t data_size
 }
 
 ///////////////////////////////////////////////////////////////////////////////
+/* This C api function is slightly different from adios_write. Instead of
+ * passing variable names, user is expected to pass variable id, which is returned
+ * from adios_define_var call. Therefore, this function is only used in the no-xml way.
+ */
+int adios_write_byid (int64_t fd_p, int64_t id, void * var)
+{
+    return common_adios_write_byid ((struct adios_file_struct *) fd_p, (struct adios_var_struct *) id, var);
+}
+
+///////////////////////////////////////////////////////////////////////////////
 /* This C api function is a bit different from the Fortran api funcion, but
  * they call the same common_adios_write()
  */
@@ -87,7 +99,7 @@ int adios_write (int64_t fd_p, const char * name, void * var)
     struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
     if (!fd)
     {
-        fprintf (stderr, "Invalid handle passed to adios_write\n");
+        adios_error (err_invalid_file_pointer, "Invalid handle passed to adios_write\n");
         return 1;
     }
 
@@ -104,25 +116,27 @@ int adios_write (int64_t fd_p, const char * name, void * var)
 
     if (!v)
     {
-        fprintf (stderr, "Bad var name (ignored): '%s'\n", name);
+        adios_error (err_invalid_varname, "Bad var name (ignored) in adios_write(): '%s'\n", name);
 
         return 1;
     }
 
+    common_adios_write_byid (fd, v, var);
+#if 0
     if (fd->mode == adios_mode_read)
     {
         if (   strcasecmp (name, fd->group->group_comm)
             && v->is_dim != adios_flag_yes
            )
         {
-            fprintf (stderr, "write attempted on %s in %s.  This was opened for read\n" ,name , fd->name);
+            adios_error (err_invalid_file_mode, "write attempted on %s in %s.  This was opened for read\n" ,name , fd->name);
             return 1;
         }
     }
 
     if (!var)
     {
-        fprintf (stderr, "Invalid data: %s\n", name);
+        adios_error (err_invalid_data, "Invalid data (NULL pointer) passed to write for variable %s\n", name);
 
         return 1;
     }
@@ -133,49 +147,6 @@ int adios_write (int64_t fd_p, const char * name, void * var)
         v->data = 0;
     }
 
-    // Q.L. 10-2010. To fix a memory leak problem.
-    if (v->stats)
-    {   
-        int j, idx;
-        int c, count = 1;
-
-        if (v->type == adios_complex || v->type == adios_double_complex)
-            count = 3;
-
-        for (c = 0; c < count; c ++)
-        {   
-            j = idx = 0;
-            while (v->bitmap >> j)
-            {   
-                if (v->bitmap >> j & 1)
-                {   
-                    if (j == adios_statistic_hist)
-                    {   
-                        struct adios_index_characteristics_hist_struct * hist =
-                            (struct adios_index_characteristics_hist_struct *) v->stats[c][idx].data;
-                        if (hist)
-                        {   
-                            free (hist->breaks);
-                            free (hist->frequencies);
-                            free (hist);
-                            v->stats[c][idx].data = 0;
-                        }
-                    }
-                    else
-                    {
-                        if (v->stats[c][idx].data)
-                        {
-                            free (v->stats[c][idx].data);
-                            v->stats[c][idx].data = 0;
-                        }
-                    }
-                    idx ++;
-                }
-                j ++;
-            }
-        }
-    }
-
     if (v->dimensions)
     {
         v->data = var;
@@ -202,11 +173,9 @@ int adios_write (int64_t fd_p, const char * name, void * var)
                 v->data = malloc (element_size);
                 if (!v->data)
                 {
-                    fprintf (stderr, "cannot allocate %lld bytes to copy "
-                                     "scalar %s\n"
-                            ,element_size
-                            ,v->name
-                            );
+                    adios_error (err_no_memory, 
+                                 "In adios_write, cannot allocate %lld bytes to copy scalar %s\n",
+                                 element_size, v->name);
 
                     return 0;
                 }
@@ -218,11 +187,9 @@ int adios_write (int64_t fd_p, const char * name, void * var)
                 v->data = malloc (element_size + 1);
                 if (!v->data)
                 {
-                    fprintf (stderr, "cannot allocate %lld bytes to copy "
-                                     "scalar %s\n"
-                            ,element_size
-                            ,v->name
-                            );
+                    adios_error (err_no_memory, 
+                                 "In adios_write, cannot allocate %lld bytes to copy string %s\n",
+                                 element_size, v->name);
 
                     return 0;
                 }
@@ -243,7 +210,7 @@ int adios_write (int64_t fd_p, const char * name, void * var)
     {
         adios_copy_var_written (&fd->group->vars_written, v, fd);
     }
-
+#endif
     return 0;
 }
 
@@ -301,7 +268,52 @@ int adios_stop_calculation ()
 ///////////////////////////////////////////////////////////////////////////////
 int adios_close (int64_t fd_p)
 {
-    return common_adios_close (fd_p);
+    int retval;
+    struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
+    struct adios_var_struct * v = fd->group->vars;
+
+    retval = common_adios_close (fd_p);
+
+    // Q.L. 10-2010. To fix a memory leak problem.
+    while (v) {
+        int j, idx;
+        int c, count = 1;
+        if (v->stats) {   
+    
+            if (v->type == adios_complex || v->type == adios_double_complex)
+                count = 3;
+            else 
+                count = 1;
+
+            for (c = 0; c < count; c ++) {   
+                j = idx = 0;
+                while (v->bitmap >> j) {   
+                    if (v->bitmap >> j & 1) {   
+                        if (j == adios_statistic_hist) {   
+                            struct adios_index_characteristics_hist_struct * hist =
+                                (struct adios_index_characteristics_hist_struct *) v->stats[c][idx].data;
+                            if (hist) {   
+                                free (hist->breaks);
+                                free (hist->frequencies);
+                                free (hist);
+                                v->stats[c][idx].data = 0;
+                            }
+                        }
+                        else {
+                            if (v->stats[c][idx].data) {
+                                free (v->stats[c][idx].data);
+                                v->stats[c][idx].data = 0;
+                            }
+                        }
+                        idx ++;
+                    }
+                    j ++;
+                }
+            }
+        }
+
+        v = v->next;
+    }
 }
 
 //////////////////////////////////////////////////////////////////////////////
@@ -342,15 +354,16 @@ int adios_free_group (int64_t id)
 // adios_common_define_var is in adios_internals.c
 
 // declare a single var as an entry in a group
-int adios_define_var (int64_t group_id, const char * name
-                     ,const char * path, int type
-                     ,const char * dimensions
-                     ,const char * global_dimensions
-                     ,const char * local_offsets
-                     )
+int64_t adios_define_var (int64_t group_id, const char * name
+                         ,const char * path
+                         ,enum ADIOS_DATATYPES type
+                         ,const char * dimensions
+                         ,const char * global_dimensions
+                         ,const char * local_offsets
+                         )
 {
     return adios_common_define_var (group_id, name, path
-                                   ,(enum ADIOS_DATATYPES) type
+                                   ,type
                                    ,dimensions
                                    ,global_dimensions, local_offsets
                                    );
@@ -381,3 +394,10 @@ int adios_select_method (int64_t group, const char * method
                                                   );
 }
 
+///////////////////////////////////////////////////////////////////////////////
+void adios_timing_write_xml (int64_t fd_p, const char* filename)
+{
+    // defined in adios_timing.c
+    adios_timing_write_xml_common (fd_p, filename);
+}
+
diff --git a/src/adios_bp_v1.c b/src/core/adios_bp_v1.c
similarity index 93%
rename from src/adios_bp_v1.c
rename to src/core/adios_bp_v1.c
index f1312d4..56f7c5a 100644
--- a/src/adios_bp_v1.c
+++ b/src/core/adios_bp_v1.c
@@ -15,10 +15,12 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
-#include "adios_types.h"
-#include "adios_internals.h"
-#include "adios_bp_v1.h"
-#include "adios_endianness.h"
+#include "public/adios_types.h"
+#include "core/adios_internals.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_endianness.h"
+#include "core/adios_logger.h"
+#include "public/adios_error.h"
 
 #if defined(__APPLE__)
 #    define O_LARGEFILE 0
@@ -35,8 +37,8 @@ static void alloc_aligned (struct adios_bp_buffer_struct_v1 * b, uint64_t size)
     b->allocated_buff_ptr = malloc (size + BYTE_ALIGN - 1);
     if (!b->allocated_buff_ptr)
     {
-        fprintf (stderr, "Cannot allocate: %llu\n", size);
-
+	adios_error(err_no_memory, "BP_V1: Cannot allocate %llu\n",
+		    size);
         b->buff = 0;
         b->length = 0;
 
@@ -56,8 +58,8 @@ static void realloc_aligned (struct adios_bp_buffer_struct_v1 * b
                                     );
     if (!b->allocated_buff_ptr)
     {
-        fprintf (stderr, "Cannot allocate: %llu\n", size);
-
+	adios_error(err_no_memory, "BP_V1: Cannot allocate %llu\n",
+		    size);
         b->buff = 0;
         b->length = 0;
 
@@ -106,8 +108,8 @@ void adios_buffer_struct_clear (struct adios_bp_buffer_struct_v1 * b)
 
 // *****************************************************************************
 // buff must be 4 bytes
-int adios_parse_version (struct adios_bp_buffer_struct_v1 * b
-                        ,uint32_t * version
+int adios_parse_version (struct adios_bp_buffer_struct_v1 * b,
+                        uint32_t * version
                         )
 {
     // if high bit set, big endian
@@ -115,26 +117,22 @@ int adios_parse_version (struct adios_bp_buffer_struct_v1 * b
 
     if (b->length < 4)
     {
-        fprintf (stderr, "adios_parse_version requires a buffer of at least "
-                         "4 bytes.  Only %llu were provided\n"
-                ,b->length
-                );
-
+	adios_error(err_invalid_buffer_version, "adios_parse_version requires"
+		    "a buffer of at least "
+		    "4 bytes.  Only %llu were provided\n", b->length);
         return 1;
     }
 
     *version = ntohl (*(uint32_t *) (b->buff + b->offset));
     char *v = (char *) version;
     if (   (*v && !*(char *) &test)       // both writer and this machine are big endian
-        || (!*(v+3) && *(char *) &test)   // both are little endian
-       )
+	   || (!*(v+3) && *(char *) &test)   // both are little endian
+	)
     {
-        b->change_endianness = adios_flag_no;
-        //fprintf(stderr, "no need to change endianness\n");
+        b->change_endianness = adios_flag_no;//no need to change endiannness
     }
     else
     {
-        //fprintf(stderr, "change endianness\n");
         b->change_endianness = adios_flag_yes;
     }
 
@@ -148,11 +146,9 @@ int adios_parse_index_offsets_v1 (struct adios_bp_buffer_struct_v1 * b)
 {
     if (b->length - b->offset < 24)
     {
-        fprintf (stderr, "adios_parse_index_offsets_v1 requires a buffer of "
-                         "at least 24 bytes.  Only %llu were provided\n"
-                ,b->length - b->offset
-                );
-
+	adios_error(err_invalid_buffer_index, "adios_parse_index_offsets_v1"
+		    "requires a buffer of at least 24 bytes."
+		    "Only %llu were provided\n", b->length - b->offset);
         return 1;
     }
 
@@ -193,18 +189,16 @@ int adios_parse_index_offsets_v1 (struct adios_bp_buffer_struct_v1 * b)
     return 0;
 }
 
-int adios_parse_process_group_index_v1 (struct adios_bp_buffer_struct_v1 * b
-                         ,struct adios_index_process_group_struct_v1 ** pg_root
+int adios_parse_process_group_index_v1 (struct adios_bp_buffer_struct_v1 * b,
+                         struct adios_index_process_group_struct_v1 ** pg_root
                          )
 {
     struct adios_index_process_group_struct_v1 ** root;
     if (b->length - b->offset < 16)
     {
-        fprintf (stderr, "adios_parse_process_group_index_v1 requires a buffer "
-                         "of at least 16 bytes.  Only %llu were provided\n"
-                ,b->length - b->offset
-                );
-
+	adios_error(err_invalid_buffer_group, "adios_parse_process_group_index_v1"
+		    "requires a buffer of at least 16 bytes."
+		    "Only %llu were provided\n", b->length - b->offset);
         return 1;
     }
 
@@ -304,11 +298,9 @@ int adios_parse_vars_index_v1 (struct adios_bp_buffer_struct_v1 * b
 
     if (b->length - b->offset < 10)
     {
-        fprintf (stderr, "adios_parse_vars_index_v1 requires a buffer "
-                         "of at least 10 bytes.  Only %llu were provided\n"
-                ,b->length - b->offset
-                );
-
+	adios_error(err_invalid_buffer_vars, "adios_parse_vars_index_v1"
+		    "requires a buffer of at least 10 bytes."
+		    "Only %llu were provided\n", b->length - b->offset);
         return 1;
     }
 
@@ -406,10 +398,8 @@ int adios_parse_vars_index_v1 (struct adios_bp_buffer_struct_v1 * b
         (*root)->characteristics = malloc (characteristics_sets_count
                          * sizeof (struct adios_index_characteristic_struct_v1)
                         );
-        memset ((*root)->characteristics, 0
-               ,  characteristics_sets_count
-                * sizeof (struct adios_index_characteristic_struct_v1)
-               );
+        memset ((*root)->characteristics, 0, characteristics_sets_count
+                * sizeof (struct adios_index_characteristic_struct_v1));
         for (j = 0; j < characteristics_sets_count; j++)
         {
             uint8_t characteristic_set_count;
@@ -475,11 +465,9 @@ int adios_parse_vars_index_v1 (struct adios_bp_buffer_struct_v1 * b
 
                                 if (!data)
                                 {
-                                    fprintf (stderr, "cannot allocate %d bytes "
-                                                     "to copy scalar %s\n"
-                                            ,data_size
-                                            ,(*root)->var_name
-                                            );
+				    adios_error(err_no_memory, "cannot allocate"
+						"%d bytes to copy scalar %s\n",
+						data_size, (*root)->var_name);
 
                                     return 1;
                                 }
@@ -518,12 +506,9 @@ int adios_parse_vars_index_v1 (struct adios_bp_buffer_struct_v1 * b
 
                                 if (!data)
                                 {
-                                    fprintf (stderr, "cannot allocate %d bytes "
-                                                     "to copy scalar %s\n"
-                                            ,data_size
-                                            ,(*root)->var_name
-                                            );
-
+				    adios_error(err_no_memory, "cannot allocate"
+						"%d bytes to copy scalar %s\n",
+						data_size, (*root)->var_name);
                                     return 1;
                                 }
 
@@ -772,10 +757,9 @@ int adios_parse_attributes_index_v1 (struct adios_bp_buffer_struct_v1 * b
 
     if (b->length - b->offset < 10)
     {
-        fprintf (stderr, "adios_parse_attributes_index_v1 requires a buffer "
-                         "of at least 10 bytes.  Only %llu were provided\n"
-                ,b->length - b->offset
-                );
+	adios_error(err_invalid_buffer_attrs, "adios_parse_attributes_index_v1 "
+		    "requires a buffer of at least 10 bytes."
+		    "Only %llu were provided\n", b->length - b->offset);
 
         return 1;
     }
@@ -926,12 +910,10 @@ int adios_parse_attributes_index_v1 (struct adios_bp_buffer_struct_v1 * b
 
                         if (!data)
                         {
-                            fprintf (stderr, "cannot allocate %d bytes to "
-                                             "copy scalar %s\n"
-                                    ,data_size
-                                    ,(*root)->attr_name
-                                    );
-
+			    adios_error(err_no_memory, "cannot allocate"
+					"%d bytes to copy scalar %s\n",
+					data_size, (*root)->attr_name);
+			    
                             return 1;
                         }
 
@@ -1087,12 +1069,9 @@ int adios_parse_process_group_header_v1 (struct adios_bp_buffer_struct_v1 * b
 {
     if (b->length - b->offset < 16)
     {
-        fprintf (stderr, "adios_parse_process_group_header_v1 requires a "
-                         "buffer of at least 16 bytes.  "
-                         "Only %llu were provided\n"
-                ,b->length - b->offset
-                );
-
+	adios_error(err_invalid_buffer_group, "adios_parse_process_group_header_v1"
+		    "requires a buffer of at least 16 bytes. "
+		    "Only %llu were provided\n",b->length - b->offset);
         return 1;
     }
 
@@ -1194,11 +1173,9 @@ int adios_parse_vars_header_v1 (struct adios_bp_buffer_struct_v1 * b
 
     if (b->length - b->offset < 10)
     {
-        fprintf (stderr, "adios_parse_vars_header_v1 requires a "
-                         "buffer of at least 10 bytes.  "
-                         "Only %llu were provided\n"
-                ,b->length - b->offset
-                );
+	adios_error(err_invalid_buffer_vars, "adios_parse_vars_header_v1"
+		    "requires a buffer of at least 10 bytes. "
+		    "Only %llu were provided\n", b->length - b->offset);
 
         vars_header->count = 0;
         vars_header->length = 0;
@@ -1226,11 +1203,9 @@ int adios_parse_var_data_header_v1 (struct adios_bp_buffer_struct_v1 * b
 {
     if (b->length - b->offset < 21)
     {
-        fprintf (stderr, "adios_parse_var_data_header_v1 requires a "
-                         "buffer of at least 21 bytes.  "
-                         "Only %llu were provided\n"
-                ,b->length - b->offset
-                );
+	adios_error(err_invalid_buffer_vars, "adios_parse_var_data_header_v1"
+		    "requires a buffer of at least 21 bytes."
+		    "Only %llu were provided\n", b->length - b->offset);
 
         return 1;
     }
@@ -1757,13 +1732,11 @@ int adios_parse_var_data_payload_v1 (struct adios_bp_buffer_struct_v1 * b
 {
     if (b->length - b->offset < var_header->payload_size)
     {
-        fprintf (stderr, "adios_parse_var_data_payload_v1 for name %s "
-                         "path %s requires a "
-                         "buffer of at least %llu bytes.  "
-                         "Only %llu were provided\n"
-                ,var_header->name, var_header->path
-                ,var_header->payload_size, b->length - b->offset
-                );
+	adios_error(err_invalid_buffer_vars, "adios_parse_var_data_payload_v1"
+		    " for name %s path %s requires a buffer of at least "
+		    "%llu bytes. Only %llu were provided\n", var_header->name, 
+		    var_header->path, var_header->payload_size, 
+		    b->length - b->offset);
 
         b->offset += var_header->payload_size;
 
@@ -1773,12 +1746,11 @@ int adios_parse_var_data_payload_v1 (struct adios_bp_buffer_struct_v1 * b
         && var_payload && var_payload->payload
        )
     {
-        fprintf (stderr, "reading var name %s path %s requires a "
-                         "buffer of at least %llu bytes.  "
-                         "Only %llu were provided\n"
-                ,var_header->name, var_header->path
-                ,var_header->payload_size, payload_buffer_size
-                );
+        adios_error(err_invalid_buffer_vars, "reading var name %s path %s"
+		    "requires a buffer of at least %llu bytes.  "
+		    "Only %llu were provided\n" , var_header->name, 
+		    var_header->path, var_header->payload_size, 
+		    payload_buffer_size);
 
         b->offset += var_header->payload_size;
 
@@ -1821,11 +1793,9 @@ int adios_parse_attributes_header_v1 (struct adios_bp_buffer_struct_v1 * b
 {
     if (b->length - b->offset < 10)
     {
-        fprintf (stderr, "adios_parse_attributes_header_v1 requires a "
-                         "buffer of at least 10 bytes.  "
-                         "Only %llu were provided\n"
-                ,b->length - b->offset
-                );
+	adios_error(err_invalid_buffer_attrs, "adios_parse_attributes_header_v1"
+		    "requires a buffer of at least 10 bytes.  "
+		    "Only %llu were provided\n", b->length - b->offset);
 
         attrs_header->count = 0;
         attrs_header->length = 0;
@@ -1854,11 +1824,9 @@ int adios_parse_attribute_v1 (struct adios_bp_buffer_struct_v1 * b
 {
     if (b->length - b->offset < 15)
     {
-        fprintf (stderr, "adios_parse_attribute_data_payload_v1 requires a "
-                         "buffer of at least 15 bytes.  "
-                         "Only %llu were provided\n"
-                ,b->length - b->offset
-                );
+	adios_error(err_invalid_buffer_attrs, "adios_parse_attribute_data_payload_v1"
+		    "requires a buffer of at least 15 bytes.  "
+		    "Only %llu were provided\n", b->length - b->offset);
 
         return 1;
     }
@@ -1989,9 +1957,8 @@ void * adios_dupe_data_scalar (enum ADIOS_DATATYPES type, void * in)
             d = malloc (element_size);
             if (!d)
             {
-                fprintf (stderr, "cannot allocate %d bytes to copy scalar\n"
-                        ,element_size
-                        );
+		adios_error(err_no_memory, "cannot allocate %d "
+			    "bytes to copy scalar\n", element_size);
 
                 return 0;
             }
@@ -2003,9 +1970,8 @@ void * adios_dupe_data_scalar (enum ADIOS_DATATYPES type, void * in)
             d = malloc (element_size + 1);
             if (!d)
             {
-                fprintf (stderr, "cannot allocate %d bytes to copy scalar\n"
-                        ,element_size + 1
-                        );
+		adios_error(err_no_memory, "cannot allocate %d "
+			    "bytes to copy scalar\n", element_size+1);
 
                 return 0;
             }
@@ -2029,7 +1995,7 @@ void adios_init_buffer_read_version (struct adios_bp_buffer_struct_v1 * b)
         alloc_aligned (b, 28);
         memset (b->buff, 0, 28);
         if (!b->buff)
-            fprintf(stderr, "could not allocate 28 bytes\n");
+            log_warn("could not allocate 28 bytes\n");
         b->offset = 24;
     }
 }
@@ -2047,7 +2013,7 @@ void adios_posix_read_version (struct adios_bp_buffer_struct_v1 * b)
 
     r = read (b->f, b->buff, 28);
     if (r != 28)
-        fprintf (stderr, "could not read 28 bytes. read only: %llu\n", r);
+	log_warn("could not read 28 bytes. read only: %llu\n", r);
 }
 
 void adios_init_buffer_read_index_offsets (struct adios_bp_buffer_struct_v1 * b)
@@ -2092,7 +2058,7 @@ void adios_posix_read_vars_index (struct adios_bp_buffer_struct_v1 * b)
     r = read (b->f, b->buff, b->vars_size);
 
     if (r != b->vars_size)
-        fprintf (stderr, "reading vars_index: wanted %llu, read: %llu\n"
+        log_warn("reading vars_index: wanted %llu, read: %llu\n"
                 ,b->vars_size, r
                 );
 }
@@ -2114,9 +2080,8 @@ void adios_posix_read_attributes_index (struct adios_bp_buffer_struct_v1 * b)
     r = read (b->f, b->buff, b->attrs_size);
 
     if (r != b->attrs_size)
-        fprintf (stderr, "reading attributess_index: wanted %llu, read: %llu\n"
-                ,b->attrs_size, r
-                );
+        log_warn("reading attributess_index: wanted %llu, read: %llu\n",
+		 b->attrs_size, r);
 }
 
 void adios_init_buffer_read_process_group (struct adios_bp_buffer_struct_v1 * b)
@@ -2139,10 +2104,10 @@ uint64_t adios_posix_read_process_group (struct adios_bp_buffer_struct_v1 * b)
 
     if (pg_size != b->read_pg_size)
     {
-        fprintf (stderr, "adios_read_process_group: "
-                         "Tried to read: %llu, but only got: %llu error: %s\n"
-                ,b->read_pg_size, pg_size, strerror (errno)
-                );
+        log_warn("adios_read_process_group: "
+		 "Tried to read: %llu, but only got: "
+		 "%llu error: %s\n", b->read_pg_size, 
+		 pg_size, strerror(errno));
 
         pg_size = 0;
     }
@@ -2167,7 +2132,8 @@ int adios_posix_open_read_internal (const char * filename
     b->f = open (name, O_RDONLY | O_LARGEFILE);
     if (b->f == -1)
     {
-        fprintf (stderr, "ADIOS POSIX: file not found: %s\n", name);
+        adios_error(err_file_not_found, "ADIOS POSIX: file not found: %s\n", 
+		    name);
 
         free (name);
 
diff --git a/src/adios_bp_v1.h b/src/core/adios_bp_v1.h
similarity index 99%
rename from src/adios_bp_v1.h
rename to src/core/adios_bp_v1.h
index e7a5d42..94c3199 100644
--- a/src/adios_bp_v1.h
+++ b/src/core/adios_bp_v1.h
@@ -9,8 +9,8 @@
 #define ADIOS_BP_V1_H
 #include "stdint.h"
 #include "unistd.h"
-#include "adios_types.h"
-#include "adios_transport_hooks.h"
+#include "public/adios_types.h"
+#include "core/adios_transport_hooks.h"
 
 #define ADIOS_VERSION_NUM_MASK                       0x00000011
 #define ADIOS_VERSION_HAVE_SUBFILE                   0x00000100
diff --git a/src/adios_endianness.c b/src/core/adios_endianness.c
similarity index 96%
rename from src/adios_endianness.c
rename to src/core/adios_endianness.c
index 33d54c3..78a1b5c 100644
--- a/src/adios_endianness.c
+++ b/src/core/adios_endianness.c
@@ -7,15 +7,16 @@
 
 #include <stdint.h>
 #include <stdio.h>
-#include "adios_types.h"
+#include "public/adios_types.h"
+#include "core/adios_logger.h"
 
 void show_bytes(unsigned char * start, int len)
 {
     int i;
     for (i = 0; i < len; i ++) {
-        fprintf(stderr, " %.2x", start[i]);
+        log_info(" %.2x", start[i]);
     }
-    fprintf(stderr, "\n");
+    log_info("\n");
 }
 
 
diff --git a/src/adios_endianness.h b/src/core/adios_endianness.h
similarity index 96%
rename from src/adios_endianness.h
rename to src/core/adios_endianness.h
index 5e1541b..a38e40d 100644
--- a/src/adios_endianness.h
+++ b/src/core/adios_endianness.h
@@ -8,7 +8,7 @@
 #ifndef ENDIANNESS_H 
 #define ENDIANNESS_H 1
 
-#include "adios_types.h"
+#include "public/adios_types.h"
 
 void show_bytes(unsigned char * start, int len);
 
diff --git a/src/adios_error.c b/src/core/adios_error.c
similarity index 70%
rename from src/adios_error.c
rename to src/core/adios_error.c
index b6a335d..d8cfe40 100644
--- a/src/adios_error.c
+++ b/src/core/adios_error.c
@@ -9,7 +9,8 @@
 #include <stdlib.h>
 #include <stdarg.h>
 #include <string.h>
-#include "adios_error.h"
+#include "public/adios_error.h"
+#include "core/adios_logger.h"
 
 #ifdef DMALLOC
 #include "dmalloc.h"
@@ -29,20 +30,23 @@ const char *adios_get_last_errmsg (void)
     return aerr; 
 }
 
-void adios_error (enum ADIOS_ERRCODES errno, char *fmt, ...) 
+void adios_error (enum ADIOS_ERRCODES errcode, char *fmt, ...) 
 {
     va_list ap;
-    adios_errno = (int)errno;
+    adios_errno = (int)errcode;
     va_start(ap, fmt);
     (void) vsnprintf(aerr, ERRMSG_MAXLEN, fmt, ap);
     va_end(ap);
+    log_error("%s", aerr);
 }
 
-void adios_error_at_line (enum ADIOS_ERRCODES errno, const char* filename, unsigned int linenum, char *fmt, ...)
+void adios_error_at_line (enum ADIOS_ERRCODES errcode, const char* filename, unsigned int linenum, char *fmt, ...)
 {
     va_list ap;
-    adios_errno = (int)errno;
+    adios_errno = (int)errcode;
     va_start(ap, fmt);
     (void) vsnprintf(aerr, ERRMSG_MAXLEN, fmt, ap);
     va_end(ap);
+    log_error("%s", aerr);
 }
+
diff --git a/src/adios_internals.c b/src/core/adios_internals.c
similarity index 91%
rename from src/adios_internals.c
rename to src/core/adios_internals.c
index fe5447d..3b57c32 100644
--- a/src/adios_internals.c
+++ b/src/core/adios_internals.c
@@ -5,6 +5,7 @@
  * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
  */
 
+#include "../config.h" /* VERSION_xxx */
 #include <math.h>
 #include <string.h>
 #include <ctype.h>  /* isdigit() */
@@ -17,9 +18,10 @@
 #include <stdint.h>
 #include <sys/stat.h>
 
-#include "adios.h"
-#include "adios_internals.h"
-#include "adios_bp_v1.h"
+#include "public/adios.h"
+#include "core/adios_internals.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_logger.h"
 
 #ifdef DMALLOC
 #include "dmalloc.h"
@@ -35,6 +37,7 @@ int adios_int_is_var (const char * temp) // 1 == yes, 0 == no
 
     if (*temp == '-' || isdigit (*temp))
     {
+        temp++;
         while (*temp)
         {
             if (isdigit (*temp))
@@ -210,7 +213,7 @@ int adios_parse_dimension (const char * dimension
 {
     if (!dimension)
     {
-        fprintf (stderr, "adios_parse_dimension: dimension not provided\n");
+        adios_error (err_dimension_required, "adios_parse_dimension: dimension not provided\n");
 
         return 0;
     }
@@ -242,9 +245,9 @@ int adios_parse_dimension (const char * dimension
                 }
                 else
                 {
-                    fprintf (stderr, "config.xml: invalid var dimension: %s\n"
-                            ,dimension
-                            );
+                    adios_error (err_invalid_dimension, 
+                                 "config.xml: invalid var dimension: %s\n", 
+                                 dimension);
 
                     return 0;
                 }
@@ -261,11 +264,13 @@ int adios_parse_dimension (const char * dimension
                         case adios_long_double:
                         case adios_complex:
                         case adios_double_complex:
-                            fprintf (stderr, "config.xml: var dimension %s "
-                                             "has an invalid type: %s\n"
-                                    ,attr->name
-                                    ,adios_type_to_string_int (attr->var->type)
-                                    );
+                            adios_error (err_invalid_var_as_dimension, 
+                                         "config.xml: dimension defining var %s "
+                                         "pointed by attribute %s "
+                                         "has an invalid type: %s\n",
+                                         attr->var->name,
+                                         attr->name,
+                                         adios_type_to_string_int (attr->var->type));
                             return 0;
 
                         default: // the integral numeric types are all fine
@@ -283,11 +288,13 @@ int adios_parse_dimension (const char * dimension
                         case adios_long_double:
                         case adios_complex:
                         case adios_double_complex:
-                            fprintf (stderr, "config.xml: var dimension %s "
-                                             "has an invalid type: %s\n"
-                                    ,attr->name
-                                    ,adios_type_to_string_int (attr->type)
-                                    );
+                            adios_error (err_invalid_var_as_dimension, 
+                                         "config.xml: dimension defining var %s "
+                                         "pointed by attribute %s "
+                                         "has an invalid type: %s\n",
+                                         attr->var->name,
+                                         attr->name,
+                                         adios_type_to_string_int (attr->type));
                             return 0;
 
                         default: // the integral numeric types are all fine
@@ -307,11 +314,11 @@ int adios_parse_dimension (const char * dimension
                 case adios_long_double:
                 case adios_complex:
                 case adios_double_complex:
-                    fprintf (stderr, "config.xml: var dimension %s "
-                                     "has an invalid type: %s\n"
-                            ,var->name
-                            ,adios_type_to_string_int (var->type)
-                            );
+                    adios_error (err_invalid_var_as_dimension, 
+                            "config.xml: dimension defining var %s "
+                            "has an invalid type: %s\n",
+                            var->name,
+                            adios_type_to_string_int (var->type));
                     return 0;
 
                 default: // the integral numeric types are all fine
@@ -330,9 +337,8 @@ int adios_parse_dimension (const char * dimension
 
     if (!global_dimension)
     {
-        fprintf (stderr, "adios_parse_dimension: global_dimension not "
-                         "provided\n"
-                );
+        adios_error (err_global_dim_required, 
+                "adios_parse_dimension: global_dimension not provided\n");
 
         return 0;
     }
@@ -361,10 +367,9 @@ int adios_parse_dimension (const char * dimension
                 }
                 else
                 {
-                    fprintf (stderr, "config.xml: invalid global-bounds "
-                                     "dimension: %s\n"
-                            ,global_dimension
-                            );
+                    adios_error (err_invalid_global_dimension, 
+                            "config.xml: invalid global-bounds dimension: %s\n",
+                            global_dimension);
 
                     return 0;
                 }
@@ -381,11 +386,13 @@ int adios_parse_dimension (const char * dimension
                         case adios_long_double:
                         case adios_complex:
                         case adios_double_complex:
-                            fprintf (stderr, "config.xml: var dimension %s "
-                                             "has an invalid type: %s\n"
-                                    ,attr->name
-                                    ,adios_type_to_string_int (attr->var->type)
-                                    );
+                            adios_error (err_invalid_var_as_dimension, 
+                                         "config.xml: global dimension defining var %s "
+                                         "pointed by attribute %s "
+                                         "has an invalid type: %s\n",
+                                         attr->var->name,
+                                         attr->name,
+                                         adios_type_to_string_int (attr->var->type));
                             return 0;
 
                         default: // the integral numeric types are all fine
@@ -403,11 +410,13 @@ int adios_parse_dimension (const char * dimension
                         case adios_long_double:
                         case adios_complex:
                         case adios_double_complex:
-                            fprintf (stderr, "config.xml: var dimension %s "
-                                             "has an invalid type: %s\n"
-                                    ,attr->name
-                                    ,adios_type_to_string_int (attr->type)
-                                    );
+                            adios_error (err_invalid_var_as_dimension, 
+                                         "config.xml: global dimension defining var %s "
+                                         "pointed by attribute %s "
+                                         "has an invalid type: %s\n",
+                                         attr->var->name,
+                                         attr->name,
+                                         adios_type_to_string_int (attr->var->type));
                             return 0;
 
                         default: // the integral numeric types are all fine
@@ -427,11 +436,11 @@ int adios_parse_dimension (const char * dimension
                 case adios_long_double:
                 case adios_complex:
                 case adios_double_complex:
-                    fprintf (stderr, "config.xml: var dimension %s "
-                                     "has an invalid type: %s\n"
-                            ,var->name
-                            ,adios_type_to_string_int (var->type)
-                            );
+                    adios_error (err_invalid_var_as_dimension, 
+                            "config.xml: global dimension defining var %s "
+                            "has an invalid type: %s\n",
+                            var->name,
+                            adios_type_to_string_int (var->type));
                     return 0;
 
                 default: // the integral numeric types are all fine
@@ -449,7 +458,7 @@ int adios_parse_dimension (const char * dimension
 
     if (!local_offset)
     {
-        fprintf (stderr, "adios_parse_dimension: local-offset not provided\n");
+        adios_error (err_offset_required, "adios_parse_dimension: local-offset not provided\n");
 
         return 0;
     }
@@ -478,10 +487,9 @@ int adios_parse_dimension (const char * dimension
                 }
                 else
                 {
-                    fprintf (stderr, "config.xml: invalid var local_offset: "
-                                     "%s\n"
-                            ,local_offset
-                            );
+                    adios_error (err_invalid_offset, 
+                                 "config.xml: invalid var local_offset: %s\n",
+                                 local_offset);
 
                     return 0;
                 }
@@ -498,11 +506,13 @@ int adios_parse_dimension (const char * dimension
                         case adios_long_double:
                         case adios_complex:
                         case adios_double_complex:
-                            fprintf (stderr, "config.xml: var dimension %s "
-                                             "has an invalid type: %s\n"
-                                    ,attr->name
-                                    ,adios_type_to_string_int (attr->var->type)
-                                    );
+                            adios_error (err_invalid_var_as_dimension, 
+                                         "config.xml: offset defining var %s "
+                                         "pointed by attribute %s "
+                                         "has an invalid type: %s\n",
+                                         attr->var->name,
+                                         attr->name,
+                                         adios_type_to_string_int (attr->var->type));
                             return 0;
 
                         default: // the integral numeric types are all fine
@@ -520,11 +530,13 @@ int adios_parse_dimension (const char * dimension
                         case adios_long_double:
                         case adios_complex:
                         case adios_double_complex:
-                            fprintf (stderr, "config.xml: var dimension %s "
-                                             "has an invalid type: %s\n"
-                                    ,attr->name
-                                    ,adios_type_to_string_int (attr->type)
-                                    );
+                            adios_error (err_invalid_var_as_dimension, 
+                                         "config.xml: offset defining var %s "
+                                         "pointed by attribute %s "
+                                         "has an invalid type: %s\n",
+                                         attr->var->name,
+                                         attr->name,
+                                         adios_type_to_string_int (attr->var->type));
                             return 0;
 
                         default: // the integral numeric types are all fine
@@ -544,11 +556,11 @@ int adios_parse_dimension (const char * dimension
                 case adios_long_double:
                 case adios_complex:
                 case adios_double_complex:
-                    fprintf (stderr, "config.xml: var dimension %s "
-                                     "has an invalid type: %s\n"
-                            ,var->name
-                            ,adios_type_to_string_int (var->type)
-                            );
+                    adios_error (err_invalid_var_as_dimension, 
+                            "config.xml: offset defining var %s "
+                            "has an invalid type: %s\n",
+                            var->name,
+                            adios_type_to_string_int (var->type));
                     return 0;
 
                 default: // the integral numeric types are all fine
@@ -578,9 +590,7 @@ struct adios_group_list_struct * adios_get_groups ()
 }
 
 
-int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
-                              ,void ** out
-                              )
+int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value, void ** out)
 {
     char * end;
 
@@ -594,10 +604,8 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
             long t = strtol (value, &end, 10);
             if (errno != errno_save || (end != 0 && *end != '\0'))
             {
-                fprintf (stderr, "value: '%s' not valid integer\n"
-                        ,value
-                        );
-
+                adios_error (err_invalid_argument, 
+                             "value: '%s' not valid integer\n",value);
                 return 0;
             }
             else
@@ -607,11 +615,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
                     case adios_byte:
                         if (t < SCHAR_MIN || t > SCHAR_MAX)
                         {
-                            fprintf (stderr, "type is %s, value "
-                                             "is out of range: '%s'\n"
-                                    ,adios_type_to_string_int (type), value
-                                    );
-
+                            adios_error (err_out_of_bound, 
+                                         "type is %s, value "
+                                         "is out of range: '%s'\n",
+                                         adios_type_to_string_int (type), 
+                                         value);
                             return 0;
                         }
                         else
@@ -624,11 +632,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
                     case adios_short:
                         if (t < SHRT_MIN || t > SHRT_MAX)
                         {
-                            fprintf (stderr, "type is %s, value "
-                                             "is out of range: '%s'\n"
-                                    ,adios_type_to_string_int (type), value
-                                    );
-
+                            adios_error (err_out_of_bound, 
+                                         "type is %s, value "
+                                         "is out of range: '%s'\n",
+                                         adios_type_to_string_int (type), 
+                                         value);
                             return 0;
                         }
                         else
@@ -641,11 +649,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
                     case adios_integer:
                         if (t < INT_MIN || t > INT_MAX)
                         {
-                            fprintf (stderr, "type is %s, value "
-                                             "is out of range: '%s'\n"
-                                    ,adios_type_to_string_int (type), value
-                                    );
-
+                            adios_error (err_out_of_bound, 
+                                         "type is %s, value "
+                                         "is out of range: '%s'\n",
+                                         adios_type_to_string_int (type), 
+                                         value);
                             return 0;
                         }
                         else
@@ -664,10 +672,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
             int64_t t = strtoll (value, &end, 10);
             if (errno != errno_save || (end != 0 && *end != '\0'))
             {
-                fprintf (stderr, "type is %s, value is out of range: '%s'\n"
-                        ,adios_type_to_string_int (type), value
-                        );
-
+                adios_error (err_out_of_bound, 
+                        "type is %s, value "
+                        "is out of range: '%s'\n",
+                        adios_type_to_string_int (type), 
+                        value);
                 return 0;
             }
             else
@@ -686,10 +695,8 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
             unsigned long t = strtoul (value, &end, 10);
             if (errno != errno_save || (end != 0 && *end != '\0'))
             {
-                fprintf (stderr, "value: '%s' not valid integer\n"
-                        ,value
-                        );
-
+                adios_error (err_invalid_argument, 
+                             "value: '%s' not valid integer\n", value);
                 return 0;
             }
             else
@@ -699,11 +706,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
                     case adios_unsigned_byte:
                         if (t > UCHAR_MAX)
                         {
-                            fprintf (stderr, "type is %s, value "
-                                             "is out of range: '%s'\n"
-                                    ,adios_type_to_string_int (type), value
-                                    );
-
+                            adios_error (err_out_of_bound, 
+                                    "type is %s, value "
+                                    "is out of range: '%s'\n",
+                                    adios_type_to_string_int (type), 
+                                    value);
                             return 0;
                         }
                         else
@@ -716,11 +723,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
                     case adios_unsigned_short:
                         if (t > USHRT_MAX)
                         {
-                            fprintf (stderr, "type is %s, value "
-                                             "is out of range: '%s'\n"
-                                    ,adios_type_to_string_int (type), value
-                                    );
-
+                            adios_error (err_out_of_bound, 
+                                    "type is %s, value "
+                                    "is out of range: '%s'\n",
+                                    adios_type_to_string_int (type), 
+                                    value);
                             return 0;
                         }
                         else
@@ -733,11 +740,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
                     case adios_unsigned_integer:
                         if (t > UINT_MAX)
                         {
-                            fprintf (stderr, "type is %s, value "
-                                             "is out of range: '%s'\n"
-                                    ,adios_type_to_string_int (type), value
-                                    );
-
+                            adios_error (err_out_of_bound, 
+                                    "type is %s, value "
+                                    "is out of range: '%s'\n",
+                                    adios_type_to_string_int (type), 
+                                    value);
                             return 0;
                         }
                         else
@@ -756,10 +763,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
             uint64_t t = strtoull (value, &end, 10);
             if (errno != errno_save || (end != 0 && *end != '\0'))
             {
-                fprintf (stderr, "type is %s, value is out of range: '%s'\n"
-                        ,adios_type_to_string_int (type), value
-                        );
-
+                adios_error (err_out_of_bound, 
+                        "type is %s, value "
+                        "is out of range: '%s'\n",
+                        adios_type_to_string_int (type), 
+                        value);
                 return 0;
             }
             else
@@ -776,10 +784,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
             float t = strtof (value, &end);
             if (errno != errno_save || (end != 0 && *end != '\0'))
             {
-                fprintf (stderr, "type is %s, value is out of range: '%s'\n"
-                        ,adios_type_to_string_int (type), value
-                        );
-
+                adios_error (err_out_of_bound, 
+                        "type is %s, value "
+                        "is out of range: '%s'\n",
+                        adios_type_to_string_int (type), 
+                        value);
                 return 0;
             }
             else
@@ -796,10 +805,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
             double t = strtod (value, &end);
             if (errno != errno_save || (end != 0 && *end != '\0'))
             {
-                fprintf (stderr, "type is %s, value is out of range: '%s'\n"
-                        ,adios_type_to_string_int (type), value
-                        );
-
+                adios_error (err_out_of_bound, 
+                        "type is %s, value "
+                        "is out of range: '%s'\n",
+                        adios_type_to_string_int (type), 
+                        value);
                 return 0;
             }
             else
@@ -816,10 +826,11 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
             long double t = strtold (value, &end);
             if (errno != errno_save || (end != 0 && *end != '\0'))
             {
-                fprintf (stderr, "type is %s, value is out of range: '%s'\n"
-                        ,adios_type_to_string_int (type), value
-                        );
-
+                adios_error (err_out_of_bound, 
+                        "type is %s, value "
+                        "is out of range: '%s'\n",
+                        adios_type_to_string_int (type), 
+                        value);
                 return 0;
             }
             else
@@ -836,20 +847,23 @@ int adios_parse_scalar_string (enum ADIOS_DATATYPES type, char * value
         }
         case adios_complex:
         {
-            fprintf (stderr, "adios_complex type validation needs to be "
-                             "implemented\n");
+            adios_error (err_unspecified, 
+                         "adios_parse_scalar_string: adios_complex type "
+                         "validation needs to be implemented\n");
             return 1;
         }
         case adios_double_complex:
         {
-            fprintf (stderr, "adios_double_complex type validation needs to "
-                             "be implemented\n");
+            adios_error (err_unspecified, 
+                         "adios_parse_scalar_string: adios_double_complex type "
+                         "validation needs to be implemented\n");
             return 1;
         }
 
         case adios_unknown:
         default:
-            fprintf (stderr, "unknown type cannot be validated\n");
+            adios_error (err_unspecified, 
+                         "adios_parse_scalar_string: unknown type cannot be validated\n");
 
             return 0;
     }
@@ -874,10 +888,10 @@ int adios_common_define_attribute (int64_t group, const char * name
     {
         if (type == adios_unknown)
         {
-            fprintf (stderr, "config.xml: attribute element %s has invalid "
-                             "type attribute\n"
-                    ,name
-                    );
+            adios_error (err_invalid_type_attr, 
+                         "config.xml: attribute element %s has invalid "
+                         "type attribute\n",
+                         name);
 
             free (attr->name);
             free (attr->path);
@@ -892,10 +906,10 @@ int adios_common_define_attribute (int64_t group, const char * name
         }
         else
         {
-            fprintf (stderr, "config.xml: attribute element %s has invalid "
-                             "value attribute: '%s'\n"
-                    ,name, value
-                    );
+            adios_error (err_invalid_value_attr, 
+                         "config.xml: attribute element %s has invalid "
+                         "value attribute: '%s'\n", 
+                         name, value);
 
             free (attr->value);
             free (attr->name);
@@ -915,10 +929,10 @@ int adios_common_define_attribute (int64_t group, const char * name
 
         if (attr->var == 0)
         {
-            fprintf (stderr, "config.xml: attribute element %s references "
-                             "var %s that has not been defined.\n"
-                    ,name, var
-                    );
+            adios_error (err_invalid_varname, 
+                         "config.xml: attribute element %s references "
+                         "var %s that has not been defined.\n",
+                         name, var);
 
             free (attr->name);
             free (attr->path);
@@ -978,7 +992,7 @@ void adios_append_method (struct adios_method_struct * method)
 
             if (!new_node)
             {
-                fprintf (stderr, "out of memory in adios_append_method\n");
+                adios_error (err_no_memory, "out of memory in adios_append_method\n");
             }
             new_node->method = method;
             new_node->next = 0;
@@ -1007,7 +1021,7 @@ void adios_add_method_to_group (struct adios_method_list_struct ** root
 
             if (!new_node)
             {
-                fprintf (stderr, "out of memory in adios_append_method\n");
+                adios_error (err_no_memory, "out of memory in adios_add_method_to_group\n");
             }
             new_node->method = method;
             new_node->next = 0;
@@ -1037,7 +1051,7 @@ void adios_append_group (struct adios_group_struct * group)
 
             if (!new_node)
             {
-                fprintf (stderr, "out of memory in adios_append_group\n");
+                adios_error (err_no_memory, "out of memory in adios_append_group\n");
             }
             group->id = id;
             new_node->group = group;
@@ -1141,6 +1155,8 @@ int adios_common_declare_group (int64_t * id, const char * name
     g->name = strdup (name);
     g->adios_host_language_fortran = host_language_fortran;
     g->all_unique_var_names = adios_flag_yes;
+    // ADIOS Schema: adding similar var for meshes
+    g->all_unique_mesh_names = adios_flag_yes;
     g->id = 0; // will be set in adios_append_group
     g->member_count = 0; // will be set in adios_append_group
     g->var_count = 0;
@@ -1154,7 +1170,9 @@ int adios_common_declare_group (int64_t * id, const char * name
     g->stats_on = stats;
     g->process_id = 0;
     g->methods = 0;
-    g->mesh = 0;
+    // ADIOS Schema
+    g->meshs = 0;
+    g->mesh_count = 0;
 
     *id = (int64_t) g;
 
@@ -1171,7 +1189,7 @@ int adios_common_free_group (int64_t id)
 
     if (!root)
     {
-        fprintf (stderr, "Err in adios_common_free_group()\n");
+        adios_error (err_unspecified, "Err in adios_common_free_group()\n");
         return -1;
     }
     while (root && root->group->id != g->id)
@@ -1183,7 +1201,7 @@ int adios_common_free_group (int64_t id)
     if (!root)
     {
         // Didn't find the group
-        fprintf (stderr, "Err in adios_common_free_group()\n");
+        adios_error (err_unspecified, "Err in adios_common_free_group()\n");
         return -1;
     }
 
@@ -1362,7 +1380,9 @@ int adios_common_define_var_characteristics (struct adios_group_struct * g
 
     if (!var)
     {
-           fprintf (stderr, "config.xml: Didn't find the variable %s for analysis\n", var_name);
+        adios_error (err_invalid_varname, 
+                     "config.xml: Didn't find the variable %s for analysis\n",
+                     var_name);
         return 0;
     }
     else
@@ -1377,7 +1397,8 @@ int adios_common_define_var_characteristics (struct adios_group_struct * g
 
             if (!count)
             {
-                fprintf (stderr, "config.xml: unable to tokenize break points\n");
+                adios_error (err_histogram_error, 
+                             "config.xml: unable to tokenize break points\n");
                 return 0;
             }
 
@@ -1385,7 +1406,8 @@ int adios_common_define_var_characteristics (struct adios_group_struct * g
 
             if(!hist || !hist->breaks)
             {
-                fprintf (stderr, "config.xml: unable to allocate memory for histogram break points in "
+                adios_error (err_histogram_error, 
+                        "config.xml: unable to allocate memory for histogram break points in "
                         "adios_common_define_var_characteristics\n");
                 return 0;
             }
@@ -1395,8 +1417,9 @@ int adios_common_define_var_characteristics (struct adios_group_struct * g
                 hist->breaks[i] = atof(bin_tokens[i]);
                 if(i > 0 && (hist->breaks[i] <= hist->breaks[i-1]))
                 {
-                    fprintf (stderr, "config.xml: break points should be in increasing order "
-                        "adios_common_define_var_characteristics\n");
+                    adios_error (err_histogram_error, 
+                            "config.xml: break points should be in increasing order in "
+                            "adios_common_define_var_characteristics\n");
                     return 0;
                 }
             }
@@ -1415,7 +1438,8 @@ int adios_common_define_var_characteristics (struct adios_group_struct * g
         {
             if(!bin_max || !bin_min || !bin_count)
             {
-                fprintf (stderr, "config.xml: unable to generate break points\n");
+                adios_error (err_histogram_error, 
+                        "config.xml: unable to generate break points\n");
                 return 0;
             }
 
@@ -1423,7 +1447,8 @@ int adios_common_define_var_characteristics (struct adios_group_struct * g
 
             if (!count)
             {
-                fprintf (stderr, "config.xml: bin count is undefined\n");
+                adios_error (err_histogram_error, 
+                    "config.xml: bin count is undefined\n");
                 return 0;
             }
 
@@ -1434,14 +1459,16 @@ int adios_common_define_var_characteristics (struct adios_group_struct * g
 
             if(!hist || !hist->breaks)
             {
-                fprintf (stderr, "config.xml: unable to allocate memory for histogram break points in "
+                adios_error (err_no_memory, 
+                        "config.xml: unable to allocate memory for histogram break points in "
                         "adios_common_define_var_characteristics\n");
                 return 0;
             }
 
             if (hist->min >= hist->max)
             {
-                fprintf (stderr, "config.xml: minimum boundary value greater than maximum\n");
+                adios_error (err_histogram_error, 
+                    "config.xml: minimum boundary value greater than maximum\n");
                 return 0;
             }
 
@@ -1456,12 +1483,12 @@ int adios_common_define_var_characteristics (struct adios_group_struct * g
     return 1;
 }
 
-int adios_common_define_var (int64_t group_id, const char * name
-                            ,const char * path, enum ADIOS_DATATYPES type
-                            ,const char * dimensions
-                            ,const char * global_dimensions
-                            ,const char * local_offsets
-                            )
+int64_t adios_common_define_var (int64_t group_id, const char * name
+                                ,const char * path, enum ADIOS_DATATYPES type
+                                ,const char * dimensions
+                                ,const char * global_dimensions
+                                ,const char * local_offsets
+                                )
 {
     struct adios_group_struct * t = (struct adios_group_struct *) group_id;
     struct adios_var_struct * v = (struct adios_var_struct *)
@@ -1557,9 +1584,8 @@ int adios_common_define_var (int64_t group_id, const char * name
 
             if (!d)
             {
-                fprintf (stderr, "config.xml: out of memory in "
-                                 "adios_common_define_var\n"
-                        );
+                adios_error (err_no_memory, 
+                        "config.xml: out of memory in adios_common_define_var\n");
 
                 return 0;
             }
@@ -1586,7 +1612,7 @@ int adios_common_define_var (int64_t group_id, const char * name
                 cleanup_dimensions (&g_dim_tokens, &g_dim_count);
                 cleanup_dimensions (&lo_dim_tokens, &lo_dim_count);
 
-                return ret;
+                return 0;
             }
 
             adios_append_dimension (&v->dimensions, d);
@@ -1612,7 +1638,7 @@ int adios_common_define_var (int64_t group_id, const char * name
     }
     t->var_count++;
 
-    return 1;
+    return v;
 }
 
 void adios_common_get_group (int64_t * group_id, const char * name)
@@ -1633,9 +1659,9 @@ void adios_common_get_group (int64_t * group_id, const char * name)
         g = g->next;
     }
 
-    fprintf (stderr, "adios-group '%s' not found in configuration file\n"
-            ,name
-            );
+    adios_error (err_invalid_group, 
+            "adios-group '%s' not found in configuration file\n",
+            name);
 }
 
 // *****************************************************************************
@@ -1654,9 +1680,8 @@ static void buffer_write (char ** buffer, uint64_t * buffer_size
         }
         else
         {
-            fprintf (stderr, "Cannot allocate memory in buffer_write.  "
+            adios_error (err_no_memory, "Cannot allocate memory in buffer_write.  "
                              "Requested: %llu\n", *buffer_offset + size + 1000);
-
             return;
         }
     }
@@ -2018,10 +2043,8 @@ static void index_append_var_v1 (struct adios_index_var_struct_v1 ** root
                     }
                     else
                     {
-                        fprintf (stderr, "error allocating memory to build "
-                                         "var index.  Index aborted\n"
-                                );
-
+                        adios_error (err_no_memory, "error allocating memory to build "
+                                     "var index.  Index aborted\n");
                         return;
                     }
                 }
@@ -2090,10 +2113,8 @@ static void index_append_attribute_v1
                     }
                     else
                     {
-                        fprintf (stderr, "error allocating memory to build "
-                                         "attribute index.  Index aborted\n"
-                                );
-
+                        adios_error (err_no_memory, "error allocating memory to build "
+                                         "attribute index.  Index aborted\n");
                         return;
                     }
                 }
@@ -2439,9 +2460,9 @@ static uint64_t cast_var_data_as_uint64 (const char * parent_name
 {
     if (!data)
     {
-        fprintf (stderr, "cannot write var since dim %s not provided\n"
-                ,parent_name
-                );
+        adios_error (err_unspecified, 
+                     "cannot write var since dim %s not provided\n",
+                     parent_name);
         return 0;
     }
 
@@ -2483,18 +2504,16 @@ static uint64_t cast_var_data_as_uint64 (const char * parent_name
         case adios_string:
         case adios_complex:
         case adios_double_complex:
-            fprintf (stderr, "Cannot convert type %s to integer for var %s\n"
-                    ,adios_type_to_string_int (type), parent_name
-                    );
-
+            adios_error (err_unspecified, 
+                         "Cannot convert type %s to integer for var %s\n",
+                         adios_type_to_string_int (type), parent_name);
             return 0;
     }
     return 0;
 }
 
-static uint64_t get_value_for_dim (struct adios_file_struct * fd
-                                ,struct adios_dimension_item_struct * dimension
-                                )
+static uint64_t get_value_for_dim (struct adios_file_struct * fd,
+                                   struct adios_dimension_item_struct * dimension)
 {
     uint64_t dim = 0;
 
@@ -2511,7 +2530,7 @@ static uint64_t get_value_for_dim (struct adios_file_struct * fd
             }
             else
             {
-                fprintf (stderr, "array dimension data missing\n");
+                adios_error (err_dimension_required, "array dimension data missing\n");
             }
         }
         else
@@ -2533,7 +2552,7 @@ static uint64_t get_value_for_dim (struct adios_file_struct * fd
                     }
                     else
                     {
-                        fprintf (stderr, "array dimension data missing\n");
+                        adios_error (err_dimension_required, "array dimension data missing\n");
                     }
                 }
                 else
@@ -2545,9 +2564,9 @@ static uint64_t get_value_for_dim (struct adios_file_struct * fd
             }
             else
             {
-                fprintf (stderr, "invalid dimension member id: %d\n"
-                        ,dimension->id
-                        );
+                adios_error (err_invalid_dimension, 
+                             "invalid dimension member id: %d\n",
+                             dimension->id);
             }
         }
     }
@@ -2875,7 +2894,8 @@ void adios_build_index_v1 (struct adios_file_struct * fd
                         }
                         v_index->characteristics [0].value = 0;
                     }
-                    else
+
+                    if (v->data)
                     {
                         v_index->characteristics [0].bitmap = 0;
                         v_index->characteristics [0].stats = 0;
@@ -3342,7 +3362,8 @@ int adios_write_index_v1 (char ** buffer
                         }
                         // NCSU - End of addition statistic to buffer
                     }
-                    else
+
+                    if (vars_root->characteristics [i].value)
                     {
                         // add a value characteristic
                         characteristic_set_count++;
@@ -3613,6 +3634,30 @@ int adios_write_index_v1 (char ** buffer
     buffer_write (buffer, buffer_size, &buffer_offset_start, &attrs_count, 2);
     buffer_write (buffer, buffer_size, &buffer_offset_start, &index_size, 8);
 
+
+    /* Since ADIOS 1.4 Write new information before the last 24+4 bytes into the footer 
+        New information's format
+            24 characters: ADIOS-BP v<version>, padded with spaces up to 24
+            1 byte: major version
+            1 byte: minor version
+            1 byte: micro version
+            1 byte: 0
+    */
+    {
+        char verstr[25] = "                    ";
+        unsigned char ver;
+        snprintf (verstr, 25, "ADIOS-BP v%-14.14s", VERSION); 
+        buffer_write (buffer, buffer_size, buffer_offset, verstr, 24);
+        ver = VERSION_MAJOR;
+        buffer_write (buffer, buffer_size, buffer_offset, &ver, 1);
+        ver = VERSION_MINOR;
+        buffer_write (buffer, buffer_size, buffer_offset, &ver, 1);
+        ver = VERSION_MICRO;
+        buffer_write (buffer, buffer_size, buffer_offset, &ver, 1);
+        ver = 0;
+        buffer_write (buffer, buffer_size, buffer_offset, &ver, 1);
+    }
+
     // location of the beginning of the indexes (first proc groups then vars)
     buffer_write (buffer, buffer_size, buffer_offset, &pg_index_start, 8);
     buffer_write (buffer, buffer_size, buffer_offset, &vars_index_start, 8);
@@ -4043,7 +4088,7 @@ int adios_generate_var_characteristics_v1 (struct adios_file_struct * fd
     uint64_t size = 0;
 
     if (var->bitmap == 0)
-        return ;
+        return 0;
 
     int32_t map[32];
     memset (map, -1, sizeof(map));
@@ -4702,12 +4747,10 @@ static int adios_multiply_dimensions (uint64_t * size
             return 1;
 
         default:
-            fprintf (stderr, "Invalid datatype for array dimension on "
-                             "var %s: %s\n"
-                    ,var->name
-                    ,adios_type_to_string_int (type)
-                    );
-
+            adios_error (err_invalid_var_as_dimension, 
+                         "Invalid datatype for array dimension on var %s: %s\n",
+                         var->name,
+                         adios_type_to_string_int (type));
             return 0;
     }
 }
@@ -4746,13 +4789,12 @@ uint64_t adios_get_var_size (struct adios_var_struct * var
                         {
                             if (!attr->var->data)
                             {
-                                fprintf (stderr, "adios_get_var_size: "
-                                                 "sizing of %s failed because "
-                                                 "dimension component %s was "
-                                                 "not provided\n"
-                                        ,var->name, attr->var->name
-                                        );
-
+                                adios_error (err_invalid_var_as_dimension, 
+                                             "adios_get_var_size: "
+                                             "sizing of %s failed because "
+                                             "dimension component %s was "
+                                             "not provided\n",
+                                             var->name, attr->var->name);
                                 return 0;
                             }
                             else
@@ -4781,13 +4823,12 @@ uint64_t adios_get_var_size (struct adios_var_struct * var
                     }
                     else
                     {
-                        fprintf (stderr, "adios_get_var_size: "
-                                         "sizing of %s failed because "
-                                         "dimension component was not "
-                                         "provided\n"
-                                ,var->name
-                                );
-
+                        adios_error (err_invalid_var_as_dimension, 
+                                "adios_get_var_size: "
+                                "sizing of %s failed because "
+                                "dimension component %s was "
+                                "not provided\n",
+                                var->name);
                         return 0;
                     }
                 }
@@ -4795,13 +4836,12 @@ uint64_t adios_get_var_size (struct adios_var_struct * var
                 {
                     if (!dim_var->data)
                     {
-                        fprintf (stderr, "adios_get_var_size: "
-                                         "sizing of %s failed because "
-                                         "dimension component %s was not "
-                                         "provided\n"
-                                ,var->name, dim_var->name
-                                );
-
+                        adios_error (err_invalid_var_as_dimension, 
+                                "adios_get_var_size: "
+                                "sizing of %s failed because "
+                                "dimension component %s was "
+                                "not provided\n",
+                                var->name, dim_var->name);
                         return 0;
                     }
                     else
diff --git a/src/adios_internals.h b/src/core/adios_internals.h
similarity index 90%
rename from src/adios_internals.h
rename to src/core/adios_internals.h
index b95a3c5..9a6647c 100644
--- a/src/adios_internals.h
+++ b/src/core/adios_internals.h
@@ -12,8 +12,12 @@
 #include <stdlib.h>
 
 // need the enum for the transports
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_bp_v1.h"
+
+#ifdef SKEL_TIMING
+#include "core/adios_timing.h"
+#endif
 
 enum ADIOS_METHOD_MODE {adios_mode_write  = 1
                        ,adios_mode_read   = 2
@@ -23,6 +27,8 @@ enum ADIOS_METHOD_MODE {adios_mode_write  = 1
 
 struct adios_dimension_struct;
 struct adios_var_struct;
+// ADIOS Schema: modifying mesh struct
+struct adios_mesh_struct;
 
 // NCSU - Generic data for statistics
 struct adios_stat_struct 
@@ -38,6 +44,8 @@ struct adios_var_struct
 
     char * name;
     char * path;
+    // ADIOS Schema: adding a mesh XML attribute to variable tag
+    // char * mesh;
     enum ADIOS_DATATYPES type;
     struct adios_dimension_struct * dimensions;
     enum ADIOS_FLAG got_buffer;
@@ -105,6 +113,19 @@ enum ADIOS_MESH_TYPE
     ,ADIOS_MESH_UNSTRUCTURED = 4
 };
 
+// ADIOS Schema: supported cell types
+enum ADIOS_CELL_TYPE
+{
+     ADIOS_CELL_PT         = 1
+    ,ADIOS_CELL_LINE       = 2
+    ,ADIOS_CELL_TRI        = 3
+    ,ADIOS_CELL_QUAD       = 4
+    ,ADIOS_CELL_HEX        = 5
+    ,ADIOS_CELL_PRI        = 6
+    ,ADIOS_CELL_TET        = 7
+    ,ADIOS_CELL_PYR        = 8
+};
+
 struct adios_mesh_uniform_struct;
 struct adios_mesh_rectilinear_struct;
 struct adios_mesh_structured_struct;
@@ -112,6 +133,9 @@ struct adios_mesh_unstructured_struct;
 
 struct adios_mesh_struct
 {
+    // ADIOS Schema: adding mesh names 
+    // Groups can have multiple meshes
+    char * name;
     enum ADIOS_FLAG time_varying;
     enum ADIOS_MESH_TYPE type;
     union 
@@ -121,6 +145,7 @@ struct adios_mesh_struct
         struct adios_mesh_structured_struct * structured;
         struct adios_mesh_unstructured_struct * unstructured;
     };
+    struct adios_mesh_struct * next;
 };
 
 struct adios_group_struct
@@ -145,7 +170,11 @@ struct adios_group_struct
 
     struct adios_method_list_struct * methods;
 
-    struct adios_mesh_struct * mesh;
+    struct adios_mesh_struct * meshs;
+    int mesh_count;
+    enum ADIOS_FLAG all_unique_mesh_names;
+   
+    int attrid_update_epoch; // ID of special attribute "/__adios__/update_time_epoch" to find it fast
 };
 
 struct adios_group_list_struct
@@ -158,7 +187,7 @@ struct adios_group_list_struct
 struct adios_file_struct
 {
     char * name;
-    uint32_t subfile_index; // needs to be set in ADIOS method if generates subfiles
+    int32_t subfile_index; // needs to be set in ADIOS method if generates subfiles
     struct adios_group_struct * group;
     enum ADIOS_METHOD_MODE mode;
     uint64_t data_size;
@@ -177,6 +206,11 @@ struct adios_file_struct
 
     uint64_t vars_start;    // offset for where to put the var/attr count
     uint16_t vars_written;  // count of vars/attrs to write
+
+#ifdef SKEL_TIMING
+    struct adios_timing_struct * timing_obj;
+#endif
+
 };
 
 struct adios_dimension_item_struct
@@ -194,7 +228,7 @@ struct adios_dimension_struct
     struct adios_dimension_struct * next;
 };
 
-typedef void (* ADIOS_INIT_FN) (const char * parameters
+typedef void (* ADIOS_INIT_FN) (const PairStruct * parameters
                                ,struct adios_method_struct * method
                                );
 typedef int (* ADIOS_OPEN_FN) (struct adios_file_struct * fd
@@ -305,6 +339,9 @@ struct adios_mesh_uniform_struct
     struct adios_mesh_item_list_struct * dimensions;
     struct adios_mesh_item_list_struct * origin;
     struct adios_mesh_item_list_struct * spacing;
+    // ADIOS Schema: adding option to provide origin and maximum
+    // instead restricting users to origin and spacing
+    struct adios_mesh_item_list_struct * maximum;
 };
 
 struct adios_mesh_rectilinear_struct
@@ -324,10 +361,15 @@ struct adios_mesh_structured_struct
 
 struct adios_mesh_unstructured_struct
 {
-    struct adios_mesh_item_struct * components;
+    // ADIOS Schema: adding single/multi points option
+    // adding nspace to allow 2D mesh in 3D for example,
+    // finally adding the concept of cellset/cellsetcount
+    enum ADIOS_FLAG points_single_var;
+    struct adios_mesh_item_struct * nspace;
+    struct adios_mesh_var_list_struct * points;
     struct adios_mesh_item_struct * points_count;
-    struct adios_var_struct * points;
     struct adios_mesh_cell_list_list_struct * cell_list;
+    struct adios_mesh_item_struct * cell_set_count;
 };
 
 //////////////////////////////////////////////////////////////////////////////
@@ -414,12 +456,12 @@ int adios_common_declare_group (int64_t * id, const char * name
                                ,enum ADIOS_FLAG stats
                                );
 
-int adios_common_define_var (int64_t group_id, const char * name
-                            ,const char * path, enum ADIOS_DATATYPES type
-                            ,const char * dimensions
-                            ,const char * global_dimensions
-                            ,const char * local_offsets
-                            );
+int64_t adios_common_define_var (int64_t group_id, const char * name
+                                ,const char * path, enum ADIOS_DATATYPES type
+                                ,const char * dimensions
+                                ,const char * global_dimensions
+                                ,const char * local_offsets
+                                );
 
 int adios_common_define_var_characteristcs  (struct adios_group_struct * g, const char * var_name
                             				,const char * bin_interval 
diff --git a/src/core/adios_internals_mxml.c b/src/core/adios_internals_mxml.c
new file mode 100644
index 0000000..f53607f
--- /dev/null
+++ b/src/core/adios_internals_mxml.c
@@ -0,0 +1,4883 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#include <string.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <sys/stat.h> /* struct stat */
+
+// xml parser
+#include <mxml.h>
+
+#include "public/adios.h"
+#include "public/adios_error.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_internals.h"
+#include "core/adios_internals_mxml.h"
+#include "core/buffer.h"
+#include "core/adios_logger.h"
+#include "core/util.h" // PairStruct*
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+static enum ADIOS_FLAG adios_host_language_fortran = adios_flag_yes;
+
+struct adios_method_list_struct * adios_methods = 0;
+struct adios_group_list_struct * adios_groups = 0;
+
+//extern struct adios_method_list_struct * adios_methods;
+//extern struct adios_group_list_struct * adios_groups;
+
+struct adios_transport_struct * adios_transports = 0;
+static int adios_transports_initialized = 0;
+
+
+// ADIOS Schema: adding utility functions
+void conca_att_nam(char ** returnstr, const char * meshname, char * att_nam);
+void conca_numb_att_nam(char ** returnstr, const char * meshname, char * att_nam, char counterstr[5]);
+
+// this macro makes getting the attributes easier
+// fix the bgp bugs
+#define GET_ATTR(n,attr,var,en)                              \
+if (!strcasecmp (n, attr->name)) {                           \
+    if (!var)                                                \
+    {                                                        \
+        var = attr->value;                                   \
+        continue;                                            \
+    }                                                        \
+    else                                                     \
+    {                                                        \
+        log_warn ("xml: duplicate attribute %s on %s (ignored)",n,en); \
+        continue;                                            \
+    }                                                        \
+}
+
+static enum ADIOS_DATATYPES parseType (const char * type, const char * name)
+{
+    if (   !strcasecmp (type, "byte")
+        || !strcasecmp (type, "integer*1")
+       )
+        return adios_byte;
+
+    if (   !strcasecmp (type, "short")
+        || !strcasecmp (type, "integer*2")
+       )
+        return adios_short;
+
+    if (   !strcasecmp (type, "integer")
+        || !strcasecmp (type, "integer*4")
+       )
+        return adios_integer;
+
+    if (   !strcasecmp (type, "long")
+        || !strcasecmp (type, "integer*8")
+       )
+        return adios_long;
+
+    if (   !strcasecmp (type, "unsigned byte")
+        || !strcasecmp (type, "unsigned integer*1")
+       )
+        return adios_unsigned_byte;
+
+    if (   !strcasecmp (type, "unsigned short")
+        || !strcasecmp (type, "unsigned integer*2")
+       )
+        return adios_unsigned_short;
+
+    if (   !strcasecmp (type, "unsigned integer")
+        || !strcasecmp (type, "unsigned integer*4")
+       )
+        return adios_unsigned_integer;
+
+    if (   !strcasecmp (type, "unsigned long")
+        || !strcasecmp (type, "unsigned integer*8")
+       )
+        return adios_unsigned_long;
+
+    if (   !strcasecmp (type, "real")
+        || !strcasecmp (type, "real*4")
+        || !strcasecmp (type, "float")
+       )
+        return adios_real;
+
+    if (   !strcasecmp (type, "real*8")
+        || !strcasecmp (type, "double")
+        || !strcasecmp (type, "long float")
+       )
+        return adios_double;
+
+    if (   !strcasecmp (type, "real*16")
+        || !strcasecmp (type, "long double")
+       )
+        return adios_long_double;
+
+    if (!strcasecmp (type, "string"))
+        return adios_string;
+
+    if (   !strcasecmp (type, "complex")
+        || !strcasecmp (type, "complex*8")
+       )
+        return adios_complex;
+
+    if (   !strcasecmp (type, "double complex")
+        || !strcasecmp (type, "complex*16")
+       )
+        return adios_double_complex;
+
+    log_error ("config.xml: invalid type: %s in var %s\n", type, name);
+
+    return adios_unknown;
+}
+
+static enum ADIOS_FLAG parseFlag (const char * attr_name, const char * flag
+                                 ,enum ADIOS_FLAG default_value
+                                 )
+{
+    if (!flag)
+        return default_value;
+
+    if (!strcasecmp (flag, "yes"))
+        return adios_flag_yes;
+
+    if (!strcasecmp (flag, "no"))
+        return adios_flag_no;
+
+    log_error ("config.xml: %s must have a value of 'yes' or 'no' "
+                     "not: %s\n", attr_name, flag
+            );
+
+    return adios_flag_unknown;
+}
+
+
+static void adios_append_mesh_item (struct adios_mesh_item_list_struct ** root
+                                   ,struct adios_mesh_item_list_struct * item
+                                   )
+{
+    while (root)
+    {
+        if (!*root)
+        {
+            *root = item;
+            root = 0;
+        }
+        else
+        {
+            root = &(*root)->next;
+        }
+    }
+}
+
+static void adios_append_mesh_var (struct adios_mesh_var_list_struct ** root
+                                  ,struct adios_mesh_var_list_struct * var
+                                  )
+{
+    while (root)
+    {
+        if (!*root)
+        {
+            *root = var;
+            root = 0;
+        }
+        else
+        {
+            root = &(*root)->next;
+        }
+    }
+}
+
+static void adios_append_mesh_cell_list
+                           (struct adios_mesh_cell_list_list_struct ** root
+                           ,struct adios_mesh_cell_list_list_struct * cell_list
+                           )
+{
+    while (root)
+    {
+        if (!*root)
+        {
+            *root = cell_list;
+            root = 0;
+        }
+        else
+        {
+            root = &(*root)->next;
+        }
+    }
+}
+
+static int parseMeshUniformDimensions (const char * dimensions
+                                      ,struct adios_group_struct * new_group
+                                      ,struct adios_mesh_uniform_struct * mesh
+                                      ,const char * name
+                                      )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_item_list_struct * item = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * dim_att_nam = 0; // dimensions attribute name
+    char * getdimsfrom = 0; // dimensions attribute that is a var
+    int counter = 0;        // used to create dimX attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create dimX attributes
+
+    if (!dimensions)
+    {
+        log_warn ("config.xml: dimensions value required for"
+                         "uniform mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (dimensions);
+
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        item = (struct adios_mesh_item_list_struct *) malloc
+                            (sizeof (struct adios_mesh_item_list_struct));
+        item->next = 0;
+
+        if (!item)
+        {
+            log_warn ("Out of memory parseMeshUniformDimensions of mesh: %s\n"
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        }
+
+        if (adios_int_is_var (c))
+        {
+            item->item.rank = 0.0;
+            item->item.var =
+                    adios_find_var_by_name (new_group->vars, c
+                                           ,new_group->all_unique_var_names
+                                           );
+            if (!item->item.var)
+            {
+                log_warn ("config.xml: invalid variable %s\n"
+                                 "for dimensions of mesh: %s\n"
+                                 ,c
+                                 ,name
+                        );
+                free (d1);
+
+                return 0;
+
+            }else{
+                // Found variable ==> create a dims attribute for it.
+                // char * getdimsfrom = 0;
+                getdimsfrom = 0;
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                conca_numb_att_nam(&getdimsfrom, name, "dim", counterstr);
+                adios_common_define_attribute (p_new_group,getdimsfrom,"/",adios_string,item->item.var->name,"");
+                free (getdimsfrom);
+                counter++;
+            }
+        }
+        else
+        {
+            item->item.rank = strtod (c, 0);
+            counterstr[0] = '\0';
+            snprintf(counterstr, 5, "%d", counter);
+            dim_att_nam = 0;
+            conca_numb_att_nam(&dim_att_nam, name, "dim", counterstr);
+            adios_common_define_attribute (p_new_group,dim_att_nam,"/",adios_double,c,"");
+            free (dim_att_nam);
+            item->item.var = 0;
+            counter++;
+        }
+
+        adios_append_mesh_item (&(mesh->dimensions), item);
+
+        c = strtok (NULL, ",");
+    }
+
+    char * dims = 0;
+    counterstr[0] = '\0';
+    snprintf(counterstr, 5, "%d", counter);
+    dims = 0;
+    conca_att_nam(&dims, name, "ndims");
+
+    adios_common_define_attribute (p_new_group,dims,"/",adios_double,counterstr,"");
+
+    free (dims);
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshUniformMaxima (const char * maximum
+                                      ,struct adios_group_struct * new_group
+                                      ,struct adios_mesh_uniform_struct * mesh
+                                      ,const char * name
+                                      )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_item_list_struct * item = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * max_att_nam = 0; // maxima attribute name   
+    char * getmaxafrom = 0; // maxima attribute name that is a var
+    int counter = 0;        // used to create maxX attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create maxX attributes
+
+    if (!maximum)
+    {
+         log_warn ("config.xml: maximum value required"
+                         "for uniform mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (maximum);
+
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        item = (struct adios_mesh_item_list_struct *) malloc
+                            (sizeof (struct adios_mesh_item_list_struct));
+        item->next = 0;
+
+        if (!item)
+        {
+            log_warn ("Out of memory parseMeshUniformMaxima of mesh: %s\n"
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        }
+        if (adios_int_is_var (c))
+        {
+            item->item.rank = 0.0;
+            item->item.var =
+                    adios_find_var_by_name (new_group->vars, c
+                                           ,new_group->all_unique_var_names
+                                           );
+            if (!item->item.var)
+            {
+                log_warn ("config.xml: invalid variable %s for maximum\n"
+                                 "of mesh: %s\n"
+                                 ,c
+                                 ,name
+                        );
+                free (d1);
+
+                return 0;
+            }else{
+                // Found variable ==> create a maxa attribute for it.
+                // char * getmaxafrom = 0;
+                getmaxafrom = 0;
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                conca_numb_att_nam(&getmaxafrom, name, "max", counterstr);
+                adios_common_define_attribute (p_new_group,getmaxafrom,"/",adios_string,item->item.var->name,"");
+                free (getmaxafrom);
+                counter++;
+            }
+        }
+        else
+        {
+            // Create attributes for each maximum
+            item->item.rank = strtod (c, 0);
+            counterstr[0] = '\0';
+            snprintf(counterstr, 5, "%d", counter);
+            max_att_nam = 0;
+            conca_numb_att_nam(&max_att_nam, name, "max", counterstr);
+            adios_common_define_attribute (p_new_group,max_att_nam,"/",adios_double,c,"");
+            free (max_att_nam);
+            item->item.var = 0;
+            counter++;        
+        }
+
+        adios_append_mesh_item (&(mesh->maximum), item);
+
+        c = strtok (NULL, ",");
+    }
+
+    char * maxa = 0;
+    counterstr[0] = '\0';
+    snprintf(counterstr, 5, "%d", counter);
+    maxa = 0;
+    conca_att_nam(&maxa, name, "maxa");
+    adios_common_define_attribute (p_new_group,maxa,"/",adios_double,counterstr,"");
+    free (maxa);
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshUniformOrigin (const char * origin
+                                  ,struct adios_group_struct * new_group
+                                  ,struct adios_mesh_uniform_struct * mesh
+                                  ,const char * name
+                                  )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_item_list_struct * item = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * org_att_nam = 0; // origins attribute name   
+    char * getorgsfrom = 0; // origins attribute name that is a var
+    int counter = 0;        // used to create orgX attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create orgX attributes
+
+    if (!origin)
+    {
+        log_warn ("config.xml: origin value required "
+                         "for uniform mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (origin);
+
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        item = (struct adios_mesh_item_list_struct *) malloc
+                            (sizeof (struct adios_mesh_item_list_struct));
+        item->next = 0;
+
+        if (!item)
+        {
+            log_warn ("Out of memory parseMeshUniformOrigin of mesh: %s\n", name);
+            free (d1);
+
+            return 0;
+        }
+
+        if (adios_int_is_var (c))
+        {
+            item->item.rank = 0.0;
+            item->item.var =
+                    adios_find_var_by_name (new_group->vars, c
+                                           ,new_group->all_unique_var_names
+                                           );
+            if (!item->item.var)
+            {
+                log_warn ("config.xml: invalid variable %s for origin\n"
+                        "of mesh: %s\n"
+                        ,c
+                        ,name
+                        );
+                free (d1);
+
+                return 0;
+            }else{
+                // Found variable ==> create a orgs attribute for it.
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                getorgsfrom = 0;
+                conca_numb_att_nam(&getorgsfrom, name, "org", counterstr);
+                adios_common_define_attribute (p_new_group,getorgsfrom,"/",adios_string,item->item.var->name,"");
+                free (getorgsfrom);
+                counter++;
+            }
+        }
+        else
+        {
+            // Create attributes for each origin 
+            item->item.rank = strtod (c, 0);
+            item->item.var = 0;
+            counterstr[0] = '\0';
+            snprintf(counterstr, 5, "%d", counter);
+            org_att_nam = 0;
+            conca_numb_att_nam(&org_att_nam, name, "org", counterstr);
+            adios_common_define_attribute (p_new_group,org_att_nam,"/",adios_double,c,"");
+            free (org_att_nam);
+            counter++;
+        }
+
+        adios_append_mesh_item (&(mesh->origin), item);
+
+        c = strtok (NULL, ",");
+    }
+
+    char * orgs = 0;
+    counterstr[0] = '\0';
+    snprintf(counterstr, 5, "%d", counter);
+    orgs = 0;
+    conca_att_nam(&orgs, name, "orgs");
+    adios_common_define_attribute (p_new_group,orgs,"/",adios_double,counterstr,"");
+    free (orgs);
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshUniformSpacing (const char * spacing
+                                   ,struct adios_group_struct * new_group
+                                   ,struct adios_mesh_uniform_struct * mesh
+                                   ,const char * name
+                                   )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_item_list_struct * item = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * spa_att_nam = 0; // spacings attribute name   
+    char * getspasfrom = 0; // spacings attribute name that is a var
+    int counter = 0;        // used to create spaX attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create spaX attributes if (!spacing)
+
+    if (!spacing)
+    {
+        log_warn ("config.xml: mesh uniform spacing value "
+                "required for mesh: %s\n"
+                ,name
+                );
+        return 0;
+    }
+
+    d1 = strdup (spacing);
+
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        item = (struct adios_mesh_item_list_struct *) malloc
+                            (sizeof (struct adios_mesh_item_list_struct));
+        item->next = 0;
+
+        if (!item)
+        {
+            log_warn ("Out of memory parseMeshUniformSpacing for mesh: %s\n", name);
+            free (d1);
+
+            return 0;
+        }
+
+        if (adios_int_is_var (c))
+        {
+            item->item.rank = 0.0;
+            item->item.var =
+                    adios_find_var_by_name (new_group->vars, c
+                                           ,new_group->all_unique_var_names
+                                           );
+            if (!item->item.var)
+            {
+                log_warn ("config.xml: invalid variable: %s for spacing\n"
+                                 "of mesh: %s\n"
+                                 ,c
+                                 ,name
+                        );
+                free (d1);
+
+                return 0;
+            }else{
+                // Found variable ==> create a spas attribute for it.
+                // char * getspasfrom = 0;
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                getspasfrom = 0;
+                conca_numb_att_nam(&getspasfrom, name, "spa", counterstr);
+                adios_common_define_attribute (p_new_group,getspasfrom,"/",adios_string,item->item.var->name,"");
+                free (getspasfrom);
+                counter++;
+            }
+        }
+        else
+        {
+            // Create attributes for each dimension
+            item->item.rank = strtod (c, 0);
+            counterstr[0] = '\0';
+            snprintf(counterstr, 5, "%d", counter);
+            spa_att_nam = 0;
+            conca_numb_att_nam(&spa_att_nam, name, "spa", counterstr);
+            adios_common_define_attribute (p_new_group,spa_att_nam,"/",adios_double,c,"");
+            free (spa_att_nam);
+            item->item.var = 0;
+            counter++;
+        }
+
+        adios_append_mesh_item (&(mesh->origin), item);
+
+        c = strtok (NULL, ",");
+    }
+
+    char * spas = 0;
+    counterstr[0] = '\0';
+    snprintf(counterstr, 5, "%d", counter);
+    spas = 0;
+    conca_att_nam(&spas, name, "spas");
+    adios_common_define_attribute (p_new_group,spas,"/",adios_double,counterstr,"");
+    free (spas);
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshRectilinearDimensions (const char * dimensions
+                                          ,struct adios_group_struct * new_group
+                                          ,struct adios_mesh_rectilinear_struct * mesh
+                                          ,const char * name
+                                          )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_item_list_struct * item = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * dim_att_nam = 0; // dimensions attribute name
+    char * getdimsfrom = 0; // dimensions attribute name that is a var
+    int counter = 0;        // used to create dimX attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create dimX attributes
+
+    if (!dimensions)
+    {
+        log_warn ("config.xml: dimensions value required"
+                         "for rectilinear mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (dimensions);
+
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        item = (struct adios_mesh_item_list_struct *) malloc
+                            (sizeof (struct adios_mesh_item_list_struct));
+        item->next = 0;
+
+        if (!item)
+        {
+            log_warn ("Out of memory parseMeshRectilinearDimensions for mesh: %s\n"
+                             ,name
+                             );
+            free (d1);
+
+            return 0;
+        }
+
+        if (adios_int_is_var (c))
+        {
+            item->item.rank = 0.0;
+            item->item.var =
+                    adios_find_var_by_name (new_group->vars, c
+                                           ,new_group->all_unique_var_names
+                                           );
+            if (!item->item.var)
+            {
+                log_warn ("config.xml: invalid variable: %s for dimensions\n"
+                                 "of mesh: %s\n"
+                                 ,c
+                                 ,name
+                        );
+                free (d1);
+
+                return 0;
+            }else
+            {
+                // Found variable ==> create a dims attribute for it.
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                getdimsfrom = 0;
+                conca_numb_att_nam(&getdimsfrom, name, "dim", counterstr);
+                adios_common_define_attribute (p_new_group,getdimsfrom,"/",adios_string,item->item.var->name,"");
+                free (getdimsfrom);
+                counter++;
+            }
+        }
+        else
+        {
+            // Create attributes for each dimension
+            item->item.rank = strtod (c, 0);
+            counterstr[0] = '\0';
+            snprintf(counterstr, 5, "%d", counter);
+            dim_att_nam = 0;
+            conca_numb_att_nam(&dim_att_nam, name, "dim", counterstr);
+            adios_common_define_attribute (p_new_group,dim_att_nam,"/",adios_double,c,"");
+            free (dim_att_nam);
+            item->item.var = 0;
+            counter++;        
+        }
+
+        adios_append_mesh_item (&(mesh->dimensions), item);
+
+        c = strtok (NULL, ",");
+    }
+
+    char * dims = 0;
+    counterstr[0] = '\0';    
+    snprintf(counterstr, 5, "%d", counter);
+    dims = 0;
+    conca_att_nam(&dims, name, "dims");
+    adios_common_define_attribute (p_new_group,dims,"/",adios_double,counterstr,"");
+
+    free (dims); 
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshRectilinearCoordinatesMultiVar (const char * coordinates
+                                                   ,struct adios_group_struct * new_group
+                                                   ,struct adios_mesh_rectilinear_struct * mesh
+                                                   ,const char * name
+                                                   )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_var_list_struct * var = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * coo_att_nam = 0; // coordinates attribute name
+    int counter = 0;        // used to create ptsX attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create ptsX attributes
+
+    if (!coordinates)
+    {
+        log_warn ("config.xml: coordinates-multi-var value required"
+                         "for rectilinear mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (coordinates);
+
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        var = (struct adios_mesh_var_list_struct *) malloc
+                        (sizeof (struct adios_mesh_var_list_struct));
+        var->next = 0;
+
+        if (!var)
+        {
+            log_warn ("Out of memory parseMeshRectilinearCoordinatesMultiVar\n"
+                             "for mesh: %s"
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        }
+
+        if (adios_int_is_var (c))
+        {
+            var->var =
+                    adios_find_var_by_name (new_group->vars, c
+                                           ,new_group->all_unique_var_names
+                                           );
+            if (!var->var)
+            {
+                log_warn ("config.xml: invalid variable: %s for coordinates\n"
+                                 "of mesh: %s\n"
+                                 ,c
+                                 ,name
+                        );
+                free (d1);
+
+                return 0;
+            }else
+            {
+                // Found variable ==> create a coords attribute for it.
+                coo_att_nam = 0;
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                conca_numb_att_nam(&coo_att_nam, name, "pts", counterstr);
+                adios_common_define_attribute (p_new_group,coo_att_nam,"/",adios_string,c,"");
+                free (coo_att_nam);
+                counter++;
+            }
+        }
+        else
+        {
+            var->var = 0;
+            log_warn ("config.xml: invalid variable: %s for coordinates"
+                             "of rectilinear mesh: %s\n"
+                             ,c
+                             ,name
+                    );
+            free (d1);
+            return 0;
+        }
+
+        adios_append_mesh_var (&(mesh->coordinates), var);
+
+        c = strtok (NULL, ",");
+    }
+
+    // At this points, coordinates should point to at least 2 variables
+    // otherwise let the user know to use the coordinates-single-var tag
+    if (counter > 1) {
+        char * coords = 0;
+        counterstr[0] = '\0';
+        snprintf(counterstr, 5, "%d", counter);
+        conca_att_nam(&coords, name, "nvars");
+        adios_common_define_attribute (p_new_group,coords,"/",adios_double,counterstr,"");
+        free (coords);
+    } else
+    {
+        log_warn ("config.xml: coordinates-multi-var expects "
+                         "at least 2 variables (%s)\n"
+                         ,name
+                );
+        free (d1);
+        return 0;
+    }
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshRectilinearCoordinatesSingleVar (const char * coordinates
+                                                    ,struct adios_group_struct * new_group
+                                                    ,struct adios_mesh_rectilinear_struct * mesh
+                                                    ,const char * name
+                                                    )
+{
+    char * d1; // save of strdup
+    struct adios_mesh_var_list_struct * var = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * coo_att_nam = 0; // coordinates attribute name
+
+    if (!coordinates)
+    {
+        log_warn ("config.xml: coordinates-single-var value required"
+                         "for rectilinear mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (coordinates);
+
+    var = (struct adios_mesh_var_list_struct *) malloc
+                    (sizeof (struct adios_mesh_var_list_struct));
+    var->next = 0;
+
+    if (!var)
+    {
+        log_warn ("Out of memory parseMeschRectilinearCoordinatesSingleVar\n");
+        free (d1);
+
+        return 0;
+     }
+
+     if (adios_int_is_var (d1))
+     {
+        var->var =
+               adios_find_var_by_name (new_group->vars, d1
+                                      ,new_group->all_unique_var_names
+                                      );
+        if (!var->var)
+        {
+            log_warn ("config.xml: invalid variable: %s for coordinates"
+                             "of mesh: %s\n"
+                             ,d1
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        }else
+        {
+            // Found variable ==> create a nvars attribute for it.
+            conca_att_nam(&coo_att_nam, name, "nvars");
+            adios_common_define_attribute (p_new_group,coo_att_nam,"/",adios_string,d1,"");
+            free (coo_att_nam);
+        }
+    }
+    else
+    {
+        var->var = 0;
+        log_warn ("config.xml: invalid variable: %s for coordinates of mesh: %s\n"
+                                 ,d1
+                                 ,name
+                );
+        free (d1);
+        return 0;
+    }
+
+    adios_append_mesh_var (&(mesh->coordinates), var);
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshStructuredNspace (const char * nspace
+                                     ,struct adios_group_struct * new_group
+                                     ,struct adios_mesh_structured_struct * mesh
+                                     ,const char * name
+                                     )
+{
+    char * d1; // save of strdup
+    int64_t      p_new_group = (int64_t) new_group;
+    struct adios_mesh_item_struct * item = 0;
+    char * nsp_att_nam = 0; // nspace attribute name
+
+    if (!nspace)
+    {
+        log_warn ("config.xml: npsace value required "
+                         "for structured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (nspace);
+
+    item = (struct adios_mesh_item_struct *) malloc
+                            (sizeof (struct adios_mesh_item_struct));
+
+    if (!item)
+    {
+        log_warn ("Out of memory parseMeshStructuredNspace for mesh: %s\n", name);
+        free (d1);
+
+        return 0;
+    }
+
+    conca_att_nam(&nsp_att_nam, name, "nsp");
+
+    if (adios_int_is_var (nspace))
+    {
+        item->rank = 0.0;
+        item->var =
+               adios_find_var_by_name (new_group->vars, nspace
+                                       ,new_group->all_unique_var_names
+                                       );
+        if (!item->var)
+        {
+           log_warn ("config.xml: invalid variable: %s for nspace of mesh: %s\n"
+                            ,nspace
+                            ,name
+                   );
+            free (d1);
+
+            return 0;
+        }else
+        {
+            adios_common_define_attribute (p_new_group,nsp_att_nam,"/",adios_string,item->var->name,"");
+            free (nsp_att_nam);
+        }
+    }
+    else
+    {
+        item->rank = strtod (nspace, 0);
+        adios_common_define_attribute (p_new_group,nsp_att_nam,"/",adios_double,nspace,"");
+        free (nsp_att_nam);
+        item->var = 0;
+    }
+
+    mesh->nspace = item;
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshStructuredDimensions (const char * dimensions
+                                         ,struct adios_group_struct * new_group
+                                         ,struct adios_mesh_structured_struct * mesh
+                                         ,const char * name
+                                         )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_item_list_struct * item = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * dim_att_nam = 0; // dimensions attribute name
+    char * getdimsfrom = 0; // dimensions attribute name that is a var
+    int counter = 0;        // used to create dimX attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create dimX attributes
+
+    if (!dimensions)
+    {
+        log_warn ("config.xml: dimensions value required"
+                         "for structured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (dimensions);
+
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        item = (struct adios_mesh_item_list_struct *) malloc
+                            (sizeof (struct adios_mesh_item_list_struct));
+        item->next = 0;
+
+        if (!item)
+        {
+            log_warn ("Out of memory parseMeshStructuredDimensions of mesh: %s\n"
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        }
+
+        if (adios_int_is_var (c))
+        {
+            item->item.rank = 0.0;
+            item->item.var =
+                    adios_find_var_by_name (new_group->vars, c
+                                           ,new_group->all_unique_var_names
+                                           );
+            if (!item->item.var)
+            {
+                log_warn ("config.xml: invalid variable: %s for dimensions\n"
+                                 "of mesh: %s\n"
+                                 ,c
+                                 ,name
+                        );
+
+                free (d1);
+
+                return 0;
+            } else
+            {
+                // Found variable ==> create a dims attribute for it.
+                // char * getdimsfrom = 0;
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                getdimsfrom = 0;
+                conca_numb_att_nam(&getdimsfrom, name, "dim", counterstr);
+                adios_common_define_attribute (p_new_group,getdimsfrom,"/",adios_string,item->item.var->name,"");
+                free (getdimsfrom);
+                counter++;
+            }
+        }
+        else
+        {
+            item->item.rank = strtod (c, 0);
+            item->item.var = 0;
+            counterstr[0] = '\0';
+            snprintf(counterstr, 5, "%d", counter);
+            dim_att_nam = 0;
+            conca_numb_att_nam(&dim_att_nam, name, "dim", counterstr);
+            adios_common_define_attribute (p_new_group,dim_att_nam,"/",adios_double,c,"");
+            free (dim_att_nam);
+            counter++;
+
+        }
+
+        adios_append_mesh_item (&(mesh->dimensions), item);
+
+        c = strtok (NULL, ",");
+    }
+
+    char * dims = 0;
+    counterstr[0] = '\0';
+    snprintf(counterstr, 5, "%d", counter);
+    dims = 0;
+    conca_att_nam(&dims, name, "ndims");
+    adios_common_define_attribute (p_new_group,dims,"/",adios_double,counterstr,"");
+
+    free (dims);
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshStructuredPointsMultiVar (const char * points
+                                             ,struct adios_group_struct * new_group
+                                             ,struct adios_mesh_structured_struct * mesh
+                                             ,const char * name
+                                             )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_var_list_struct * var = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * pts_att_nam = 0; // pointss attribute name
+    int counter = 0;        // used to create ptsX attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create ptsX attributes
+
+    if (!points)
+    {
+        log_warn ("config.xml: points-multi-var value required"
+                         "for structured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (points);
+
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        var = (struct adios_mesh_var_list_struct *) malloc
+                        (sizeof (struct adios_mesh_var_list_struct));
+        var->next = 0;
+
+        if (!var)
+        {
+            log_warn ("Out of memory parseMeshStructuredPointsMultiVar"
+                             "of mesh: %s\n"
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        }
+
+        if (adios_int_is_var (c))
+        {
+            var->var =
+                    adios_find_var_by_name (new_group->vars, c
+                                           ,new_group->all_unique_var_names
+                                           );
+            if (!var->var)
+            {
+                log_warn ("config.xml: invalid variable: %s points of mesh: %s\n"
+                                 ,c
+                                 ,name
+                        );
+                free (d1);
+
+                return 0;
+            }else
+            {
+                // Found variable ==> create a points attribute for it.
+                pts_att_nam = 0;
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                conca_numb_att_nam(&pts_att_nam, name, "pts", counterstr);
+                adios_common_define_attribute (p_new_group,pts_att_nam,"/",adios_string,c,"");
+                free (pts_att_nam);
+                counter++;
+            }
+        }
+        else
+        {
+            var->var = 0;
+            log_warn ("config.xml: invalid variable: %s for points of mesh: %s\n"
+                             ,c
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        }
+
+        adios_append_mesh_var (&(mesh->points), var);
+
+        c = strtok (NULL, ",");
+    }
+
+    // Define an attribute showing the number of mesh_vars
+    // Should be more than one in this multi-var parsing
+    if (counter > 1){
+        char * pts = 0;
+        counterstr[0] = '\0';
+        snprintf(counterstr, 5, "%d", counter);
+        conca_att_nam(&pts, name, "nvars");
+        adios_common_define_attribute (p_new_group,pts,"/",adios_double,counterstr,"");
+        free (pts);
+    } else
+    {
+            log_warn ("config.xml: points-multi-var tag for mesh: %s "
+                             " expects at least 2 variables\n"
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+    }
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshStructuredPointsSingleVar (const char * points
+                                              ,struct adios_group_struct * new_group
+                                              ,struct adios_mesh_structured_struct * mesh
+                                              ,const char * name
+                                              )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_var_list_struct * var = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * pts_att_nam = 0; // points attribute name
+
+    if (!points)
+    {
+        log_warn ("config.xml: points-single-var value required"
+                         "for structured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (points);
+
+    var = (struct adios_mesh_var_list_struct *) malloc
+                    (sizeof (struct adios_mesh_var_list_struct));
+    var->next = 0;
+
+    if (!var)
+    {
+        log_warn ("Out of memory parseMeshStructuredPointsSingleVar"
+                         "for mesh: %s\n"
+                         ,name
+                );
+        free (d1);
+
+        return 0;
+     }
+
+     if (adios_int_is_var (d1))
+     {
+        var->var =
+               adios_find_var_by_name (new_group->vars, d1
+                                      ,new_group->all_unique_var_names
+                                      );
+        if (!var->var)
+        {
+            log_warn ("config.xml: invalid variable: %s for points of mesh: %s\n"
+                             ,d1
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        }else
+        {
+            // Found variable ==> create a number of vars attribute for it.
+            conca_att_nam(&pts_att_nam, name, "nvars");
+            adios_common_define_attribute (p_new_group,pts_att_nam,"/",adios_string,d1,"");
+            free (pts_att_nam);
+        }
+    }
+    else
+    {
+        var->var = 0;
+        log_warn ("config.xml: invalid variable: %s for points of mesh: %s\n"
+                         ,d1
+                         ,name
+                );
+        free (d1);
+
+        return 0;
+    }
+
+    adios_append_mesh_var (&(mesh->points), var);
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshUnstructuredNspace (const char * nspace
+                                     ,struct adios_group_struct * new_group
+                                     ,struct adios_mesh_unstructured_struct * mesh
+                                     ,const char * name
+                                     )
+{
+    char * d1; // save of strdup
+    int64_t      p_new_group = (int64_t) new_group;
+    struct adios_mesh_item_struct * item = 0;
+    char * nsp_att_nam = 0; // nspace attribute name
+
+    if (!nspace)
+    {
+        log_warn ("config.xml: nspace value required"
+                         "for unstructured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (nspace);
+
+    item = (struct adios_mesh_item_struct *) malloc
+                            (sizeof (struct adios_mesh_item_struct));
+
+    if (!item)
+    {
+        log_warn ("Out of memory parseMeshUnstructuredNspace for mesh: %s\n"
+                         ,name
+                );
+        free (d1);
+
+        return 0;
+    }
+
+    conca_att_nam(&nsp_att_nam, name, "nsp");
+
+    if (adios_int_is_var (nspace))
+    {
+        item->rank = 0.0;
+        item->var =
+               adios_find_var_by_name (new_group->vars, nspace
+                                       ,new_group->all_unique_var_names
+                                       );
+        if (!item->var)
+        {
+           log_warn ("config.xml: invalid variable: %s for nspace of mesh: %s\n"
+                            ,nspace
+                            ,name
+                   );
+            free (d1);
+
+            return 0;
+        }else
+        {
+            adios_common_define_attribute (p_new_group,nsp_att_nam,"/",adios_string,item->var->name,"");
+            free (nsp_att_nam);
+        }
+    }
+    else
+    {
+        item->rank = strtod (nspace, 0);
+        adios_common_define_attribute (p_new_group,nsp_att_nam,"/",adios_double,nspace,"");
+        free (nsp_att_nam);
+        item->var = 0;
+    }
+
+    mesh->nspace = item;
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshUnstructuredNpoints (const char * npoints
+                                     ,struct adios_group_struct * new_group
+                                     ,struct adios_mesh_unstructured_struct * mesh
+                                     ,const char * name
+                                     )
+{
+    char * d1; // save of strdup
+    int64_t      p_new_group = (int64_t) new_group;
+    struct adios_mesh_item_struct * item = 0;
+    char * npts_att_nam = 0; // npoints attribute name
+
+    if (!npoints)
+    {
+        log_warn ("config.xml: npoints value required"
+                         "for unstructured mesh\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (npoints);
+
+    item = (struct adios_mesh_item_struct *) malloc
+                            (sizeof (struct adios_mesh_item_struct));
+
+    if (!item)
+    {
+        log_warn ("Out of memory parseMeshUnstructuredNpoints for mesh: %s\n"
+                         ,name
+                );
+        free (d1);
+
+        return 0;
+    }
+
+    conca_att_nam(&npts_att_nam, name, "npoints");
+
+    if (adios_int_is_var (npoints))
+    {
+        item->rank = 0.0;
+        item->var =
+               adios_find_var_by_name (new_group->vars, npoints
+                                       ,new_group->all_unique_var_names
+                                       );
+        if (!item->var)
+        {
+           log_warn ("config.xml: invalid variable: %s for npoints of mesh: %s\n"
+                   ,npoints
+                   ,name
+                   );
+            free (d1);
+
+            return 0;
+        }else
+        {
+            adios_common_define_attribute (p_new_group,npts_att_nam,"/",adios_string,item->var->name,"");
+            free (npts_att_nam);
+        }
+    }
+    else
+    {
+        item->rank = strtod (npoints, 0);
+        adios_common_define_attribute (p_new_group,npts_att_nam,"/",adios_double,npoints,"");
+        free (npts_att_nam);
+        item->var = 0;
+    }
+
+    mesh->points_count = item;
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshUnstructuredPointsMultiVar (const char * points
+                                             ,struct adios_group_struct * new_group
+                                             ,struct adios_mesh_unstructured_struct * mesh
+                                             ,const char * name
+                                             )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_var_list_struct * var = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * pts_att_nam = 0; // pointss attribute name
+    int counter = 0;        // used to create ptsX attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create ptsX attributes
+
+    if (!points)
+    {
+        log_warn ("config.xml: points-multi-var value required"
+                         "for unstructured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (points);
+
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        var = (struct adios_mesh_var_list_struct *) malloc
+                        (sizeof (struct adios_mesh_var_list_struct));
+        var->next = 0;
+
+        if (!var)
+        {
+            log_warn ("Out of memory parseMeshUnstructuredPointsMultiVar\n"
+                             "for mesh: %s\n"
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        }
+
+        if (adios_int_is_var (c))
+        {
+            var->var =
+                    adios_find_var_by_name (new_group->vars, c
+                                           ,new_group->all_unique_var_names
+                                           );
+            if (!var->var)
+            {
+                log_warn ("config.xml: invalid variable: %s for points of mesh: %s\n"
+                        ,c
+                        ,name
+                        );
+                free (d1);
+
+                return 0;
+            }else
+            {
+                // Found variable ==> create a points attribute for it.
+                pts_att_nam = 0;
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                conca_numb_att_nam(&pts_att_nam, name, "pts", counterstr);
+                adios_common_define_attribute (p_new_group,pts_att_nam,"/",adios_string,c,"");
+                free (pts_att_nam);
+                counter++;
+            }
+        }
+        else
+        {
+            var->var = 0;
+            log_warn ("config.xml: invalid variable: %s for points of mesh: %s\n"
+                             ,c
+                             ,name
+                    );
+            free (d1);
+            return 0;
+        }
+
+        adios_append_mesh_var (&(mesh->points), var);
+
+        c = strtok (NULL, ",");
+    }
+
+    // At this point we expect at least 2 "points-multi-var values
+    if (counter > 1){
+        char * pts = 0;
+        counterstr[0] = '\0';
+        snprintf(counterstr, 5, "%d", counter);
+        conca_att_nam(&pts, name, "nvars");
+        adios_common_define_attribute (p_new_group,pts,"/",adios_double,counterstr,"");
+        free (pts);
+        free (d1);
+    } else
+    {
+        log_warn ("config.xml: points-multi-var tag expects "
+                         " at least two variabels. (%s)\n"
+                ,name
+                );
+        free (d1);
+        return 0;
+    }
+
+    return 1;
+}
+
+static int parseMeshUnstructuredPointsSingleVar (const char * points
+                                              ,struct adios_group_struct * new_group
+                                              ,struct adios_mesh_unstructured_struct * mesh
+                                              ,const char * name
+                                              )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_var_list_struct * var = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * pts_att_nam = 0; // points attribute name
+
+    if (!points)
+    {
+        log_warn ("config.xml: points-single-var value required"
+                         "for unstructured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (points);
+
+    var = (struct adios_mesh_var_list_struct *) malloc
+                    (sizeof (struct adios_mesh_var_list_struct));
+    var->next = 0;
+
+    if (!var)
+    {
+        log_warn ("Out of memory parseMeshUnstructuredPointsSingleVar"
+                         "for mesh: %s\n"
+                         ,name
+                );
+        free (d1);
+
+        return 0;
+     }
+
+     if (adios_int_is_var (d1))
+     {
+        var->var =
+               adios_find_var_by_name (new_group->vars, d1
+                                      ,new_group->all_unique_var_names
+                                      );
+        if (!var->var)
+        {
+            log_warn ("config.xml: invalid variable: %s for points of mesh: %s\n"
+                    ,d1
+                    ,name
+                    );
+            free (d1);
+
+            return 0;
+        }else
+        {
+            // Found variable ==> create a number of vars attribute for it.
+            conca_att_nam(&pts_att_nam, name, "nvars");
+            adios_common_define_attribute (p_new_group,pts_att_nam,"/",adios_string,d1,"");
+            free (pts_att_nam);
+        }
+    }
+    else
+    {
+        var->var = 0;
+        log_warn ("config.xml: invalid variable: %s "
+                         " for points-multi-var of mesh: %s\n"
+                ,d1
+                ,name
+                );
+        free (d1);
+        return 0;
+    }
+
+    adios_append_mesh_var (&(mesh->points), var);
+
+    free (d1);
+
+    return 1;
+}
+
+static int parseMeshUnstructuredUniformCells (const char * count
+                                             ,const char * data
+                                             ,const char * type
+                                             ,struct adios_group_struct * new_group
+                                             ,struct adios_mesh_unstructured_struct * mesh
+                                             ,const char * name
+                                             )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_cell_list_list_struct * cell_list = 0;
+    struct adios_mesh_item_struct * item = 0;
+    int64_t      p_new_group = (int64_t) new_group;
+    char * ncellset_att_nam = 0;  // ncellset attribute
+    char * cellcount_att_nam = 0; // single cell count attribute
+    char * celldata_att_nam = 0;  // single cell data  attribute
+    char * celltype_att_nam = 0;  // single cell type attribute
+
+    item = (struct adios_mesh_item_struct *) malloc
+                            (sizeof (struct adios_mesh_item_struct));
+
+    if (!item)
+    {
+        log_warn ("Out of memory parseMeshUnstructuredUniformCells of mesh: %s\n"
+                         ,name
+                );
+        free (d1);
+
+        return 0;
+    }else{
+        item->rank = 1;
+        conca_att_nam(&ncellset_att_nam,name,"ncsets");
+        adios_common_define_attribute (p_new_group,ncellset_att_nam,"/",adios_double,"1","");
+        free (ncellset_att_nam);
+        item->var = 0;
+    }
+
+    // Given that we expect only one variable in this case
+    // We should not have any "," in these values... Catch errors
+    mesh->cell_set_count = item;
+
+    if (!count)
+    {
+        log_warn ("config.xml: uniform-cells count value required"
+                         "for unstructured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+    if (!data)
+    {
+        log_warn ("config.xml: uniform-cells data value required"
+                         "for unstructured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+    if (!type)
+    {
+        log_warn ("config.xml: uniform-cells type value required"
+                         "for unstructured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (count);
+
+    cell_list = (struct adios_mesh_cell_list_list_struct *) malloc
+                        (sizeof (struct adios_mesh_cell_list_list_struct));
+    cell_list->next = 0;
+
+    if (!cell_list)
+    {
+        log_warn ("Out of memory parseMeshUnstructuredUniformCells"
+                         "of mesh: %s\n"
+                         ,name
+                );
+        free (d1);
+
+        return 0;
+    }
+
+    if (adios_int_is_var (d1))
+    {
+        cell_list->cell_list.count.var =
+                adios_find_var_by_name (new_group->vars, d1
+                                       ,new_group->all_unique_var_names
+                                       );
+        cell_list->cell_list.count.rank = 0;
+        if (!cell_list->cell_list.count.var)
+        {
+            log_warn ("config.xml: invalid variable: %s for 'count' attribute\n"
+                             "of mesh: %s\n"
+                             ,d1
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        } else
+        {
+           conca_att_nam(&cellcount_att_nam, name, "ccount");
+           adios_common_define_attribute (p_new_group,cellcount_att_nam,"/",adios_string,cell_list->cell_list.count.var->name,"");
+           free (cellcount_att_nam);
+        }
+    }
+    else
+    {
+        cell_list->cell_list.count.var = 0;
+        cell_list->cell_list.count.rank = strtod (d1, 0);
+        conca_att_nam(&cellcount_att_nam, name, "ccount");
+        adios_common_define_attribute (p_new_group,cellcount_att_nam,"/",adios_double,d1,"");
+        free (cellcount_att_nam);
+    }
+
+    free (d1);
+
+    d1 = strdup (data);
+
+    if (adios_int_is_var (d1))
+    {
+        cell_list->cell_list.data =
+             adios_find_var_by_name (new_group->vars, d1
+                                    ,new_group->all_unique_var_names
+                                    );
+        if (!cell_list->cell_list.data)
+        {
+            log_warn ("config.xml: invalid variable: %s for cell data\n"
+                             "of mesh: %s\n"
+                             ,d1
+                             ,name
+                    );
+            free (d1);
+
+            return 0;
+        } else
+        {
+            conca_att_nam(&celldata_att_nam, name, "cdata");
+            adios_common_define_attribute (p_new_group,celldata_att_nam,"/",adios_string,d1,"");
+            free (celldata_att_nam);
+        }
+    }
+    else
+    {
+        cell_list->cell_list.data = 0;
+        log_warn ("config.xml: invalid data dimension: %s of mesh: %s\n"
+                         "Please provide a valid variable for cell data.\n"
+                         ,d1
+                         ,name
+                );
+        free (d1);
+        return 0;
+    }
+
+    free (d1);
+
+    d1 = strdup (type);
+
+    conca_att_nam(&celltype_att_nam, name, "ctype");
+
+    if (!strcmp(d1,"pt") || !strcmp(d1,"point"))
+    {
+        cell_list->cell_list.type.var = 0;
+        cell_list->cell_list.type.rank = 1; //strtod (c, 0);
+        adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,d1,"");
+    } else
+    if (!strcmp(d1,"line"))
+    {
+        cell_list->cell_list.type.var = 0;
+        cell_list->cell_list.type.rank = 2; //strtod (c, 0);
+        adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,d1,"");
+    } else
+    if (!strcmp(d1,"tri") || !strcmp(d1,"triangle"))
+    {
+        cell_list->cell_list.type.var = 0;
+        cell_list->cell_list.type.rank = 3; //strtod (c, 0);
+        adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,d1,"");
+    } else
+    if (!strcmp(d1,"quad") || !strcmp(d1,"quadrilateral"))
+    {
+        cell_list->cell_list.type.var = 0;
+        cell_list->cell_list.type.rank = 4; //strtod (c, 0);
+        adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,d1,"");
+    } else
+    if (!strcmp(d1,"hex") || !strcmp(d1,"hexahedron"))
+    {
+        cell_list->cell_list.type.var = 0;
+        cell_list->cell_list.type.rank = 5; //strtod (c, 0);
+        adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,d1,"");
+    } else
+    if (!strcmp(d1,"pri") || !strcmp(d1,"prism"))
+    {
+        cell_list->cell_list.type.var = 0;
+        cell_list->cell_list.type.rank = 6; //strtod (c, 0);
+        adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,d1,"");
+    } else
+    if (!strcmp(d1,"tet") || !strcmp(d1,"tetrahedron"))
+    {
+        cell_list->cell_list.type.var = 0;
+        cell_list->cell_list.type.rank = 7; //strtod (c, 0);
+        adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,d1,"");
+    } else
+    if (!strcmp(d1,"pyr") || !strcmp(d1,"pyramid"))
+    {
+        cell_list->cell_list.type.var = 0;
+        cell_list->cell_list.type.rank = 8; //strtod (c, 0);
+        adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,d1,"");
+    } else
+    if (adios_int_is_var (d1))
+    {
+        cell_list->cell_list.type.var =
+            adios_find_var_by_name (new_group->vars, d1
+                    ,new_group->all_unique_var_names
+                    );
+        cell_list->cell_list.type.rank = 0;
+        if (!cell_list->cell_list.type.var)
+        {
+            log_warn ("config.xml: invalid variable: %s for type attribute\n"
+                             "of mesh: %s\n"
+                             ,d1
+                             ,name
+                    );
+            free (celltype_att_nam);
+            free (d1);
+
+            return 0;
+        } else
+        {
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,d1,"");
+        }
+    } else
+    {
+        cell_list->cell_list.type.var = 0;
+        cell_list->cell_list.type.rank = strtod (d1, 0);
+        if (cell_list->cell_list.type.rank > 0 && cell_list->cell_list.type.rank < 9)
+        {
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_double,d1,"");
+        } else {
+            log_warn ("config.xml: invalid type attribute: %s of mesh: %s.\n"
+                             "Please select a number between 1 and 8 for cell types\n"
+                             "or: pt, line, tri, quad, hex, pri, tet or pyr.\n"
+                             ,d1
+                             ,name
+                    );
+            free (celltype_att_nam);
+            free (d1);
+
+            return 0;
+        }
+    }
+
+    free(celltype_att_nam);
+
+    free (d1);
+
+    adios_append_mesh_cell_list (&(mesh->cell_list), cell_list);
+
+    return 1;
+}
+
+static int parseMeshUnstructuredMixedCells (const char * count
+                                           ,const char * data
+                                           ,const char * types
+                                           ,struct adios_group_struct * new_group
+                                           ,struct adios_mesh_unstructured_struct * mesh
+                                           ,const char * name
+                                           )
+{
+    char * c;  // comma location
+    char * d1; // save of strdup
+    struct adios_mesh_cell_list_list_struct * cell_list = 0;
+    struct adios_mesh_item_struct * item = 0;
+    int counter = 0;        // used to create countX, typeX, dataX? attributes
+    char counterstr[5] = {0,0,0,0,0}; // used to create countX, typeX, dataX? attributes
+    int64_t      p_new_group = (int64_t) new_group;
+    char * ncellset_att_nam = 0;  // ncellset attribute
+    char * ccounts_att_nam = 0;   // ccountX attributes
+    char * cdata_att_nam = 0;     // cdataX attributes
+    char * celltype_att_nam = 0;  // ctypeX attributes
+
+    item = (struct adios_mesh_item_struct *) malloc
+                            (sizeof (struct adios_mesh_item_struct));
+
+    if (!item)
+    {
+        log_warn ("Out of memory parseMeshUnstructuredMixedCells of mesh: %s\n"
+                         ,name
+                );
+        free (d1);
+
+        return 0;
+    }
+
+    if (!count)
+    {
+        log_warn ("config.xml: mixed-cells count value required"
+                         "for unstructured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+    if (!data)
+    {
+        log_warn ("config.xml: mixed-cells data value required"
+                         "for unstructured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+    if (!types)
+    {
+        log_warn ("config.xml: mixed-cellsi type value required "
+                         "for unstructured mesh: %s\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    d1 = strdup (count);
+    c = strtok (d1, ",");
+
+    cell_list = (struct adios_mesh_cell_list_list_struct *) malloc
+                        (sizeof (struct adios_mesh_cell_list_list_struct));
+    cell_list->next = 0;
+
+    if (!cell_list)
+    {
+        log_warn ("Out of memory parseMeshUnstructuredMixedCells\n");
+        free (d1);
+
+        return 0;
+    }
+
+    while (c)
+    {
+        if (adios_int_is_var (c))
+        {
+            cell_list->cell_list.count.var =
+                   adios_find_var_by_name (new_group->vars, c
+                                          ,new_group->all_unique_var_names
+                                          );
+            cell_list->cell_list.count.rank = 0;
+            if (!cell_list->cell_list.count.var)
+            {
+                log_warn ("config.xml: invalid variable: %s for cell count\n"
+                                 "of mesh: %s\n"
+                        ,c, name
+                        );
+                free (d1);
+
+                return 0;
+            }else{
+                ccounts_att_nam = 0;
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                conca_numb_att_nam(&ccounts_att_nam, name, "ccount", counterstr);
+                adios_common_define_attribute (p_new_group,ccounts_att_nam,"/",adios_string,c,"");
+                free (ccounts_att_nam);
+                counter++;
+            }
+        }
+        else
+        {
+            cell_list->cell_list.count.var = 0;
+            cell_list->cell_list.count.rank = strtod (c, 0);
+            counterstr[0] = '\0';
+            snprintf(counterstr, 5, "%d", counter);
+            ccounts_att_nam = 0;
+            conca_numb_att_nam(&ccounts_att_nam, name, "ccount", counterstr);
+            adios_common_define_attribute (p_new_group,ccounts_att_nam,"/",adios_double,c,"");
+            free (ccounts_att_nam);
+            counter++;
+        }
+
+        c = strtok (NULL, ",");
+    }
+    free (d1);
+
+    // We should have at least 2 cell sets, otherwise the cells are uniform
+    if (counter <= 1){
+       log_warn ("config.xml: Please provide at least 2 cell counts of mesh: %s\n"
+                        "or use the 'uniform-cells' tag.\n"
+                        ,name
+               );
+        return 0;
+    }
+
+    item->rank = (double) counter;
+    conca_att_nam(&ncellset_att_nam, name, "ncsets");
+    adios_common_define_attribute (p_new_group,ncellset_att_nam,"/",adios_double,counterstr,"");
+    free (ncellset_att_nam);
+    item->var = 0;
+
+    mesh->cell_set_count = item;
+
+    // From the number of counts expect the same number of data and type items
+    int cell_set_count = counter;
+    // Reset counter
+    counter = 0;
+
+    d1 = strdup (data);
+    c = strtok (d1, ",");
+    while (c)
+    {
+        if (adios_int_is_var (c))
+        {
+            cell_list->cell_list.data =
+                   adios_find_var_by_name (new_group->vars, c
+                                          ,new_group->all_unique_var_names
+                                          );
+            if (!cell_list->cell_list.data)
+            {
+                log_warn ("config.xml: invalid variable: %s for data of mesh: %s\n"
+                                 ,c
+                                 ,name
+                        );
+                free (d1);
+
+                return 0;
+            } else
+            {
+                cdata_att_nam = 0;
+                counterstr[0] = '\0';
+                snprintf(counterstr, 5, "%d", counter);
+                conca_numb_att_nam(&cdata_att_nam, name, "cdata", counterstr);
+                adios_common_define_attribute (p_new_group,cdata_att_nam,"/",adios_string,c,"");
+                free (cdata_att_nam);
+                counter++;
+            }
+        }
+        else
+        {
+            cell_list->cell_list.data = 0;
+            log_warn ("config.xml: invalid data: %s of mesh: %s\n"
+                             "Please provide a valid variable for cell data\n"
+                    ,d1
+                    ,name                    );
+            free (d1);
+            return 0;
+        }
+
+        c = strtok (NULL, ",");
+    }
+    free (d1);
+
+    // If the number of data variables does not match the number of counts
+    // Generate an error message
+    if (counter != cell_set_count){
+       log_warn ("config.xml: Please provide at least %d cell data of mesh: %s\n"
+                        "or use the 'uniform-cells' tag\n"
+                        ,cell_set_count
+                        ,name
+               );
+        return 0;
+    }
+
+    // Reset counter
+    counter = 0;
+
+    d1 = strdup (types);
+    c = strtok (d1, ",");
+
+    while (c)
+    {
+        celltype_att_nam = 0;
+        counterstr[0] = '\0';
+        snprintf(counterstr, 5, "%d", counter);
+        conca_numb_att_nam(&celltype_att_nam, name, "ctype", counterstr);
+
+        if (!strcmp(c,"pt") || !strcmp(c,"point"))
+        {
+            cell_list->cell_list.type.var = 0;
+            cell_list->cell_list.type.rank = 1; //strtod (c, 0);
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,c,"");
+        } else
+        if (!strcmp(c,"line"))
+        {
+            cell_list->cell_list.type.var = 0;
+            cell_list->cell_list.type.rank = 2; //strtod (c, 0);
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,c,"");
+        } else
+        if (!strcmp(c,"tri") || !strcmp(c,"triangle"))
+        {
+            cell_list->cell_list.type.var = 0;
+            cell_list->cell_list.type.rank = 3; //strtod (c, 0);
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,c,"");
+        } else
+        if (!strcmp(c,"quad") || !strcmp(c,"quadrilateral"))
+        {
+            cell_list->cell_list.type.var = 0;
+            cell_list->cell_list.type.rank = 4; //strtod (c, 0);
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,c,"");
+        } else
+        if (!strcmp(c,"hex") || !strcmp(c,"hexahedron"))
+        {
+            cell_list->cell_list.type.var = 0;
+            cell_list->cell_list.type.rank = 5; //strtod (c, 0);
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,c,"");
+        } else
+        if (!strcmp(c,"pri") || !strcmp(c,"prism"))
+        {
+            cell_list->cell_list.type.var = 0;
+            cell_list->cell_list.type.rank = 6; //strtod (c, 0);
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,c,"");
+        } else
+        if (!strcmp(c,"tet") || !strcmp(c,"tetrahedron"))
+        {
+            cell_list->cell_list.type.var = 0;
+            cell_list->cell_list.type.rank = 7; //strtod (c, 0);
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,c,"");
+        } else
+        if (!strcmp(c,"pyr") || !strcmp(c,"pyramid"))
+        {
+            cell_list->cell_list.type.var = 0;
+            cell_list->cell_list.type.rank = 8; //strtod (c, 0);
+            adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,c,"");
+        } else
+        if (adios_int_is_var (c))
+        {
+            cell_list->cell_list.type.var =
+                   adios_find_var_by_name (new_group->vars, c
+                                          ,new_group->all_unique_var_names
+                                          );
+            cell_list->cell_list.type.rank = 0;
+            if (!cell_list->cell_list.type.var)
+            {
+                log_warn ("config.xml: invalid var for type variable: %s\n"
+                                 "of mesh: %s\n"
+                                 ,c
+                                 ,name
+                        );
+                free (d1);
+
+                return 0;
+            } else
+            {
+                adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_string,c,"");
+            }
+        }
+        else
+        {
+            cell_list->cell_list.type.var = 0;
+            cell_list->cell_list.type.rank = strtod (c, 0);
+            if (cell_list->cell_list.type.rank > 0 && cell_list->cell_list.type.rank < 9)
+            {
+                adios_common_define_attribute (p_new_group,celltype_att_nam,"/",adios_double,c,"");
+            } else {
+                log_warn ("config.xml: invalid type attribute: %s of mesh: %s.\n"
+                                 "Please select a number between 1 and 8 for cell types\n"
+                                 "or: pt, line, tri, quad, hex, pri, tet or pyr.\n"
+                                 ,c
+                                 ,name
+                        );
+                free (celltype_att_nam);
+                free (d1);
+
+                return 0;
+            }
+        }
+
+        c = strtok (NULL, ",");
+        counter++;
+        free (celltype_att_nam);
+    }
+    free (d1);
+
+    // If the number of data variables does not match the number of counts
+    // Generate an error message
+    if (counter != cell_set_count){
+       log_warn ("config.xml: Please provide at least %d cell types of mesh: %s\n"
+                        "or use the 'uniform-cells' tag\n"
+                        ,cell_set_count
+                        ,name
+               );
+        return 0;
+    }
+
+    adios_append_mesh_cell_list (&(mesh->cell_list), cell_list);
+
+    return 1;
+}
+
+// primary mesh XML parsing
+static int parseMeshUniform (mxml_node_t * node
+                            ,struct adios_group_struct * new_group
+                            ,struct adios_mesh_uniform_struct ** mesh
+                            ,const char * name
+                            )
+{
+    mxml_node_t * n;
+    int saw_dimensions = 0;
+    int saw_origin = 0;
+    int saw_spacing = 0;
+    int saw_maximum = 0;
+
+    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
+        ;n
+        ;n = mxmlWalkNext (n, node, MXML_DESCEND)
+        )
+    {
+        if (n->type != MXML_ELEMENT)
+        {
+            continue;
+        }
+
+        if (!strcasecmp (n->value.element.name, "dimensions"))
+        {
+            const char * dimensions;
+
+            if (saw_dimensions)
+            {
+                log_warn ("config.xml: only one dimensions definition "
+                                 "allowed per mesh sructured-points (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_dimensions = 1;
+            dimensions = mxmlElementGetAttr (n, "value");
+
+            if (!dimensions)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "dimensions required (%s)\n"
+                                 ,name
+                        );
+                return 0;
+            }
+
+            if (!parseMeshUniformDimensions (dimensions, new_group, *mesh, name))
+                return 0;
+        } else
+        if (!strcasecmp (n->value.element.name, "origin"))
+        {
+            const char * value;
+
+            if (saw_origin)
+            {
+                log_warn ("config.xml: only one origin definition "
+                                 "allowed per mesh uniform (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_origin = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "origin required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshUniformOrigin (value, new_group, *mesh, name))
+                return 0;
+        } else
+        if (!strcasecmp (n->value.element.name, "spacing"))
+        {
+            const char * value;
+
+            if (saw_spacing)
+            {
+                log_warn ("config.xml: only one spacing "
+                                 "definition allowed per mesh uniform (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_spacing = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "spacing required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshUniformSpacing (value, new_group, *mesh, name))
+                return 0;
+        } else
+        if (!strcasecmp (n->value.element.name, "maximum"))
+        {
+            const char * value;
+
+            if (saw_maximum)
+            {
+                log_warn ("config.xml: only one maximum "
+                                 "definition allowed per mesh uniform (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_maximum = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "max required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshUniformMaxima (value, new_group, *mesh, name))
+                return 0;
+        } else
+        {
+            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
+            {
+                continue;
+            }
+        }
+    }
+
+    // If nothing is given, simply assume basic uniform plots using 
+    // the dimensions of the variable, origin=0 and spacing=1
+    /*if (!saw_dimensions)
+    {
+        log_debug ("config.xml: dimensions required on mesh "
+                   "type=uniform (%s)\n",name);
+        return 0;
+    }*/
+
+    return 1;
+}
+
+static int parseMeshRectilinear (mxml_node_t * node
+                               ,struct adios_group_struct * new_group
+                               ,struct adios_mesh_rectilinear_struct ** mesh
+                               ,const char * name
+                               )
+{
+    mxml_node_t * n;
+    int saw_dimensions = 0;
+    int saw_coordinates_multi_var = 0;
+    int saw_coordinates_single_var = 0;
+
+    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
+        ;n
+        ;n = mxmlWalkNext (n, node, MXML_DESCEND)
+        )
+    {
+        if (n->type != MXML_ELEMENT)
+        {
+            continue;
+        }
+
+        if (!strcasecmp (n->value.element.name, "dimensions"))
+        {
+            const char * value;
+
+            if (saw_dimensions)
+            {
+                log_warn ("config.xml: only one dimensions "
+                                 "definition allowed per mesh rectilinear (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_dimensions = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "dimensions required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshRectilinearDimensions (value, new_group, *mesh, name))
+                return 0;
+        } else
+        if (!strcasecmp (n->value.element.name, "coordinates-multi-var"))
+        {
+            const char * value;
+
+            if (saw_coordinates_multi_var || saw_coordinates_single_var)
+            {
+                log_warn ("config.xml: only one coordinates "
+                                 "definition allowed per mesh rectilinear (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_coordinates_multi_var = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "coordinates-multi-var required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshRectilinearCoordinatesMultiVar (value, new_group, *mesh, name))
+                return 0;
+            (*mesh)->coordinates_single_var = adios_flag_no;
+        } else
+        if (!strcasecmp (n->value.element.name, "coordinates-single-var"))
+        {
+            const char * value;
+
+            if (saw_coordinates_single_var || saw_coordinates_multi_var)
+            {
+                log_warn ("config.xml: only one coordinates "
+                                 "definition allowed per mesh rectilinear (%s)\n"
+                                 ,name
+                        );
+                return 0;
+            }
+
+            saw_coordinates_single_var = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "coordinates-single-var required (%s)\n"
+                                 ,name
+                        );
+                return 0;
+            }
+
+            if (!parseMeshRectilinearCoordinatesSingleVar (value, new_group, *mesh, name))
+                return 0;
+            (*mesh)->coordinates_single_var = adios_flag_yes;
+        } else
+        {
+            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
+            {
+                continue;
+            }
+        }
+    }
+
+    if (!saw_dimensions)
+    {
+        log_warn ("config.xml: dimensions required on mesh "
+                         "type=rectilinear (%s)\n"
+                         ,name
+                );
+        return 0;
+    }
+    if (!saw_coordinates_multi_var && !saw_coordinates_single_var)
+    {
+        log_warn ("config.xml: coordinates-multi-var or "
+                         "coordinates-single-var required on mesh "
+                         "type=rectilinear (%s)\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    return 1;
+}
+
+static int parseMeshStructured (mxml_node_t * node
+                               ,struct adios_group_struct * new_group
+                               ,struct adios_mesh_structured_struct ** mesh
+                               ,const char * name
+                               )
+{
+    mxml_node_t * n;
+    int saw_nspace = 0;
+    int saw_dimensions = 0;
+    int saw_points_multi_var = 0;
+    int saw_points_single_var = 0;
+
+    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
+        ;n
+        ;n = mxmlWalkNext (n, node, MXML_DESCEND)
+        )
+    {
+        if (n->type != MXML_ELEMENT)
+        {
+            continue;
+        }
+
+        if (!strcasecmp (n->value.element.name, "nspace"))
+        {
+            const char * value;
+
+            if (saw_nspace)
+            {
+                log_warn ("config.xml: only one nspace "
+                                 "definition allowed per mesh structured (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_nspace = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "nspace required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshStructuredNspace (value, new_group, *mesh, name))
+                return 0;
+        } else
+        if (!strcasecmp (n->value.element.name, "dimensions"))
+        {
+            const char * value;
+
+            if (saw_dimensions)
+            {
+                log_warn ("config.xml: only one dimensions "
+                                 "definition allowed per mesh structured (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_dimensions = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "dimensions required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshStructuredDimensions (value, new_group, *mesh, name))
+                return 0;
+        } else
+        if (!strcasecmp (n->value.element.name, "points-multi-var"))
+        {
+            const char * value;
+
+            if (saw_points_multi_var || saw_points_single_var)
+            {
+                log_warn ("config.xml: only one points "
+                                 "definition allowed per mesh structured (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_points_multi_var = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "points-multi-var required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshStructuredPointsMultiVar (value, new_group, *mesh, name))
+                return 0;
+            (*mesh)->points_single_var = adios_flag_no;
+        } else
+        if (!strcasecmp (n->value.element.name, "points-single-var"))
+        {
+            const char * value;
+
+            if (saw_points_multi_var || saw_points_single_var)
+            {
+                log_warn ("config.xml: only one points "
+                                 "definition allowed per mesh structured (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_points_single_var = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "points-single-var required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshStructuredPointsSingleVar (value, new_group, *mesh, name))
+                return 0;
+            (*mesh)->points_single_var = adios_flag_yes;
+        } else
+        {
+            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
+            {
+                continue;
+            }
+        }
+    }
+
+    if (!saw_dimensions)
+    {
+        log_warn ("config.xml: dimensions required on mesh "
+                         "type=structured (%s)\n"
+                         ,name
+                );
+
+        return 0;
+    }
+    if (!saw_points_multi_var && !saw_points_single_var)
+    {
+        log_warn ("config.xml: points-single-var or points-multi-var "
+                         "required on mesh type=structured (%s)\n"
+                         ,name
+                );
+
+        return 0;
+    }
+    // nspace should not be required since the single var could be multi-dim
+    /*if (saw_points_single_var && !saw_nspace)
+    {
+        log_warn ("config.xml: points-single-var and nspace "
+                         "required on mesh type=structured (%s)\n"
+                         ,name
+                );
+
+        return 0;
+    }*/
+
+    return 1;
+}
+
+static int parseMeshUnstructured (mxml_node_t * node
+                                 ,struct adios_group_struct * new_group
+                                 ,struct adios_mesh_unstructured_struct ** mesh
+                                 ,const char * name
+                                 )
+{
+    mxml_node_t * n;
+    int saw_points = 0;
+    int saw_nspace =0;
+    int saw_number_of_points = 0;
+    int saw_points_multi_var = 0;
+    int saw_points_single_var = 0;
+    int saw_cell_set = 0;
+
+    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
+        ;n
+        ;n = mxmlWalkNext (n, node, MXML_DESCEND)
+        )
+    {
+        if (n->type != MXML_ELEMENT)
+        {
+            continue;
+        }
+
+        if (!strcasecmp (n->value.element.name, "nspace"))
+        {
+            const char * value;
+
+            if (saw_nspace)
+            {
+                log_warn ("config.xml: only one nspace "
+                                 "definition allowed per mesh structured (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_nspace = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "nspace required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshUnstructuredNspace (value, new_group, *mesh, name))
+                return 0;
+        }else
+        if (!strcasecmp (n->value.element.name, "number-of-points"))
+        {
+            const char * value;
+
+            if (saw_number_of_points)
+            {
+                log_warn ("config.xml: only one number-of-points "
+                                 "definition allowed per mesh structured (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_number_of_points = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "number-of-points required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshUnstructuredNpoints (value, new_group, *mesh, name))
+                return 0;
+        }else
+        if (!strcasecmp (n->value.element.name, "points-multi-var"))
+        {
+            const char * value;
+
+            if (saw_points_multi_var || saw_points_single_var)
+            {
+                log_warn ("config.xml: only one points "
+                                 "definition allowed per mesh unstructured (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_points_multi_var = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "points-multi-var required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshUnstructuredPointsMultiVar (value, new_group, *mesh, name))
+                return 0;
+            (*mesh)->points_single_var = adios_flag_no;
+        } else
+        if (!strcasecmp (n->value.element.name, "points-single-var"))
+        {
+            const char * value;
+
+            if (saw_points_multi_var || saw_points_single_var)
+            {
+                log_warn ("config.xml: only one points "
+                                 "definition allowed per mesh unstructured (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            saw_points_single_var = 1;
+            value = mxmlElementGetAttr (n, "value");
+
+            if (!value)
+            {
+                log_warn ("config.xml: value attribute on "
+                                 "points-single-var required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshUnstructuredPointsSingleVar (value, new_group, *mesh, name))
+                return 0;
+            (*mesh)->points_single_var = adios_flag_yes;
+        } else
+        if (!strcasecmp (n->value.element.name, "uniform-cells"))
+        {
+            const char * count;
+            const char * data;
+            const char * type;
+
+            saw_cell_set = 1;
+            count = mxmlElementGetAttr (n, "count");
+            data = mxmlElementGetAttr (n, "data");
+            type = mxmlElementGetAttr (n, "type");
+
+            if (!count)
+            {
+                log_warn ("config.xml: count attribute on "
+                                 "uniform-cells required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+            if (!data)
+            {
+                log_warn ("config.xml: data attribute on "
+                                 "uniform-cells required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+            if (!type)
+            {
+                log_warn ("config.xml: type attribute on "
+                                 "uniform-cells required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshUnstructuredUniformCells (count, data, type
+                                                   ,new_group, *mesh
+                                                   ,name
+                                                   )
+               )
+                return 0;
+        } else
+        if (!strcasecmp (n->value.element.name, "mixed-cells"))
+        {
+            const char * count;
+            const char * data;
+            const char * types;
+
+            saw_cell_set = 1;
+            count = mxmlElementGetAttr (n, "count");
+            data = mxmlElementGetAttr (n, "data");
+            types = mxmlElementGetAttr (n, "type");
+
+            if (!count)
+            {
+                log_warn ("config.xml: count attribute on "
+                                 "mixed-cells required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+            if (!data)
+            {
+                log_warn ("config.xml: data attribute on "
+                                 "mixed-cells required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+            if (!types)
+            {
+                log_warn ("config.xml: types attribute on "
+                                 "mixed-cells required (%s)\n"
+                                 ,name
+                        );
+
+                return 0;
+            }
+
+            if (!parseMeshUnstructuredMixedCells (count, data, types
+                                                   ,new_group, *mesh
+                                                   ,name
+                                                   )
+               )
+                return 0;
+        } else
+        {
+            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
+            {
+                continue;
+            }
+        }
+    }
+
+    if (!saw_points_multi_var && !saw_points_single_var)
+    {
+        log_warn ("config.xml: points-single-var or points-multi-var "
+                         "required on mesh type=unstructured (%s)\n"
+                         ,name
+                );
+
+        return 0;
+    }
+    // nspace should not be required since the single variable could be multi-dim
+    /*if (saw_points_single_var && !saw_nspace && !saw_number_of_points)
+    {
+        log_warn ("config.xml: with points-single-var, nspace or number-of-points "
+                         "required on mesh type=unstructured (%s)\n"
+                         ,name
+                );
+
+        return 0;
+
+    }*/
+
+    if (!saw_cell_set)
+    {
+        log_warn ("config.xml: at least one cell-set required on "
+                         "mesh type=unstructured (%s)\n"
+                         ,name
+                );
+
+        return 0;
+    }
+
+    return 1;
+}
+
+static int validatePath (const struct adios_var_struct * vars
+                        ,const char * test_path
+                        )
+{
+    // if it is a default path, it is ok by default
+    if (!strcmp (test_path, "/"))
+    {
+        return 1;
+    }
+
+    char * path = strdup (test_path);
+    int len = strlen (path);
+    char * path_only;
+    char * var_only;
+    char * last_slash = strrchr (path, '/'); // find the last '/'
+    path_only = (char *) malloc (len + 1);
+    var_only = (char *) malloc (len + 1);
+    memset (path_only, 0, len + 1);
+    memset (var_only, 0, len + 1);
+    if (last_slash == path + len - 1)  // if it is a trailing '/', remove
+    {
+        last_slash = '\0';
+        last_slash = strrchr (path, '/');
+    }
+    if (last_slash == 0)
+    {
+        strcpy (path_only, "/");
+        strcpy (var_only, path);
+    }
+    else
+    {
+        strncpy (path_only, path, (last_slash - path));
+        strncpy (var_only, last_slash + 1, (len - (last_slash - path + 1)));
+    }
+
+    while (vars)
+    {
+        int path_only_len = strlen (path_only);
+        int var_path_len = strlen (vars->path);
+        int var_name_len = strlen (vars->name);
+        char full_path_matches = (!strcasecmp (vars->path, path));
+        char path_matches = (!strcasecmp (vars->path, path_only));
+        char var_matches = (!strcasecmp (vars->name, var_only));
+        char prefix_matches = 0;
+        char * path_var;
+        path_var = (char *) malloc (var_path_len + var_name_len + 2);
+        sprintf (path_var, "%s/%s", vars->path, vars->name);
+        char path_var_matches = (!strcasecmp (path_var, path));
+
+        if (var_path_len >= len && path_only_len > 0)
+            prefix_matches = (!strncmp (vars->path, path_only, path_only_len));
+        if (!prefix_matches)
+            prefix_matches = (!strncmp (vars->path, path, len));
+        int var_len = strlen (var_only);
+
+        if (   (path_matches && var_matches)
+            || (path_matches && var_len == 0)
+            || (full_path_matches)
+            || (prefix_matches)
+            || (path_var_matches)
+           )
+        {
+            free (path);
+            free (path_only);
+            free (var_only);
+            free (path_var);
+
+            return 1;
+        }
+        vars = vars->next;
+        free (path_var);
+    }
+
+    // not found
+    free (path);
+    free (path_only);
+    free (var_only);
+
+    return 0;
+}
+
+static int parseGroup (mxml_node_t * node)
+{
+    mxml_node_t * n;
+
+    const char * datagroup_name = 0;
+    const char * coordination_comm = 0;
+    const char * coordination_var = 0;
+    const char * host_language = 0;
+    const char * time_index_name = 0;
+    const char * stats = 0;
+
+    int64_t      ptr_new_group;
+    struct adios_group_struct * new_group;
+    enum ADIOS_FLAG host_language_fortran = adios_flag_yes, enable_stats = adios_flag_yes;
+    int i;
+
+    for (i = 0; i < node->value.element.num_attrs; i++)
+    {
+        mxml_attr_t * attr = &node->value.element.attrs [i];
+
+        GET_ATTR("name",attr,datagroup_name,"adios-group")
+        // JL: 1-2010
+        // Although this is not used, we are leaving in the retrevial
+        // of this to avoid messages from all of the existing XML files.
+        // In a few months, once everything has been updated, we can remove
+        // this code
+        GET_ATTR("coordination-communicator",attr,coordination_comm,"adios-group")
+        GET_ATTR("coordination-var",attr,coordination_var,"adios-group")
+        GET_ATTR("host-language",attr,host_language,"adios-group")
+        GET_ATTR("time-index",attr,time_index_name,"adios-group")
+        GET_ATTR("stats",attr,stats,"adios-group")
+        log_warn ("config.xml: unknown attribute '%s' on %s "
+                         "(ignored)\n"
+                ,attr->name
+                ,"adios-group"
+                );
+    }
+
+    if (!datagroup_name)
+    {
+        adios_error(err_invalid_attrname,"config.xml: name attribute required on adios-group\n");
+
+        return 0;
+    }
+    if (!host_language)
+    {
+        host_language_fortran = adios_host_language_fortran;
+    }
+    else
+    {
+        if (!strcasecmp (host_language, "Fortran"))
+        {
+            host_language_fortran = adios_flag_yes;
+        }
+        else
+        {
+            if (!strcasecmp (host_language, "C"))
+            {
+                host_language_fortran = adios_flag_no;
+            }
+            else
+            {
+                adios_error (err_invalid_host_language, "config.xml: invalid host-language %s"
+                        ,host_language
+                        );
+
+                return 0;
+            }
+        }
+    }
+
+    if (!stats)
+    {
+        enable_stats = adios_flag_yes;
+    }
+    else
+    {
+        if (!strcasecmp (stats, "On"))
+        {
+            enable_stats = adios_flag_yes;
+        }
+        else if (!strcasecmp (stats, "Off"))
+        {
+            enable_stats = adios_flag_no;
+        }
+        else
+        {
+            log_error ("config.xml, invalid stats %s"
+                    ,stats
+                    );
+            return 0;
+        }
+    }
+
+// fix the bgp bugs 
+/*
+    adios_common_declare_group ((int64_t *) &new_group, datagroup_name
+                               ,host_language_fortran, coordination_comm
+                               ,coordination_var, time_index_name
+                               );
+*/
+    adios_common_declare_group (&ptr_new_group, datagroup_name
+                               ,host_language_fortran, coordination_comm
+                               ,coordination_var, time_index_name
+                               ,enable_stats
+                               );
+     new_group = (struct adios_group_struct *)ptr_new_group;
+
+    for (n = mxmlWalkNext (node, node, MXML_DESCEND)
+        ;n
+        ;n = mxmlWalkNext (n, node, MXML_NO_DESCEND)
+        )
+    {
+        const char * gb_global_dimensions = "";
+        const char * gb_local_offsets = "";
+
+        if (n->type != MXML_ELEMENT)
+        {
+            continue;
+        }
+
+        if (!strcasecmp (n->value.element.name, "var"))
+        {
+            const char * name = 0;
+            const char * path = 0;
+            const char * mesh = 0;
+            const char * type = 0;
+            const char * dimensions = 0;
+            const char * dimension = 0;
+            const char * gread = 0;
+            const char * gwrite = 0;
+            const char * read_flag = 0;
+            enum ADIOS_DATATYPES t1;
+            char  * mpath = 0;
+
+            for (i = 0; i < n->value.element.num_attrs; i++)
+            {
+                mxml_attr_t * attr = &n->value.element.attrs [i];
+
+                GET_ATTR("name",attr,name,"var")
+                GET_ATTR("mesh",attr,mesh,"var")
+                GET_ATTR("path",attr,path,"var")
+                GET_ATTR("type",attr,type,"var")
+                GET_ATTR("dimensions",attr,dimensions,"var")
+                GET_ATTR("dimension",attr,dimension,"var")
+                GET_ATTR("gwrite",attr,gwrite,"var")
+                GET_ATTR("gread",attr,gread,"var")
+                GET_ATTR("read",attr,read_flag,"var")
+                log_warn ("config.xml: unknown attribute '%s' on %s "
+                                 "(ignored)\n"
+                        ,attr->name
+                        ,"var"
+                        );
+            }
+
+            if (!name)
+                name = ""; // this will catch the error
+            if (!path)
+                path = "/";
+            if (!type)
+                type = ""; // this will catch the error
+            if (!mesh)
+                mesh = "";  
+
+            t1 = parseType (type, name);
+
+            if (!dimensions)
+            {
+                dimensions = dimension;
+                if (!dimensions)
+                    dimensions = "";
+            }
+
+            if (read_flag)
+                parseFlag ("read", read_flag, adios_flag_no);
+
+// fix the bgp bugs
+//            if (!adios_common_define_var (*(int64_t *) &new_group, name
+            if (!adios_common_define_var (ptr_new_group, name
+                                         ,path, t1, dimensions
+                                         ,gb_global_dimensions
+                                         ,gb_local_offsets
+                                         )
+               )
+            {
+                return 0;
+            }else{
+                // Successfully define a variable, so now 
+                // an attribute for the mesh if it exists.
+                if (strcmp(mesh,"")){
+                    mpath = malloc(strlen("/adios_schema")+strlen(name)+1);
+                    strcpy(mpath,name);
+                    strcat(mpath,"/adios_schema");
+                    adios_common_define_attribute (ptr_new_group,mpath,path,adios_string,mesh,"");
+                }
+            }
+        } else
+        if (!strcasecmp (n->value.element.name, "global-bounds"))
+        {
+            mxml_node_t * n1;   // used for global_bounds
+            struct adios_global_bounds_struct * new_global_bounds = 0;
+
+            const char * dimensions = 0;
+            const char * dimension = 0;
+            const char * global_dimensions = 0;
+            const char * global_dimension = 0;
+            const char * offsets = 0;
+            const char * offset = 0;
+            const char * local_offsets = 0;
+            const char * local_offset = 0;
+
+            for (i = 0; i < n->value.element.num_attrs; i++)
+            {
+                mxml_attr_t * attr = &n->value.element.attrs [i];
+
+                GET_ATTR("dimensions",attr,dimensions,"var")
+                GET_ATTR("dimension",attr,dimension,"var")
+
+                GET_ATTR("global-dimensions",attr,global_dimensions,"var")
+                GET_ATTR("global-dimension",attr,global_dimension,"var")
+
+                GET_ATTR("offsets",attr,offsets,"var")
+                GET_ATTR("offset",attr,offset,"var")
+
+                GET_ATTR("local-offsets",attr,local_offsets,"var")
+                GET_ATTR("local-offset",attr,local_offset,"var")
+
+                log_warn ("config.xml: unknown attribute '%s' on %s "
+                                 "(ignored)\n"
+                        ,attr->name
+                        ,"global-bounds"
+                        );
+            }
+
+            if (!dimensions)
+            {
+                dimensions = (dimension ? dimension : global_dimensions);
+                dimensions = (dimensions ? dimensions : global_dimension);
+                if (!dimensions)
+                {
+                    adios_error (err_global_dim_required, "config.xml: dimensions required on "
+                                     "global-bounds\n"
+                            );
+
+                    return 0;
+                }
+            }
+            if (!offsets)
+            {
+                offsets = (offset ? offset : local_offsets);
+                offsets = (offsets ? offsets : local_offset);
+                adios_error (err_global_offset_required, "config.xml: offsets required on "
+                                 "global-bounds\n"
+                        );
+
+                return 0;
+            }
+
+            gb_global_dimensions = dimensions;
+            gb_local_offsets = offsets;
+
+            for (n1 = mxmlWalkNext (n, n, MXML_DESCEND)
+                ;n1
+                ;n1 = mxmlWalkNext (n1, n, MXML_DESCEND)
+                )
+            {
+                if (n1->type != MXML_ELEMENT)
+                {
+                    continue;
+                }
+
+                if (!strcasecmp (n1->value.element.name, "var"))
+                {
+                    const char * name = 0;
+                    const char * mesh = 0;
+                    const char * path = 0;
+                    const char * type = 0;
+                    const char * dimension = 0;
+                    const char * dimensions = 0;
+                    const char * gwrite = 0;
+                    const char * gread = 0;
+                    const char * read_flag = 0;
+                    enum ADIOS_DATATYPES t1;
+                    char * mpath = 0;
+
+                    for (i = 0; i < n1->value.element.num_attrs; i++)
+                    {
+                        mxml_attr_t * attr = &n1->value.element.attrs [i];
+
+                        GET_ATTR("name",attr,name,"var")
+                        GET_ATTR("mesh",attr,mesh,"var")
+                        GET_ATTR("path",attr,path,"var")
+                        GET_ATTR("type",attr,type,"global-bounds var")
+                        GET_ATTR("dimensions",attr,dimensions,"var")
+                        GET_ATTR("dimension",attr,dimension,"var")
+                        GET_ATTR("gwrite",attr,gwrite,"var")
+                        GET_ATTR("gread",attr,gread,"var")
+                        GET_ATTR("read",attr,read_flag,"var")
+                        log_warn ("config.xml: unknown attribute '%s' "
+                                         "on %s (ignored)\n"
+                                ,attr->name
+                                ,"var"
+                                );
+                    }
+
+                    if (!name)
+                        name = "";  // this will catch the error
+                    if (!path)
+                        path = "/";
+                    if (!type)
+                        type = ""; // this will catch the error
+                    if (!mesh)
+                        mesh = ""; 
+
+                    t1 = parseType (type, name);
+                    if (!dimensions)
+                        dimensions = dimension;
+
+                    if (read_flag)
+                        parseFlag ("read", read_flag, adios_flag_no);
+// fix the bgp bugs
+//                    if (!adios_common_define_var (*(int64_t *) &new_group
+                    if (!adios_common_define_var (ptr_new_group
+                                                 ,name
+                                                 ,path, t1, dimensions
+                                                 ,gb_global_dimensions
+                                                 ,gb_local_offsets
+                                                 )
+                       )
+                    {
+                        return 0;
+                    }else{
+                        // Successfully define a variable, so now 
+                        // an attribute for the mesh if it exists.
+                        if (strcmp(mesh,"")){
+                            mpath = malloc(strlen("/adios_schema")+strlen(name)+1);
+                            strcpy(mpath,name);
+                            strcat(mpath,"/adios_schema");
+                            adios_common_define_attribute (ptr_new_group,mpath,path,adios_string,mesh,"");
+                         }
+                    }
+                } else
+                {
+                    if (!strncmp (n1->value.element.name, "!--", 3)) // comment
+                    {
+                        continue;
+                    }
+                    else
+                    {
+                        log_warn ("config.xml: invalid xml element: "
+                                         "'%s'\n"
+                                ,n1->value.element.name
+                                );
+
+                        return 0;
+                    }
+                }
+            }
+
+            gb_global_dimensions = "";
+            gb_local_offsets = "";
+        } else
+        if (!strcasecmp (n->value.element.name, "attribute"))
+        {
+            const char * name = 0;
+            const char * path = 0;
+            const char * value = 0;
+            const char * type = 0;
+            const char * var = 0;
+            enum ADIOS_DATATYPES t1;
+
+            for (i = 0; i < n->value.element.num_attrs; i++)
+            {
+                mxml_attr_t * attr = &n->value.element.attrs [i];
+
+                GET_ATTR("name",attr,name,"var")
+                GET_ATTR("path",attr,path,"var")
+                GET_ATTR("type",attr,type,"var")
+                GET_ATTR("value",attr,value,"var")
+                GET_ATTR("var",attr,var,"var")
+                log_warn ("config.xml: unknown attribute '%s' on %s "
+                                 "(ignored)\n"
+                        ,attr->name
+                        ,"attribute"
+                        );
+            }
+
+            if (!name)
+            {
+                log_warn ("config.xml: attribute element requires "
+                                 "name\n");
+
+                return 0;
+            }
+            if (!path)
+            {
+                log_warn ("config.xml: attribute element requires "
+                                 "path\n");
+
+                return 0;
+            }
+            if ((!value && !var) || (value && var))
+            {
+                log_warn ("config.xml: attribute element '%s' "
+                                 "requires either value OR var\n"
+                        ,name
+                        );
+
+                return 0;
+            }
+            if (var && type)
+            {
+                log_warn ("config.xml: attribute element '%s'. "
+                                 "The type of an associated var is part "
+                                 "of the associated var element and cannot "
+                                 "be provided as part of the attribute "
+                                 "element."
+                                 "\n"
+                        ,name
+                        );
+
+                return 0;
+            }
+            if (!type && value)
+            {
+                type = "string";
+            }
+            if (!var)
+            {
+                t1 = parseType (type, name);
+            }
+            else
+            {
+                t1 = adios_unknown;
+            }
+// fix the bgp bugs
+//            if (!adios_common_define_attribute (*(int64_t *) &new_group, name
+            if (!adios_common_define_attribute (ptr_new_group, name
+                                               ,path, t1, value, var
+                                               )
+               )
+            {
+                return 0;
+            }
+        } else
+        if (!strcasecmp (n->value.element.name, "mesh"))
+        {
+            const char * type;
+            const char * time_varying;
+            int t_varying;
+            const char * name;
+
+            // Get the mesh name
+            name = mxmlElementGetAttr (n, "name");
+            // Get the mesh type
+            type = mxmlElementGetAttr (n, "type");
+            // Get the time varying parameter
+            time_varying = mxmlElementGetAttr(n, "time-varying");
+
+            if (!type)
+                type = "";
+
+            if (!strcmp(time_varying,"yes")){
+                t_varying = adios_flag_yes;
+            }else if (!strcmp(time_varying,"no")){
+                t_varying = adios_flag_no;
+            }else{
+                t_varying = adios_flag_no;
+                // If the user enters anything else than "yes" or "no" 
+                // Output a warning letting them no that the default ("no"
+                // will be use give instead of their value 
+                log_warn ("config.xml: the value of the time varying "
+                        "attribute can only be 'yes' or 'no'. The "
+                        "unrecognize value of '%s' is ignored and "
+                        "replaced by 'no'."
+                        "\n"
+                        ,time_varying
+                        );
+            }
+
+            char * meshtype = 0;
+            char * meshtime = 0;
+
+            conca_att_nam(&meshtype, name, "type");
+            conca_att_nam(&meshtime, name, "time");
+
+            if (!strcasecmp (type, "uniform"))
+            {
+                struct adios_mesh_struct * mes;
+                mes = adios_common_define_mesh(ptr_new_group, name,
+                                               t_varying, ADIOS_MESH_UNIFORM);
+
+                if (mes) {
+                    // Define attribute for the type and time varying characteristics
+                    adios_common_define_attribute (ptr_new_group,meshtype,"/",adios_string,type,"");
+                    adios_common_define_attribute (ptr_new_group,meshtime,"/",adios_string,time_varying,"");
+                    free (meshtype);
+                    free (meshtime);
+
+                    // Parse the uniform mesh tags
+                    parseMeshUniform (n, new_group, &mes->uniform, name);
+                }
+            } else
+            if (!strcasecmp (type, "structured"))
+            {
+                struct adios_mesh_struct * mes;
+                mes = adios_common_define_mesh(ptr_new_group, name,
+                                               t_varying, ADIOS_MESH_STRUCTURED);
+
+                if (mes) {
+                    // Define attribute for the type and time varying characteristics
+                    adios_common_define_attribute (ptr_new_group,meshtype,"/",adios_string,type,"");
+                    adios_common_define_attribute (ptr_new_group,meshtime,"/",adios_string,time_varying,"");
+                    free (meshtype);
+                    free (meshtime);
+
+                    // Parse the uniform mesh tags
+                    parseMeshStructured (n, new_group, &mes->structured, name);
+                }
+            } else
+            if (!strcasecmp (type, "rectilinear"))
+            {
+                struct adios_mesh_struct * mes;
+                mes = adios_common_define_mesh(ptr_new_group, name,
+                                               t_varying, ADIOS_MESH_RECTILINEAR);
+
+                if (mes) {
+                    // Define attribute for the type and time varying characteristics
+                    adios_common_define_attribute (ptr_new_group,meshtype,"/",adios_string,type,"");
+                    adios_common_define_attribute (ptr_new_group,meshtime,"/",adios_string,time_varying,"");
+                    free (meshtype);
+                    free (meshtime);
+
+                    // Parse the uniform mesh tags
+                    parseMeshRectilinear (n, new_group, &mes->rectilinear, name);                
+                }
+            } else
+            if (!strcasecmp (type, "unstructured"))
+            {
+                struct adios_mesh_struct * mes;
+                mes = adios_common_define_mesh(ptr_new_group, name,
+                                               t_varying, ADIOS_MESH_UNSTRUCTURED);
+
+                if (mes) {
+                    // Define attribute for the type and time varying characteristics
+                    adios_common_define_attribute (ptr_new_group,meshtype,"/",adios_string,type,"");
+                    adios_common_define_attribute (ptr_new_group,meshtime,"/",adios_string,time_varying,"");
+                    free (meshtype);
+                    free (meshtime);
+
+                    // Parse the uniform mesh tags
+                    parseMeshUnstructured (n, new_group, &mes->unstructured, name);
+                }
+            } else
+            {
+                log_warn ("config.xml: invalid mesh type: '%s'\n"
+                        ,type
+                        );
+
+                return 0;
+            }
+        } else
+        if (!strcasecmp (n->value.element.name, "gwrite"))
+        {
+            const char * src = 0;
+
+            for (i = 0; i < n->value.element.num_attrs; i++)
+            {
+                mxml_attr_t * attr = &n->value.element.attrs [i];
+
+                GET_ATTR("src",attr,src,"var")
+                log_warn ("config.xml: unknown attribute '%s' on %s "
+                                 "(ignored)\n"
+                        ,attr->name
+                        ,"gwrite"
+                        );
+            }
+            if (!src)
+            {
+                log_warn ("config.xml: gwrite element requires "
+                                 "src\n");
+
+                return 0;
+            }
+        } else
+        {
+            if (!strncmp (n->value.element.name, "!--", 3)) // a comment
+            {
+                continue;
+            }
+            else
+            {
+                log_warn ("config.xml: invalid xml element: '%s'\n"
+                        ,n->value.element.name
+                        );
+
+                return 0;
+            }
+        }
+    }
+
+    // now that we have declared the whole group, validate that the
+    // paths specified in attributes refer to real things or give
+    // a warning
+    /* // This is not required in ADIOS so why do this warnings?
+    struct adios_attribute_struct * a = new_group->attributes;
+    while (a)
+    {
+        if (!validatePath (new_group->vars, a->path))
+        {
+             log_warn ("config.xml warning: attribute element '%s' "
+                       "has path '%s' that does not match "
+                       "any var path or name.\n",a->name, a->path);
+        }
+
+        a = a->next;
+    }
+    */
+
+    return 1;
+}
+
+// concat numbered attribute name strings
+void conca_numb_att_nam(char ** returnstr, const char * meshname, char * att_nam, char counterstr[5]) {
+    *returnstr = malloc (strlen("adios_schema/") + strlen(meshname) + strlen(att_nam) + strlen(counterstr) + 3);
+    strcpy(*returnstr,"adios_schema");
+    strcat(*returnstr,"/");
+    strcat(*returnstr,meshname);
+    strcat(*returnstr,"/");
+    strcat(*returnstr,att_nam);
+    strcat(*returnstr,counterstr);
+}
+
+// concat attribute name strings
+void conca_att_nam(char ** returnstr, const char * meshname, char * att_nam) {
+    int slength = 0;
+    slength = strlen("adios_schema/");
+    slength = slength + strlen(meshname);
+    slength = slength + 1;
+    slength = slength + 1;
+    slength = slength + strlen(att_nam);
+
+    *returnstr = malloc (slength);
+
+    strcpy(*returnstr,"adios_schema/");
+    strcat(*returnstr,meshname);
+    strcat(*returnstr,"/");
+    strcat(*returnstr,att_nam);
+}
+
+// Append a mesh to a group
+enum ADIOS_FLAG adios_append_mesh (struct adios_mesh_struct ** root
+                                 ,struct adios_mesh_struct * mesh
+                                 ,uint16_t id
+                                 )
+{
+    while (root)
+    {
+        if (*root && !strcasecmp ((*root)->name, mesh->name))
+        {
+            return adios_flag_no;
+        }
+        if (!*root)
+        {
+            *root = mesh;
+            root = 0;
+        }
+        else
+        {
+            root = &(*root)->next;
+        }
+    }
+
+    return adios_flag_yes;
+}
+
+// Define a new mesh
+struct adios_mesh_struct * adios_common_define_mesh (
+        int64_t group_id, const char * name,
+        enum ADIOS_FLAG time_varying,
+        enum ADIOS_MESH_TYPE type)
+{
+    struct adios_group_struct * t = (struct adios_group_struct *) group_id;
+    struct adios_mesh_struct * m = (struct adios_mesh_struct *)
+                               malloc (sizeof (struct adios_mesh_struct));
+    enum ADIOS_FLAG flag;
+
+    m->name = strdup (name);
+    m->type = type;
+    m->time_varying = time_varying;
+    m->next = 0;
+
+    if (type == 1){
+        m->uniform = (struct adios_mesh_uniform_struct *) calloc (1, sizeof (struct adios_mesh_uniform_struct));
+    }else if (type == 3){
+        m->rectilinear = (struct adios_mesh_rectilinear_struct *) calloc (1, sizeof (struct adios_mesh_rectilinear_struct));
+    }else if (type == 2){
+        m->structured = (struct adios_mesh_structured_struct *) calloc (1, sizeof (struct adios_mesh_structured_struct));
+    }else if (type == 4){
+        m->unstructured = (struct adios_mesh_unstructured_struct *) calloc (1, sizeof (struct adios_mesh_unstructured_struct));
+    }else{
+        m->uniform = (struct adios_mesh_uniform_struct *) calloc (1, sizeof (struct adios_mesh_uniform_struct));
+    }
+    flag = adios_append_mesh (&t->meshs, m, t->mesh_count);
+    if (flag == adios_flag_no)
+    {
+        log_warn ("config.xml: unique mesh names required; "
+                         "second mesh: %s will be ignored.\n"
+                         ,name
+                );
+        free(m);
+        m = 0;
+    } else {
+        t->mesh_count++;
+    }
+
+    return m;
+}
+
+// Find a mesh
+struct adios_mesh_struct * adios_find_mesh_by_name (struct adios_mesh_struct * root
+                                                 ,const char * name
+                                                 )
+{
+    int done = 0;
+    struct adios_mesh_struct * mesh = 0;
+
+    if (!name)
+        done = 1;
+
+    while (!done && root)
+    {
+        if (!strcasecmp (name, root->name))
+        {
+            done = 1;
+            mesh = root;
+        }
+        else
+        {
+            root = root->next;
+        }
+    }
+
+    return mesh;
+}
+
+static int parseAnalysis (mxml_node_t * node)
+{
+    mxml_node_t * n;
+
+    const char * group = 0;
+    const char * var = 0;
+    const char * bin_intervals = 0;
+    const char * bin_count = 0;
+    const char * bin_min = 0;
+    const char * bin_max = 0;
+
+    int i;
+    int64_t group_id;
+    struct adios_group_struct * g;
+
+    for (i = 0; i < node->value.element.num_attrs; i++)
+    {
+        mxml_attr_t * attr = &node->value.element.attrs [i];
+
+        GET_ATTR("adios-group",attr,group,"analysis")
+        GET_ATTR("var",attr,var,"analysis")
+        GET_ATTR("break-points",attr,bin_intervals,"analysis")
+        GET_ATTR("min",attr,bin_min,"analysis")
+        GET_ATTR("max",attr,bin_max,"analysis")
+        GET_ATTR("count",attr,bin_count,"analysis")
+        log_warn ("config.xml: unknown attribute '%s' on %s "
+                         "(ignored)\n"
+                ,attr->name
+                ,"method"
+                );
+    }
+
+    if (!var)
+    {
+        log_warn ("config.xml: variable name must be given\n");
+        return 0;
+    }
+
+    if (!group)
+    {
+        log_warn ("config.xml: adios-group name must be given\n");
+        return 0;
+    }
+
+    adios_common_get_group (&group_id, group);
+    g = (struct adios_group_struct *) group_id;
+
+    if (!g)
+    {
+        log_warn ("config.xml: Didn't find group %s for analysis\n", group);
+        return 0;
+    }
+    if(!adios_common_define_var_characteristics(g, var, bin_intervals, bin_min, bin_max, bin_count))
+        return 0;
+
+    return 1;
+}
+
+static int parseMethod (mxml_node_t * node)
+{
+    mxml_node_t * n;
+
+    const char * priority = 0;
+    const char * iterations = 0;
+    const char * base_path = 0;
+    const char * method = 0;
+    const char * group = 0;
+    const char * parameters = 0;
+    int p1;
+    int i1;
+    int i;
+
+    for (i = 0; i < node->value.element.num_attrs; i++)
+    {
+        mxml_attr_t * attr = &node->value.element.attrs [i];
+
+        GET_ATTR("priority",attr,priority,"method")
+        GET_ATTR("iterations",attr,iterations,"method")
+        GET_ATTR("base-path",attr,base_path,"method")
+        GET_ATTR("method",attr,method,"method")
+        GET_ATTR("group",attr,group,"method")
+        log_warn ("config.xml: unknown attribute '%s' on %s "
+                         "(ignored)\n"
+                ,attr->name
+                ,"method"
+                );
+    }
+
+    // Check for parameters, if they exist
+    n = mxmlWalkNext (node, node, MXML_DESCEND);
+    if (n != NULL)
+    {
+        parameters = n->value.text.string;
+    }
+    else
+    {
+        parameters = NULL;
+    }
+
+    if (!priority)
+        p1 = 1;
+    else
+        p1 = atoi (priority);
+    if (!iterations)
+        i1 = 1;
+    else
+        i1 = atoi (iterations);
+    if (!parameters)
+        parameters = "";
+    if (!base_path)
+        base_path = "";
+    else
+    {
+        uint16_t len = strlen (base_path);
+        if (len > 0 && base_path [len - 1] != '/')
+        {
+            adios_error (err_invalid_method, "config.xml: method %s for group %s base-path "
+                             "must end with a '/' character\n"
+                    ,method, group
+                    );
+
+            return 0;
+        }
+    }
+    if (!group)
+        group = "";
+    if (!method)
+        method = "";
+
+    if (!adios_common_select_method (p1, method, parameters, group
+                                    ,base_path, i1
+                                    )
+       )
+    {
+        return 0;
+    }
+
+    return 1;
+}
+
+static int parseBuffer (mxml_node_t * node)
+{
+    const char * size_MB = 0;
+    const char * free_memory_percentage = 0;
+    const char * allocate_time = 0;
+
+    int i;
+
+    int size = -1;
+
+    for (i = 0; i < node->value.element.num_attrs; i++)
+    {
+        mxml_attr_t * attr = &node->value.element.attrs [i];
+
+        GET_ATTR("size-MB",attr,size_MB,"method")
+        GET_ATTR("free-memory-percentage",attr,free_memory_percentage,"method")
+        GET_ATTR("allocate-time",attr,allocate_time,"method")
+        log_warn ("config.xml: unknown attribute '%s' on %s "
+                         "(ignored)\n"
+                ,attr->name
+                ,"buffer"
+                );
+    }
+
+
+
+    if ((!size_MB && !free_memory_percentage) || !allocate_time)
+    {
+        adios_error (err_invalid_buffer_size, "config.xml: must define allocate-time and either "
+                         "size-MB or free-memory-percentage for "
+                         "buffer element\n"
+                );
+
+        return 0;
+    }
+    else
+    {
+        if (!strcasecmp (allocate_time, "now"))
+        {
+            adios_buffer_alloc_when_set (ADIOS_BUFFER_ALLOC_NOW);
+        }
+        else
+        {
+            if (!strcasecmp (allocate_time, "oncall"))
+            {
+                adios_buffer_alloc_when_set (ADIOS_BUFFER_ALLOC_LATER);
+            }
+            else
+            {
+                adios_error (err_invalid_buffer_size, "config.xml: buffer allocate-time %s "
+                                 "invalid. ('now' or 'oncall')\n"
+                        ,allocate_time
+                        );
+
+                return 0;
+            }
+        }
+
+        if (size_MB)
+        {
+            adios_buffer_alloc_percentage_set (0);
+            size = atoi (size_MB);
+            if (size_MB == 0)
+            {
+                adios_error (err_invalid_buffer_size, "config.xml: buffer size-MB is either 0 or "
+                                 "cannot be parsed: %s"
+                        ,size_MB
+                        );
+
+                return 0;
+            }
+
+            if (size < 1)
+                size = 1; // we need a minimum 1 MB buffer
+
+            adios_buffer_size_requested_set ((uint64_t) size * 1024 * 1024);
+        }
+        else
+        {
+            adios_buffer_alloc_percentage_set (1);
+            size = atoi (free_memory_percentage);
+            if (size > 0 && size <= 100)
+            {
+                adios_buffer_size_requested_set ((uint64_t) size);
+            }
+            else
+            {
+                adios_error (err_invalid_buffer_size, "config.xml: buffer free-memory-percentage %s "
+                                 "is not an integer between 1 and 100\n"
+                        ,free_memory_percentage
+                        );
+
+                return 0;
+            }
+        }
+
+        if (adios_buffer_alloc_when_get() == ADIOS_BUFFER_ALLOC_NOW)
+        {
+
+// Do not attempt to allocate the buffer when this is being called from adios_lint
+#ifndef _INTERNAL
+            return adios_set_buffer_size ();
+#endif
+
+        }
+    }
+
+    return 1;
+}
+
+int adios_parse_config (const char * config, MPI_Comm comm)
+{
+    FILE * fp = 0;
+    mxml_node_t * doc = NULL;
+    mxml_node_t * node = NULL;
+    mxml_node_t * root = NULL;
+    int saw_datagroup = 0;
+    int saw_method = 0;
+    int saw_buffer = 0;
+
+    if (!adios_transports_initialized)
+    {
+        adios_transports_initialized = 1;
+        adios_init_transports (&adios_transports);
+    }
+
+    char * buffer = NULL;
+//#if HAVE_MPI
+    int buffer_size = 0;
+    int rank;
+    MPI_Comm_rank (comm, &rank);
+    if (rank == 0)
+    {
+//#endif
+        fp = fopen (config, "r");
+        if (!fp)
+        {
+            adios_error (err_missing_config_file, "missing config file %s\n", config);
+
+            return 0;
+        }
+        struct stat s;
+        if (stat (config, &s) == 0)
+        {
+            buffer = malloc (s.st_size + 1);
+            buffer [s.st_size] = 0;
+        }
+        if (buffer)
+        {
+            size_t bytes_read = fread (buffer, 1, s.st_size, fp);
+            if (bytes_read != s.st_size)
+            {
+                adios_error (err_expected_read_size_mismatch, "error reading config file: %s. Expected %d Got %d\n"
+                        ,config, s.st_size, bytes_read );
+
+                return 0;
+            }
+        }
+        else
+        {
+            adios_error (err_allocating_buffer_size, "error allocating %d for reading config.\n"
+                    ,s.st_size + 1
+                    );
+
+            return 0;
+        }
+        fclose (fp);
+//#if HAVE_MPI
+        buffer_size = s.st_size;
+        MPI_Bcast (&buffer_size, 1, MPI_INT, 0, comm);
+        MPI_Bcast (buffer, buffer_size, MPI_BYTE, 0, comm);
+    }
+    else
+    {
+        MPI_Bcast (&buffer_size, 1, MPI_INT, 0, comm);
+        buffer = malloc (buffer_size + 1);
+        if (!buffer)
+        {
+            adios_error (err_allocating_buffer_size, "cannot allocate %d bytes to receive config file\n"
+                    ,buffer_size + 1
+                    );
+
+            return 0;
+        }
+        MPI_Bcast (buffer, buffer_size, MPI_BYTE, 0, comm);
+        buffer [buffer_size] = 0;
+    }
+//#endif
+
+    doc = mxmlLoadString (NULL, buffer, MXML_TEXT_CALLBACK);
+    free (buffer);
+    buffer = NULL;
+
+    if (!doc)
+    {
+        adios_error (err_invalid_xml_doc, "config.xml: unknown error parsing XML "
+                         "(probably structural)\n"
+                         "Did you remember to start the file with\n"
+                         "<?xml version=\"1.0\"?>\n");
+
+        return 0;
+    }
+
+    root = doc;
+
+    while (root && root->type != MXML_ELEMENT)
+    {
+        root = mxmlWalkNext (root, doc, MXML_DESCEND);
+    }
+
+    while (!strncmp (root->value.element.name, "!--", 3))
+    {
+        root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
+        root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
+    }
+
+    if (strcasecmp (root->value.element.name, "adios-config"))
+    {
+        if (strncmp (root->value.element.name, "?xml", 4))
+        {
+            adios_error (err_invalid_xml_doc, "config.xml: invalid root xml element: %s\n"
+                    ,root->value.element.name
+                    );
+
+            mxmlRelease (doc);
+
+            return 0;
+        }
+        else
+        {
+            while (!strncmp (root->value.element.name, "!--", 3))
+            {
+                root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
+            }
+
+            root = mxmlWalkNext (root, doc, MXML_DESCEND);  // skip ver num
+            root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);  // get next
+            while (!strncmp (root->value.element.name, "!--", 3))
+            {
+                root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
+                root = mxmlWalkNext (root, doc, MXML_NO_DESCEND);
+            }
+        }
+    }
+    else
+    {
+        //printf ("it is adios-config\n");
+    }
+
+
+    if (strcasecmp (root->value.element.name, "adios-config"))
+    {
+        adios_error (err_invalid_xml_doc, "config.xml: invalid root xml element: %s\n"
+                ,root->value.element.name
+                );
+
+        mxmlRelease (doc);
+
+        return 0;
+    }
+    else
+    {
+        const char * host_language = 0;
+        int i;
+
+        for (i = 0; i < root->value.element.num_attrs; i++)
+        {
+            mxml_attr_t * attr = &root->value.element.attrs [i];
+
+            GET_ATTR("host-language",attr,host_language,"var")
+            log_warn ("config.xml: unknown attribute '%s' on %s "
+                             "(ignored)\n"
+                    ,attr->name
+                    ,"adios-config"
+                    );
+        }
+
+        if (!host_language)
+        {
+            host_language = "Fortran";
+        }
+
+        if (!strcasecmp (host_language, "Fortran"))
+        {
+            adios_host_language_fortran = adios_flag_yes;
+        }
+        else
+        {
+            if (!strcasecmp (host_language, "C"))
+            {
+                adios_host_language_fortran = adios_flag_no;
+            }
+            else
+            {
+                adios_error (err_invalid_host_language, "config.xml: invalid host-language %s"
+                        ,host_language
+                        );
+
+                mxmlRelease (doc);
+
+                return 0;
+            }
+        }
+    }
+
+    for (node = mxmlWalkNext (root, doc, MXML_DESCEND_FIRST)
+        ;node
+        ;node = mxmlWalkNext (node, root, MXML_NO_DESCEND)
+        )
+    {
+        if (node->type != MXML_ELEMENT)
+        {
+            continue;
+        }
+
+        if (!strcasecmp (node->value.element.name, "adios-group"))
+        {
+            if (!parseGroup (node))
+                break;
+            saw_datagroup = 1;
+        }
+        else
+        {
+            if (   !strcasecmp (node->value.element.name, "transport")
+                || !strcasecmp (node->value.element.name, "method")
+               )
+            {
+                if (!parseMethod (node))
+                    break;
+                saw_method = 1;
+            }
+            else
+            {
+                if (!strcasecmp (node->value.element.name, "buffer"))
+                {
+                    if (!parseBuffer (node))
+                        break;
+                    saw_buffer = 1;
+                }
+				else
+				{
+                    if (!strcasecmp (node->value.element.name, "analysis"))
+                    {
+                        if (!parseAnalysis(node))
+                            break;
+                    }
+                	else
+                	{
+                	    if (!strncmp (node->value.element.name, "!--", 3))
+                	    {
+                	        continue;
+                	    }
+                	    else
+                	    {
+                	        log_warn ("config.xml: invalid element: %s\n"
+                	                ,node->value.element.name
+                	                );
+
+                	        break;
+                	    }
+					}
+                }
+            }
+        }
+    }
+
+    mxmlRelease (doc);
+
+    if (!saw_datagroup)
+    {
+        adios_error (err_no_group_defined, "config.xml: must define at least 1 adios-group in "
+                         "config.xml\n"
+                );
+
+        return 0;
+    }
+    if (!saw_method)
+    {
+        adios_error (err_no_method_defined, "config.xml: must define at least 1 method for "
+                         "the adios-group in config.xml\n"
+                );
+
+        return 0;
+    }
+    if (!saw_buffer)
+    {
+        adios_error (err_no_buffer_defined, "config.xml: must define the buffer element in "
+                         "config.xml\n"
+                );
+
+        return 0;
+    }
+
+    return 1;
+}
+
+int adios_local_config ()
+{
+    if (!adios_transports_initialized)
+    {
+        adios_transports_initialized = 1;
+        adios_init_transports (&adios_transports);
+    }
+
+    return 1;
+}
+
+static PairStruct * get_and_preprocess_params (const char * parameters)
+{
+    PairStruct *params, *p, *prev_p;
+    int verbose_level, removeit, save;
+    char *end;
+
+    params = text_to_name_value_pairs (parameters);
+
+    /*
+    p = params;
+    while (p) {
+        fprintf(stderr, "-------  Param    name = %s  value = %s\n", p->name, p->value);
+        p = p->next;
+    }
+    */
+    prev_p = NULL;
+    p = params;
+    while (p) {
+        /*fprintf(stderr, "Parameter    name = %s  value = %s\n", p->name, p->value);*/
+        removeit = 0;
+        if (!strcasecmp (p->name, "verbose"))
+        {
+            if (p->value) {
+                errno = 0;
+                verbose_level = strtol(p->value, &end, 10);
+                if (errno || (end != 0 && *end != '\0')) {
+                    log_error ("Invalid 'verbose' parameter passed to read init function: '%s'\n", p->value);
+                    verbose_level = 1; // print errors only
+                }
+            } else {
+                verbose_level = 3;  // info level
+            }
+            adios_verbose_level = verbose_level;
+            removeit = 1;
+        }
+        else if (!strcasecmp (p->name, "quiet"))
+        {
+            adios_verbose_level = 0; //don't print errors
+            removeit = 1;
+        }
+        else if (!strcasecmp (p->name, "logfile")) 
+        {
+            /*fprintf (stderr,"****************** logfile = %s\n", p->value);*/
+            if (p->value) {
+                adios_logger_open (p->value, -1);
+            }
+            removeit = 1;
+        }
+        else if (!strcasecmp (p->name, "abort_on_error"))
+        {
+            adios_abort_on_error = 1;
+            save = adios_verbose_level;
+            adios_verbose_level = 2;
+            log_warn ("ADIOS is set to abort on error\n");
+            adios_verbose_level = save;
+            removeit = 1;
+        }
+        if (removeit) {
+            if (p == params) {
+                // remove head
+                //fprintf(stderr, "  Remove HEAD  p = %x p->next = %x\n", p, p->next);
+                p = p->next; 
+                params->next = NULL;
+                free_name_value_pairs (params);
+                params = p;
+            } else {
+                // remove from middle of the list
+                //fprintf(stderr, "  Remove MIDDLE prev = %x p = %x p->next = %x\n", prev_p, p, p->next);
+                prev_p->next = p->next;
+                p->next = NULL;
+                free_name_value_pairs (p);
+                p = prev_p->next;
+            }
+        } else {
+            //fprintf(stderr, "  Keep MIDDLE prev = %x p = %x p->next = %x\n", prev_p, p, p->next);
+            prev_p = p;
+            p = p->next;
+        }
+    }
+
+    return params;
+}
+
+int adios_common_select_method (int priority, const char * method
+                               ,const char * parameters, const char * group
+                               ,const char * base_path, int iters
+                               )
+{
+    int64_t group_id;
+    struct adios_group_struct * g;
+    struct adios_method_struct * new_method;
+    int requires_group_comm = 0;
+
+    new_method = (struct adios_method_struct *)
+                           malloc (sizeof (struct adios_method_struct));
+    
+    new_method->m = ADIOS_METHOD_UNKNOWN;
+    new_method->base_path = strdup (base_path);
+    new_method->method = strdup (method);
+    new_method->parameters = strdup (parameters); // string goes into BP file
+    new_method->iterations = iters;
+    new_method->priority = priority;
+    new_method->method_data = 0;
+    new_method->group = 0;
+
+    if (adios_parse_method (method, &new_method->m, &requires_group_comm))
+    {
+        if (   new_method->m != ADIOS_METHOD_UNKNOWN
+            && new_method->m != ADIOS_METHOD_NULL
+            && adios_transports [new_method->m].adios_init_fn
+           )
+        {
+            PairStruct * params = get_and_preprocess_params (parameters);
+
+            adios_transports [new_method->m].adios_init_fn
+                                       (params, new_method);
+
+            free_name_value_pairs (params);
+        }
+    }
+    else
+    {
+        adios_error (err_invalid_write_method, "config.xml: invalid transport: %s\n", method);
+
+        free (new_method->base_path);
+        free (new_method->method);
+        free (new_method->parameters);
+        free (new_method);
+
+        return 0;
+    }
+
+    adios_common_get_group (&group_id, group);
+    g = (struct adios_group_struct *) group_id;
+    if (!g)
+    {
+        adios_error (err_missing_invalid_group, "config.xml: Didn't find group: %s for transport: %s\n"
+                ,group, method
+                );
+
+        free (new_method->base_path);
+        free (new_method->method);
+        free (new_method->parameters);
+        free (new_method);
+
+        return 0;
+    }
+    else
+    {
+        // JL: 1-2010
+        // we no longer require this since we moved the coordiantion
+        // communicator to the open call. Leaving code here, just in case.
+        // once this has been validated thoroughly, remove this block of code.
+        //if (requires_group_comm && !g->group_comm)
+        //{
+        //    fprintf (stderr, "config.xml: method %s for group %s.  Group does "
+        //                     "not have the required coordination-communicator"
+        //                     ".\n"
+        //            ,method, group
+        //            );
+
+        //    free (new_method->base_path);
+        //    free (new_method->method);
+        //    free (new_method->parameters);
+        //    free (new_method);
+
+        //    return 0;
+        //}
+        adios_add_method_to_group (&g->methods, new_method);
+        new_method->group = g;
+    }
+
+    adios_append_method (new_method);
+
+    return 1;
+}
+
+int adios_common_select_method_by_group_id (int priority, const char * method
+                                           ,const char * parameters, int64_t group_id
+                                           ,const char * base_path, int iters
+                                           )
+{
+    struct adios_group_struct * g;
+    struct adios_method_struct * new_method;
+    int requires_group_comm = 0;
+
+    new_method = (struct adios_method_struct *)
+                           malloc (sizeof (struct adios_method_struct));
+
+    new_method->m = ADIOS_METHOD_UNKNOWN;
+    new_method->base_path = strdup (base_path);
+    new_method->method = strdup (method);
+    new_method->parameters = strdup (parameters);
+    new_method->iterations = iters;
+    new_method->priority = priority;
+    new_method->method_data = 0;
+    new_method->group = 0;
+
+    if (adios_parse_method (method, &new_method->m, &requires_group_comm))
+    {
+        if (   new_method->m != ADIOS_METHOD_UNKNOWN
+            && new_method->m != ADIOS_METHOD_NULL
+            && adios_transports [new_method->m].adios_init_fn
+           )
+        {
+            PairStruct * params = get_and_preprocess_params (parameters);
+
+            adios_transports [new_method->m].adios_init_fn
+                                       (params, new_method);
+
+            free_name_value_pairs (params);
+        }
+    }
+    else
+    {
+        adios_error (err_invalid_write_method, "config.xml: invalid transport: %s\n", method);
+
+        free (new_method->base_path);
+        free (new_method->method);
+        free (new_method->parameters);
+        free (new_method);
+
+        return 0;
+    }
+
+    g = (struct adios_group_struct *) group_id;
+    if (!g)
+    {
+        adios_error (err_missing_invalid_group, "config.xml: invalid group id: %llu for transport: %s\n"
+                ,group_id, method
+                );
+
+        free (new_method->base_path);
+        free (new_method->method);
+        free (new_method->parameters);
+        free (new_method);
+
+        return 0;
+    }
+    else
+    {
+        if (requires_group_comm && !g->group_comm)
+        {
+            adios_error (err_group_method_mismatch, "config.xml: method %s for group %s.  Group does "
+                             "not have the required coordination-communicator"
+                             ".\n"
+                    ,method, g->name
+                    );
+
+            free (new_method->base_path);
+            free (new_method->method);
+            free (new_method->parameters);
+            free (new_method);
+
+            return 0;
+        }
+        adios_add_method_to_group (&g->methods, new_method);
+        new_method->group = g;
+    }
+
+    adios_append_method (new_method);
+
+    return 1;
+}
+
+void adios_cleanup ()
+{
+    adios_transports_initialized = 0;
+    if (adios_transports)
+        free (adios_transports);
+    adios_transports = 0;
+
+    while (adios_methods)
+    {
+        struct adios_method_list_struct * methods = adios_methods->next;
+        if (adios_methods->method->base_path)
+            free (adios_methods->method->base_path);
+        if (adios_methods->method->method)
+            free (adios_methods->method->method);
+        if (adios_methods->method->method_data)
+            free (adios_methods->method->method_data);
+        if (adios_methods->method->parameters)
+            free (adios_methods->method->parameters);
+        free (adios_methods->method);
+        free (adios_methods);
+        adios_methods = methods;
+    }
+
+    while (adios_groups)
+    {
+        struct adios_group_list_struct * groups = adios_groups->next;
+
+        if (adios_groups->group->name)
+            free (adios_groups->group->name);
+
+        while (adios_groups->group->vars)
+        {
+            struct adios_var_struct * vars = adios_groups->group->vars->next;
+
+            if (adios_groups->group->vars->name)
+                free (adios_groups->group->vars->name);
+            if (adios_groups->group->vars->path)
+                free (adios_groups->group->vars->path);
+            // ADIOS Schema 
+            // if (adios_groups->group->vars->mesh)
+                // free (adios_groups->group->vars->mesh);
+
+
+            while (adios_groups->group->vars->dimensions)
+            {
+                struct adios_dimension_struct * dimensions
+                                = adios_groups->group->vars->dimensions->next;
+
+                free (adios_groups->group->vars->dimensions);
+                adios_groups->group->vars->dimensions = dimensions;
+            }
+
+			// NCSU - Clean up stat
+            if (adios_groups->group->vars->stats)
+			{
+				int j, idx;
+				int c, count = 1;
+
+				if (adios_groups->group->vars->type == adios_complex || adios_groups->group->vars->type == adios_double_complex)
+					count = 3;
+
+				for (c = 0; c < count; c ++)
+				{
+					j = idx = 0;
+					while (adios_groups->group->vars->bitmap >> j)
+					{
+						if (adios_groups->group->vars->bitmap >> j & 1)
+						{
+                            if (j == adios_statistic_hist)
+                            {
+								struct adios_index_characteristics_hist_struct * hist = (struct adios_index_characteristics_hist_struct *) adios_groups->group->vars->stats[c][idx].data;
+								free (hist->breaks);
+								free (hist->frequencies);
+								free (hist);
+							}
+						    else
+								free (adios_groups->group->vars->stats[c][idx].data);
+							idx ++;
+						}
+						j ++;
+					}
+					free (adios_groups->group->vars->stats[c]);
+				}
+
+                free (adios_groups->group->vars->stats);
+			}
+            if (adios_groups->group->vars->data)
+                free (adios_groups->group->vars->data);
+
+            free (adios_groups->group->vars);
+            adios_groups->group->vars = vars;
+        }
+
+        while (adios_groups->group->attributes)
+        {
+            struct adios_attribute_struct * attributes
+                                        = adios_groups->group->attributes->next;
+
+            if (adios_groups->group->attributes->name)
+                free (adios_groups->group->attributes->name);
+            if (adios_groups->group->attributes->path)
+                free (adios_groups->group->attributes->path);
+            if (adios_groups->group->attributes->value)
+                free (adios_groups->group->attributes->value);
+
+            free (adios_groups->group->attributes);
+            adios_groups->group->attributes = attributes;
+        }
+
+        if (adios_groups->group->group_comm)
+            free (adios_groups->group->group_comm);
+        if (adios_groups->group->group_by)
+            free (adios_groups->group->group_by);
+        if (adios_groups->group->time_index_name)
+            free (adios_groups->group->time_index_name);
+
+        while (adios_groups->group->methods)
+        {
+            struct adios_method_list_struct * m = adios_groups->group->methods->next;
+            free (adios_groups->group->methods);
+            adios_groups->group->methods = m;
+        }
+
+        // ADIOS Schema
+        /*while (adios_groups->group->meshs)
+        {
+            struct adios_mesh_struct * meshs = adios_groups->group->meshs->next;
+                        
+            if (adios_groups->group->meshs->name)
+                free (adios_groups->group->meshs->name);
+
+            switch (adios_groups->group->meshs->type)
+            {
+                case ADIOS_MESH_UNIFORM:
+                {
+                    struct adios_mesh_item_list_struct * i;
+                    while (adios_groups->group->meshs->uniform->dimensions)
+                    {
+                        i = adios_groups->group->meshs->uniform->dimensions->next;
+                        free (adios_groups->group->meshs->uniform->dimensions);
+                        adios_groups->group->meshs->uniform->dimensions = i;
+                    }
+                    while (adios_groups->group->meshs->uniform->origin)
+                    {
+                        i = adios_groups->group->meshs->uniform->origin->next;
+                        free (adios_groups->group->meshs->uniform->origin);
+                        adios_groups->group->meshs->uniform->origin = i;
+                    }
+                    while (adios_groups->group->meshs->uniform->spacing)
+                    {
+                        i = adios_groups->group->meshs->uniform->spacing->next;
+                        free (adios_groups->group->meshs->uniform->spacing);
+                        adios_groups->group->meshs->uniform->spacing = i;
+                    }
+                    while (adios_groups->group->meshs->uniform->origin)
+                    {
+                        i = adios_groups->group->meshs->uniform->origin->next;
+                        free (adios_groups->group->meshs->uniform->origin);
+                        adios_groups->group->meshs->uniform->origin = i;
+                    }
+                    break;
+                }
+                case ADIOS_MESH_STRUCTURED:
+                {
+                    struct adios_mesh_item_list_struct * i;
+                    struct adios_mesh_var_list_struct * v;
+                    while (adios_groups->group->meshs->structured->dimensions)
+                    {
+                        i = adios_groups->group->meshs->structured->dimensions->next;
+                        free (adios_groups->group->meshs->structured->dimensions);
+                        adios_groups->group->meshs->structured->dimensions = i;
+                    }
+                    while (adios_groups->group->meshs->structured->points)
+                    {
+                        v = adios_groups->group->meshs->structured->points->next;
+                        free (adios_groups->group->meshs->structured->points);
+                        adios_groups->group->meshs->structured->points = v;
+                    }
+                    if (adios_groups->group->meshs->structured->nspace)
+                        free (adios_groups->group->meshs->structured->nspace);
+
+                    break;
+                }
+                case ADIOS_MESH_RECTILINEAR:
+                {
+                    struct adios_mesh_item_list_struct * i;
+                    struct adios_mesh_var_list_struct * v;
+                    while (adios_groups->group->meshs->rectilinear->dimensions)
+                    {
+                        i = adios_groups->group->meshs->rectilinear->dimensions->next;
+                        free (adios_groups->group->meshs->rectilinear->dimensions);
+                        adios_groups->group->meshs->rectilinear->dimensions = i;
+                    }
+                    while (adios_groups->group->meshs->rectilinear->coordinates)
+                    {
+                        v = adios_groups->group->meshs->rectilinear->coordinates->next;                        
+                        free (adios_groups->group->meshs->rectilinear->coordinates);
+                        adios_groups->group->meshs->rectilinear->coordinates = v;
+                    }
+
+                    break;
+                }
+                case ADIOS_MESH_UNSTRUCTURED:
+                {
+                    struct adios_mesh_var_list_struct * v;
+                    if (adios_groups->group->meshs->unstructured->cell_set_count)
+                        free (adios_groups->group->meshs->unstructured->cell_set_count);
+                    if (adios_groups->group->meshs->unstructured->points_count)
+                        free (adios_groups->group->meshs->unstructured->points_count);
+                    if (adios_groups->group->meshs->unstructured->nspace)
+                        free (adios_groups->group->meshs->unstructured->nspace);
+                    while (adios_groups->group->meshs->unstructured->points)
+                    {
+                        v = adios_groups->group->meshs->unstructured->points->next;
+                        free (adios_groups->group->meshs->unstructured->points);
+                        adios_groups->group->meshs->unstructured->points = v;
+                    }
+                    while (adios_groups->group->meshs->unstructured->cell_list)
+                    {
+                        struct adios_mesh_cell_list_list_struct * next
+                          = adios_groups->group->meshs->unstructured->cell_list->next;
+                        free (adios_groups->group->meshs->unstructured->cell_list);
+                        adios_groups->group->meshs->unstructured->cell_list = next;
+                    }
+
+                    break;
+                }
+            }
+
+            free (adios_groups->group->meshs);
+            adios_groups->group->meshs = meshs;
+        }*/
+
+        free (adios_groups->group);
+        free (adios_groups);
+        adios_groups = groups;
+    }
+}
+
+
diff --git a/src/adios_internals_mxml.h b/src/core/adios_internals_mxml.h
similarity index 60%
rename from src/adios_internals_mxml.h
rename to src/core/adios_internals_mxml.h
index e67dc7e..2420e16 100644
--- a/src/adios_internals_mxml.h
+++ b/src/core/adios_internals_mxml.h
@@ -8,7 +8,15 @@
 #ifndef ADIOS_INTERNALS_MXML_H
 #define ADIOS_INTERNALS_MXML_H
 
-int adios_parse_config (const char * config);
+#ifdef _NOMPI
+    /* Sequential processes can use the library compiled with -D_NOMPI */
+#   include "public/mpidummy.h"
+#else
+    /* Parallel applications should use MPI to communicate  */
+#   include "mpi.h"
+#endif
+
+int adios_parse_config (const char * config, MPI_Comm comm);
 int adios_local_config ();
 int adios_common_select_method (int priority, const char * method
                                ,const char * parameters, const char * group 
@@ -18,6 +26,15 @@ int adios_common_select_method_by_group_id (int priority, const char * method
                                            ,const char * parameters, int64_t group_id
                                            ,const char * base_path, int iters
                                            );
+//ADIOS Schema
+struct adios_mesh_struct * adios_find_mesh_by_name (struct adios_mesh_struct * root
+                                                   ,const char * name
+                                                   );
+struct adios_mesh_struct * adios_common_define_mesh (
+        int64_t group_id, const char * name,
+        enum ADIOS_FLAG time_varying,
+        enum ADIOS_MESH_TYPE type);
+
 void adios_cleanup ();
 
 int adios_set_buffer_size (void);
diff --git a/src/core/adios_logger.c b/src/core/adios_logger.c
new file mode 100644
index 0000000..64da4d0
--- /dev/null
+++ b/src/core/adios_logger.c
@@ -0,0 +1,60 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* Logger functions */
+#include <stdio.h>
+#include <string.h>
+#include <errno.h>
+#include "core/adios_logger.h"
+
+FILE *adios_logf = NULL;
+int adios_verbose_level = 2; // WARN level (0 = no logs)
+int adios_abort_on_error = 0;  
+char *adios_log_names[4] = {"ERROR","WARN ","INFO ","DEBUG"};
+
+
+void adios_logger_open (char *logpath, int rank)
+{ 
+    adios_logger_close();
+
+    if (!logpath || !strcmp(logpath, "stderr")) { 
+        adios_logf = stderr; 
+    } else if (!strcmp(logpath, "stdout")) { 
+        adios_logf = stdout; 
+    } else {  
+        char path[256]; 
+        if (rank >= 0) 
+            snprintf (path, 256, "%s.%d", logpath, rank); 
+        else 
+            strncpy (path, logpath, 256); 
+        adios_logf = fopen (path, "w"); 
+        if (!adios_logf) {  
+            fprintf (stderr, "Logger file %s cannot be opened. Use stderr for logging.\n" 
+                             "       errno=%d: %s\n", path, errno, strerror(errno)); 
+            adios_logf = stderr; 
+        } 
+    } 
+}   
+    
+void adios_logger_close() 
+{ 
+    if (adios_logf && adios_logf != stdout && adios_logf != stderr) 
+    {
+        fclose(adios_logf); 
+        adios_logf = NULL;
+    }
+}
+    
+/*
+void adios_log(int verbose_level, ...) 
+{
+    if (adios_verbose_level >= verbose_level) { 
+        fprintf (adios_logf, __VA_ARGS__); 
+        fflush(adios_logf); 
+    }
+}
+*/
diff --git a/src/core/adios_logger.h b/src/core/adios_logger.h
new file mode 100644
index 0000000..69af559
--- /dev/null
+++ b/src/core/adios_logger.h
@@ -0,0 +1,41 @@
+#ifndef __ADIOS_LOGGER_H__
+#define __ADIOS_LOGGER_H__
+
+/* Logger functions */
+#include <stdio.h>
+#include <string.h>
+
+extern FILE *adios_logf;
+extern int adios_verbose_level; // default = 2 (print warnings)
+extern int adios_abort_on_error; // default = 0 (don't abort)
+extern char *adios_log_names[4];
+
+/* Direct log into file(s).
+   rank >=0: log file is <logpath>.<rank>
+   rank <0:  log file is <logpath>
+*/
+void adios_logger_open (char *logpath, int rank);
+void adios_logger_close();
+
+#define  adios_logger(verbose_level, print_header, ...) { \
+    if (adios_verbose_level >= verbose_level) { \
+        if (!adios_logf) adios_logf=stderr; \
+        if (print_header) \
+            fprintf (adios_logf, "%s: ",adios_log_names[verbose_level-1]); \
+        fprintf (adios_logf, __VA_ARGS__); \
+        fflush(adios_logf);\
+    }\
+}
+
+
+#define log_error(...) adios_logger(1, 1, __VA_ARGS__); if (adios_abort_on_error) abort();
+#define log_warn(...) adios_logger(2, 1, __VA_ARGS__)
+#define log_info(...) adios_logger(3, 1, __VA_ARGS__)
+#define log_debug(...) adios_logger(4, 1, __VA_ARGS__)
+
+#define log_error_cont(...) adios_logger(1, 0, __VA_ARGS__)
+#define log_warn_cont(...) adios_logger(2, 0, __VA_ARGS__)
+#define log_info_cont(...) adios_logger(3, 0, __VA_ARGS__)
+#define log_debug_cont(...) adios_logger(4, 0, __VA_ARGS__)
+
+#endif
diff --git a/src/core/adios_read.c b/src/core/adios_read.c
new file mode 100644
index 0000000..bfc4dfc
--- /dev/null
+++ b/src/core/adios_read.c
@@ -0,0 +1,189 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include "public/adios_read_v2.h"
+#include "public/adios_error.h"
+#include "core/adios_logger.h"
+#include "core/common_read.h"
+#define BYTE_ALIGN 8
+
+
+const char *adios_errmsg ()
+{
+    return adios_get_last_errmsg();
+}
+
+int adios_read_init_method (enum ADIOS_READ_METHOD method, MPI_Comm comm, const char * parameters)
+{
+    return common_read_init_method (method,comm,parameters);
+} 
+
+int adios_read_finalize_method(enum ADIOS_READ_METHOD method)
+{
+    int retval = common_read_finalize_method(method);
+    log_debug ("adios_read_finalize_method completed");
+    return retval;
+}
+
+ADIOS_FILE * adios_read_open_stream (const char * fname,
+                                     enum ADIOS_READ_METHOD method,
+                                     MPI_Comm comm,
+                                     enum ADIOS_LOCKMODE lock_mode,
+                                     float timeout_sec)
+{
+    return common_read_open_stream (fname, method, comm, lock_mode, timeout_sec);
+}
+
+ADIOS_FILE * adios_read_open_file (const char * fname,
+                                   enum ADIOS_READ_METHOD method,
+                                   MPI_Comm comm)
+{
+    return common_read_open_file (fname, method, comm);
+}
+
+int adios_read_close (ADIOS_FILE *fp) 
+{
+    return common_read_close (fp);
+}
+
+int adios_advance_step (ADIOS_FILE *fp, int last, float timeout_sec)
+{
+    return common_read_advance_step (fp, last, timeout_sec);
+}
+
+void adios_release_step (ADIOS_FILE *fp)
+{
+    common_read_release_step (fp);
+}
+
+ADIOS_VARINFO * adios_inq_var (ADIOS_FILE  *fp, const char * varname) 
+{
+    return common_read_inq_var (fp, varname);
+}
+
+ADIOS_VARINFO * adios_inq_var_byid (ADIOS_FILE  *fp, int varid)
+{
+    return common_read_inq_var_byid (fp, varid);
+}
+
+void adios_free_varinfo (ADIOS_VARINFO *vp)
+{
+    common_read_free_varinfo (vp);
+}
+
+int adios_inq_var_stat (ADIOS_FILE *fp, ADIOS_VARINFO * varinfo,
+                                    int per_step_stat, int per_writer_stat)
+{
+    return common_read_inq_var_stat (fp, varinfo, per_step_stat, per_writer_stat);
+}
+
+int adios_inq_var_blockinfo (ADIOS_FILE *fp, ADIOS_VARINFO * varinfo)
+{
+    return common_read_inq_var_blockinfo (fp, varinfo);
+}
+
+int adios_schedule_read (const ADIOS_FILE      * fp,
+                             const ADIOS_SELECTION * sel,
+                             const char            * varname,
+                             int                     from_steps,
+                             int                     nsteps,
+                             void                  * data)
+{
+    return common_read_schedule_read (fp, sel, varname, from_steps, nsteps, data);
+}
+
+int adios_schedule_read_byid (const ADIOS_FILE      * fp,
+                                  const ADIOS_SELECTION * sel,
+                                  int                     varid,
+                                  int                     from_steps,
+                                  int                     nsteps,
+                                  void                  * data)
+{
+    return common_read_schedule_read_byid (fp, sel, varid, from_steps, nsteps, data);
+}
+
+int adios_perform_reads (const ADIOS_FILE *fp, int blocking)
+{
+    return common_read_perform_reads (fp, blocking);
+}
+
+int adios_check_reads (const ADIOS_FILE * fp, ADIOS_VARCHUNK ** chunk)
+{
+    return common_read_check_reads (fp, chunk);
+}
+
+void adios_free_chunk (ADIOS_VARCHUNK *chunk)
+{
+    common_read_free_chunk (chunk);
+}
+
+int adios_get_attr (ADIOS_FILE  * fp, const char * attrname, enum ADIOS_DATATYPES * type,
+                    int * size, void ** data)
+{
+    return common_read_get_attr (fp, attrname, type, size, data);
+}
+
+int adios_get_attr_byid (ADIOS_FILE  * fp, int attrid, 
+                    enum ADIOS_DATATYPES * type, int * size, void ** data)
+{
+    return common_read_get_attr_byid (fp, attrid, type, size, data);
+}
+
+const char * adios_type_to_string (enum ADIOS_DATATYPES type)
+{
+    return common_read_type_to_string (type);
+}
+
+int adios_type_size(enum ADIOS_DATATYPES type, void *data)
+{
+    return common_read_type_size(type, data);
+}
+
+int adios_get_grouplist (ADIOS_FILE  *fp, char ***group_namelist)
+{
+    return common_read_get_grouplist (fp, group_namelist);
+}
+
+int adios_group_view (ADIOS_FILE  *fp, int groupid)
+{
+    return common_read_group_view (fp, groupid);
+}
+
+void adios_print_fileinfo (ADIOS_FILE *fp) 
+{
+    common_read_print_fileinfo(fp);
+}
+
+
+ADIOS_SELECTION * adios_selection_boundingbox (uint64_t ndim, const uint64_t *start, const uint64_t *count)
+{
+    return common_read_selection_boundingbox (ndim, start, count);
+}
+
+ADIOS_SELECTION * adios_selection_points (uint64_t ndim, uint64_t npoints, const uint64_t *points)
+{
+    return common_read_selection_points (ndim, npoints, points);
+}
+
+ADIOS_SELECTION * adios_selection_writeblock (int index)
+{
+    return common_read_selection_writeblock (index);
+}
+
+ADIOS_SELECTION * adios_selection_auto (char *hints)
+{
+    return common_read_selection_auto (hints);
+}
+
+void adios_selection_delete (ADIOS_SELECTION *sel)
+{
+    common_read_selection_delete (sel);
+}
+
+
diff --git a/src/adios_read_hooks.c b/src/core/adios_read_hooks.c
similarity index 50%
rename from src/adios_read_hooks.c
rename to src/core/adios_read_hooks.c
index 9f434a5..8fd6946 100644
--- a/src/adios_read_hooks.c
+++ b/src/core/adios_read_hooks.c
@@ -15,36 +15,40 @@ if (!strcasecmp (buf,b)) \
 {*method=d;*requires_group_comm=r;return 1;}
 
 #define ASSIGN_FNS(a,b) \
-(*t) [b].adios_init_fn = adios_read_##a##_init; \
-(*t) [b].adios_finalize_fn = adios_read_##a##_finalize; \
-(*t) [b].adios_fopen_fn = adios_read_##a##_fopen; \
-(*t) [b].adios_fclose_fn = adios_read_##a##_fclose; \
-(*t) [b].adios_gopen_fn = adios_read_##a##_gopen; \
-(*t) [b].adios_gopen_byid_fn = adios_read_##a##_gopen_byid; \
-(*t) [b].adios_gclose_fn = adios_read_##a##_gclose; \
-(*t) [b].adios_inq_var_fn = adios_read_##a##_inq_var; \
+(*t) [b].adios_init_method_fn = adios_read_##a##_init_method; \
+(*t) [b].adios_finalize_method_fn = adios_read_##a##_finalize_method; \
+(*t) [b].adios_open_stream_fn = adios_read_##a##_open_stream; \
+(*t) [b].adios_open_file_fn = adios_read_##a##_open_file; \
+(*t) [b].adios_close_fn = adios_read_##a##_close; \
+(*t) [b].adios_advance_step_fn = adios_read_##a##_advance_step; \
+(*t) [b].adios_release_step_fn = adios_read_##a##_release_step; \
 (*t) [b].adios_inq_var_byid_fn = adios_read_##a##_inq_var_byid; \
-(*t) [b].adios_read_var_fn = adios_read_##a##_read_var; \
-(*t) [b].adios_read_local_var_fn = adios_read_##a##_read_local_var; \
-(*t) [b].adios_read_var_byid_fn = adios_read_##a##_read_var_byid; \
-(*t) [b].adios_get_attr_fn = adios_read_##a##_get_attr; \
-(*t) [b].adios_get_attr_byid_fn = adios_read_##a##_get_attr_byid;
+(*t) [b].adios_inq_var_stat_fn = adios_read_##a##_inq_var_stat; \
+(*t) [b].adios_inq_var_blockinfo_fn = adios_read_##a##_inq_var_blockinfo; \
+(*t) [b].adios_schedule_read_byid_fn = adios_read_##a##_schedule_read_byid; \
+(*t) [b].adios_perform_reads_fn = adios_read_##a##_perform_reads; \
+(*t) [b].adios_check_reads_fn = adios_read_##a##_check_reads; \
+(*t) [b].adios_get_attr_byid_fn = adios_read_##a##_get_attr_byid; \
+(*t) [b].adios_reset_dimension_order_fn = adios_read_##a##_reset_dimension_order; \
+(*t) [b].adios_get_groupinfo_fn = adios_read_##a##_get_groupinfo; \
+(*t) [b].adios_is_var_timed_fn = adios_read_##a##_is_var_timed; \
 
 void adios_read_hooks_init (struct adios_read_hooks_struct ** t)
 {
     static int did_init = 0;
     // we need to init only once in the lifetime of an application
-    // called from common_read.c/common_read_fopen()
+    // called from common_read.c/common_read_init_method() and 
+    // from common_read.c/common_read_open_*() 
     if (!did_init) {
         *t = (struct adios_read_hooks_struct *)
                calloc (ADIOS_READ_METHOD_COUNT, sizeof (struct adios_read_hooks_struct));
 
         ASSIGN_FNS(bp,ADIOS_READ_METHOD_BP)
 #ifndef __MPI_DUMMY_H__
-        ASSIGN_FNS(bp_staged,ADIOS_READ_METHOD_BP_STAGED)
+        ASSIGN_FNS(bp_staged,ADIOS_READ_METHOD_BP_AGGREGATE)
 #endif
-#if HAVE_DART
-        ASSIGN_FNS(dart,ADIOS_READ_METHOD_DART)
+#if HAVE_DATASPACES
+        ASSIGN_FNS(dataspaces,ADIOS_READ_METHOD_DATASPACES)
 #endif
 
 #if HAVE_DIMES
@@ -56,7 +60,7 @@ void adios_read_hooks_init (struct adios_read_hooks_struct ** t)
 #endif
 
 #if HAVE_NSSI
-        ASSIGN_FNS(nssi,ADIOS_READ_METHOD_NSSI)
+        //ASSIGN_FNS(nssi,ADIOS_READ_METHOD_NSSI)
 #endif
 
 #if HAVE_DATATAP
diff --git a/src/core/adios_read_hooks.h b/src/core/adios_read_hooks.h
new file mode 100644
index 0000000..fc8f14a
--- /dev/null
+++ b/src/core/adios_read_hooks.h
@@ -0,0 +1,110 @@
+/*
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#ifndef ADIOS_READ_HOOKS_H
+#define ADIOS_READ_HOOKS_H
+
+#include "config.h"
+#include <stdint.h>
+#include <string.h>
+#include "public/adios_read.h"
+#include "core/util.h" // PairStruct*
+
+#define FORWARD_DECLARE(a) \
+int adios_read_##a##_init_method (MPI_Comm comm, PairStruct *params); \
+int adios_read_##a##_finalize_method (); \
+ADIOS_FILE * adios_read_##a##_open_stream (const char * fname, MPI_Comm comm, enum ADIOS_LOCKMODE lock_mode, float timeout_sec); \
+ADIOS_FILE * adios_read_##a##_open_file (const char * fname, MPI_Comm comm); \
+int adios_read_##a##_close (ADIOS_FILE *fp); \
+int adios_read_##a##_advance_step (ADIOS_FILE *fp, int last, float timeout_sec); \
+void adios_read_##a##_release_step (ADIOS_FILE *fp); \
+ADIOS_VARINFO * adios_read_##a##_inq_var_byid (const ADIOS_FILE *gp, int varid); \
+int adios_read_##a##_inq_var_stat (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo, int per_step_stat, int per_block_stat); \
+int adios_read_##a##_inq_var_blockinfo (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo); \
+int adios_read_##a##_schedule_read_byid (const ADIOS_FILE * fp, const ADIOS_SELECTION * sel, int varid, int from_steps, int nsteps, void * data) ; \
+int adios_read_##a##_perform_reads (const ADIOS_FILE *fp, int blocking); \
+int adios_read_##a##_check_reads (const ADIOS_FILE * fp, ADIOS_VARCHUNK ** chunk); \
+int adios_read_##a##_get_attr_byid (const ADIOS_FILE * fp, int attrid, enum ADIOS_DATATYPES * type, int * size, void ** data); \
+void adios_read_##a##_reset_dimension_order (const ADIOS_FILE *fp, int is_fortran); \
+void adios_read_##a##_get_groupinfo (const ADIOS_FILE *fp, int *ngroups, char ***group_namelist, int **nvars_per_group, int **nattrs_per_group); \
+int adios_read_##a##_is_var_timed (const ADIOS_FILE *fp, int varid); \
+
+//////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////
+//// SETUP YOUR NEW READ METHODS BELOW (FOLLOW THE PATTERN):                  ////
+//// 1. Add an entry to the adios_read.h/ADIOS_READ_METHOD                    ////
+//// 2. Update the ADIOS_METHOD_COUNT                                         ////
+//// 2. Add a FOWARD_DECLARE line (assuming standard naming)                  ////
+//////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////
+
+#define ADIOS_READ_METHOD_COUNT 8
+
+// forward declare the functions (or dummies for internals use)
+FORWARD_DECLARE(bp)
+FORWARD_DECLARE(bp_staged)
+FORWARD_DECLARE(bp_staged1)
+#if HAVE_DATASPACES
+FORWARD_DECLARE(dataspaces)
+#endif
+#if HAVE_DIMES
+FORWARD_DECLARE(dimes)
+#endif
+#if HAVE_NSSI
+FORWARD_DECLARE(nssi)
+#endif
+#if HAVE_DATATAP
+FORWARD_DECLARE(datatap)
+#endif
+//FORWARD_DECLARE(hdf5)
+
+
+typedef int  (* ADIOS_INIT_METHOD_FN) (MPI_Comm comm, PairStruct * params);
+typedef int  (* ADIOS_FINALIZE_METHOD_FN) ();
+typedef ADIOS_FILE * (* ADIOS_OPEN_STREAM_FN) (const char * fname, MPI_Comm comm, 
+                                 enum ADIOS_LOCKMODE lock_mode, float timeout_sec);
+typedef ADIOS_FILE * (* ADIOS_OPEN_FILE_FN) (const char * fname, MPI_Comm comm);
+typedef int  (* ADIOS_CLOSE_FN) (ADIOS_FILE *fp);
+typedef int  (* ADIOS_ADVANCE_STEP_FN) (ADIOS_FILE *fp, int last, float timeout_sec);
+typedef void (* ADIOS_RELEASE_STEP_FN) (ADIOS_FILE *fp);
+typedef ADIOS_VARINFO * (* ADIOS_INQ_VAR_BYID_FN) (const ADIOS_FILE *fp, int varid);
+typedef int  (* ADIOS_INQ_VAR_STAT_FN) (const ADIOS_FILE *fp, ADIOS_VARINFO *varinfo,
+                                 int per_step_stat, int per_block_stat);
+typedef int  (* ADIOS_INQ_VAR_BLOCKINFO_FN) (const ADIOS_FILE *fp, ADIOS_VARINFO *varinfo);
+typedef int  (* ADIOS_SCHEDULE_READ_BYID_FN) (const ADIOS_FILE * fp, const ADIOS_SELECTION * sel, 
+                                 int varid, int from_steps, int nsteps, void * data);
+typedef int  (* ADIOS_PERFORM_READS_FN) (const ADIOS_FILE *fp, int blocking);
+typedef int  (* ADIOS_CHECK_READS_FN) (const ADIOS_FILE * fp, ADIOS_VARCHUNK ** chunk);
+typedef int  (* ADIOS_GET_ATTR_BYID_FN) (const ADIOS_FILE * fp, int attrid, 
+                                 enum ADIOS_DATATYPES * type, int * size, void ** data);
+typedef void (* ADIOS_RESET_DIMENSION_ORDER_FN) (const ADIOS_FILE *fp, int is_fortran);
+typedef void (* ADIOS_GET_GROUPINFO_FN) (const ADIOS_FILE *fp, int *ngroups, char ***group_namelist, int **nvars_per_group, int **nattrs_per_group); 
+typedef int  (* ADIOS_IS_VAR_TIMED_FN) (const ADIOS_FILE *fp, int varid); 
+
+struct adios_read_hooks_struct
+{
+    ADIOS_INIT_METHOD_FN            adios_init_method_fn;
+    ADIOS_FINALIZE_METHOD_FN        adios_finalize_method_fn;
+    ADIOS_OPEN_STREAM_FN            adios_open_stream_fn;
+    ADIOS_OPEN_FILE_FN              adios_open_file_fn;
+    ADIOS_CLOSE_FN                  adios_close_fn;
+    ADIOS_ADVANCE_STEP_FN           adios_advance_step_fn;
+    ADIOS_RELEASE_STEP_FN           adios_release_step_fn;
+    ADIOS_INQ_VAR_BYID_FN           adios_inq_var_byid_fn;
+    ADIOS_INQ_VAR_STAT_FN           adios_inq_var_stat_fn;
+    ADIOS_INQ_VAR_BLOCKINFO_FN      adios_inq_var_blockinfo_fn;
+    ADIOS_SCHEDULE_READ_BYID_FN     adios_schedule_read_byid_fn;
+    ADIOS_PERFORM_READS_FN          adios_perform_reads_fn;
+    ADIOS_CHECK_READS_FN            adios_check_reads_fn;
+    ADIOS_GET_ATTR_BYID_FN          adios_get_attr_byid_fn;
+    ADIOS_RESET_DIMENSION_ORDER_FN  adios_reset_dimension_order_fn;
+    ADIOS_GET_GROUPINFO_FN          adios_get_groupinfo_fn;
+    ADIOS_IS_VAR_TIMED_FN           adios_is_var_timed_fn;
+};
+
+#undef FORWARD_DECLARE
+#endif
diff --git a/src/core/adios_read_v1.c b/src/core/adios_read_v1.c
new file mode 100644
index 0000000..7e3500e
--- /dev/null
+++ b/src/core/adios_read_v1.c
@@ -0,0 +1,827 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "public/adios_read_v1.h"
+
+#undef ADIOS_FILE
+#undef ADIOS_GROUP
+#undef ADIOS_VARINFO
+#undef ADIOS_HIST
+
+#undef ADIOS_READ_METHOD
+#undef ADIOS_READ_METHOD_BP
+#undef ADIOS_READ_METHOD_BP_STAGED
+#undef ADIOS_READ_METHOD_BP_AGGREGATE
+#undef ADIOS_READ_METHOD_HDF5
+#undef ADIOS_READ_METHOD_DART
+#undef ADIOS_READ_METHOD_DIMES
+#undef ADIOS_READ_METHOD_NSSI
+#undef ADIOS_READ_METHOD_DATATAP
+#undef ADIOS_READ_METHOD_BP_STAGED1
+
+#undef adios_set_read_method
+#undef adios_fopen
+#undef adios_fclose
+#undef adios_reset_dimension_order
+#undef adios_gopen
+#undef adios_gopen_byid
+#undef adios_gclose
+#undef adios_inq_var
+#undef adios_inq_var_byid
+#undef adios_stat_cor
+#undef adios_stat_cov
+#undef adios_free_varinfo
+#undef adios_read_var
+#undef adios_read_var_byid
+#undef adios_read_local_var
+#undef adios_get_attr
+#undef adios_get_attr_byid
+#undef adios_type_to_string
+#undef adios_type_size
+#undef adios_print_groupinfo
+//#undef adios_print_fileinfo
+
+
+#include "core/common_read.h"
+
+
+#include "public/adios_error.h"
+#define BYTE_ALIGN 8
+
+static enum ADIOS_READ_METHOD lastmethod = ADIOS_READ_METHOD_BP;
+
+/*
+const char *adios_errmsg ()
+{
+    return adios_get_last_errmsg();
+}
+*/
+
+
+int adios_set_read_method_v1 (enum ADIOS_READ_METHOD_V1 method)
+{
+    switch (method) {
+        case ADIOS_READ_METHOD_BP_V1:
+            lastmethod = ADIOS_READ_METHOD_BP;
+            break;
+        case ADIOS_READ_METHOD_BP_STAGED_V1:
+            lastmethod = ADIOS_READ_METHOD_BP_AGGREGATE;
+            break;
+        case ADIOS_READ_METHOD_BP_STAGED1_V1:
+            lastmethod = ADIOS_READ_METHOD_BP_AGGREGATE;
+            break;
+        case ADIOS_READ_METHOD_DART_V1:
+            lastmethod = ADIOS_READ_METHOD_DATASPACES;
+            break;
+        case ADIOS_READ_METHOD_DIMES_V1:
+            lastmethod = ADIOS_READ_METHOD_DIMES;
+            break;
+
+        /* Unsupported methods */
+        case ADIOS_READ_METHOD_HDF5_V1:
+        case ADIOS_READ_METHOD_NSSI_V1:
+        case ADIOS_READ_METHOD_DATATAP_V1:
+        default:
+            lastmethod = ADIOS_READ_METHOD_BP;
+            break;
+    }
+    return 0;
+} 
+
+
+int adios_read_init_v1(MPI_Comm comm)
+{
+    return common_read_init_method (lastmethod, comm, NULL);
+}
+
+
+int adios_read_finalize_v1()
+{
+    return common_read_finalize_method (lastmethod);
+}
+
+ADIOS_FILE_V1 * adios_fopen_v1 (const char * fname, MPI_Comm comm)
+{
+    ADIOS_FILE_V1 *fp1 = NULL;
+    ADIOS_FILE *fp = common_read_open_file (fname, lastmethod, comm);
+    if (fp) {
+        fp1 = (ADIOS_FILE_V1 *) malloc (sizeof(ADIOS_FILE_V1));
+        if (fp1) {
+            fp1->fh          = fp->fh;
+            fp1->vars_count  = fp->nvars;  
+            fp1->attrs_count = fp->nattrs;
+            fp1->tidx_start  = 1;
+            fp1->ntimesteps  = fp->last_step;
+            fp1->version     = fp->version;  
+            fp1->file_size   = fp->file_size;
+            fp1->endianness  = fp->endianness; 
+
+            /* FIX: no groups in new version, extra function should support this */
+            fp1->groups_count = common_read_get_grouplist(fp, &fp1->group_namelist);
+
+            fp1->internal_data = fp;
+        } else {
+            adios_error ( err_no_memory, "Cannot allocate memory for file info.\n");
+        }
+    }
+    return fp1;
+}
+
+int adios_fclose_v1 (ADIOS_FILE_V1 *fp) 
+{
+    return common_read_close ((ADIOS_FILE*)fp->internal_data);
+}
+
+ADIOS_GROUP_V1 * adios_gopen_v1 (ADIOS_FILE_V1 *fp, const char * grpname)
+{
+    int grpid;
+    adios_errno = 0;
+    for (grpid=0;grpid<(fp->groups_count);grpid++) {
+        if (!strcmp(fp->group_namelist[grpid], grpname))
+            break;
+    }
+    if (grpid >= fp->groups_count) {
+        adios_error ( err_invalid_group, "Invalid group name %s\n", grpname);
+        return NULL;
+    }
+    return adios_gopen_byid_v1 (fp, grpid);
+}
+
+ADIOS_GROUP_V1 * adios_gopen_byid_v1 (ADIOS_FILE_V1 *fp, int grpid)
+{
+    ADIOS_GROUP_V1 * gp = NULL;
+
+    adios_errno = 0;
+    if (grpid < 0 || grpid >= fp->groups_count) {
+        adios_error ( err_invalid_group, "Invalid group index %d\n", grpid);
+        return NULL;
+    }
+
+    gp = (ADIOS_GROUP_V1 *) malloc(sizeof(ADIOS_GROUP_V1));
+    if (!gp) {
+        adios_error ( err_no_memory, "Could not allocate memory for group info\n");
+        return NULL;
+    }
+
+    ADIOS_FILE *f = (ADIOS_FILE*)fp->internal_data;
+    common_read_group_view (f, grpid);
+
+    gp->grpid = grpid;
+    gp->gh = (uint64_t) f;
+    gp->fp = fp;
+    gp->vars_count = f->nvars;
+    gp->attrs_count = f->nattrs;
+    gp->var_namelist = f->var_namelist;
+    gp->attr_namelist = f->attr_namelist;
+
+    return gp;
+}
+
+int adios_gclose_v1 (ADIOS_GROUP_V1 *gp)
+{
+    ADIOS_FILE *f = (ADIOS_FILE*) gp->gh;
+    //free_namelist ((gp->var_namelist),gp->vars_count);
+    //free_namelist ((gp->attr_namelist),gp->attrs_count);
+    gp->var_namelist = NULL;
+    gp->attr_namelist = NULL;
+    gp->vars_count = 0;
+    gp->attrs_count = 0;
+    free (gp);
+    common_read_group_view (f, -1);
+    return 0;
+}
+
+
+int adios_get_attr_v1 (ADIOS_GROUP_V1  * gp, const char * attrname, enum ADIOS_DATATYPES * type,
+                    int * size, void ** data)
+{
+    return common_read_get_attr ((ADIOS_FILE*)gp->fp->internal_data, attrname, type, size, data);
+}
+
+int adios_get_attr_byid_v1 (ADIOS_GROUP_V1  * gp, int attrid, 
+                    enum ADIOS_DATATYPES * type, int * size, void ** data)
+{
+    return common_read_get_attr_byid ((ADIOS_FILE*)gp->fp->internal_data, attrid, type, size, data);
+}
+
+static ADIOS_VARINFO_V1 * adios_varinfo_to_v1 (ADIOS_GROUP_V1 *gp, ADIOS_VARINFO *vi, int getstat) 
+{
+    ADIOS_VARINFO_V1 * v = 0;
+    if (vi) {
+        v = (ADIOS_VARINFO_V1 *) malloc (sizeof(ADIOS_VARINFO_V1));
+        
+        v->grpid = 0;
+        v->varid = vi->varid;
+        v->type = vi->type;
+        v->value = vi->value; 
+             
+        /* TIME dimension should be emulated here !!! */
+        int timed = common_read_is_var_timed((ADIOS_FILE *)gp->fp->internal_data, vi->varid);
+        if (timed) {
+            v->ndim = vi->ndim + 1;
+            v->timedim = 0;
+        } else {
+            v->ndim = vi->ndim;
+            v->timedim = -1;
+        }
+        int tidx = 0, i;
+        v->dims = (uint64_t *) malloc (sizeof(uint64_t) * (v->ndim));
+        if (timed) {
+            v->dims[0] = vi->nsteps;
+            tidx=1;
+        }
+        for (i=0; i<vi->ndim; i++)
+            v->dims[i+tidx] = vi->dims[i];
+
+
+        ADIOS_VARSTAT * stat = NULL;
+        if (getstat)
+            common_read_inq_var_stat ((ADIOS_FILE *)gp->fp->internal_data, 
+                                       vi, 1, 0);
+
+        if (stat) {
+            v->characteristics_count;// = stat->characteristics_count; FIXME
+            v->gmin = stat->min; 
+            v->gmax = stat->max; 
+            v->gavg = stat->avg; 
+            v->gstd_dev = stat->std_dev;
+            v->mins = stat->steps->mins;
+            v->maxs = stat->steps->maxs;
+            v->avgs = stat->steps->avgs;
+            v->std_devs = stat->steps->std_devs;
+
+            v->hist->num_breaks = stat->histogram->num_breaks;
+            v->hist->max = stat->histogram->max;
+            v->hist->min = stat->histogram->min;
+            v->hist->breaks = stat->histogram->breaks;
+            v->hist->frequenciess = stat->histogram->frequencies;
+            v->hist->gfrequencies = stat->histogram->gfrequencies;
+        }
+        
+        v->internal_data = (void *)vi;
+    }
+    return v;
+}
+
+ADIOS_VARINFO_V1 * adios_inq_var_v1 (ADIOS_GROUP_V1  *gp, const char * varname) 
+{
+    ADIOS_VARINFO * vi = common_read_inq_var ((ADIOS_FILE*)gp->fp->internal_data, varname);
+    return adios_varinfo_to_v1 (gp, vi, 1);
+}
+
+ADIOS_VARINFO_V1 * adios_inq_var_byid_v1 (ADIOS_GROUP_V1  *gp, int varid)
+{
+    ADIOS_VARINFO * vi = common_read_inq_var_byid ((ADIOS_FILE*)gp->fp->internal_data, varid);
+    return  adios_varinfo_to_v1 (gp, vi, 1);
+}
+
+void adios_free_varinfo_v1 (ADIOS_VARINFO_V1 *vp)
+{
+    /* Should free up ADIOS_VARINFO_V1 and ADIOS_VARINFO too!!! */
+    common_read_free_varinfo ((ADIOS_VARINFO*)vp->internal_data);
+    free(vp);
+}
+
+int64_t adios_read_var_v1 (ADIOS_GROUP_V1  * gp, const char * varname,
+                        const uint64_t * start, const uint64_t * count,
+                        void * data)
+{
+    ADIOS_FILE *f = (ADIOS_FILE*)gp->fp->internal_data;
+
+    /* variable name -> varid */
+    ADIOS_VARINFO * vi = common_read_inq_var (f, varname);
+    if (!vi) 
+        return adios_errno;
+
+    return adios_read_var_byid_v1 (gp, vi->varid, start, count, data);
+
+}
+
+int64_t adios_read_var_byid_v1 (ADIOS_GROUP_V1 * gp,
+                             int                 varid,
+                             const uint64_t    * start,
+                             const uint64_t    * count,
+                             void              * data)
+{
+    ADIOS_FILE *f = (ADIOS_FILE*)gp->fp->internal_data;
+
+    /* First get the number of dimensions of the variable */
+    ADIOS_VARINFO * vi = common_read_inq_var_byid (f, varid);
+    if (!vi) 
+        return adios_errno;
+    ADIOS_VARINFO_V1 * v = adios_varinfo_to_v1 (gp, vi, 0); // fixes time
+
+    int ndim = v->ndim;
+    int tidx = 0;
+    int from_step = 0;
+    int nsteps = 1;
+    if (v->timedim == 0) {
+        /* has time dimension, translate to new query */
+        ndim--;
+        tidx = 1;
+        from_step = (int) start[0];
+        nsteps    = (int) count[0];
+    }
+
+    ADIOS_SELECTION * sel = adios_selection_boundingbox (ndim, start+tidx, count+tidx);
+
+    common_read_schedule_read_byid (f, sel, varid, from_step, nsteps, data);
+    int ret = common_read_perform_reads (f, 1);
+    int64_t rbytes;
+    if (ret == err_no_error) {
+        /* should return the number of bytes read */
+        rbytes = (int64_t) common_read_type_size (vi->type, data);
+        int i;
+        for (i=0; i<v->ndim; i++)
+            rbytes *= (int64_t) count[i];
+    } else {
+        rbytes = (int64_t) adios_errno;
+    }
+
+    adios_free_varinfo_v1(v);
+    adios_selection_delete(sel);
+    return rbytes;
+}
+
+int64_t adios_read_local_var_v1 (ADIOS_GROUP_V1 * gp,
+                              const char        * varname,
+                              int                 idx,
+                              const uint64_t    * start,
+                              const uint64_t    * count,
+                              void              * data)
+{
+    ADIOS_FILE *f = (ADIOS_FILE*)gp->fp->internal_data;
+    int i;
+
+    /* The new API does not support reading write block with subselection.
+       Only complete blocks can be read.
+       Here we check if the passed selection equals the whole block.
+       Otherwise we return an out of bound error, although it probably should
+       be a "within bounds" error
+
+       Version 1: 
+          - start/count has no time dimension for the local read
+          - idx is for all timesteps, 0...timesteps*blocks
+       Version 2:
+          - idx is from 0..blocks for each timestep
+          - need to say which timestep
+    */
+
+    /* First get the number of dimensions of the variable */
+    ADIOS_VARINFO * vi = common_read_inq_var (f, varname);
+    if (!vi) 
+        return adios_errno;
+
+    /* get step from the idx, and check validity of idx */
+    int step = 0;
+    int idx_in_step = idx;
+    step = 0;
+    while (step < vi->nsteps && idx_in_step >= vi->nblocks[step]) {
+        idx_in_step -= vi->nblocks[step];
+        step++;
+    }
+    if (step == vi->nsteps) {
+        adios_error (err_out_of_bound, "ADIOS ERROR: local "
+                "variable %s has only %d blocks in file. "
+                "Requested index %d\n", varname, vi->sum_nblocks, idx);
+        return adios_errno;
+    }
+    common_read_inq_var_blockinfo (f, vi); // get info on each block
+
+    /* check dimensions */
+    for (i=0; i<vi->ndim; i++) {
+        if (start[i] != 0 || count[i] != vi->blockinfo[idx].count[i]) {
+            adios_error (err_out_of_bound, "ADIOS ERROR: when reading a local "
+                "variable, only the whole block can be requested; subselections "
+                "are not allowed. Variable %s, block %d, dimension %d size is %lld, "
+                "requested %lld from offset %lld\n", 
+                varname, idx, vi->blockinfo[idx].count[i], count[i], start[i]);
+            return adios_errno;
+        }
+    }
+
+    ADIOS_SELECTION * sel = adios_selection_writeblock (idx_in_step);
+
+    common_read_schedule_read_byid (f, sel, vi->varid, step, 1, data);
+    int ret = common_read_perform_reads (f, 1);
+    int64_t rbytes;
+    if (ret == err_no_error) {
+        /* should return the number of bytes read */
+        rbytes = (int64_t) common_read_type_size (vi->type, data);
+        for (i=0; i<vi->ndim; i++)
+            rbytes *= (int64_t) count[i];
+    } else {
+        rbytes = (int64_t) adios_errno;
+    }
+
+    common_read_free_varinfo(vi);
+    adios_selection_delete(sel);
+    return rbytes;
+}
+
+const char * adios_type_to_string_v1 (enum ADIOS_DATATYPES type)
+{
+    return common_read_type_to_string (type);
+}
+
+int adios_type_size_v1(enum ADIOS_DATATYPES type, void *data)
+{
+    return common_read_type_size(type, data);
+}
+
+
+void adios_print_groupinfo (ADIOS_GROUP_V1 *gp) 
+{
+    ADIOS_FILE *f = (ADIOS_FILE*)gp->fp->internal_data;
+    common_read_print_fileinfo(f);
+}
+
+
+void adios_print_fileinfo_v1 (ADIOS_FILE_V1 *fp) 
+{
+    ADIOS_FILE *f = (ADIOS_FILE*)fp->internal_data;
+    common_read_print_fileinfo(f);
+}
+
+
+#include <math.h>
+
+// NCSU - Timer series analysis, correlation
+double adios_stat_cor_v1 (ADIOS_VARINFO_V1 * vix, ADIOS_VARINFO_V1 * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag)
+{
+    int i,j;
+
+    double avg_x = 0.0, avg_y = 0.0, avg_lag = 0.0;
+    double var_x = 0.0, var_y = 0.0, var_lag = 0.0;
+    double cov = 0;
+
+    if (vix == NULL)
+    {
+	adios_error(err_invalid_argument, "Variable not defined\n");
+        return 0;
+    }
+
+    // If the vix and viy are not time series objects, return.
+    if ((vix->timedim < 0) && (viy->timedim < 0))
+    {             
+        adios_error(err_invalid_argument, "Covariance must involve timeseries data\n");
+        return 0;
+    }                                                                    
+
+    uint32_t min = vix->dims[0] - 1;
+    if (viy && (min > viy->dims[0] - 1))
+        min = viy->dims[0] - 1;         
+    
+    if(time_start == 0 && time_end == 0) 
+    { //global covariance
+        if(viy == NULL) {
+            adios_error(err_invalid_argument, "Must have two variables for global covariance\n");
+            return 0;
+        }                                                                          
+
+        // Assign vix to viy, and calculate covariance
+        viy = vix;
+        time_start = 0;
+        time_end = min;
+    }
+    // Check the bounds of time
+    if (    (time_start >= 0) && (time_start <= min)
+            &&      (time_end >= 0)   && (time_end <= min)
+            &&  (time_start <= time_end))
+    {
+        if(viy == NULL) //user must want to run covariance against itself
+        {
+            if(! (time_end+lag) > min)
+            {                                                                        
+                adios_error(err_invalid_timestep, "Must leave enough timesteps for lag\n");
+                return 0;
+            }
+
+            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (adios_double, vix->avgs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (adios_double, vix->avgs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (adios_double, vix->avgs[i]); 
+                    double val_lag = bp_value_to_double (adios_double, vix->avgs[i + lag]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (adios_double, vix->std_devs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (adios_double, vix->std_devs[i]);
+                    double val_lag = bp_value_to_double (adios_double, vix->std_devs[i + lag]);
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1);
+                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (vix->type, vix->mins[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (vix->type, vix->mins[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (vix->type, vix->mins[i]); 
+                    double val_lag = bp_value_to_double (vix->type, vix->mins[i + lag]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (vix->type, vix->maxs[i]); 
+                    double val_lag = bp_value_to_double (vix->type, vix->maxs[i + lag]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                }
+            }
+            else
+            {
+                adios_error(err_unknown_char, "Unknown characteristic\n");
+                return 0;
+            }
+            return cov / (sqrt (var_x) * sqrt (var_lag));
+        }
+        else
+        {
+            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(adios_double, vix->avgs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(adios_double, viy->avgs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (adios_double, vix->avgs[i]); 
+                    double val_y = bp_value_to_double (adios_double, viy->avgs[i]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(adios_double, viy->std_devs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (adios_double, vix->std_devs[i]);
+                    double val_y = bp_value_to_double (adios_double, viy->std_devs[i]);
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1);
+                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(vix->type, vix->mins[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(viy->type, viy->mins[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (vix->type, vix->mins[i]); 
+                    double val_y = bp_value_to_double (viy->type, viy->mins[i]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(vix->type, viy->maxs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (vix->type, vix->maxs[i]); 
+                    double val_y = bp_value_to_double (viy->type, viy->maxs[i]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else
+            {
+                adios_error(err_unknown_char, "Unknown characteristic\n");
+                return 0;
+            }
+            return cov / (sqrt (var_x) * sqrt (var_y));
+        }
+    }
+    else
+    {
+        adios_error(err_invalid_timestep, "Time values out of bounds\n");
+        return 0;
+    }
+}
+
+// NCSU - Time series analysis, covariance
+//covariance(x,y) = sum(i=1,..N) [(x_1 - x_mean)(y_i - y_mean)]/N
+double adios_stat_cov_v1 (ADIOS_VARINFO_V1 * vix, ADIOS_VARINFO_V1 * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag)
+{
+    int i,j;
+
+    double avg_x = 0.0, avg_y = 0.0, avg_lag = 0.0;
+    double cov = 0;
+
+    if (vix == NULL)
+    {
+        adios_error(err_invalid_argument, "Variable not defined\n");
+        return 0;
+    }
+
+    // If the vix and viy are not time series objects, return.
+    if ((vix->timedim < 0) && (viy->timedim < 0))
+    {             
+        adios_error(err_invalid_argument, "Covariance must involve timeseries data\n");
+        return 0;
+    }                                                                    
+
+    uint32_t min = vix->dims[0] - 1;
+    if (viy && (min > viy->dims[0] - 1))
+        min = viy->dims[0] - 1;         
+    
+    if(time_start == 0 && time_end == 0) 
+    { //global covariance
+        if(viy == NULL) {
+            adios_error(err_invalid_argument, "Must have two variables for global covariance\n");
+            return 0;
+        }                                                                          
+
+        // Assign vix to viy, and calculate covariance
+        viy = vix;
+        time_start = 0;
+        time_end = min;
+    }
+    // Check the bounds of time
+    if (    (time_start >= 0) && (time_start <= min)
+            &&      (time_end >= 0)   && (time_end <= min)
+            &&  (time_start <= time_end))
+    {
+        if(viy == NULL) //user must want to run covariance against itself
+        {
+            if(! (time_end+lag) > min)
+            {                                                                        
+                adios_error(err_invalid_timestep, "Must leave enough timesteps for lag\n");
+                return 0;
+            }
+
+            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (adios_double, vix->avgs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (adios_double, vix->avgs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                    cov += (bp_value_to_double (adios_double, vix->avgs[i]) - avg_x) * (bp_value_to_double (adios_double, vix->avgs[i+lag]) - avg_lag) / (time_end - time_start + 1);
+            }
+            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (adios_double, vix->std_devs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                    cov += (bp_value_to_double (adios_double, vix->std_devs[i]) - avg_x) * (bp_value_to_double (adios_double, vix->std_devs[i+lag]) - avg_lag) / (time_end - time_start + 1);
+            }
+            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (vix->type, vix->mins[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (vix->type, vix->mins[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                    cov += (bp_value_to_double (vix->type, vix->mins[i]) - avg_x) * (bp_value_to_double (vix->type, vix->mins[i+lag]) - avg_lag) / (time_end - time_start + 1);
+            }
+            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (vix->type, vix->maxs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                    cov += (bp_value_to_double (vix->type, vix->maxs[i]) - avg_x) * (bp_value_to_double (vix->type, vix->maxs[i+lag]) - avg_lag) / (time_end - time_start + 1);
+            }
+            else
+            {
+                adios_error(err_unknown_char, "Unknown characteristic\n");
+                return 0;
+            }
+        }
+        else
+        {
+            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(adios_double, vix->avgs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(adios_double, viy->avgs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    cov += (bp_value_to_double(adios_double, vix->avgs[i]) - avg_x) * (bp_value_to_double(adios_double, viy->avgs[i]) - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(adios_double, viy->std_devs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    cov += (bp_value_to_double(adios_double, vix->std_devs[i]) - avg_x) * (bp_value_to_double(adios_double, viy->std_devs[i]) - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(vix->type, vix->mins[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(viy->type, viy->mins[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    cov += (bp_value_to_double(vix->type, vix->mins[i]) - avg_x) * (bp_value_to_double(viy->type, viy->mins[i]) - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(vix->type, viy->maxs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    cov += (bp_value_to_double(vix->type, vix->maxs[i]) - avg_x) * (bp_value_to_double(viy->type, viy->maxs[i]) - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else
+            {
+                adios_error(err_unknown_char, "Unknown characteristic\n");
+                return 0;
+            }
+        }
+    }
+    else
+    {
+        adios_error(err_invalid_timestep, "Time values out of bounds\n");
+    }
+    return cov;
+}
diff --git a/src/adios_socket.c b/src/core/adios_socket.c
similarity index 100%
rename from src/adios_socket.c
rename to src/core/adios_socket.c
diff --git a/src/adios_socket.h b/src/core/adios_socket.h
similarity index 100%
rename from src/adios_socket.h
rename to src/core/adios_socket.h
diff --git a/src/core/adios_timing.c b/src/core/adios_timing.c
new file mode 100644
index 0000000..d6c1c51
--- /dev/null
+++ b/src/core/adios_timing.c
@@ -0,0 +1,285 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+
+#include "public/adios.h"
+#include "public/adios_error.h"
+#include "core/adios_internals.h"
+#include "core/adios_timing.h"
+#include "core/adios_logger.h"
+#include <string.h>
+#include <stdio.h>
+#include <sys/time.h>
+
+//#include "mpi.h"
+
+
+/*
+ * Dump the timing information to an XML file. 
+ * The first process writes first, the last writes last, and the others are in unspecified order.
+ * Called both from C and Fortran API's (adios.c and adiosf.c)
+*/
+void adios_timing_write_xml_common (int64_t fd_p, const char* filename)
+{
+#ifdef SKEL_TIMING
+    struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
+    if (!fd)
+    {
+        adios_error (err_invalid_file_pointer, 
+                     "Invalid handle passed to adios_get_timing_name\n");
+        return;
+    }
+
+    if (!fd->timing_obj)
+    {
+        log_error ("No timing info available, file not written\n");
+        // No timing info, don't write anything.
+        return;
+    }
+
+    int size, rank, i;
+    MPI_Comm_size (MPI_COMM_WORLD, &size);
+    MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+
+    if (rank == 0)
+    {
+        FILE* f = fopen (filename, "a"); 
+
+        // Rank 0 starts the xml and includes the text labels
+        fprintf (f, "<skel_result><adios_timing cores='%i' keys='", size);
+        for (i = 0; i < fd->timing_obj->user_count; i++)
+        {
+            if (fd->timing_obj->names[i])
+            {
+                fprintf (f, "%s, ", fd->timing_obj->names[i]);
+            }
+            else
+            {
+                fprintf (f, "user%i, ", i);
+            }
+        }
+        for (i = 0; i < fd->timing_obj->internal_count; i++)
+        {
+            if (fd->timing_obj->names[ADIOS_TIMING_MAX_USER_TIMERS + i])
+            {
+                fprintf (f, fd->timing_obj->names[ADIOS_TIMING_MAX_USER_TIMERS + i]);
+            }
+            else
+            {
+                fprintf (f, "internal%i", i);
+            }
+            if (i != fd->timing_obj->internal_count - 1) // Skip trailing comma
+            {
+                fprintf (f, ", ");
+            }
+        }
+        fprintf (f, "' "); // Close the keys attribute
+
+        // Assume there is only one method in play
+        fprintf (f, "method='%s' ", fd->group->methods->method->method);
+
+        struct timeval tv;
+        gettimeofday (&tv, NULL);
+        double time = tv.tv_sec+(tv.tv_usec/1000000.0);
+        fprintf (f, "start_time='%f' ", time);
+
+        fprintf (f, ">\n"); // Close the adios_timing element
+
+        // This part should be the same for all procs
+        fprintf (f, "<proc id='%i' vals='", rank);
+        for (i = 0; i < fd->timing_obj->user_count; i++)
+        {
+            fprintf (f, "%f, ", fd->timing_obj->times[i]);
+        }
+        for (i = 0; i < fd->timing_obj->internal_count; i++)
+        {
+            fprintf (f, "%f", fd->timing_obj->times[ADIOS_TIMING_MAX_USER_TIMERS + i]);
+            if (i != fd->timing_obj->internal_count - 1)
+            {
+                fprintf (f, ", ");
+            }
+        }
+        fprintf (f, "' />\n");
+
+        fclose (f);
+        MPI_Barrier (MPI_COMM_WORLD);
+        MPI_Barrier (MPI_COMM_WORLD);
+    }
+    else if (rank == size - 1)
+    {
+        MPI_Barrier (MPI_COMM_WORLD);
+        MPI_Barrier (MPI_COMM_WORLD);
+        FILE* f = fopen (filename, "a");
+
+        // This part should be the same for all procs 
+        fprintf (f, "<proc id='%i' vals='", rank);
+        for (i = 0; i < fd->timing_obj->user_count; i++)
+        {
+            fprintf (f, "%f, ", fd->timing_obj->times[i]);
+        }
+        for (i = 0; i < fd->timing_obj->internal_count; i++)
+        {
+            fprintf (f, "%f", fd->timing_obj->times[ADIOS_TIMING_MAX_USER_TIMERS + i]);
+            if (i != fd->timing_obj->internal_count - 1)
+            {
+                fprintf (f, ", ");
+            }
+        }
+        fprintf (f, "' />\n");
+
+
+        // The highest numbered rank ends the xml document
+        fprintf (f, "</adios_timing></skel_result>\n");
+        fclose (f);
+    }
+    else
+    {
+        MPI_Barrier (MPI_COMM_WORLD);
+        FILE* f = fopen (filename, "a"); 
+        
+        // This part should be the same for all procs
+        fprintf (f, "<proc id='%i' vals='", rank);
+        for (i = 0; i < fd->timing_obj->user_count; i++)
+        {
+            fprintf (f, "%f, ", fd->timing_obj->times[i]);
+        }
+        for (i = 0; i < fd->timing_obj->internal_count; i++)
+        {
+            fprintf (f, "%f", fd->timing_obj->times[ADIOS_TIMING_MAX_USER_TIMERS + i]);
+            if (i != fd->timing_obj->internal_count - 1)
+            {
+                fprintf (f, ", ");
+            }
+        }
+        fprintf (f, "' />\n");
+
+        fclose (f);
+        MPI_Barrier (MPI_COMM_WORLD);
+    }
+#else
+    log_warn ("Timing information is not currently available.\n"
+              "To use the Skel timing functions, you must enable them when building ADIOS.\n"
+              "Use --enable-skel-timing during the configuration step.\n");
+#endif
+}
+
+
+
+//Build the internal functions only when timing is enabled.
+#ifdef SKEL_TIMING
+int adios_get_timing_internal_count (int64_t fd_p, int64_t * tc)
+{
+    struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
+    if (!fd)
+    {
+        adios_error (err_invalid_file_pointer, 
+                     "Invalid handle passed to adios_get_timing_count\n");
+
+        return 1;
+    }
+
+    if (! fd->timing_obj)
+    {
+        *tc = 0;
+    } 
+    else
+    {
+        *tc = fd->timing_obj->internal_count;
+    }
+
+    return 0;
+}
+
+
+int adios_get_timing_name (int64_t fd_p, int64_t index, char* name)
+{
+    struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
+    if (!fd)
+    {
+        adios_error (err_invalid_file_pointer, 
+                     "Invalid handle passed to adios_get_timing_name\n");
+
+        return 1;
+    }
+
+    strcpy (name, fd->timing_obj->names[index]);
+    //*name = fd->timing_obj->names[index];
+
+    return 0;
+}
+
+
+int adios_get_timing_value (int64_t fd_p, int64_t index, double* value)
+{
+    struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
+    if (!fd)
+    {
+        adios_error (err_invalid_file_pointer, 
+                     "Invalid handle passed to adios_get_timing_value\n");
+
+        return 1;
+    }
+
+    *value = fd->timing_obj->times[index];
+
+    return 0;
+}
+
+
+void adios_timing_go (struct adios_timing_struct * ts, int64_t index)
+{
+    ts->times[index] -= MPI_Wtime();
+}
+
+
+void adios_timing_stop (struct adios_timing_struct * ts, int64_t index)
+{
+    ts->times[index] += MPI_Wtime();
+}
+
+
+struct adios_timing_struct *  adios_timing_create (int timer_count, char** timer_names)
+{
+    int i;
+    struct adios_timing_struct * ts = (struct adios_timing_struct *) 
+                                       malloc (sizeof (struct adios_timing_struct) );
+    
+    ts->internal_count = timer_count;
+    ts->user_count = 0;
+    ts->names = (char**) malloc ( (ADIOS_TIMING_MAX_USER_TIMERS + timer_count) * sizeof (char*) );
+    ts->times = (double*) malloc ( (ADIOS_TIMING_MAX_USER_TIMERS + timer_count) * sizeof (double) );
+
+    // Clear all timers
+    memset(ts->times, 0, (ADIOS_TIMING_MAX_USER_TIMERS + timer_count) * sizeof (double) );
+    memset(ts->names, 0, (ADIOS_TIMING_MAX_USER_TIMERS + timer_count) * sizeof (char*) );
+
+    for (i = 0; i < timer_count; i++)
+    {
+        ts->names[ADIOS_TIMING_MAX_USER_TIMERS + i] = (char*) malloc (strlen(timer_names[i]) + 1 * sizeof (char) );
+        strcpy (ts->names[ADIOS_TIMING_MAX_USER_TIMERS + i], timer_names[i]);
+    }
+
+    return ts;
+}
+
+
+
+void adios_timing_destroy (struct adios_timing_struct * timing_obj)
+{
+    if (timing_obj)
+    {
+        if (timing_obj->times)
+        {
+            free (timing_obj->times);
+        }
+        free (timing_obj);
+    }
+}
+
+#endif // ifdef SKEL_TIMING
+
+
diff --git a/src/core/adios_timing.h b/src/core/adios_timing.h
new file mode 100644
index 0000000..667c947
--- /dev/null
+++ b/src/core/adios_timing.h
@@ -0,0 +1,45 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#ifndef _ADIOS_TIMING_H_
+#define _ADIOS_TIMING_H_
+
+
+#include <stdint.h>
+
+
+#define ADIOS_TIMING_MAX_USER_TIMERS 16
+
+
+struct adios_timing_struct
+{
+
+	int64_t internal_count;
+	int64_t user_count;
+	char ** names;
+	double *times;
+
+};
+
+
+//int adios_get_timing_count (int64_t fd_p, int64_t * tc);
+//int adios_get_timing_name (int64_t fd_p, int64_t index, char* name);
+//int adios_get_timing_value (int64_t fd_p, int64_t index, double* value);
+
+
+struct adios_timing_struct *  adios_timing_create (int timer_count, char** timer_names);
+void adios_timing_destroy (struct adios_timing_struct * timing_obj);
+
+void adios_timing_go (struct adios_timing_struct * ts, int64_t index);
+void adios_timing_stop (struct adios_timing_struct * ts, int64_t index);
+
+
+void adios_timing_declare_user_timers (int64_t fd_p, int user_timer_count, char** user_timer_names);
+
+
+
+#endif
diff --git a/src/adios_transport_hooks.c b/src/core/adios_transport_hooks.c
similarity index 90%
rename from src/adios_transport_hooks.c
rename to src/core/adios_transport_hooks.c
index fee982f..0bae607 100644
--- a/src/adios_transport_hooks.c
+++ b/src/core/adios_transport_hooks.c
@@ -14,10 +14,10 @@
     /* Parallel applications should use MPI to communicate file info and slices of data */
 #endif
 
-#include "adios.h"
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
-#include "adios_internals.h"
+#include "public/adios.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_internals.h"
 
 #define MATCH_STRING_TO_METHOD(b,d,r) \
 if (!strcasecmp (buf,b)) \
@@ -43,10 +43,6 @@ void adios_init_transports (struct adios_transport_struct ** t)
 
 #ifndef ADIOS_EMPTY_TRANSPORTS
 
-#  ifndef NO_RESEARCH_TRANSPORTS
-    ASSIGN_FNS(adaptive,ADIOS_METHOD_ADAPTIVE)
-#  endif
-
 #  ifndef _NOMPI
 
 #    if HAVE_MPI
@@ -59,6 +55,7 @@ void adios_init_transports (struct adios_transport_struct ** t)
     ASSIGN_FNS(mpi_stagger,ADIOS_METHOD_MPI_STAGGER)
     ASSIGN_FNS(mpi_aggregate,ADIOS_METHOD_MPI_AGG)
     ASSIGN_FNS(mpi_amr1,ADIOS_METHOD_MPI_AMR1)
+    ASSIGN_FNS(adaptive,ADIOS_METHOD_ADAPTIVE)
 #      endif
 #    endif
 
@@ -84,8 +81,8 @@ void adios_init_transports (struct adios_transport_struct ** t)
     ASSIGN_FNS(posix,ADIOS_METHOD_POSIX)
     ASSIGN_FNS(posix1,ADIOS_METHOD_POSIX1)
 
-#  if HAVE_DART
-    ASSIGN_FNS(dart,ADIOS_METHOD_DART)
+#  if HAVE_DATASPACES
+    ASSIGN_FNS(dataspaces,ADIOS_METHOD_DATASPACES)
 #  endif
 
 #  if HAVE_DIMES
@@ -105,20 +102,18 @@ int adios_parse_method (const char * buf, enum ADIOS_IO_METHOD * method
 {
     // add the string<->ID mapping here (also add ID in adios_internals.h)
     // use a '1' for requires a communicator or '0' if not as the last param
-#ifndef NO_RESEARCH_TRANSPORTS
-    MATCH_STRING_TO_METHOD("ADAPTIVE",ADIOS_METHOD_ADAPTIVE,1)
-#endif
-
 #if HAVE_MPI
     MATCH_STRING_TO_METHOD("MPI",ADIOS_METHOD_MPI,1)
     MATCH_STRING_TO_METHOD("MPI_LUSTRE",ADIOS_METHOD_MPI_LUSTRE,1)
     MATCH_STRING_TO_METHOD("MPI_AMR",ADIOS_METHOD_MPI_AMR,1)
+    MATCH_STRING_TO_METHOD("MPI_AGGREGATE",ADIOS_METHOD_MPI_AMR,1)
 #ifndef NO_RESEARCH_TRANSPORTS
     MATCH_STRING_TO_METHOD("MPI_STRIPE",ADIOS_METHOD_MPI_STRIPE,1)
     MATCH_STRING_TO_METHOD("MPI_CIO",ADIOS_METHOD_MPI_CIO,1)
     MATCH_STRING_TO_METHOD("MPI_STAGGER",ADIOS_METHOD_MPI_STAGGER,1)
-    MATCH_STRING_TO_METHOD("MPI_AGGREGATE",ADIOS_METHOD_MPI_AGG,1)
+    MATCH_STRING_TO_METHOD("MPI_AGGREGATE1",ADIOS_METHOD_MPI_AGG,1)
     MATCH_STRING_TO_METHOD("MPI_AMR1",ADIOS_METHOD_MPI_AMR1,1)
+    MATCH_STRING_TO_METHOD("ADAPTIVE",ADIOS_METHOD_ADAPTIVE,1)
 #endif
 #endif
 
@@ -131,8 +126,9 @@ int adios_parse_method (const char * buf, enum ADIOS_IO_METHOD * method
     MATCH_STRING_TO_METHOD("POSIX1",ADIOS_METHOD_POSIX1,0)
     MATCH_STRING_TO_METHOD("FB",ADIOS_METHOD_POSIX,0)
 
-#if HAVE_DART
-    MATCH_STRING_TO_METHOD("DART",ADIOS_METHOD_DART,1)
+#if HAVE_DATASPACES
+    MATCH_STRING_TO_METHOD("DART",ADIOS_METHOD_DATASPACES,1)
+    MATCH_STRING_TO_METHOD("DATASPACES",ADIOS_METHOD_DATASPACES,1)
 #endif
 
 #if HAVE_DIMES
diff --git a/src/adios_transport_hooks.h b/src/core/adios_transport_hooks.h
similarity index 96%
rename from src/adios_transport_hooks.h
rename to src/core/adios_transport_hooks.h
index 702fe46..539ffe4 100644
--- a/src/adios_transport_hooks.h
+++ b/src/core/adios_transport_hooks.h
@@ -11,9 +11,10 @@
 #include "config.h"
 #include <stdint.h>
 #include <string.h>
+#include "core/util.h" /* PairStruct* */
 
 #define FORWARD_DECLARE_EMPTY(a) \
-void adios_##a##_init (const char * parameters \
+void adios_##a##_init (const PairStruct * parameters \
                       ,struct adios_method_struct * method \
                       ) {} \
 int adios_##a##_open (struct adios_file_struct * fd \
@@ -52,7 +53,7 @@ void adios_##a##_stop_calculation (struct adios_method_struct * method) {}
 //#define FORWARD_DECLARE(a) FORWARD_DECLARE_EMPTY(a) \
 //#else
 #define FORWARD_DECLARE(a) \
-void adios_##a##_init (const char * parameters \
+void adios_##a##_init (const PairStruct * parameters \
                       ,struct adios_method_struct * method \
                       ); \
 int adios_##a##_open (struct adios_file_struct * fd \
@@ -107,7 +108,7 @@ enum ADIOS_IO_METHOD {ADIOS_METHOD_UNKNOWN     = -2
               ,ADIOS_METHOD_MPI         = 0
               ,ADIOS_METHOD_DATATAP     = 1
               ,ADIOS_METHOD_POSIX       = 2
-              ,ADIOS_METHOD_DART        = 3
+              ,ADIOS_METHOD_DATASPACES  = 3
               ,ADIOS_METHOD_VTK         = 4
               ,ADIOS_METHOD_POSIX_ASCII = 5
               ,ADIOS_METHOD_MPI_CIO     = 6
@@ -158,8 +159,8 @@ enum ADIOS_IO_METHOD {ADIOS_METHOD_UNKNOWN     = -2
      FORWARD_DECLARE(adaptive)
 #endif
 
-#if defined(HAVE_DART) && !defined(ADIOS_EMPTY_TRANSPORTS) 
-FORWARD_DECLARE(dart)
+#if defined(HAVE_DATASPACES) && !defined(ADIOS_EMPTY_TRANSPORTS) 
+FORWARD_DECLARE(dataspaces)
 #endif
 
 #if HAVE_DIMES
diff --git a/src/core/adiosf.c b/src/core/adiosf.c
new file mode 100644
index 0000000..db2365c
--- /dev/null
+++ b/src/core/adiosf.c
@@ -0,0 +1,840 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#include "../config.h"
+#include <string.h>
+#include <unistd.h>
+#include <stdint.h>
+
+#include "core/common_adios.h"
+#include "core/adios_internals.h"
+#include "core/adios_internals_mxml.h"
+#include "core/adios_transport_hooks.h"
+#include "core/futils.h"
+#include "core/globals.h"
+#include "public/adios_error.h"
+#include "core/adios_logger.h"
+
+#ifdef __cplusplus
+extern "C"  /* prevent C++ name mangling */
+#endif
+
+extern int adios_errno;
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_set_application_id, ADIOS_SET_APPLICATION_ID) (int *id, int * err)
+{
+    globals_adios_set_application_id (*id);
+    if (err != 0) *err = 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_init, ADIOS_INIT) (const char * config, int * err, int config_size)
+{
+    char * buf1 = 0;
+
+    buf1 = futils_fstr_to_cstr (config, config_size);
+    if (buf1 != 0) {
+        *err = common_adios_init (buf1);
+        free (buf1);
+    } else {
+        *err = -adios_errno;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_init_noxml, ADIOS_INIT_LOCAL) (int * err)
+{
+    *err = common_adios_init_noxml ();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_finalize, ADIOS_FINALIZE) (int * mype, int * err)
+{
+    *err = common_adios_finalize (*mype);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_allocate_buffer, ADIOS_ALLOCATE_BUFFER) (int *sizeMB, int * err)
+{
+    //FIX
+    *err = common_adios_allocate_buffer (1 /*NOW*/, *sizeMB);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_open, ADIOS_OPEN) 
+    (int64_t * fd, const char * group_name, const char * name
+    ,const char * mode, void * comm, int * err
+    ,int group_name_size, int name_size, int mode_size
+    )
+{
+    char * buf1 = 0;
+    char * buf2 = 0;
+    char * buf3 = 0;
+
+    buf1 = futils_fstr_to_cstr (group_name, group_name_size);
+    buf2 = futils_fstr_to_cstr (name, name_size);
+    buf3 = futils_fstr_to_cstr (mode, mode_size);
+
+    if (buf1 != 0 && buf2 != 0 && buf3 != 0) {
+        *err = common_adios_open (fd, buf1, buf2, buf3, comm);
+        free (buf1);
+        free (buf2);
+        free (buf3);
+    } else {
+        *err = -adios_errno;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_group_size, ADIOS_GROUP_SIZE) 
+    (int64_t * fd_p, int64_t * data_size
+    ,int64_t * total_size, int * err
+    )
+{
+    *err = common_adios_group_size (*fd_p, (uint64_t) *data_size
+                            ,(uint64_t *) total_size
+                            );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+#include "stdio.h"
+void FC_FUNC_(adios_write_byid, ADIOS_WRITE_BYID)
+    (int64_t * fd_p, int64_t * id, void * var
+    ,int * err, int var_size
+    )
+{
+    struct adios_file_struct * fd = (struct adios_file_struct *) *fd_p;
+    if (!fd)
+    {
+        adios_error (err_invalid_file_pointer, "Invalid handle passed to adios_write\n");
+        *err = 1;
+        return;
+    }
+
+    struct adios_var_struct * v = (struct adios_var_struct *) *id;
+    if (!v)
+    {
+        adios_error (err_invalid_varid, "Invalid id passed to adios_write_byid\n");
+        *err = 1;
+        return;
+    }
+
+    struct adios_method_list_struct * m = fd->group->methods;
+
+    if (m && m->next == NULL && m->method->m == ADIOS_METHOD_NULL)
+    {
+        // nothing to do so just return
+        *err = 0;
+        return;
+    }
+
+    if (!var)
+    {
+        adios_error (err_invalid_data, "Invalid data (NULL pointer) passed to write\n");
+        *err = 1;
+        return;
+    }
+
+    *err = common_adios_write_byid (fd, v, var);
+}
+
+/* Name clash resolution: Fortran adios_write_byid is an interface, and its 
+   subroutines cannot call adios_write_byid() in this file directly because 
+   the Fortran compiler interprets it as the call to the interface name. 
+   adios_write_byid_f2c provides the bridge to link the C function with
+   the subroutines. 
+*/
+void FC_FUNC_(adios_write_byid_f2c, ADIOS_WRITE_BYID_F2C) 
+    (int64_t * fd_p, int64_t * id, void * var, int * err, int var_size)
+{
+    FC_FUNC_(adios_write_byid, ADIOS_WRITE) (fd_p, id, var, err, var_size);
+}
+
+/* This Fortran api function is a bit different from the C api funcion, but
+ * they call the same common_adios_write().
+ * Difference: if the variable is string type then we need to convert
+ * the void * var to a C string (add \0 to the end)
+ * We rely on the assumption/fact that Fortran compilers pass on the 
+ * length of a character array in an extra integer argument, even if
+ * the C function declares a void* array in the argument list. 
+ */
+void FC_FUNC_(adios_write, ADIOS_WRITE) 
+    (int64_t * fd_p, const char * name, void * var, int * err
+    ,int name_size, int var_size
+    )
+{
+    struct adios_file_struct * fd = (struct adios_file_struct *) *fd_p;
+    if (!fd)
+    {
+        adios_error (err_invalid_file_pointer, "Invalid handle passed to adios_write\n");
+        *err = 1;
+        return;
+    }
+
+    struct adios_var_struct * v = fd->group->vars;
+    struct adios_method_list_struct * m = fd->group->methods;
+
+    if (m && m->next == NULL && m->method->m == ADIOS_METHOD_NULL)
+    {
+        // nothing to do so just return
+        *err = 0;
+        return;
+    }
+
+    char * buf1 = 0;
+    buf1 = futils_fstr_to_cstr (name, name_size);
+
+    //printf("  -- adios_write: name=[%s] var size = %d\n", buf1, var_size);
+
+    if (!buf1) {
+        *err = -adios_errno;
+        return;
+    }
+
+    v = adios_find_var_by_name (v, buf1, fd->group->all_unique_var_names);
+
+    if (!v)
+    {
+        adios_error (err_invalid_varname, "Bad var name (ignored): '%s'\n", buf1);
+        *err = 1;
+        free (buf1);
+        return;
+    }
+
+    if (fd->mode == adios_mode_read)
+    {
+        if (   strcasecmp (buf1, fd->group->group_comm)
+            && v->is_dim != adios_flag_yes
+           )
+        {
+            adios_error (err_invalid_file_mode, "write attempted on %s in %s.  This was opened for read\n" ,buf1 , fd->name);
+            *err = 1;
+            free (buf1);
+            return;
+        }
+    }
+
+    if (!var)
+    {
+        adios_error (err_invalid_data, "Invalid data (NULL pointer) passed to write for variable %s\n", buf1);
+        *err = 1;
+        free (buf1);
+        return;
+    }
+
+    if (v->data)
+    {
+        free (v->data);
+        v->data = 0;
+    }
+
+    // Q.L. 10-2010. To fix a memory leak problem.
+    if (v->stats)
+    {   
+        int j, idx;
+        int c, count = 1;
+
+        if (v->type == adios_complex || v->type == adios_double_complex)
+            count = 3;
+
+        for (c = 0; c < count; c ++)
+        {   
+            j = idx = 0;
+            while (v->bitmap >> j)
+            {   
+                if (v->bitmap >> j & 1)
+                {   
+                    if (j == adios_statistic_hist)
+                    {   
+                        struct adios_index_characteristics_hist_struct * hist =
+                            (struct adios_index_characteristics_hist_struct *) v->stats[c][idx].data;
+                        free (hist->breaks);
+                        free (hist->frequencies);
+                        free (hist);
+                        v->stats[c][idx].data = 0;
+                    }
+                    else
+                    {   
+                        free (v->stats[c][idx].data);
+                        v->stats[c][idx].data = 0;
+                    }
+                    idx ++;
+                }
+                j ++;
+            }
+        }
+    }
+
+    if (v->dimensions)
+    {
+        v->data = var;
+    }
+    else
+    {
+        uint64_t element_size = adios_get_type_size (v->type, var);
+
+        switch (v->type)
+        {
+            case adios_byte:
+            case adios_short:
+            case adios_integer:
+            case adios_long:
+            case adios_unsigned_byte:
+            case adios_unsigned_short:
+            case adios_unsigned_integer:
+            case adios_unsigned_long:
+            case adios_real:
+            case adios_double:
+            case adios_long_double:
+            case adios_complex:
+            case adios_double_complex:
+                v->data = malloc (element_size);
+                if (!v->data)
+                {
+                    adios_error (err_no_memory, 
+                                 "In adios_write, cannot allocate %lld bytes to copy scalar %s\n",
+                                 element_size, v->name);
+                    *err = 1;
+                    free (buf1);
+                    return;
+                }
+
+                memcpy ((char *) v->data, var, element_size);
+                break;
+            case adios_string:
+                v->data = futils_fstr_to_cstr (var, var_size);
+                if (!v->data)
+                {
+                    adios_error (err_no_memory, 
+                                 "In adios_write, cannot allocate %lld bytes to copy string %s\n",
+                                 element_size, v->name);
+                    *err = 1;
+                    free (buf1);
+                    return;
+                }
+                break;
+
+            default:
+                v->data = 0;
+                break;
+        }
+    }
+
+    *err = common_adios_write (fd, v, var);
+    if (fd->mode == adios_mode_write || fd->mode == adios_mode_append)
+    {
+        adios_copy_var_written (&fd->group->vars_written, v, fd);
+    }
+
+    free (buf1);
+}
+
+/* Name clash resolution: Fortran adios_write is an interface, and its subroutines cannot call
+   adios_write() in this file directly because the Fortran compiler interprets it as the
+   call to the interface name. adios_write_f2c provides the bridge to link the C function with
+   the subroutines. 
+*/
+void FC_FUNC_(adios_write_f2c, ADIOS_WRITE_F2C) 
+    (int64_t * fd_p, const char * name, void * var, int * err,int name_size, int var_size)
+{
+    FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_get_write_buffer, ADIOS_GET_WRITE_BUFFER) 
+    (int64_t * fd_p, const char * name
+    ,int64_t * size
+    ,void ** buffer, int * err, int name_size
+    )
+{
+    char * buf1 = 0;
+
+    buf1 = futils_fstr_to_cstr (name, name_size);
+
+    if (buf1 != 0) {
+        *err = common_adios_get_write_buffer (*fd_p, buf1, (uint64_t *) size, buffer);
+        free (buf1);
+    } else {
+        *err = -adios_errno;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_read, ADIOS_READ) 
+    (int64_t * fd_p, const char * name, void * buffer
+    ,int64_t * buffer_size, int * err, int name_size
+    )
+{
+    char * buf1 = 0;
+
+    buf1 = futils_fstr_to_cstr (name, name_size);
+
+    if (buf1 != 0) {
+        *err = common_adios_read (*fd_p, buf1, buffer, *buffer_size);
+        free (buf1);
+    } else {
+        *err = -adios_errno;
+    }
+}
+
+void FC_FUNC_(adios_read_f2c, ADIOS_READ_F2C) 
+    (int64_t * fd_p, const char * name, void * buffer,int64_t * buffer_size, int * err, int name_size)
+{
+    FC_FUNC_(adios_read, ADIOS_READ) 
+    (fd_p, name, buffer, buffer_size, err, name_size);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_set_path, ADIOS_SET_PATH) 
+    (int64_t * fd_p, const char * path, int * err, int path_size)
+{
+    char * buf1 = 0;
+
+    buf1 = futils_fstr_to_cstr (path, path_size);
+
+    if (buf1 != 0) {
+        *err = common_adios_set_path (*fd_p, buf1);
+        free (buf1);
+    } else {
+        *err = -adios_errno;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_set_path_var, ADIOS_SET_PATH_VAR) 
+    (int64_t * fd_p, const char * path, const char * name, int * err, int path_size, int name_size)
+{
+    char * buf1 = 0;
+    char * buf2 = 0;
+
+    buf1 = futils_fstr_to_cstr (path, path_size);
+    buf2 = futils_fstr_to_cstr (name, name_size);
+
+    if (buf1 != 0 && buf2 != 0) {
+        *err = common_adios_set_path_var (*fd_p, buf1, buf2);
+        free (buf1);
+        free (buf2);
+    } else {
+        *err = -adios_errno;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// hint that we reached the end of an iteration (for asynchronous pacing)
+void FC_FUNC_(adios_end_iteration, ADIOS_END_ITERATION) (int * err)
+{
+    *err = common_adios_end_iteration ();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// hint to start communicating
+void FC_FUNC_(adios_start_calculation, ADIOS_START_CALCULATION) (int * err)
+{
+    *err = common_adios_start_calculation ();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// hint to stop communicating
+void FC_FUNC_(adios_stop_calculation, ADIOS_STOP_CALCULATION) (int * err)
+{
+    *err = common_adios_stop_calculation ();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_close, ADIOS_CLOSE) (int64_t * fd_p, int * err)
+{
+    *err = common_adios_close (*fd_p);
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void FC_FUNC_(adios_timing_write_xml, ADIOS_TIMING_WRITE_XML) (int64_t * fd_p, const char* filename, int filename_size)
+{
+    char * cfile = 0;
+    cfile = futils_fstr_to_cstr (filename, filename_size);
+
+    // defined in adios_timing.c
+    adios_timing_write_xml_common (*fd_p, cfile);
+}
+
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Methods normally only called by the XML parser
+//////////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+// adios_common_declare_group is in adios_internals.c
+// group a list of vars into a composite group
+void FC_FUNC_(adios_declare_group, ADIOS_DECLARE_GROUP) 
+    (int64_t * id, const char * name
+    ,const char * time_index, enum ADIOS_FLAG *stats
+    ,int * err, int name_size, int time_index_size
+    )
+{
+    char * buf1 = 0;
+    char * buf2 = 0;
+
+    buf1 = futils_fstr_to_cstr (name, name_size);
+    buf2 = futils_fstr_to_cstr (time_index, time_index_size);
+
+    if (buf1 != 0 && buf2 != 0) {
+        *err = adios_common_declare_group (id, buf1, adios_flag_yes, "", "", buf2, *stats);
+        free (buf1);
+        free (buf2);
+        if (*err == 1) {
+            struct adios_group_struct * g = (struct adios_group_struct *) *id;
+            g->all_unique_var_names = adios_flag_no;
+        }
+    } else {
+        *err = -adios_errno;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// adios_common_define_var is in adios_internals.c
+// declare a single var as an entry in a group
+void FC_FUNC_(adios_define_var, ADIOS_DEFINE_VAR) 
+    (int64_t * group_id, const char * name
+    ,const char * path, int * type
+    ,const char * dimensions
+    ,const char * global_dimensions
+    ,const char * local_offsets, int64_t * id
+    ,int name_size, int path_size, int dimensions_size
+    ,int global_dimensions_size, int local_offsets_size
+    )
+{
+    char * buf1 = 0;
+    char * buf2 = 0;
+    char * buf3 = 0;
+    char * buf4 = 0;
+    char * buf5 = 0;
+
+    buf1 = futils_fstr_to_cstr (name, name_size);
+    buf2 = futils_fstr_to_cstr (path, path_size);
+    buf3 = futils_fstr_to_cstr (dimensions, dimensions_size);
+    buf4 = futils_fstr_to_cstr (global_dimensions, global_dimensions_size);
+    buf5 = futils_fstr_to_cstr (local_offsets, local_offsets_size);
+
+    if (buf1 != 0 && buf2 != 0) {
+        *id = adios_common_define_var (*group_id, buf1, buf2
+                                       ,(enum ADIOS_DATATYPES) *type
+                                       ,buf3, buf4, buf5
+                                       );
+
+        free (buf1);
+        free (buf2);
+        free (buf3);
+        free (buf4);
+        free (buf5);
+    } else {
+        *id = 0;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// adios_common_define_attribute is in adios_internals.c
+void FC_FUNC_(adios_define_attribute, ADIOS_DEFINE_ATTRIBUTE) 
+    (int64_t * group, const char * name
+    ,const char * path, int * type, const char * value
+    ,const char * var, int * err
+    ,int name_size, int path_size, int value_size
+    ,int var_size
+    )
+{
+    char * buf1 = 0;
+    char * buf2 = 0;
+    char * buf3 = 0;
+    char * buf4 = 0;
+
+    buf1 = futils_fstr_to_cstr (name, name_size);
+    buf2 = futils_fstr_to_cstr (path, path_size);
+    buf3 = futils_fstr_to_cstr (value, value_size);
+    buf4 = futils_fstr_to_cstr (var, var_size);
+
+    if (buf1 != 0 && buf2 != 0 && buf3 != 0 && buf4 != 0) {
+        *err = adios_common_define_attribute (*group, buf1, buf2
+                                             ,(enum ADIOS_DATATYPES) *type, buf3
+                                             ,buf4
+                                             );
+
+        free (buf1);
+        free (buf2);
+        free (buf3);
+        free (buf4);
+    } else {
+        *err = -adios_errno;
+    }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// adios_common_select_method is in adios_internals_mxml.c
+void FC_FUNC_(adios_select_method, ADIOS_SELECT_METHOD) 
+    (int64_t * group, const char * method
+    ,const char * parameters, const char * base_path
+    ,int * err, int method_size, int parameters_size
+    ,int base_path_size
+    )
+{
+    char * buf1 = 0;
+    char * buf2 = 0;
+    char * buf3 = 0;
+    buf1 = futils_fstr_to_cstr (method, method_size);
+    buf2 = futils_fstr_to_cstr (parameters, parameters_size);
+    buf3 = futils_fstr_to_cstr (base_path, base_path_size);
+
+    if (buf1 != 0 && buf2 != 0 && buf3 != 0) {
+        struct adios_group_struct * g = (struct adios_group_struct *) (* group);
+        *err = adios_common_select_method (0, buf1, buf2, g->name, buf3, 0);
+
+        free (buf1);
+        free (buf2);
+        free (buf3);
+    } else {
+        *err = -adios_errno;
+    }
+}
+
+
+
+/**************************************************************************/
+/*                  Specific function for each data type                  */
+/**************************************************************************/
+#if 0
+/* 
+    ADIOS_WRITE 
+*/
+/* scalars */
+void FC_FUNC_(adios_write_int1_d0, ADIOS_WRITE_INT1_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int2_d0, ADIOS_WRITE_INT2_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int4_d0, ADIOS_WRITE_INT4_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int8_d0, ADIOS_WRITE_INT8_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real4_d0, ADIOS_WRITE_REAL4_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real8_d0, ADIOS_WRITE_REAL8_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+//void FC_FUNC_(adios_write_char_d0, ADIOS_WRITE_CHAR_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex8_d0, ADIOS_WRITE_COMPLEX8_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex16_d0, ADIOS_WRITE_COMPLEX16_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical1_d0, ADIOS_WRITE_LOGICAL1_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical2_d0, ADIOS_WRITE_LOGICAL2_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical4_d0, ADIOS_WRITE_LOGICAL4_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical8_d0, ADIOS_WRITE_LOGICAL8_D0) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+
+
+/* 1D */
+void FC_FUNC_(adios_write_int1_d1, ADIOS_WRITE_INT1_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int2_d1, ADIOS_WRITE_INT2_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int4_d1, ADIOS_WRITE_INT4_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int8_d1, ADIOS_WRITE_INT8_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real4_d1, ADIOS_WRITE_REAL4_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real8_d1, ADIOS_WRITE_REAL8_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_char_d1, ADIOS_WRITE_CHAR_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex8_d1, ADIOS_WRITE_COMPLEX8_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex16_d1, ADIOS_WRITE_COMPLEX16_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical1_d1, ADIOS_WRITE_LOGICAL1_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical2_d1, ADIOS_WRITE_LOGICAL2_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical4_d1, ADIOS_WRITE_LOGICAL4_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical8_d1, ADIOS_WRITE_LOGICAL8_D1) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+
+
+/* 2D */
+void FC_FUNC_(adios_write_int1_d2, ADIOS_WRITE_INT1_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int2_d2, ADIOS_WRITE_INT2_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int4_d2, ADIOS_WRITE_INT4_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int8_d2, ADIOS_WRITE_INT8_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real4_d2, ADIOS_WRITE_REAL4_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real8_d2, ADIOS_WRITE_REAL8_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_char_d2, ADIOS_WRITE_CHAR_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex8_d2, ADIOS_WRITE_COMPLEX8_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex16_d2, ADIOS_WRITE_COMPLEX16_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical1_d2, ADIOS_WRITE_LOGICAL1_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical2_d2, ADIOS_WRITE_LOGICAL2_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical4_d2, ADIOS_WRITE_LOGICAL4_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical8_d2, ADIOS_WRITE_LOGICAL8_D2) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+
+
+/* 3D */
+void FC_FUNC_(adios_write_int1_d3, ADIOS_WRITE_INT1_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int2_d3, ADIOS_WRITE_INT2_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int4_d3, ADIOS_WRITE_INT4_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int8_d3, ADIOS_WRITE_INT8_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real4_d3, ADIOS_WRITE_REAL4_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real8_d3, ADIOS_WRITE_REAL8_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_char_d3, ADIOS_WRITE_CHAR_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex8_d3, ADIOS_WRITE_COMPLEX8_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex16_d3, ADIOS_WRITE_COMPLEX16_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical1_d3, ADIOS_WRITE_LOGICAL1_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical2_d3, ADIOS_WRITE_LOGICAL2_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical4_d3, ADIOS_WRITE_LOGICAL4_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical8_d3, ADIOS_WRITE_LOGICAL8_D3) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+
+
+/* 4D */
+void FC_FUNC_(adios_write_int1_d4, ADIOS_WRITE_INT1_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int2_d4, ADIOS_WRITE_INT2_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int4_d4, ADIOS_WRITE_INT4_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int8_d4, ADIOS_WRITE_INT8_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real4_d4, ADIOS_WRITE_REAL4_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real8_d4, ADIOS_WRITE_REAL8_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_char_d4, ADIOS_WRITE_CHAR_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex8_d4, ADIOS_WRITE_COMPLEX8_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex16_d4, ADIOS_WRITE_COMPLEX16_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical1_d4, ADIOS_WRITE_LOGICAL1_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical2_d4, ADIOS_WRITE_LOGICAL2_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical4_d4, ADIOS_WRITE_LOGICAL4_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical8_d4, ADIOS_WRITE_LOGICAL8_D4) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+
+
+/* 5D */
+void FC_FUNC_(adios_write_int1_d5, ADIOS_WRITE_INT1_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int2_d5, ADIOS_WRITE_INT2_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int4_d5, ADIOS_WRITE_INT4_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int8_d5, ADIOS_WRITE_INT8_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real4_d5, ADIOS_WRITE_REAL4_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real8_d5, ADIOS_WRITE_REAL8_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_char_d5, ADIOS_WRITE_CHAR_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex8_d5, ADIOS_WRITE_COMPLEX8_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex16_d5, ADIOS_WRITE_COMPLEX16_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical1_d5, ADIOS_WRITE_LOGICAL1_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical2_d5, ADIOS_WRITE_LOGICAL2_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical4_d5, ADIOS_WRITE_LOGICAL4_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical8_d5, ADIOS_WRITE_LOGICAL8_D5) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+
+
+/* 6D */
+void FC_FUNC_(adios_write_int1_d6, ADIOS_WRITE_INT1_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int2_d6, ADIOS_WRITE_INT2_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int4_d6, ADIOS_WRITE_INT4_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_int8_d6, ADIOS_WRITE_INT8_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real4_d6, ADIOS_WRITE_REAL4_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_real8_d6, ADIOS_WRITE_REAL8_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_char_d6, ADIOS_WRITE_CHAR_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex8_d6, ADIOS_WRITE_COMPLEX8_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_complex16_d6, ADIOS_WRITE_COMPLEX16_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical1_d6, ADIOS_WRITE_LOGICAL1_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical2_d6, ADIOS_WRITE_LOGICAL2_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical4_d6, ADIOS_WRITE_LOGICAL4_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+void FC_FUNC_(adios_write_logical8_d6, ADIOS_WRITE_LOGICAL8_D6) (int64_t * fd_p, const char * name, void * var, int * err, int name_size, int var_size) { FC_FUNC_(adios_write, ADIOS_WRITE) (fd_p, name, var, err, name_size, var_size); }
+
+
+
+/* 
+    ADIOS_READ 
+*/
+/* scalars */
+void FC_FUNC_(adios_read_int1_d0, ADIOS_READ_INT1_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int2_d0, ADIOS_READ_INT2_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int4_d0, ADIOS_READ_INT4_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int8_d0, ADIOS_READ_INT8_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real4_d0, ADIOS_READ_REAL4_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real8_d0, ADIOS_READ_REAL8_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+//void FC_FUNC_(adios_read_char_d0, ADIOS_READ_CHAR_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex8_d0, ADIOS_READ_COMPLEX8_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex16_d0, ADIOS_READ_COMPLEX16_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical1_d0, ADIOS_READ_LOGICAL1_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical2_d0, ADIOS_READ_LOGICAL2_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical4_d0, ADIOS_READ_LOGICAL4_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical8_d0, ADIOS_READ_LOGICAL8_D0) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+
+/* 1D */
+void FC_FUNC_(adios_read_int1_d1, ADIOS_READ_INT1_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int2_d1, ADIOS_READ_INT2_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int4_d1, ADIOS_READ_INT4_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int8_d1, ADIOS_READ_INT8_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real4_d1, ADIOS_READ_REAL4_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real8_d1, ADIOS_READ_REAL8_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_char_d1, ADIOS_READ_CHAR_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex8_d1, ADIOS_READ_COMPLEX8_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex16_d1, ADIOS_READ_COMPLEX16_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical1_d1, ADIOS_READ_LOGICAL1_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical2_d1, ADIOS_READ_LOGICAL2_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical4_d1, ADIOS_READ_LOGICAL4_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical8_d1, ADIOS_READ_LOGICAL8_D1) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+
+
+/* 2D */
+void FC_FUNC_(adios_read_int1_d2, ADIOS_READ_INT1_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int2_d2, ADIOS_READ_INT2_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int4_d2, ADIOS_READ_INT4_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int8_d2, ADIOS_READ_INT8_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real4_d2, ADIOS_READ_REAL4_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real8_d2, ADIOS_READ_REAL8_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_char_d2, ADIOS_READ_CHAR_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex8_d2, ADIOS_READ_COMPLEX8_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex16_d2, ADIOS_READ_COMPLEX16_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical1_d2, ADIOS_READ_LOGICAL1_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical2_d2, ADIOS_READ_LOGICAL2_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical4_d2, ADIOS_READ_LOGICAL4_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical8_d2, ADIOS_READ_LOGICAL8_D2) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+
+
+/* 3D */
+void FC_FUNC_(adios_read_int1_d3, ADIOS_READ_INT1_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int2_d3, ADIOS_READ_INT2_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int4_d3, ADIOS_READ_INT4_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int8_d3, ADIOS_READ_INT8_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real4_d3, ADIOS_READ_REAL4_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real8_d3, ADIOS_READ_REAL8_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_char_d3, ADIOS_READ_CHAR_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex8_d3, ADIOS_READ_COMPLEX8_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex16_d3, ADIOS_READ_COMPLEX16_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical1_d3, ADIOS_READ_LOGICAL1_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical2_d3, ADIOS_READ_LOGICAL2_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical4_d3, ADIOS_READ_LOGICAL4_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical8_d3, ADIOS_READ_LOGICAL8_D3) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+
+
+/* 4D */
+void FC_FUNC_(adios_read_int1_d4, ADIOS_READ_INT1_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int2_d4, ADIOS_READ_INT2_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int4_d4, ADIOS_READ_INT4_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int8_d4, ADIOS_READ_INT8_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real4_d4, ADIOS_READ_REAL4_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real8_d4, ADIOS_READ_REAL8_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_char_d4, ADIOS_READ_CHAR_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex8_d4, ADIOS_READ_COMPLEX8_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex16_d4, ADIOS_READ_COMPLEX16_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical1_d4, ADIOS_READ_LOGICAL1_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical2_d4, ADIOS_READ_LOGICAL2_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical4_d4, ADIOS_READ_LOGICAL4_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical8_d4, ADIOS_READ_LOGICAL8_D4) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+
+
+/* 5D */
+void FC_FUNC_(adios_read_int1_d5, ADIOS_READ_INT1_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int2_d5, ADIOS_READ_INT2_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int4_d5, ADIOS_READ_INT4_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int8_d5, ADIOS_READ_INT8_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real4_d5, ADIOS_READ_REAL4_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real8_d5, ADIOS_READ_REAL8_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_char_d5, ADIOS_READ_CHAR_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex8_d5, ADIOS_READ_COMPLEX8_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex16_d5, ADIOS_READ_COMPLEX16_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical1_d5, ADIOS_READ_LOGICAL1_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical2_d5, ADIOS_READ_LOGICAL2_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical4_d5, ADIOS_READ_LOGICAL4_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical8_d5, ADIOS_READ_LOGICAL8_D5) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+
+
+/* 6D */
+void FC_FUNC_(adios_read_int1_d6, ADIOS_READ_INT1_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int2_d6, ADIOS_READ_INT2_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int4_d6, ADIOS_READ_INT4_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_int8_d6, ADIOS_READ_INT8_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real4_d6, ADIOS_READ_REAL4_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_real8_d6, ADIOS_READ_REAL8_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_char_d6, ADIOS_READ_CHAR_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex8_d6, ADIOS_READ_COMPLEX8_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_complex16_d6, ADIOS_READ_COMPLEX16_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical1_d6, ADIOS_READ_LOGICAL1_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical2_d6, ADIOS_READ_LOGICAL2_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical4_d6, ADIOS_READ_LOGICAL4_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+void FC_FUNC_(adios_read_logical8_d6, ADIOS_READ_LOGICAL8_D6) (int64_t * fd_p, const char * name, void * buffer ,int64_t * buffer_size, int * err, int name_size) { FC_FUNC_(adios_read, ADIOS_READ) (fd_p, name, buffer, buffer_size, err, name_size); }
+
+
+#endif
+
diff --git a/src/core/adiosf_defs_mod.f90 b/src/core/adiosf_defs_mod.f90
new file mode 100644
index 0000000..4b5a9dd
--- /dev/null
+++ b/src/core/adiosf_defs_mod.f90
@@ -0,0 +1,96 @@
+!  
+!  ADIOS is freely available under the terms of the BSD license described
+!  in the COPYING file in the top level directory of this source distribution.
+!
+!  Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+!
+
+! 
+! Read Fortran 90 API for ADIOS BP format files 
+!    
+! Use this module in your source code to ensure that
+! you are calling the adios_* reading functions with
+! the correct arguments
+!
+module adios_defs_mod
+
+    !
+    ! ADIOS Data types                                   ! (size in bytes)
+    !
+    integer, parameter :: adios_unknown = -1             
+    integer, parameter :: adios_byte = 0                 ! (1) 
+    integer, parameter :: adios_short = 1                ! (2) 
+    integer, parameter :: adios_integer = 2              ! (4) 
+    integer, parameter :: adios_long = 4                 ! (8) 
+    integer, parameter :: adios_unsigned_byte = 50       ! (1) 
+    integer, parameter :: adios_unsigned_short = 51      ! (2) 
+    integer, parameter :: adios_unsigned_integer = 52    ! (4) 
+    integer, parameter :: adios_unsigned_long = 54       ! (8) 
+    integer, parameter :: adios_real = 5                 ! (4) 
+    integer, parameter :: adios_double = 6               ! (8) 
+    integer, parameter :: adios_long_double = 7          ! (16) 
+    integer, parameter :: adios_string = 9               ! C strings
+    integer, parameter :: adios_complex = 10             ! (8) 
+
+
+    !
+    ! Read methods (used in init/finalize/open calls)
+    !
+    integer, parameter :: ADIOS_READ_METHOD_BP         = 0
+    integer, parameter :: ADIOS_READ_METHOD_BP_STAGED  = 1
+    integer, parameter :: ADIOS_READ_METHOD_BP_STAGED1 = 2
+    integer, parameter :: ADIOS_READ_METHOD_DATASPACES = 3
+    integer, parameter :: ADIOS_READ_METHOD_DIMES      = 4
+    integer, parameter :: ADIOS_READ_METHOD_FLEXIO     = 5
+
+    ! 
+    ! Stream Locking modes
+    !
+    integer, parameter :: ADIOS_LOCKMODE_NONE    = 0
+    integer, parameter :: ADIOS_LOCKMODE_CURRENT = 0
+    integer, parameter :: ADIOS_LOCKMODE_ALL     = 0
+
+
+    !
+    ! ADIOS error codes
+    !
+    integer, parameter :: err_no_error                        = 0
+    integer, parameter :: err_no_memory                       = -1
+    integer, parameter :: err_file_open_error                 = -2
+    integer, parameter :: err_file_not_found                  = -3
+    integer, parameter :: err_invalid_file_pointer            = -4
+    integer, parameter :: err_invalid_group                   = -5
+    integer, parameter :: err_invalid_group_struct            = -6
+    integer, parameter :: err_invalid_varid                   = -7
+    integer, parameter :: err_invalid_varname                 = -8
+    integer, parameter :: err_corrupted_variable              = -9
+
+    integer, parameter :: err_invalid_attrid                  = -10
+    integer, parameter :: err_invalid_attrname                = -11
+    integer, parameter :: err_corrupted_attribute             = -12
+    integer, parameter :: err_invalid_attribute_reference     = -13
+    integer, parameter :: err_invalid_timestep                = -14
+    integer, parameter :: err_no_data_at_timestep             = -15
+    integer, parameter :: err_time_at_wrong_dimension         = -16
+    integer, parameter :: err_invalid_read_method             = -17
+    integer, parameter :: err_connection_failed               = -18
+    integer, parameter :: err_out_of_bound                    = -19
+
+    ! Stream reading specific errors
+    integer, parameter :: err_operation_not_supported         = -20
+    integer, parameter :: err_end_of_stream                   = -21
+    integer, parameter :: err_step_notready                   = -22
+    integer, parameter :: err_step_disappeared                = -23
+    integer, parameter :: err_too_many_files                  = -24
+
+    ! Write method errors
+    integer, parameter :: err_invalid_file_mode               = -100
+    integer, parameter :: err_invalid_file_version            = -101
+    integer, parameter :: err_invalid_data                    = -102
+    integer, parameter :: err_buffer_overflow                 = -103
+    integer, parameter :: err_too_many_variables              = -104
+    integer, parameter :: err_invalid_write_method            = -105
+    integer, parameter :: err_unspecified                     = -200
+
+
+end module adios_defs_mod
diff --git a/src/core/adiosf_read.c b/src/core/adiosf_read.c
new file mode 100644
index 0000000..b971d72
--- /dev/null
+++ b/src/core/adiosf_read.c
@@ -0,0 +1,721 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#include "../config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define __INCLUDED_FROM_FORTRAN_API__
+#include "public/adios_read.h"
+#include "public/adios_error.h"
+//#include "core/bp_utils.h" // bp_get_type_size
+//#include "core/bp_types.h"
+#include "core/common_read.h"
+#include "core/futils.h"
+#define BYTE_ALIGN 8
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+#ifdef __cplusplus
+extern "C"  /* prevent C++ name mangling */
+#endif
+
+extern int adios_errno;
+
+#define PRINT_ERRMSG() fprintf(stderr, "ADIOS READ ERROR: %s\n", adios_get_last_errmsg())
+
+/*********************/
+/* FORTRAN INTERFACE */
+/*********************/
+void FC_FUNC_(adios_errmsg, adios_errmsg) (char *msg, int msg_len)
+{
+    futils_cstr_to_fstr( adios_get_last_errmsg(), (char *)msg, msg_len);
+}
+
+void FC_FUNC_(adios_read_init_method, ADIOS_READ_INIT_METHOD) (
+        int *fmethod, int * fcomm, char * parameters, int * err, int parameters_len)
+{
+    MPI_Comm comm = MPI_Comm_f2c (*((int *) fcomm));
+    enum ADIOS_READ_METHOD method = (enum ADIOS_READ_METHOD) *fmethod;
+    char *paramstr;
+    futils_called_from_fortran_set();
+
+    paramstr = futils_fstr_to_cstr(parameters, parameters_len);
+    *err = common_read_init_method (method, comm, paramstr);
+    free(paramstr);
+    if (*err)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_read_finalize_method, ADIOS_READ_FINALIZE_METHOD) (int *fmethod, int * err)
+{
+    enum ADIOS_READ_METHOD method = (enum ADIOS_READ_METHOD) *fmethod;
+    *err = common_read_finalize_method (method);
+    futils_called_from_fortran_unset();
+    if (*err)
+        PRINT_ERRMSG();
+}
+
+
+void FC_FUNC_(adios_read_open_stream, ADIOS_READ_OPEN_STREAM)
+        (int64_t * fp,
+         char    * fname,
+         int     * fmethod,
+         int     * fcomm,
+         int     * lockmode,
+         float   * timeout_sec,
+         int     * err,
+         int       fname_len)
+{
+    ADIOS_FILE *afp;
+    char *namestr;
+    enum ADIOS_READ_METHOD method = (enum ADIOS_READ_METHOD) *fmethod;
+    enum ADIOS_LOCKMODE lockm = (enum ADIOS_LOCKMODE) *lockmode;
+    MPI_Comm comm = MPI_Comm_f2c (*((int *) fcomm));
+    futils_called_from_fortran_set();
+
+    namestr = futils_fstr_to_cstr(fname, fname_len);
+    if (namestr != NULL) {
+        afp = common_read_open_stream (namestr, method, comm, lockm, *timeout_sec);
+        *fp = (int64_t) afp;
+        free(namestr);
+    } else {
+        *fp = (int64_t) NULL;
+    }
+    *err = adios_errno;
+    if (*err)
+        PRINT_ERRMSG();
+}
+
+
+void FC_FUNC_(adios_read_open_file, ADIOS_READ_OPEN_FILE)
+        (int64_t * fp,
+         char    * fname,
+         int     * fmethod,
+         int     * fcomm,
+         int     * err,
+         int       fname_len)
+{
+    ADIOS_FILE *afp;
+    char *namestr;
+    enum ADIOS_READ_METHOD method = (enum ADIOS_READ_METHOD) *fmethod;
+    MPI_Comm comm = MPI_Comm_f2c (*((int *) fcomm));
+    futils_called_from_fortran_set();
+
+    namestr = futils_fstr_to_cstr(fname, fname_len);
+    if (namestr != NULL) {
+        afp = common_read_open_file (namestr, method, comm);
+        *fp = (int64_t) afp;
+        free(namestr);
+    } else {
+        *fp = (int64_t) NULL;
+    }
+    *err = adios_errno;
+    if (*err)
+        PRINT_ERRMSG();
+}
+
+
+int FC_FUNC_(adios_advance_step, ADIOS_ADVANCE_STEP) 
+        (int64_t *fp, int *last, float *timeout_sec, int *err)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    *err = common_read_advance_step (afp, *last, *timeout_sec);
+    if (*err)
+        PRINT_ERRMSG();
+}
+
+
+void FC_FUNC_(adios_release_step, ADIOS_RELEASE_STEP) (int64_t *fp, int *err)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    common_read_release_step (afp);
+    *err = adios_errno;
+    if (*err)
+        PRINT_ERRMSG();
+}
+
+
+void FC_FUNC_(adios_reset_dimension_order, ADIOS_RESET_DIMENSION_ORDER)
+        (int64_t * fp, int * flag)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    common_read_reset_dimension_order(afp, *flag);
+    if (adios_errno)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_read_close, ADIOS_READ_CLOSE) (int64_t * fp, int * err)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    *err = common_read_close (afp);
+    futils_called_from_fortran_unset();
+    if (*err)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_inq_ngroups, ADIOS_INQ_NGROUPS) 
+        (int64_t * fp, int * groups_count, int * err)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    if (afp != NULL) {
+        char ** group_namelist;
+        *groups_count = common_read_get_grouplist (afp, &group_namelist);
+        *err = adios_errno;
+        if (*err)
+            PRINT_ERRMSG();
+    } else {
+        *groups_count = 0;
+        *err = 1;
+    }
+}
+
+void FC_FUNC_(adios_inq_groupnames, ADIOS_INQ_GROUPNAMES)
+        (int64_t * fp, void * gnamelist, int * err, int gnamelist_len)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    adios_errno = err_no_error;
+    if (afp != NULL) {
+        char ** group_namelist;
+        int ngroups = common_read_get_grouplist (afp, &group_namelist);
+        int i;
+        for (i=0;i<ngroups;i++) {
+            futils_cstr_to_fstr( group_namelist[i], (char *)gnamelist+i*gnamelist_len, gnamelist_len);
+        }
+        *err = adios_errno;
+        if (*err)
+            PRINT_ERRMSG();
+    } else {
+        *err = 1;
+    }
+}
+
+void FC_FUNC_(adios_group_view, ADIOS_GROUP_VIEW) 
+        (int64_t * fp, int * groupid, int * err)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    if (afp != NULL) {
+        *err = common_read_group_view (afp, *groupid);
+        if (*err)
+            PRINT_ERRMSG();
+    } else {
+        *err = 1;
+    }
+}
+
+void FC_FUNC_(adios_inq_file, ADIOS_INQ_FILE) 
+        (int64_t * fp,
+         int     * vars_count,
+         int     * attrs_count,
+         int     * current_step,
+         int     * last_step,
+         int     * err)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    int i;
+    if (afp != NULL) {
+        *vars_count = afp->nvars;
+        *attrs_count = afp->nattrs;
+        *current_step = afp->current_step;
+        *last_step = afp->last_step;
+        *err = 0;
+    } else {
+        *vars_count = 0;
+        *attrs_count = 0;
+        *current_step = 0;
+        *last_step = 0;
+        *err = 1;
+    }
+}
+
+void FC_FUNC_(adios_inq_varnames, ADIOS_INQ_VARNAMES)
+        (int64_t * fp, void * vnamelist, int * err, int vnamelist_len)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    int i;
+    if (afp != NULL) {
+        for (i=0;i<afp->nvars;i++) {
+            futils_cstr_to_fstr( afp->var_namelist[i], (char *)vnamelist+i*vnamelist_len, vnamelist_len);
+        }
+        *err = 0;
+    } else {
+        *err = 1;
+    }
+}
+
+void FC_FUNC_(adios_inq_attrnames, ADIOS_INQ_ATTRNAMES)
+        (int64_t * fp, void * anamelist, int * err, int anamelist_len)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    int i;
+    if (afp != NULL) {
+        for (i=0;i<afp->nattrs;i++) {
+            futils_cstr_to_fstr( afp->attr_namelist[i], (char *)anamelist+i*anamelist_len, anamelist_len);
+        }
+        *err = 0;
+    } else {
+        *err = 1;
+    }
+}
+
+void FC_FUNC_(adios_inq_var, ADIOS_INQ_VAR) 
+        (int64_t  * fp, 
+         char     * varname,
+         int      * type,
+         int      * nsteps,
+         int      * ndim,
+         uint64_t * dims,
+         int      * err,
+         int        varname_len)
+{
+    char *varstr;
+    int  i;
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    ADIOS_VARINFO *vi = NULL;
+
+    varstr = futils_fstr_to_cstr(varname, varname_len);
+    if (varstr != NULL) {
+        vi = common_read_inq_var (afp, varstr);
+        free(varstr);
+    }
+    if (vi != NULL) {
+        *type = vi->type;
+        *nsteps = vi->nsteps;
+        *ndim = vi->ndim;
+        for (i=0;i<vi->ndim;i++)
+            dims[i] = vi->dims[i];
+        common_read_free_varinfo(vi);
+    } else {
+        *type = adios_unknown;
+        *ndim = 0;
+        *nsteps = 0;
+    }
+    *err = adios_errno;
+    if (*err < 0)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) 
+        (int64_t  * fp,
+         char     * varname,
+         void     * data,
+         int      * err,
+         int varname_len)
+{
+    char *varstr;
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    ADIOS_VARINFO *vi = NULL;
+
+    varstr = futils_fstr_to_cstr(varname, varname_len);
+    if (varstr != NULL) {
+        vi = common_read_inq_var (afp, varstr);
+        free(varstr);
+    }
+    if (vi != NULL && vi->value != NULL) {
+        int size = bp_get_type_size(vi->type, vi->value);
+        memcpy(data, vi->value, size);
+        common_read_free_varinfo(vi);
+    } else {
+        *err = adios_errno;
+    }
+    *err = adios_errno;
+    if (*err < 0)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) 
+        (int64_t  * fp,
+         int64_t  * fsel,
+         char     * varname,
+         int      * from_step,
+         int      * nsteps,
+         void     * data,
+         int      * err,
+         int varname_len)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    ADIOS_SELECTION * sel = (ADIOS_SELECTION *) *fsel;
+    char *varstr;
+    int i;
+    varstr = futils_fstr_to_cstr(varname, varname_len);
+    if (varstr != NULL) {
+        *err = common_read_schedule_read (afp, sel, varstr, *from_step, *nsteps, data);
+        free(varstr);
+    } else {
+        *err = adios_errno;
+    }
+    if (*err < 0)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_schedule_read_f2c, ADIOS_SCHEDULE_READ_F2C) (int64_t * fp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (fp,fsel,varname,from_step,nsteps,data,err,varname_len); }
+
+void FC_FUNC_(adios_perform_reads, ADIOS_PERFORM_READS) 
+        (int64_t * fp,
+         int     * err)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    *err = common_read_perform_reads (afp, 1); // only blocking read implemented for Fortran
+    if (*err < 0)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) 
+        (int64_t * gp,
+         char    * varname,
+         void    * value,
+         void    * gmin,
+         void    * gmax,
+         double  * gavg,
+         double  * gstd_dev,
+         void   ** mins,
+         void   ** maxs,
+         double ** avgs,
+         double ** std_devs,
+         int     * err,
+         int       varname_len)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
+    ADIOS_VARINFO *vi = NULL;
+    char *varstr;
+    int i, size;
+
+    varstr = futils_fstr_to_cstr(varname, varname_len);
+    if (varstr != NULL) {
+        /* First get the number of dimensions of the variable */
+        vi = common_read_inq_var (afp, varstr);
+        free(varstr);
+    }
+    if (vi != NULL) {
+        size = bp_get_type_size(vi->type, vi->value);
+        // get statistics information per each step
+        common_read_inq_var_stat (afp, vi, 1, 0); 
+        if (vi->type == adios_string) size++;
+        if (vi->value) memcpy(value, vi->value, size);
+
+        if (vi->statistics) {
+            if (vi->type == adios_complex || vi->type == adios_double_complex) {
+                /* For complex numbers, the statistics in ADIOS_VARINFO, like 
+                   gmin, gavg, std_devs etc, are of base type double. They also 
+                   have an additional dimension that stores the statistics for 
+                   the magnitude, the real part, and the imaginary part of the 
+                   complex number, individually. For example, gmin[0] holds the 
+                   overall minimum value of the magnitude of the complex numbers. 
+                   gmin[1] and gmin [2] contain the global minimums for the real 
+                   and the imaginary parts, respectively. 
+                 */
+                if (vi->statistics->min) 
+                    memcpy((char *) gmin, (char *) vi->statistics->min, 3*size);
+                if (vi->statistics->max) 
+                    memcpy(((char *) gmax), (char *) vi->statistics->max, 3*size);
+                if (vi->statistics->avg) 
+                    memcpy(gavg, vi->statistics->avg, 3*sizeof(double));
+                if (vi->statistics->std_dev) 
+                    memcpy(gstd_dev, vi->statistics->std_dev, 3*sizeof(double));
+
+                /* FIXME: I do not know if mins is **void and mins[i] is a void * allocated
+                   separately, or mins is a continuous array now.
+                   Copy content accordingly back to the Fortran client.
+                */
+                int c;
+                double ** v_mins = NULL;
+                double ** v_maxs = NULL;
+                double ** v_avgs = NULL;
+                double ** v_std_devs = NULL;
+                if (vi->statistics->steps) {
+                    v_mins = (double **) vi->statistics->steps->mins;
+                    v_maxs = (double **) vi->statistics->steps->maxs;
+                    v_avgs = (double **) vi->statistics->steps->avgs;
+                    v_std_devs = (double **) vi->statistics->steps->std_devs;
+                }
+
+                for (c = 0; c < 3; c ++)
+                {
+                    if (v_mins && v_mins[c]) memcpy(((double **) mins)[c], v_mins[c], vi->nsteps * size);
+                    if (v_maxs && v_maxs[c]) memcpy(((double **) maxs)[c], v_maxs[c], vi->nsteps * size);
+                    if (v_avgs && v_avgs[c]) memcpy(avgs[c], v_avgs[c], vi->nsteps * sizeof(double));
+                    if (v_std_devs && v_std_devs[c]) memcpy(std_devs[c], v_std_devs[c], vi->nsteps * sizeof(double));
+                }
+
+            } else {
+                if (vi->statistics->min) 
+                    memcpy((char *) gmin, (char *) vi->statistics->min, size);
+                if (vi->statistics->max) 
+                    memcpy((char *) gmax, (char *) vi->statistics->max, size);
+                if (vi->statistics->avg) 
+                    memcpy(gavg, vi->statistics->avg, sizeof(double));
+                if (vi->statistics->std_dev) 
+                    memcpy(gstd_dev, vi->statistics->std_dev, sizeof(double));
+
+                if (vi->statistics->steps) {
+                    if (vi->statistics->steps->mins) 
+                        memcpy((char *) mins, (char *) vi->statistics->steps->mins, vi->nsteps * size);
+                    if (vi->statistics->steps->maxs) 
+                        memcpy((char *) maxs, (char *) vi->statistics->steps->maxs, vi->nsteps * size);
+                    if (vi->statistics->steps->avgs) 
+                        memcpy(avgs, vi->statistics->steps->avgs, vi->nsteps * sizeof(double));
+                    if (vi->statistics->steps->std_devs) 
+                        memcpy(std_devs, vi->statistics->steps->std_devs, vi->nsteps * sizeof(double));
+                }
+            }
+        }
+        common_read_free_varinfo(vi);
+    }
+    *err = adios_errno;
+    if (*err < 0)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) 
+        (int64_t * gp,
+         char    * attrname,
+         void    * attr,
+         int     * err,
+         int       attrname_len)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
+    char *attrstr;
+    int i;
+    void *data;
+    int size;
+    enum ADIOS_DATATYPES type;
+    attrstr = futils_fstr_to_cstr(attrname, attrname_len);
+    if (attrstr != NULL) {
+        *err = common_read_get_attr (afp, attrstr, &type, &size, &data);
+        if (data) {
+            memcpy(attr, data, size);
+            free(data);
+        }
+        free(attrstr);
+    } else {
+        *err = adios_errno;
+    }
+    if (*err < 0)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_inq_attr, ADIOS_INQ_ATTR) 
+        (int64_t * gp,
+         char    * attrname,
+         int     * type,
+         int     * size,
+         int     * err,
+         int       attrname_len)
+{
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
+    char *attrstr;
+    int i;
+    void *data;
+    attrstr = futils_fstr_to_cstr(attrname, attrname_len);
+    if (attrstr != NULL) {
+        *err = common_read_get_attr (afp, attrstr, (enum ADIOS_DATATYPES *)type, size, &data);
+        free(data);
+        free(attrstr);
+    } else {
+        *err = adios_errno;
+    }
+    if (*err < 0)
+        PRINT_ERRMSG();
+}
+
+void FC_FUNC_(adios_selection_boundingbox, ADIOS_SELECTION_BOUNDINGBOX) 
+           (int64_t * fsel, uint64_t *ndim, uint64_t *start, uint64_t *count)
+{   
+    ADIOS_SELECTION * sel = common_read_selection_boundingbox (*ndim, start, count);
+    *fsel = (int64_t) sel;
+}
+
+void FC_FUNC_(adios_selection_points, ADIOS_SELECTION_POINTS) 
+            (int64_t *fsel, uint64_t *ndim, uint64_t *npoints, uint64_t *points)
+{
+    ADIOS_SELECTION * sel = common_read_selection_points (*ndim, *npoints, points);
+    *fsel = (int64_t) sel;
+}
+
+void FC_FUNC_(adios_selection_writeblock, ADIOS_SELECTION_WRITEBLOCK) (int64_t *fsel, int *index)
+{
+    ADIOS_SELECTION * sel = common_read_selection_writeblock (*index);
+    *fsel = (int64_t) sel;
+}
+
+void FC_FUNC_(adios_selection_auto, ADIOS_SELECTION_AUTO) (int64_t *fsel, char *hints, int hints_len)
+{
+    char *hintstr = futils_fstr_to_cstr(hints, hints_len);
+    ADIOS_SELECTION * sel = common_read_selection_auto (hintstr);
+    *fsel = (int64_t) sel;
+    free (hintstr);
+}
+
+void FC_FUNC_(adios_selection_delete, ADIOS_SELECTION_AUTO) (int64_t *fsel)
+{
+    ADIOS_SELECTION * sel = (ADIOS_SELECTION *) *fsel;
+    common_read_selection_delete (sel);
+    *fsel = 0;
+}
+
+
+/**************************************************************************/
+/*                  Specific function for each data type                  */
+/**************************************************************************/
+
+/* ADIOS_GET_SCALAR */
+void FC_FUNC_(adios_get_scalar_int1, ADIOS_GET_SCALAR_INT1)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_int2, ADIOS_GET_SCALAR_INT2)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_int4, ADIOS_GET_SCALAR_INT4)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_int8, ADIOS_GET_SCALAR_INT8)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_real4, ADIOS_GET_SCALAR_REAL4)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_real8, ADIOS_GET_SCALAR_REAL8)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_char, ADIOS_GET_SCALAR_CHAR)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_complex8, ADIOS_GET_SCALAR_COMPLEX8)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_complex16, ADIOS_GET_SCALAR_COMPLEX16)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_logical1, ADIOS_GET_SCALAR_LOGICAL1)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_logical2, ADIOS_GET_SCALAR_LOGICAL2)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_logical4, ADIOS_GET_SCALAR_LOGICAL4)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+void FC_FUNC_(adios_get_scalar_logical8, ADIOS_GET_SCALAR_LOGICAL8)  (int64_t * fp, char * varname, void * data, int * err, int varname_len) { FC_FUNC_(adios_get_scalar, ADIOS_GET_SCALAR) (fp, varname, data, err, varname_len); }
+
+/* ADIOS_SCHEDULE_READ */
+/* scalars */
+#if 0
+void FC_FUNC_(adios_schedule_read_int1_d0, ADIOS_SCHEDULE_READ_INT1_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int2_d0, ADIOS_SCHEDULE_READ_INT2_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int4_d0, ADIOS_SCHEDULE_READ_INT4_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int8_d0, ADIOS_SCHEDULE_READ_INT8_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real4_d0, ADIOS_SCHEDULE_READ_REAL4_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real8_d0, ADIOS_SCHEDULE_READ_REAL8_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+//void FC_FUNC_(adios_schedule_read_char_d0, ADIOS_SCHEDULE_READ_CHAR_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex8_d0, ADIOS_SCHEDULE_READ_COMPLEX8_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex16_d0, ADIOS_SCHEDULE_READ_COMPLEX16_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical1_d0, ADIOS_SCHEDULE_READ_LOGICAL1_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical2_d0, ADIOS_SCHEDULE_READ_LOGICAL2_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical4_d0, ADIOS_SCHEDULE_READ_LOGICAL4_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical8_d0, ADIOS_SCHEDULE_READ_LOGICAL8_D0) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+
+/* 1D */
+void FC_FUNC_(adios_schedule_read_int1_d1, ADIOS_SCHEDULE_READ_INT1_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int2_d1, ADIOS_SCHEDULE_READ_INT2_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int4_d1, ADIOS_SCHEDULE_READ_INT4_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int8_d1, ADIOS_SCHEDULE_READ_INT8_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real4_d1, ADIOS_SCHEDULE_READ_REAL4_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real8_d1, ADIOS_SCHEDULE_READ_REAL8_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_char_d1, ADIOS_SCHEDULE_READ_CHAR_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex8_d1, ADIOS_SCHEDULE_READ_COMPLEX8_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex16_d1, ADIOS_SCHEDULE_READ_COMPLEX16_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical1_d1, ADIOS_SCHEDULE_READ_LOGICAL1_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical2_d1, ADIOS_SCHEDULE_READ_LOGICAL2_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical4_d1, ADIOS_SCHEDULE_READ_LOGICAL4_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical8_d1, ADIOS_SCHEDULE_READ_LOGICAL8_D1) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+
+/* 2D */
+void FC_FUNC_(adios_schedule_read_int1_d2, ADIOS_SCHEDULE_READ_INT1_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int2_d2, ADIOS_SCHEDULE_READ_INT2_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int4_d2, ADIOS_SCHEDULE_READ_INT4_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int8_d2, ADIOS_SCHEDULE_READ_INT8_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real4_d2, ADIOS_SCHEDULE_READ_REAL4_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real8_d2, ADIOS_SCHEDULE_READ_REAL8_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_char_d2, ADIOS_SCHEDULE_READ_CHAR_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex8_d2, ADIOS_SCHEDULE_READ_COMPLEX8_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex16_d2, ADIOS_SCHEDULE_READ_COMPLEX16_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical1_d2, ADIOS_SCHEDULE_READ_LOGICAL1_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical2_d2, ADIOS_SCHEDULE_READ_LOGICAL2_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical4_d2, ADIOS_SCHEDULE_READ_LOGICAL4_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical8_d2, ADIOS_SCHEDULE_READ_LOGICAL8_D2) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+
+/* 3D */
+void FC_FUNC_(adios_schedule_read_int1_d3, ADIOS_SCHEDULE_READ_INT1_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int2_d3, ADIOS_SCHEDULE_READ_INT2_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int4_d3, ADIOS_SCHEDULE_READ_INT4_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int8_d3, ADIOS_SCHEDULE_READ_INT8_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real4_d3, ADIOS_SCHEDULE_READ_REAL4_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real8_d3, ADIOS_SCHEDULE_READ_REAL8_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_char_d3, ADIOS_SCHEDULE_READ_CHAR_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex8_d3, ADIOS_SCHEDULE_READ_COMPLEX8_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex16_d3, ADIOS_SCHEDULE_READ_COMPLEX16_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical1_d3, ADIOS_SCHEDULE_READ_LOGICAL1_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical2_d3, ADIOS_SCHEDULE_READ_LOGICAL2_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical4_d3, ADIOS_SCHEDULE_READ_LOGICAL4_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical8_d3, ADIOS_SCHEDULE_READ_LOGICAL8_D3) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+
+/* 4D */
+void FC_FUNC_(adios_schedule_read_int1_d4, ADIOS_SCHEDULE_READ_INT1_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int2_d4, ADIOS_SCHEDULE_READ_INT2_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int4_d4, ADIOS_SCHEDULE_READ_INT4_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int8_d4, ADIOS_SCHEDULE_READ_INT8_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real4_d4, ADIOS_SCHEDULE_READ_REAL4_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real8_d4, ADIOS_SCHEDULE_READ_REAL8_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_char_d4, ADIOS_SCHEDULE_READ_CHAR_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex8_d4, ADIOS_SCHEDULE_READ_COMPLEX8_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex16_d4, ADIOS_SCHEDULE_READ_COMPLEX16_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical1_d4, ADIOS_SCHEDULE_READ_LOGICAL1_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical2_d4, ADIOS_SCHEDULE_READ_LOGICAL2_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical4_d4, ADIOS_SCHEDULE_READ_LOGICAL4_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical8_d4, ADIOS_SCHEDULE_READ_LOGICAL8_D4) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+
+/* 5D */
+void FC_FUNC_(adios_schedule_read_int1_d5, ADIOS_SCHEDULE_READ_INT1_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int2_d5, ADIOS_SCHEDULE_READ_INT2_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int4_d5, ADIOS_SCHEDULE_READ_INT4_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int8_d5, ADIOS_SCHEDULE_READ_INT8_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real4_d5, ADIOS_SCHEDULE_READ_REAL4_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real8_d5, ADIOS_SCHEDULE_READ_REAL8_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_char_d5, ADIOS_SCHEDULE_READ_CHAR_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex8_d5, ADIOS_SCHEDULE_READ_COMPLEX8_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex16_d5, ADIOS_SCHEDULE_READ_COMPLEX16_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical1_d5, ADIOS_SCHEDULE_READ_LOGICAL1_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical2_d5, ADIOS_SCHEDULE_READ_LOGICAL2_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical4_d5, ADIOS_SCHEDULE_READ_LOGICAL4_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical8_d5, ADIOS_SCHEDULE_READ_LOGICAL8_D5) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+
+/* 6D */
+void FC_FUNC_(adios_schedule_read_int1_d6, ADIOS_SCHEDULE_READ_INT1_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int2_d6, ADIOS_SCHEDULE_READ_INT2_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int4_d6, ADIOS_SCHEDULE_READ_INT4_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_int8_d6, ADIOS_SCHEDULE_READ_INT8_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real4_d6, ADIOS_SCHEDULE_READ_REAL4_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_real8_d6, ADIOS_SCHEDULE_READ_REAL8_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_char_d6, ADIOS_SCHEDULE_READ_CHAR_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex8_d6, ADIOS_SCHEDULE_READ_COMPLEX8_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_complex16_d6, ADIOS_SCHEDULE_READ_COMPLEX16_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical1_d6, ADIOS_SCHEDULE_READ_LOGICAL1_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical2_d6, ADIOS_SCHEDULE_READ_LOGICAL2_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical4_d6, ADIOS_SCHEDULE_READ_LOGICAL4_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+void FC_FUNC_(adios_schedule_read_logical8_d6, ADIOS_SCHEDULE_READ_LOGICAL8_D6) (int64_t * gp, int64_t * fsel, char * varname, int * from_step, int * nsteps, void * data, int * err, int varname_len) { FC_FUNC_(adios_schedule_read, ADIOS_SCHEDULE_READ) (gp, fsel, varname, from_step, nsteps, data, err, varname_len); }
+#endif
+
+/* ADIOS_GET_STATISTICS */
+void FC_FUNC_(adios_get_statistics_int1, ADIOS_GET_STATISTICS_INT1) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_int2, ADIOS_GET_STATISTICS_INT2) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_int4, ADIOS_GET_STATISTICS_INT4) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_int8, ADIOS_GET_STATISTICS_INT8) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_real4, ADIOS_GET_STATISTICS_REAL4) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_real8, ADIOS_GET_STATISTICS_REAL8) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_complex8, ADIOS_GET_STATISTICS_COMPLEX8) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_complex16, ADIOS_GET_STATISTICS_COMPLEX16) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_char, ADIOS_GET_STATISTICS_CHAR) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_logical1, ADIOS_GET_STATISTICS_LOGICAL1) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_logical2, ADIOS_GET_STATISTICS_LOGICAL2) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_logical4, ADIOS_GET_STATISTICS_LOGICAL4) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+void FC_FUNC_(adios_get_statistics_logical8, ADIOS_GET_STATISTICS_LOGICAL8) (int64_t * gp, char * varname, void * value, void * gmin, void * gmax, void * gavg, void * gstd_dev, void * mins, void * maxs, void * avgs, void * std_devs, int * err, int varname_len) { FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS) (gp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err, varname_len); }
+
+
+/* ADIOS_GET_ATTR */
+void FC_FUNC_(adios_get_attr_int1, ADIOS_GET_ATTR_INT1) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_int2, ADIOS_GET_ATTR_INT2) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_int4, ADIOS_GET_ATTR_INT4) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_int8, ADIOS_GET_ATTR_INT8) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_real4, ADIOS_GET_ATTR_REAL4) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_real8, ADIOS_GET_ATTR_REAL8) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_complex8, ADIOS_GET_ATTR_COMPLEX8) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_complex16, ADIOS_GET_ATTR_COMPLEX16) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_char, ADIOS_GET_ATTR_CHAR) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len, int attr_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_logical1, ADIOS_GET_ATTR_LOGICAL1) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_logical2, ADIOS_GET_ATTR_LOGICAL2) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_logical4, ADIOS_GET_ATTR_LOGICAL4) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+void FC_FUNC_(adios_get_attr_logical8, ADIOS_GET_ATTR_LOGICAL8) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+
+
diff --git a/src/core/adiosf_read_mod.f90 b/src/core/adiosf_read_mod.f90
new file mode 100644
index 0000000..6cb2efb
--- /dev/null
+++ b/src/core/adiosf_read_mod.f90
@@ -0,0 +1,2086 @@
+!  
+!  ADIOS is freely available under the terms of the BSD license described
+!  in the COPYING file in the top level directory of this source distribution.
+!
+!  Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+!
+
+! 
+! Read Fortran 90 API for ADIOS BP format files 
+!    
+! Use this module in your source code to ensure that
+! you are calling the adios_* reading functions with
+! the correct arguments
+!
+module adios_read_mod
+
+    use adios_defs_mod 
+
+    interface
+
+        subroutine adios_errmsg (msg)
+            implicit none
+            character(*),   intent(out) :: msg
+        end subroutine
+
+        subroutine adios_read_init_method (method, comm, parameters, err)
+            implicit none
+            integer,        intent(in)  :: method
+            integer,        intent(in)  :: comm
+            character(*),   intent(in)  :: parameters
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_read_finalize_method (method, err)
+            implicit none
+            integer,        intent(in)  :: method
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_read_open_stream (fp, fname, method, comm, lockmode, timeout_sec, err)
+            implicit none
+            integer*8,      intent(out) :: fp
+            character(*),   intent(in)  :: fname
+            integer,        intent(in)  :: method
+            integer,        intent(in)  :: comm
+            integer,        intent(in)  :: lockmode
+            real,           intent(in)  :: timeout_sec
+            integer,        intent(out) :: err
+        end subroutine
+        
+        subroutine adios_read_open_file (fp, fname, method, comm, err)
+            implicit none
+            integer*8,      intent(out) :: fp
+            character(*),   intent(in)  :: fname
+            integer,        intent(in)  :: method
+            integer,        intent(in)  :: comm
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_advance_step (fp, last, timeout_sec, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer,        intent(in)  :: last
+            real,           intent(in)  :: timeout_sec
+            integer,        intent(out) :: err
+        end subroutine
+        
+        subroutine adios_release_step (fp, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer,        intent(out) :: err
+        end subroutine
+        
+        subroutine adios_reset_dimension_order (fp, flag)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer,        intent(in)  :: flag
+        end subroutine
+
+        subroutine adios_read_close (fp, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_inq_ngroups (fp, groups_count, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer,        intent(out) :: groups_count
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_inq_groupnames (fp, gnamelist, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*), dimension(*), intent(inout) :: gnamelist
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_group_view (fp, groupid, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer,        intent(in)  :: groupid
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_inq_file (fp, vars_count, attrs_count, current_step, last_step, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer,        intent(out) :: vars_count
+            integer,        intent(out) :: attrs_count
+            integer,        intent(out) :: current_step
+            integer,        intent(out) :: last_step
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_inq_varnames (fp, vnamelist, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*), dimension(*), intent(inout) :: vnamelist
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_inq_attrnames (fp, anamelist, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*), dimension(*), intent(inout) :: anamelist
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_inq_var (fp, varname, vartype, nsteps, ndim, dims, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            integer,        intent(out) :: vartype 
+            integer,        intent(out) :: nsteps 
+            integer,        intent(out) :: ndim
+            integer*8, dimension(*), intent(out) :: dims
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_inq_attr (fp, attrname, attrtype, attrsize, err)
+            implicit none
+            integer*8,      intent(in) :: fp
+            character(*),   intent(in)  :: attrname
+            integer,        intent(out) :: attrtype 
+            integer,        intent(out) :: attrsize 
+            integer,        intent(out) :: err 
+        end subroutine
+
+        subroutine adios_perform_reads (fp, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_selection_boundingbox (sel, ndim, start, count)
+            implicit none
+            integer*8,      intent(out)          :: sel
+            integer,        intent(in)           :: ndim
+            integer*8, dimension(*), intent(in)  :: start
+            integer*8, dimension(*), intent(in)  :: count
+        end subroutine
+
+        subroutine adios_selection_points (sel, ndim, npoints, points)
+            implicit none
+            integer*8,      intent(out)          :: sel
+            integer,        intent(in)           :: ndim
+            integer*8,      intent(in)           :: npoints
+            integer*8, dimension(*), intent(in)  :: points
+        end subroutine
+
+        subroutine adios_selection_writeblock (sel, index)
+            implicit none
+            integer*8,      intent(out)          :: sel
+            integer,        intent(in)           :: index
+        end subroutine
+
+        subroutine adios_selection_auto (sel, hints)
+            implicit none
+            integer*8,      intent(out)          :: sel
+            character(*),   intent(in)           :: hints
+        end subroutine
+
+        subroutine adios_selection_delete (sel)
+            implicit none
+            integer*8,      intent(in)           :: sel
+        end subroutine
+
+    end interface
+
+    !
+    ! ADIOS_GET_SCALAR generic interface 
+    !
+    ! Usage: call adios_get_scalar (gp, varname, data, err)
+    !
+    interface adios_get_scalar
+
+        ! INTEGER*1 scalar
+        subroutine adios_get_scalar_int1 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            integer*1,      intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! INTEGER*2 scalar
+        subroutine adios_get_scalar_int2 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            integer*2,      intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! INTEGER*4 scalar
+        subroutine adios_get_scalar_int4 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            integer*4,      intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! INTEGER*8 scalar
+        subroutine adios_get_scalar_int8 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            integer*8,      intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! REAL*4 scalar
+        subroutine adios_get_scalar_real4 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            real*4,         intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! REAL*8 scalar
+        subroutine adios_get_scalar_real8 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            real*8,         intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! COMPLEX*8 scalar
+        subroutine adios_get_scalar_complex8 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            complex*8,      intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! COMPLEX*16 scalar
+        subroutine adios_get_scalar_complex16 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            complex*16,     intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! CHARACTER(*) string
+        subroutine adios_get_scalar_char (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            character(*),   intent(inout) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! LOGICAL*1 scalar
+        subroutine adios_get_scalar_logical1 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            logical*1,      intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! LOGICAL*2 scalar
+        subroutine adios_get_scalar_logical2 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            logical*2,      intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! LOGICAL*4 scalar
+        subroutine adios_get_scalar_logical4 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            logical*4,      intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+        ! LOGICAL*8 scalar
+        subroutine adios_get_scalar_logical8 (fp, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            logical*8,      intent(out) :: data
+            integer,        intent(out) :: err
+        end subroutine
+
+    end interface
+
+    !
+    ! ADIOS_GET_ATTR generic interface 
+    !
+    ! Usage: call adios_get_attr (fp, varname, attr, err)
+    !
+    interface adios_get_attr
+
+        ! INTEGER*1
+        subroutine adios_get_attr_int1 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            integer*1,      intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! INTEGER*2
+        subroutine adios_get_attr_int2 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            integer*2,      intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! INTEGER*4
+        subroutine adios_get_attr_int4 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            integer*4,      intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! INTEGER*8
+        subroutine adios_get_attr_int8 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            integer*8,      intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! REAL*4
+        subroutine adios_get_attr_real4 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            real*4,         intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! REAL*8
+        subroutine adios_get_attr_real8 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            real*8,         intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! COMPLEX*8
+        subroutine adios_get_attr_complex8 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            complex,        intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! COMPLEX*16
+        subroutine adios_get_attr_complex16 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            complex*16,     intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! CHARACTER(*)
+        subroutine adios_get_attr_char (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            character(*),   intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! LOGICAL*1
+        subroutine adios_get_attr_logical1 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            logical*1,      intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! LOGICAL*2
+        subroutine adios_get_attr_logical2 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            logical*2,      intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! LOGICAL*4
+        subroutine adios_get_attr_logical4 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            logical*4,      intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! LOGICAL*8
+        subroutine adios_get_attr_logical8 (fp, attrname, attr, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: attrname
+            logical*8,      intent(out) :: attr
+            integer,        intent(out) :: err 
+        end subroutine
+
+    end interface
+
+    !
+    ! ADIOS_SCHEDULE_READ generic interface 
+    !
+    ! Usage: call adios_schedule_read (fp, sel, varname, from_step, nsteps,  data, err)
+    !
+    interface adios_schedule_read
+        module procedure adios_schedule_read_int1_d0
+        module procedure adios_schedule_read_int2_d0
+        module procedure adios_schedule_read_int4_d0
+        module procedure adios_schedule_read_int8_d0
+        module procedure adios_schedule_read_real4_d0
+        module procedure adios_schedule_read_real8_d0
+        module procedure adios_schedule_read_complex8_d0
+        module procedure adios_schedule_read_complex16_d0
+        !module procedure adios_schedule_read_char_d0
+        module procedure adios_schedule_read_logical1_d0
+        module procedure adios_schedule_read_logical2_d0
+        module procedure adios_schedule_read_logical4_d0
+        module procedure adios_schedule_read_logical8_d0
+        module procedure adios_schedule_read_int1_d1
+        module procedure adios_schedule_read_int2_d1
+        module procedure adios_schedule_read_int4_d1
+        module procedure adios_schedule_read_int8_d1
+        module procedure adios_schedule_read_real4_d1
+        module procedure adios_schedule_read_real8_d1
+        module procedure adios_schedule_read_complex8_d1
+        module procedure adios_schedule_read_complex16_d1
+        module procedure adios_schedule_read_char_d1
+        module procedure adios_schedule_read_logical1_d1
+        module procedure adios_schedule_read_logical2_d1
+        module procedure adios_schedule_read_logical4_d1
+        module procedure adios_schedule_read_logical8_d1
+        module procedure adios_schedule_read_int1_d2
+        module procedure adios_schedule_read_int2_d2
+        module procedure adios_schedule_read_int4_d2
+        module procedure adios_schedule_read_int8_d2
+        module procedure adios_schedule_read_real4_d2
+        module procedure adios_schedule_read_real8_d2
+        module procedure adios_schedule_read_complex8_d2
+        module procedure adios_schedule_read_complex16_d2
+        module procedure adios_schedule_read_char_d2
+        module procedure adios_schedule_read_logical1_d2
+        module procedure adios_schedule_read_logical2_d2
+        module procedure adios_schedule_read_logical4_d2
+        module procedure adios_schedule_read_logical8_d2
+        module procedure adios_schedule_read_int1_d3
+        module procedure adios_schedule_read_int2_d3
+        module procedure adios_schedule_read_int4_d3
+        module procedure adios_schedule_read_int8_d3
+        module procedure adios_schedule_read_real4_d3
+        module procedure adios_schedule_read_real8_d3
+        module procedure adios_schedule_read_complex8_d3
+        module procedure adios_schedule_read_complex16_d3
+        module procedure adios_schedule_read_char_d3
+        module procedure adios_schedule_read_logical1_d3
+        module procedure adios_schedule_read_logical2_d3
+        module procedure adios_schedule_read_logical4_d3
+        module procedure adios_schedule_read_logical8_d3
+        module procedure adios_schedule_read_int1_d4
+        module procedure adios_schedule_read_int2_d4
+        module procedure adios_schedule_read_int4_d4
+        module procedure adios_schedule_read_int8_d4
+        module procedure adios_schedule_read_real4_d4
+        module procedure adios_schedule_read_real8_d4
+        module procedure adios_schedule_read_complex8_d4
+        module procedure adios_schedule_read_complex16_d4
+        module procedure adios_schedule_read_char_d4
+        module procedure adios_schedule_read_logical1_d4
+        module procedure adios_schedule_read_logical2_d4
+        module procedure adios_schedule_read_logical4_d4
+        module procedure adios_schedule_read_logical8_d4
+        module procedure adios_schedule_read_int1_d5
+        module procedure adios_schedule_read_int2_d5
+        module procedure adios_schedule_read_int4_d5
+        module procedure adios_schedule_read_int8_d5
+        module procedure adios_schedule_read_real4_d5
+        module procedure adios_schedule_read_real8_d5
+        module procedure adios_schedule_read_complex8_d5
+        module procedure adios_schedule_read_complex16_d5
+        module procedure adios_schedule_read_char_d5
+        module procedure adios_schedule_read_logical1_d5
+        module procedure adios_schedule_read_logical2_d5
+        module procedure adios_schedule_read_logical4_d5
+        module procedure adios_schedule_read_logical8_d5
+        module procedure adios_schedule_read_int1_d6
+        module procedure adios_schedule_read_int2_d6
+        module procedure adios_schedule_read_int4_d6
+        module procedure adios_schedule_read_int8_d6
+        module procedure adios_schedule_read_real4_d6
+        module procedure adios_schedule_read_real8_d6
+        module procedure adios_schedule_read_complex8_d6
+        module procedure adios_schedule_read_complex16_d6
+        module procedure adios_schedule_read_char_d6
+        module procedure adios_schedule_read_logical1_d6
+        module procedure adios_schedule_read_logical2_d6
+        module procedure adios_schedule_read_logical4_d6
+        module procedure adios_schedule_read_logical8_d6
+
+    end interface
+
+    !
+    ! adios_GET_STATISTICS generic interface 
+    !
+    ! Usage: call adios_get_statistics (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+    !
+    interface adios_get_statistics
+
+        ! INTEGER*1 arrays
+        subroutine adios_get_statistics_int1 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            integer*1,      intent(out) :: value
+            integer*1,      intent(out) :: gmin
+            integer*1,      intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            integer*1, dimension(*), intent(out) :: mins
+            integer*1, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,dimension(*), intent(out) :: err 
+        end subroutine
+
+        ! INTEGER*2 arrays
+        subroutine adios_get_statistics_int2 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            integer*2,      intent(out) :: value
+            integer*2,      intent(out) :: gmin
+            integer*2,      intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            integer*2, dimension(*), intent(out) :: mins
+            integer*2, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! INTEGER*4 arrays
+        subroutine adios_get_statistics_int4 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            integer*4,      intent(out) :: value
+            integer*4,      intent(out) :: gmin
+            integer*4,      intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            integer*4, dimension(*), intent(out) :: mins
+            integer*1, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! INTEGER*8 arrays
+        subroutine adios_get_statistics_int8 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            integer*8,      intent(out) :: value
+            integer*8,      intent(out) :: gmin
+            integer*8,      intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            integer*8, dimension(*), intent(out) :: mins
+            integer*8, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! REAL*4 arrays
+        subroutine adios_get_statistics_real4 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            real*4,         intent(out) :: value
+            real*4,         intent(out) :: gmin
+            real*4,         intent(out) :: gmax
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            real*4, dimension(*), intent(out) :: mins
+            real*4, dimension(*), intent(out) :: maxs
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! REAL*8 arrays
+        subroutine adios_get_statistics_real8 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            real*8,         intent(out) :: value
+            real*8,         intent(out) :: gmin
+            real*8,         intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            real*8, dimension(*), intent(out) :: mins
+            real*8, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! COMPLEX*8 arrays
+        subroutine adios_get_statistics_complex8 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            complex,        intent(out) :: value
+            complex,        intent(out) :: gmin
+            complex,        intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            complex, dimension(*), intent(out) :: mins
+            complex, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! COMPLEX*16 arrays
+        subroutine adios_get_statistics_complex16 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            complex*16,     intent(out) :: value
+            complex*16,     intent(out) :: gmin
+            complex*16,     intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            complex*16, dimension(*), intent(out) :: mins
+            complex*16, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! CHARACTER(*) arrays
+        subroutine adios_get_statistics_char (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            character(*),   intent(out) :: value
+            character(*),   intent(out) :: gmin
+            character(*),   intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            character(*), dimension(*), intent(out) :: mins
+            character(*), dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! LOFICAL*1 arrays
+        subroutine adios_get_statistics_logical1 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            logical*1,      intent(out) :: value
+            logical*1,      intent(out) :: gmin
+            logical*1,      intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            logical*1, dimension(*), intent(out) :: mins
+            logical*1, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! LOGICAL*2 arrays
+        subroutine adios_get_statistics_logical2 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            logical*2,      intent(out) :: value
+            logical*2,      intent(out) :: gmin
+            logical*2,      intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            logical*2, dimension(*), intent(out) :: mins
+            logical*2, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! LOGICAL*4 arrays
+        subroutine adios_get_statistics_logical4 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            logical*4,      intent(out) :: value
+            logical*4,      intent(out) :: gmin
+            logical*4,      intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            logical*4, dimension(*), intent(out) :: mins
+            logical*4, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+        ! LOGICAL*8 arrays
+        subroutine adios_get_statistics_logical8 (fp, varname, value, gmin, gmax, gavg, gstd_dev, mins, maxs, avgs, std_devs, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            character(*),   intent(in)  :: varname
+            logical*8,      intent(out) :: value
+            logical*8,      intent(out) :: gmin
+            logical*8,      intent(out) :: gmax
+            real*8,         intent(out) :: gavg
+            real*8,         intent(out) :: gstd_dev
+            logical*8, dimension(*), intent(out) :: mins
+            logical*8, dimension(*), intent(out) :: maxs
+            real*8, dimension(*), intent(out) :: avgs
+            real*8, dimension(*), intent(out) :: std_devs
+            integer,        intent(out) :: err 
+        end subroutine
+
+    end interface
+
+
+    contains 
+
+
+    !
+    ! ADIOS_SCHEDULE_READ procedures
+    !
+    ! Usage: call adios_schedule_read (fp, sel, varname, from_step, nsteps,  data, err)
+    !
+        !
+        ! scalars
+        !
+
+        ! INTEGER*1 scalar
+        subroutine adios_schedule_read_int1_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*1,      intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*2 scalar
+        subroutine adios_schedule_read_int2_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*2,      intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*4 scalar
+        subroutine adios_schedule_read_int4_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*4,      intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*8 scalar
+        subroutine adios_schedule_read_int8_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*8,      intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*4 scalar
+        subroutine adios_schedule_read_real4_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*4,         intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*8 scalar
+        subroutine adios_schedule_read_real8_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*8,        intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) scalar
+        subroutine adios_schedule_read_complex8_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex,        intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX scalar
+        subroutine adios_schedule_read_complex16_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex*16,     intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! CHARACTER scalar
+        !subroutine adios_schedule_read_char_d0 (fp, sel, varname, from_step, nsteps, data, err)
+        !    implicit none
+        !    integer*8,      intent(in)  :: fp
+        !    integer*8,      intent(in)  :: sel
+        !    character(*),   intent(in)  :: varname
+        !    integer,        intent(in)  :: from_step
+        !    integer,        intent(in)  :: nsteps
+        !    character(*),   intent(out) :: data
+        !    integer,        intent(in)  :: err 
+        !
+        !    call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        !end subroutine
+
+        ! LOGICAL*1 scalar
+        subroutine adios_schedule_read_logical1_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*1,      intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*2 scalar
+        subroutine adios_schedule_read_logical2_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*2,      intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*4 scalar
+        subroutine adios_schedule_read_logical4_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*4,      intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*8 scalar
+        subroutine adios_schedule_read_logical8_d0 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*8,      intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        !
+        ! 1D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_schedule_read_int1_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*1, dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_schedule_read_int2_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*2, dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_schedule_read_int4_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*4, dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_schedule_read_int8_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*8, dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_schedule_read_real4_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*4,    dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_schedule_read_real8_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*8,   dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_schedule_read_complex8_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex,   dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_schedule_read_complex16_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex*16,dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_schedule_read_char_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            character(*),   intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_schedule_read_logical1_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*1, dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_schedule_read_logical2_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*2, dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_schedule_read_logical4_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*4, dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_schedule_read_logical8_d1 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*8, dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        !
+        ! 2D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_schedule_read_int1_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*1, dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_schedule_read_int2_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*2, dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_schedule_read_int4_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*4, dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_schedule_read_int8_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*8, dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_schedule_read_real4_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*4,    dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_schedule_read_real8_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*8,   dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_schedule_read_complex8_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex,   dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_schedule_read_complex16_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex*16,dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_schedule_read_char_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            character(*),dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_schedule_read_logical1_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*1, dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_schedule_read_logical2_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*2, dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_schedule_read_logical4_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*4, dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_schedule_read_logical8_d2 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*8, dimension(:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        !
+        ! 3D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_schedule_read_int1_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*1, dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_schedule_read_int2_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*2, dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_schedule_read_int4_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*4, dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_schedule_read_int8_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*8, dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_schedule_read_real4_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*4,    dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_schedule_read_real8_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*8,   dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_schedule_read_complex8_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex,   dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_schedule_read_complex16_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex*16,dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_schedule_read_char_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            character(*),dimension(:,:),  intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_schedule_read_logical1_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*1, dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_schedule_read_logical2_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*2, dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_schedule_read_logical4_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*4, dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_schedule_read_logical8_d3 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*8, dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        !
+        ! 4D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_schedule_read_int1_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*1, dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_schedule_read_int2_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*2, dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_schedule_read_int4_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*4, dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_schedule_read_int8_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*8, dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_schedule_read_real4_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*4,    dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_schedule_read_real8_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*8,   dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_schedule_read_complex8_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex,   dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_schedule_read_complex16_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex*16,dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_schedule_read_char_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            character(*),dimension(:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_schedule_read_logical1_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*1, dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_schedule_read_logical2_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*2, dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_schedule_read_logical4_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*4, dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_schedule_read_logical8_d4 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*8, dimension(:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        !
+        ! 5D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_schedule_read_int1_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*1, dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_schedule_read_int2_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*2, dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_schedule_read_int4_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*4, dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_schedule_read_int8_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*8, dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_schedule_read_real4_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*4,    dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_schedule_read_real8_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*8,   dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_schedule_read_complex8_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex,   dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_schedule_read_complex16_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex*16,dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_schedule_read_char_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            character(*),dimension(:,:,:,:),intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_schedule_read_logical1_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*1, dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_schedule_read_logical2_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*2, dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_schedule_read_logical4_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*4, dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_schedule_read_logical8_d5 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*8, dimension(:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        !
+        ! 6D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_schedule_read_int1_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*1, dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_schedule_read_int2_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*2, dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_schedule_read_int4_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*4, dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_schedule_read_int8_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            integer*8, dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_schedule_read_real4_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*4,    dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_schedule_read_real8_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            real*8,   dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_schedule_read_complex8_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex,   dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_schedule_read_complex16_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            complex*16,dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_schedule_read_char_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            character(*),dimension(:,:,:,:,:),intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_schedule_read_logical1_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*1, dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_schedule_read_logical2_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*2, dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_schedule_read_logical4_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*4, dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_schedule_read_logical8_d6 (fp, sel, varname, from_step, nsteps, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fp
+            integer*8,      intent(in)  :: sel
+            character(*),   intent(in)  :: varname
+            integer,        intent(in)  :: from_step
+            integer,        intent(in)  :: nsteps
+            logical*8, dimension(:,:,:,:,:,:), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_schedule_read_f2c(fp, sel, varname, from_step, nsteps, data, err)
+        end subroutine
+
+end module
+
diff --git a/src/adiosf_read.c b/src/core/adiosf_read_v1.c
similarity index 59%
rename from src/adiosf_read.c
rename to src/core/adiosf_read_v1.c
index 4241327..b9014e0 100644
--- a/src/adiosf_read.c
+++ b/src/core/adiosf_read_v1.c
@@ -6,15 +6,16 @@
  */
 
 #include "../config.h"
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #define __INCLUDED_FROM_FORTRAN_API__
-#include "bp_utils.h"
-#include "bp_types.h"
-#include "common_read.h"
-#include "adios_read.h"
-#include "adios_error.h"
-#include "futils.h"
+#include "public/adios_read.h"
+#include "public/adios_error.h"
+//#include "core/bp_utils.h"
+//#include "core/bp_types.h"
+#include "core/common_read.h"
+#include "core/futils.h"
 #define BYTE_ALIGN 8
 
 #ifdef DMALLOC
@@ -25,8 +26,22 @@
 extern "C"  /* prevent C++ name mangling */
 #endif
 
+static enum ADIOS_READ_METHOD lastmethod = ADIOS_READ_METHOD_BP;
+
 extern int adios_errno;
 
+// Re-define the ADIOS_GROUP struct here, because we need to emulate the group view behavior
+// of the old read API
+typedef struct { 
+    uint64_t gh;                /* Group handler                                           */
+    int      grpid;             /* group index (0..ADIOS_FILE.groups_count-1)              */
+    int      vars_count;        /* Number of variables in this adios group                 */
+    char     ** var_namelist;   /* Variable names in a char* array                         */
+    int      attrs_count;       /* Number of attributes in this adios group                */
+    char     ** attr_namelist;  /* Attribute names in a char* array                        */
+    ADIOS_FILE * fp;            /* pointer to the parent ADIOS_FILE struct                 */
+} ADIOS_GROUP_V1;
+
 /*********************/
 /* FORTRAN INTERFACE */
 /*********************/
@@ -35,31 +50,55 @@ void FC_FUNC_(adios_errmsg, adios_errmsg) (char *msg, int msg_len)
     futils_cstr_to_fstr( adios_get_last_errmsg(), (char *)msg, msg_len);
 }
 
+void FC_FUNC_(adios_set_read_method, ADIOS_SET_READ_METHOD) (int *fmethod, int *err)
+{
+    enum ADIOS_READ_METHOD method = (enum ADIOS_READ_METHOD) *fmethod;
+    switch (*fmethod) {
+        // Translate from V1 method IDs to the new API's methods
+        case 0: //ADIOS_READ_METHOD_BP_V1:
+            lastmethod = ADIOS_READ_METHOD_BP;
+            break;
+        case 1: //ADIOS_READ_METHOD_BP_STAGED_V1:
+            lastmethod = ADIOS_READ_METHOD_BP_AGGREGATE;
+            break;
+        case 7: //ADIOS_READ_METHOD_BP_STAGED1_V1:
+            lastmethod = ADIOS_READ_METHOD_BP_AGGREGATE;
+            break;
+        case 3: //ADIOS_READ_METHOD_DART_V1:
+            lastmethod = ADIOS_READ_METHOD_DATASPACES;
+            break;
+        case 4: //ADIOS_READ_METHOD_DIMES_V1:
+            lastmethod = ADIOS_READ_METHOD_DIMES;
+            break;
+
+            /* Unsupported methods */
+        case 2: //ADIOS_READ_METHOD_HDF5_V1:
+        case 5: //ADIOS_READ_METHOD_NSSI_V1:
+        case 6: //ADIOS_READ_METHOD_DATATAP_V1:
+        default:
+            lastmethod = ADIOS_READ_METHOD_BP;
+            break;
+    }
+    *err = 0;
+}
+
 void FC_FUNC_(adios_read_init, ADIOS_READ_INIT) (int * fcomm, int * err)
 {
     MPI_Comm comm = MPI_Comm_f2c (*((int *) fcomm));
     futils_called_from_fortran_set();
-    *err = common_read_init(comm);
+    *err =  common_read_init_method (lastmethod, comm, NULL);
     if (*err)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
 }
 
 void FC_FUNC_(adios_read_finalize, ADIOS_READ_FINALIZE) (int * err)
 {
-    *err = common_read_finalize ();
+    *err = common_read_finalize_method (lastmethod);
     futils_called_from_fortran_unset();
     if (*err)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
 }
 
-void FC_FUNC_(adios_set_read_method, ADIOS_SET_READ_METHOD) (int *fmethod, int *err)
-{
-    enum ADIOS_READ_METHOD method = (enum ADIOS_READ_METHOD) *fmethod;
-    *err = common_read_set_read_method (method);
-    if (*err)
-        fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
-}
-
 void FC_FUNC_(adios_fopen, ADIOS_FOPEN)
         (int64_t * fp,
          char    * fname,
@@ -70,14 +109,15 @@ void FC_FUNC_(adios_fopen, ADIOS_FOPEN)
 {
     ADIOS_FILE *afp;
     char *namestr;
+    char **group_namelist;
     MPI_Comm comm = MPI_Comm_f2c (*((int *) fcomm));
     futils_called_from_fortran_set();
 
     namestr = futils_fstr_to_cstr(fname, fname_len);
     if (namestr != NULL) {
-        afp = common_read_fopen (namestr,comm);
+        afp = common_read_open_file (namestr, lastmethod, comm);
         if (afp != NULL) {
-            *groups_count = afp->groups_count;
+            *groups_count = common_read_get_grouplist(afp, &group_namelist);
         } else {
             *groups_count = 0;
         }
@@ -86,7 +126,7 @@ void FC_FUNC_(adios_fopen, ADIOS_FOPEN)
     } else {
         *fp = (int64_t) NULL;
     }
-    *err = -adios_errno;
+    *err = adios_errno;
     if (*err)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
 }
@@ -102,7 +142,7 @@ void FC_FUNC_(adios_reset_dimension_order, ADIOS_RESET_DIMENSION_ORDER)
 void FC_FUNC_(adios_fclose, ADIOS_FCLOSE) (int64_t * fp, int * err)
 {
     ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
-    *err = common_read_fclose (afp);
+    *err = common_read_close (afp);
     futils_called_from_fortran_unset();
     if (*err)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
@@ -120,15 +160,18 @@ void FC_FUNC_(adios_inq_file, ADIOS_INQ_FILE)
 {
     ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
     int i;
+    char **group_namelist;
+    int ngroups;
     if (afp != NULL) {
-        *vars_count = afp->vars_count;
-        *attrs_count = afp->attrs_count;
-        *tstart = afp->tidx_start;
-        *ntsteps = afp->ntimesteps;
-        *err = 0;
-        for (i=0;i<afp->groups_count;i++) {
-            futils_cstr_to_fstr( afp->group_namelist[i], (char *)gnamelist+i*gnamelist_len, gnamelist_len);
+        *vars_count = afp->nvars;
+        *attrs_count = afp->nattrs;
+        *tstart = 1;
+        *ntsteps = afp->last_step-afp->current_step+1;
+        ngroups = common_read_get_grouplist(afp, &group_namelist);
+        for (i=0;i<ngroups;i++) {
+            futils_cstr_to_fstr( group_namelist[i], (char *)gnamelist+i*gnamelist_len, gnamelist_len);
         }
+        *err = 0;
     } else {
         *vars_count = 0;
         *attrs_count = 0;
@@ -148,33 +191,47 @@ void FC_FUNC_(adios_gopen, ADIOS_GOPEN)
          int       grpname_len)
 {
     char *namestr;
-    ADIOS_GROUP *agp;
     ADIOS_FILE *afp = (ADIOS_FILE *) *fp;
+    char **group_namelist;
+    int ngroups, grpid;
 
     namestr = futils_fstr_to_cstr(grpname, grpname_len);
     if (namestr != NULL) {
-        agp = common_read_gopen (afp, namestr);
-        if (agp != NULL) {
-            *vars_count = agp->vars_count;
-            *attrs_count = agp->attrs_count;
+
+        // get group list and find the group name 
+        ngroups = common_read_get_grouplist(afp, &group_namelist);
+        for (grpid=0;grpid<(ngroups);grpid++) {
+            if (!strcmp(group_namelist[grpid], namestr))
+                break;
+        }
+
+        if (grpid < ngroups) {
+
+            // Set group view of file for this group
+            common_read_group_view (afp, grpid);
+
+            *vars_count = afp->nvars;
+            *attrs_count = afp->nattrs;
+            *gp = (int64_t)afp;
         } else {
-            *vars_count = 0;
-            *attrs_count = 0;
+            adios_error ( err_invalid_group, "Invalid group name %s", grpname);
+            *gp = (int64_t) NULL;
         }
-        *gp = (int64_t)agp;
         free(namestr);
+
     } else {
         *gp = (int64_t) NULL;
     }
-    *err = -adios_errno;
+    *err = adios_errno;
     if (*err)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
 }
 
 void FC_FUNC_(adios_gclose, ADIOS_GCLOSE) (int64_t * gp, int * err)
 {
-    ADIOS_GROUP *agp = (ADIOS_GROUP *) *gp;
-    *err=common_read_gclose(agp);
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
+    // restore full file view
+    *err=common_read_group_view (afp, -1);
     if (*err)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
 }
@@ -189,17 +246,17 @@ void FC_FUNC_(adios_inq_group, ADIOS_INQ_GROUP)
          int       vnamelist_len, 
          int       anamelist_len) 
 {
-    ADIOS_GROUP *agp = (ADIOS_GROUP *) *gp;
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
     int i;
-    if (agp != NULL) {
-        for (i=0;i<agp->vars_count;i++) {
-            futils_cstr_to_fstr( agp->var_namelist[i], (char *)vnamelist+i*vnamelist_len, vnamelist_len);
+    if (afp != NULL) {
+        for (i=0;i<afp->nvars;i++) {
+            futils_cstr_to_fstr( afp->var_namelist[i], (char *)vnamelist+i*vnamelist_len, vnamelist_len);
         } 
-        for (i=0;i<agp->attrs_count;i++) {
-            futils_cstr_to_fstr( agp->attr_namelist[i], (char *)anamelist+i*anamelist_len, anamelist_len);
+        for (i=0;i<afp->nattrs;i++) {
+            futils_cstr_to_fstr( afp->attr_namelist[i], (char *)anamelist+i*anamelist_len, anamelist_len);
         } 
-        *timestep = agp->timestep;
-        *lasttimestep = agp->lasttimestep;
+        *timestep = 1;
+        *lasttimestep = afp->last_step;
         *err = 0;
     } else {
         *err = 1;
@@ -218,26 +275,41 @@ void FC_FUNC_(adios_inq_var, ADIOS_INQ_VAR)
 {
     char *varstr;
     int  i;
-    ADIOS_GROUP *agp = (ADIOS_GROUP *) *gp;
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
     ADIOS_VARINFO *vi = NULL;
 
     varstr = futils_fstr_to_cstr(varname, varname_len);
     if (varstr != NULL) {
-        vi = common_read_inq_var (agp, varstr);
+        vi = common_read_inq_var (afp, varstr);
     }
     if (vi != NULL) {
         *type = vi->type;
-        *ndim = vi->ndim;
-        *timedim = vi->timedim;
-        for (i=0;i<vi->ndim;i++)
-            dims[i] = vi->dims[i];
+
+        /* TIME dimension should be emulated here !!! */  
+        int tidx;
+        int timed = common_read_is_var_timed(afp, vi->varid);
+        if (timed) {
+            *ndim = vi->ndim + 1;
+            *timedim = vi->ndim;
+            dims[0] = vi->nsteps;
+            tidx = 1;
+        } else {
+            *ndim = vi->ndim;
+            *timedim = -1;
+            tidx = 0;
+        }
+
+        for (i=0; i<vi->ndim; i++)
+            dims[i+tidx] = vi->dims[i];
+
         common_read_free_varinfo(vi);
+
     } else {
         *type = adios_unknown;
         *ndim = 0;
         *timedim = -1;
     }
-    *err = -adios_errno;
+    *err = adios_errno;
     if (*err < 0)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
 }
@@ -251,15 +323,48 @@ void FC_FUNC_(adios_read_var, ADIOS_READ_VAR)
          int64_t  * read_bytes,
          int varname_len)
 {
-    ADIOS_GROUP *agp = (ADIOS_GROUP *) *gp;
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
     char *varstr;
     int i;
     varstr = futils_fstr_to_cstr(varname, varname_len);
     if (varstr != NULL) {
-        *read_bytes = common_read_read_var (agp, varstr, start, count, data);
+        /* First get the number of dimensions of the variable */
+        ADIOS_VARINFO * vi = common_read_inq_var (afp, varstr);
+        if (!vi)  {
+            *read_bytes = adios_errno;
+            return;
+        }
+        int tidx;
+        int from_step = 0, nsteps = 1;
+        /* TIME dimension should be emulated here !!! */  
+        int timed = common_read_is_var_timed(afp, vi->varid);
+        if (timed) {
+            from_step = (int) start[vi->ndim];
+            nsteps    = (int) count[vi->ndim];
+            tidx = 1;
+        } else {
+            tidx = 0;
+        }
+
+        ADIOS_SELECTION * sel = common_read_selection_boundingbox (vi->ndim, start, count);
+
+        common_read_schedule_read (afp, sel, varstr, from_step, nsteps, data);
+        int ret = common_read_perform_reads (afp, 1);
+        if (ret == err_no_error) {
+            /* should return the number of bytes read */
+            *read_bytes = (int64_t) common_read_type_size (vi->type, data);
+            *read_bytes *= nsteps;
+            for (i=0; i<vi->ndim; i++) 
+                *read_bytes *= (int64_t) count[i];
+        } else {
+            *read_bytes = (int64_t) adios_errno;
+        }
+
+        common_read_free_varinfo(vi);
+        common_read_selection_delete(sel);
         free(varstr);
     } else {
-        *read_bytes = -adios_errno;
+        *read_bytes = adios_errno;
     }
     if (*read_bytes < 0)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
@@ -275,16 +380,83 @@ void FC_FUNC_(adios_read_local_var, ADIOS_READ_LOCAL_VAR)
          int64_t  * read_bytes,
          int varname_len)
 {
-    ADIOS_GROUP *agp = (ADIOS_GROUP *) *gp;
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
+    ADIOS_VARINFO *vi = NULL;
     char *varstr;
     int i;
     varstr = futils_fstr_to_cstr(varname, varname_len);
     if (varstr != NULL) {
-        *read_bytes = common_read_read_local_var (agp, varstr, *idx, start, count, data);
+        /* The new API does not support reading write block with subselection.
+           Only complete blocks can be read.
+           Here we check if the passed selection equals the whole block.
+           Otherwise we return an out of bound error, although it probably should
+           be a "within bounds" error
+
+           Version 1: 
+           - start/count has no time dimension for the local read
+           - idx is for all timesteps, 0...timesteps*blocks
+           Version 2:
+           - idx is from 0..blocks for each timestep
+           - need to say which timestep
+         */
+
+        /* First get the number of dimensions of the variable */
+        vi = common_read_inq_var (afp, varstr);
+    }
+
+    if (vi != NULL) {
+        /* get step from the idx, and check validity of idx */
+        int step = 0;
+        int idx_in_step = *idx;
+        step = 0;
+        while (step < vi->nsteps && idx_in_step >= vi->nblocks[step]) {
+            idx_in_step -= vi->nblocks[step];
+            step++;
+        }
+        if (step == vi->nsteps) {
+            adios_error (err_out_of_bound, "ADIOS ERROR: local "
+                    "variable %s has only %d blocks in file. "
+                    "Requested index %d\n", varstr, vi->sum_nblocks, idx);
+            *read_bytes = adios_errno;
+            return;
+        }
+        common_read_inq_var_blockinfo (afp, vi); // get info on each block
+
+        /* check dimensions */
+        for (i=0; i<vi->ndim; i++) {
+            if (start[i] != 0 || count[i] != vi->blockinfo[*idx].count[i]) {
+                adios_error (err_out_of_bound, "ADIOS ERROR: when reading a local "
+                        "variable, only the whole block can be requested; subselections "
+                        "are not allowed. Variable %s, block %d, dimension %d size is %lld, "
+                        "requested %lld from offset %lld\n",
+                        varstr, *idx, vi->blockinfo[*idx].count[i], count[i], start[i]);
+                *read_bytes = adios_errno;
+                return;
+            }
+        }
+
+        ADIOS_SELECTION * sel = common_read_selection_writeblock (idx_in_step);
+
+        common_read_schedule_read_byid (afp, sel, vi->varid, step, 1, data);
+        int ret = common_read_perform_reads (afp, 1);
+        if (ret == err_no_error) {
+            /* should return the number of bytes read */
+            *read_bytes = (int64_t) common_read_type_size (vi->type, data);
+            for (i=0; i<vi->ndim; i++)
+                *read_bytes *= (int64_t) count[i];
+        } else {
+            *read_bytes = (int64_t) adios_errno;
+        }
+
+        common_read_free_varinfo(vi);
+        common_read_selection_delete(sel);
         free(varstr);
+
     } else {
-        *read_bytes = -adios_errno;
+        // return error from futils or inq_var
+        *read_bytes = adios_errno;
     }
+
     if (*read_bytes < 0)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
 }
@@ -310,70 +482,101 @@ void FC_FUNC_(adios_get_statistics, ADIOS_GET_STATISTICS)
          void    * value,
          void    * gmin,
          void    * gmax,
-		 double    * gavg,
-		 double    * gstd_dev,
-         void    ** mins,
-         void    ** maxs,
-         double    ** avgs,
-         double    ** std_devs,
+         double  * gavg,
+         double  * gstd_dev,
+         void   ** mins,
+         void   ** maxs,
+         double ** avgs,
+         double ** std_devs,
          int     * err,
          int       varname_len)
 {
-    ADIOS_GROUP *agp = (ADIOS_GROUP *) *gp;
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
     ADIOS_VARINFO *vi = NULL;
     char *varstr;
-    int i, size, ntime;
+    int i, size;
 
     varstr = futils_fstr_to_cstr(varname, varname_len);
     if (varstr != NULL) {
-        vi = common_read_inq_var (agp, varstr);
+        /* First get the number of dimensions of the variable */
+        vi = common_read_inq_var (afp, varname);
     }
     if (vi != NULL) {
         size = bp_get_type_size(vi->type, vi->value);
+        // get statistics information per each step
+        common_read_inq_var_stat (afp, vi, 1, 0); 
         if (vi->type == adios_string) size++;
-        if (vi->timedim > -1)
-            ntime = agp->fp->ntimesteps;
-        else 
-            ntime = 1;
         if (vi->value) memcpy(value, vi->value, size);
 
-		if (vi->type == adios_complex || vi->type == adios_double_complex)
-		{
-			int c;
-			double * v_gmin = (double *) vi->gmin;
-			double * v_gmax = (double *) vi->gmax;
-			double ** v_mins = (double **) vi->mins;
-			double ** v_maxs = (double **) vi->maxs;
-
-			for (c = 0; c < 3; c ++)
-			{
-        		if (v_gmin[c]) memcpy(((double *) gmin) + c * size, &v_gmin[c], size);
-        		if (v_mins && v_mins[c]) memcpy(((double **) mins)[c], v_mins[c], ntime * size);
-
-        		if (v_gmax[c]) memcpy(((double *) gmax) + c * size, &v_gmax[c], size);
-        		if (v_maxs && v_maxs[c]) memcpy(((double **) maxs)[c], v_maxs[c], ntime * size);
-
-				if (vi->gavg && vi->gavg[c]) memcpy(&gavg[c], &vi->gavg[c], sizeof(double));
-        		if (vi->avgs && vi->avgs[c]) memcpy(avgs[c], vi->avgs[c], ntime * sizeof(double));
-
-				if (vi->gstd_dev && vi->gstd_dev[c]) memcpy(&gstd_dev[c], &vi->gstd_dev[c], sizeof(double));
-        		if (vi->std_devs && vi->std_devs[c]) memcpy(std_devs[c], vi->std_devs[c], ntime * sizeof(double));
-			}
-		}
-		else
-		{
-        	if (vi->gmin) memcpy((char *) gmin, (char *) vi->gmin, size);
-        	if (vi->gmax) memcpy((char *) gmax, (char *) vi->gmax, size);
-			if (vi->gavg) memcpy(gavg, vi->gavg, sizeof(double));
-			if (vi->gstd_dev) memcpy(gstd_dev, vi->gstd_dev, sizeof(double));
-        	if (vi->mins) memcpy((char *) mins, (char *) vi->mins, ntime * size);
-        	if (vi->maxs) memcpy((char *) maxs, (char *) vi->maxs, ntime * size);
-        	if (vi->avgs) memcpy(avgs, vi->avgs, ntime * sizeof(double));
-        	if (vi->std_devs) memcpy(std_devs, vi->std_devs, ntime * sizeof(double));
-		}
+        if (vi->statistics) {
+            if (vi->type == adios_complex || vi->type == adios_double_complex) {
+                /* For complex numbers, the statistics in ADIOS_VARINFO, like 
+                   gmin, gavg, std_devs etc, are of base type double. They also 
+                   have an additional dimension that stores the statistics for 
+                   the magnitude, the real part, and the imaginary part of the 
+                   complex number, individually. For example, gmin[0] holds the 
+                   overall minimum value of the magnitude of the complex numbers. 
+                   gmin[1] and gmin [2] contain the global minimums for the real 
+                   and the imaginary parts, respectively. 
+                 */
+                if (vi->statistics->min) 
+                    memcpy((char *) gmin, (char *) vi->statistics->min, 3*size);
+                if (vi->statistics->max) 
+                    memcpy(((char *) gmax), (char *) vi->statistics->max, 3*size);
+                if (vi->statistics->avg) 
+                    memcpy(gavg, vi->statistics->avg, 3*sizeof(double));
+                if (vi->statistics->std_dev) 
+                    memcpy(gstd_dev, vi->statistics->std_dev, 3*sizeof(double));
+
+                /* FIXME: I do not know if mins is **void and mins[i] is a void * allocated
+                   separately, or mins is a continuous array now.
+                   Copy content accordingly back to the Fortran client.
+                */
+                int c;
+                double ** v_mins = NULL;
+                double ** v_maxs = NULL;
+                double ** v_avgs = NULL;
+                double ** v_std_devs = NULL;
+                if (vi->statistics->steps) {
+                    v_mins = (double **) vi->statistics->steps->mins;
+                    v_maxs = (double **) vi->statistics->steps->maxs;
+                    v_avgs = (double **) vi->statistics->steps->avgs;
+                    v_std_devs = (double **) vi->statistics->steps->std_devs;
+                }
+
+                for (c = 0; c < 3; c ++)
+                {
+                    if (v_mins && v_mins[c]) memcpy(((double **) mins)[c], v_mins[c], vi->nsteps * size);
+                    if (v_maxs && v_maxs[c]) memcpy(((double **) maxs)[c], v_maxs[c], vi->nsteps * size);
+                    if (v_avgs && v_avgs[c]) memcpy(avgs[c], v_avgs[c], vi->nsteps * sizeof(double));
+                    if (v_std_devs && v_std_devs[c]) memcpy(std_devs[c], v_std_devs[c], vi->nsteps * sizeof(double));
+                }
+
+            } else {
+                if (vi->statistics->min) 
+                    memcpy((char *) gmin, (char *) vi->statistics->min, size);
+                if (vi->statistics->max) 
+                    memcpy((char *) gmax, (char *) vi->statistics->max, size);
+                if (vi->statistics->avg) 
+                    memcpy(gavg, vi->statistics->avg, sizeof(double));
+                if (vi->statistics->std_dev) 
+                    memcpy(gstd_dev, vi->statistics->std_dev, sizeof(double));
+
+                if (vi->statistics->steps) {
+                    if (vi->statistics->steps->mins) 
+                        memcpy((char *) mins, (char *) vi->statistics->steps->mins, vi->nsteps * size);
+                    if (vi->statistics->steps->maxs) 
+                        memcpy((char *) maxs, (char *) vi->statistics->steps->maxs, vi->nsteps * size);
+                    if (vi->statistics->steps->avgs) 
+                        memcpy(avgs, vi->statistics->steps->avgs, vi->nsteps * sizeof(double));
+                    if (vi->statistics->steps->std_devs) 
+                        memcpy(std_devs, vi->statistics->steps->std_devs, vi->nsteps * sizeof(double));
+                }
+            }
+        }
         common_read_free_varinfo(vi);
     }
-    *err = -adios_errno;
+    *err = adios_errno;
     if (*err < 0)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
 }
@@ -400,7 +603,7 @@ void FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR)
          int     * err,
          int       attrname_len)
 {
-    ADIOS_GROUP *agp = (ADIOS_GROUP *) *gp;
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
     char *attrstr;
     int i;
     void *data;
@@ -408,13 +611,13 @@ void FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR)
     enum ADIOS_DATATYPES type;
     attrstr = futils_fstr_to_cstr(attrname, attrname_len);
     if (attrstr != NULL) {
-        *err = common_read_get_attr (agp, attrstr, &type, &size, &data);
+        *err = common_read_get_attr (afp, attrstr, &type, &size, &data);
         if (data) {
             memcpy(attr, data, size);
             free(data);
         }
     } else {
-        *err = -adios_errno;
+        *err = adios_errno;
     }
     if (*err < 0)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
@@ -428,16 +631,16 @@ void FC_FUNC_(adios_inq_attr, ADIOS_INQ_ATTR)
          int     * err,
          int       attrname_len)
 {
-    ADIOS_GROUP *agp = (ADIOS_GROUP *) *gp;
+    ADIOS_FILE *afp = (ADIOS_FILE *) *gp;
     char *attrstr;
     int i;
     void *data;
     attrstr = futils_fstr_to_cstr(attrname, attrname_len);
     if (attrstr != NULL) {
-        *err = common_read_get_attr (agp, attrstr, (enum ADIOS_DATATYPES *)type, size, &data);
+        *err = common_read_get_attr (afp, attrstr, (enum ADIOS_DATATYPES *)type, size, &data);
         free(data);
     } else {
-        *err = -adios_errno;
+        *err = adios_errno;
     }
     if (*err < 0)
         fprintf(stderr, "Error: %s\n", adios_get_last_errmsg());
@@ -457,3 +660,4 @@ void FC_FUNC_(adios_get_attr_logical1, ADIOS_GET_ATTR_LOGICAL1) (int64_t * gp, c
 void FC_FUNC_(adios_get_attr_logical2, ADIOS_GET_ATTR_LOGICAL2) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
 void FC_FUNC_(adios_get_attr_logical4, ADIOS_GET_ATTR_LOGICAL4) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
 void FC_FUNC_(adios_get_attr_logical8, ADIOS_GET_ATTR_LOGICAL8) (int64_t * gp, char * attrname, void * attr, int * err, int attrname_len) { FC_FUNC_(adios_get_attr, ADIOS_GET_ATTR) (gp, attrname, attr, err, attrname_len); }
+
diff --git a/src/core/adiosf_write_mod.f90 b/src/core/adiosf_write_mod.f90
new file mode 100644
index 0000000..0973879
--- /dev/null
+++ b/src/core/adiosf_write_mod.f90
@@ -0,0 +1,3678 @@
+!  
+!  ADIOS is freely available under the terms of the BSD license described
+!  in the COPYING file in the top level directory of this source distribution.
+!
+!  Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+!
+
+! 
+! Fortran 90 API for writing ADIOS files 
+!    
+! Use this module in your source code to ensure that
+! you are calling the adios_* writing functions with
+! the correct arguments
+!
+module adios_write_mod
+
+    use adios_defs_mod
+
+    interface
+
+        subroutine adios_init (config, err)
+            implicit none
+            character(*),   intent(in)  :: config
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_init_noxml (err)
+            implicit none
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_finalize (mype, err)
+            implicit none
+            integer,        intent(in)  :: mype
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_open (fd, group_name, filename, mode, comm, err)
+            implicit none
+            integer*8,      intent(out) :: fd
+            character(*),   intent(in)  :: group_name
+            character(*),   intent(in)  :: filename
+            character(*),   intent(in)  :: mode
+            integer,        intent(in)  :: comm
+            integer,        intent(out) :: err
+        end subroutine
+        
+        subroutine adios_group_size (fd, data_size, total_size, err)
+            implicit none
+            integer*8,      intent(out) :: fd
+            integer*8,      intent(in)  :: data_size
+            integer*8,      intent(in)  :: total_size
+            integer,        intent(out) :: err
+        end subroutine
+        
+        subroutine adios_set_path (fd, path, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: path
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_set_path_var (fd, path, varname, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: path
+            character(*),   intent(in)  :: varname
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_end_iteration (fd, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_start_calculation (fd, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_stop_calculation (fd, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_close (fd, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_timing_write_xml (fd, filename, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: filename
+            integer,        intent(out) :: err
+        end subroutine
+
+        !
+        ! No-XML calls
+        !
+        subroutine adios_declare_group (id, groupname, time_index, stats_flag, err)
+            implicit none
+            integer*8,      intent(out) :: id
+            character(*),   intent(in)  :: groupname
+            character(*),   intent(in)  :: time_index
+            integer,        intent(in)  :: stats_flag
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_define_var (group_id, varname, path, vartype, dimensions, global_dimensions, local_offsets, id) 
+            implicit none
+            integer*8,      intent(in)  :: group_id
+            character(*),   intent(in)  :: varname
+            character(*),   intent(in)  :: path
+            integer,        intent(in)  :: vartype
+            character(*),   intent(in)  :: dimensions
+            character(*),   intent(in)  :: global_dimensions
+            character(*),   intent(in)  :: local_offsets
+            integer*8,      intent(out) :: id
+        end subroutine
+
+        subroutine adios_define_attribute (group_id, attrname, path, attrtype, value, varname, err)
+            implicit none
+            integer*8,      intent(in)  :: group_id
+            character(*),   intent(in)  :: attrname
+            character(*),   intent(in)  :: path
+            integer,        intent(in)  :: attrtype
+            character(*),   intent(in)  :: value
+            character(*),   intent(in)  :: varname
+            integer,        intent(out) :: err
+        end subroutine
+
+        subroutine adios_select_method (group_id, method, parameters, base_path, err)
+            implicit none
+            integer*8,      intent(in)  :: group_id
+            character(*),   intent(in)  :: method
+            character(*),   intent(in)  :: parameters
+            character(*),   intent(in)  :: base_path
+            integer,        intent(out) :: err
+        end subroutine
+
+        
+        subroutine adios_allocate_buffer (sizeMB, err)
+            implicit none
+            integer,        intent(in)  :: sizeMB
+            integer,        intent(out) :: err
+        end subroutine
+
+    end interface
+
+
+
+    !
+    !
+    ! ADIOS_WRITE generic interface 
+    !
+    ! Usage: call adios_write (fd, varname, data, err)
+    !
+    !
+    interface adios_write
+        module procedure adios_write_int1_d0
+        module procedure adios_write_int2_d0
+        module procedure adios_write_int4_d0
+        module procedure adios_write_int8_d0
+        module procedure adios_write_real4_d0
+        module procedure adios_write_real8_d0
+        module procedure adios_write_complex8_d0
+        module procedure adios_write_complex16_d0
+        !module procedure adios_write_char_d0
+        module procedure adios_write_logical1_d0
+        module procedure adios_write_logical2_d0
+        module procedure adios_write_logical4_d0
+        module procedure adios_write_logical8_d0
+        module procedure adios_write_int1_d1
+        module procedure adios_write_int2_d1
+        module procedure adios_write_int4_d1
+        module procedure adios_write_int8_d1
+        module procedure adios_write_real4_d1
+        module procedure adios_write_real8_d1
+        module procedure adios_write_complex8_d1
+        module procedure adios_write_complex16_d1
+        module procedure adios_write_char_d1
+        module procedure adios_write_logical1_d1
+        module procedure adios_write_logical2_d1
+        module procedure adios_write_logical4_d1
+        module procedure adios_write_logical8_d1
+        module procedure adios_write_int1_d2
+        module procedure adios_write_int2_d2
+        module procedure adios_write_int4_d2
+        module procedure adios_write_int8_d2
+        module procedure adios_write_real4_d2
+        module procedure adios_write_real8_d2
+        module procedure adios_write_complex8_d2
+        module procedure adios_write_complex16_d2
+        module procedure adios_write_char_d2
+        module procedure adios_write_logical1_d2
+        module procedure adios_write_logical2_d2
+        module procedure adios_write_logical4_d2
+        module procedure adios_write_logical8_d2
+        module procedure adios_write_int1_d3
+        module procedure adios_write_int2_d3
+        module procedure adios_write_int4_d3
+        module procedure adios_write_int8_d3
+        module procedure adios_write_real4_d3
+        module procedure adios_write_real8_d3
+        module procedure adios_write_complex8_d3
+        module procedure adios_write_complex16_d3
+        module procedure adios_write_char_d3
+        module procedure adios_write_logical1_d3
+        module procedure adios_write_logical2_d3
+        module procedure adios_write_logical4_d3
+        module procedure adios_write_logical8_d3
+        module procedure adios_write_int1_d4
+        module procedure adios_write_int2_d4
+        module procedure adios_write_int4_d4
+        module procedure adios_write_int8_d4
+        module procedure adios_write_real4_d4
+        module procedure adios_write_real8_d4
+        module procedure adios_write_complex8_d4
+        module procedure adios_write_complex16_d4
+        module procedure adios_write_char_d4
+        module procedure adios_write_logical1_d4
+        module procedure adios_write_logical2_d4
+        module procedure adios_write_logical4_d4
+        module procedure adios_write_logical8_d4
+        module procedure adios_write_int1_d5
+        module procedure adios_write_int2_d5
+        module procedure adios_write_int4_d5
+        module procedure adios_write_int8_d5
+        module procedure adios_write_real4_d5
+        module procedure adios_write_real8_d5
+        module procedure adios_write_complex8_d5
+        module procedure adios_write_complex16_d5
+        module procedure adios_write_char_d5
+        module procedure adios_write_logical1_d5
+        module procedure adios_write_logical2_d5
+        module procedure adios_write_logical4_d5
+        module procedure adios_write_logical8_d5
+        module procedure adios_write_int1_d6
+        module procedure adios_write_int2_d6
+        module procedure adios_write_int4_d6
+        module procedure adios_write_int8_d6
+        module procedure adios_write_real4_d6
+        module procedure adios_write_real8_d6
+        module procedure adios_write_complex8_d6
+        module procedure adios_write_complex16_d6
+        module procedure adios_write_char_d6
+        module procedure adios_write_logical1_d6
+        module procedure adios_write_logical2_d6
+        module procedure adios_write_logical4_d6
+        module procedure adios_write_logical8_d6
+    end interface
+
+
+    !
+    !
+    ! ADIOS_WRITE_BYID generic interface 
+    !
+    ! Usage: call adios_write_byid (fd, varid, data, err)
+    !
+    !
+    interface adios_write_byid
+        module procedure adios_write_byid_int1_d0
+        module procedure adios_write_byid_int2_d0
+        module procedure adios_write_byid_int4_d0
+        module procedure adios_write_byid_int8_d0
+        module procedure adios_write_byid_real4_d0
+        module procedure adios_write_byid_real8_d0
+        module procedure adios_write_byid_complex8_d0
+        module procedure adios_write_byid_complex16_d0
+        !module procedure adios_write_byid_char_d0
+        module procedure adios_write_byid_logical1_d0
+        module procedure adios_write_byid_logical2_d0
+        module procedure adios_write_byid_logical4_d0
+        module procedure adios_write_byid_logical8_d0
+        module procedure adios_write_byid_int1_d1
+        module procedure adios_write_byid_int2_d1
+        module procedure adios_write_byid_int4_d1
+        module procedure adios_write_byid_int8_d1
+        module procedure adios_write_byid_real4_d1
+        module procedure adios_write_byid_real8_d1
+        module procedure adios_write_byid_complex8_d1
+        module procedure adios_write_byid_complex16_d1
+        module procedure adios_write_byid_char_d1
+        module procedure adios_write_byid_logical1_d1
+        module procedure adios_write_byid_logical2_d1
+        module procedure adios_write_byid_logical4_d1
+        module procedure adios_write_byid_logical8_d1
+        module procedure adios_write_byid_int1_d2
+        module procedure adios_write_byid_int2_d2
+        module procedure adios_write_byid_int4_d2
+        module procedure adios_write_byid_int8_d2
+        module procedure adios_write_byid_real4_d2
+        module procedure adios_write_byid_real8_d2
+        module procedure adios_write_byid_complex8_d2
+        module procedure adios_write_byid_complex16_d2
+        module procedure adios_write_byid_char_d2
+        module procedure adios_write_byid_logical1_d2
+        module procedure adios_write_byid_logical2_d2
+        module procedure adios_write_byid_logical4_d2
+        module procedure adios_write_byid_logical8_d2
+        module procedure adios_write_byid_int1_d3
+        module procedure adios_write_byid_int2_d3
+        module procedure adios_write_byid_int4_d3
+        module procedure adios_write_byid_int8_d3
+        module procedure adios_write_byid_real4_d3
+        module procedure adios_write_byid_real8_d3
+        module procedure adios_write_byid_complex8_d3
+        module procedure adios_write_byid_complex16_d3
+        module procedure adios_write_byid_char_d3
+        module procedure adios_write_byid_logical1_d3
+        module procedure adios_write_byid_logical2_d3
+        module procedure adios_write_byid_logical4_d3
+        module procedure adios_write_byid_logical8_d3
+        module procedure adios_write_byid_int1_d4
+        module procedure adios_write_byid_int2_d4
+        module procedure adios_write_byid_int4_d4
+        module procedure adios_write_byid_int8_d4
+        module procedure adios_write_byid_real4_d4
+        module procedure adios_write_byid_real8_d4
+        module procedure adios_write_byid_complex8_d4
+        module procedure adios_write_byid_complex16_d4
+        module procedure adios_write_byid_char_d4
+        module procedure adios_write_byid_logical1_d4
+        module procedure adios_write_byid_logical2_d4
+        module procedure adios_write_byid_logical4_d4
+        module procedure adios_write_byid_logical8_d4
+        module procedure adios_write_byid_int1_d5
+        module procedure adios_write_byid_int2_d5
+        module procedure adios_write_byid_int4_d5
+        module procedure adios_write_byid_int8_d5
+        module procedure adios_write_byid_real4_d5
+        module procedure adios_write_byid_real8_d5
+        module procedure adios_write_byid_complex8_d5
+        module procedure adios_write_byid_complex16_d5
+        module procedure adios_write_byid_char_d5
+        module procedure adios_write_byid_logical1_d5
+        module procedure adios_write_byid_logical2_d5
+        module procedure adios_write_byid_logical4_d5
+        module procedure adios_write_byid_logical8_d5
+        module procedure adios_write_byid_int1_d6
+        module procedure adios_write_byid_int2_d6
+        module procedure adios_write_byid_int4_d6
+        module procedure adios_write_byid_int8_d6
+        module procedure adios_write_byid_real4_d6
+        module procedure adios_write_byid_real8_d6
+        module procedure adios_write_byid_complex8_d6
+        module procedure adios_write_byid_complex16_d6
+        module procedure adios_write_byid_char_d6
+        module procedure adios_write_byid_logical1_d6
+        module procedure adios_write_byid_logical2_d6
+        module procedure adios_write_byid_logical4_d6
+        module procedure adios_write_byid_logical8_d6
+    end interface
+
+
+    !
+    !
+    ! ADIOS_READ generic interface 
+    !
+    ! Usage: call adios_read
+    !
+    !
+    interface adios_read
+        module procedure adios_read_int1_d0
+        module procedure adios_read_int2_d0
+        module procedure adios_read_int4_d0
+        module procedure adios_read_int8_d0
+        module procedure adios_read_real4_d0
+        module procedure adios_read_real8_d0
+        module procedure adios_read_complex8_d0
+        module procedure adios_read_complex16_d0
+        !module procedure adios_read_char_d0
+        module procedure adios_read_logical1_d0
+        module procedure adios_read_logical2_d0
+        module procedure adios_read_logical4_d0
+        module procedure adios_read_logical8_d0
+        module procedure adios_read_int1_d1
+        module procedure adios_read_int2_d1
+        module procedure adios_read_int4_d1
+        module procedure adios_read_int8_d1
+        module procedure adios_read_real4_d1
+        module procedure adios_read_real8_d1
+        module procedure adios_read_complex8_d1
+        module procedure adios_read_complex16_d1
+        module procedure adios_read_char_d1
+        module procedure adios_read_logical1_d1
+        module procedure adios_read_logical2_d1
+        module procedure adios_read_logical4_d1
+        module procedure adios_read_logical8_d1
+        module procedure adios_read_int1_d2
+        module procedure adios_read_int2_d2
+        module procedure adios_read_int4_d2
+        module procedure adios_read_int8_d2
+        module procedure adios_read_real4_d2
+        module procedure adios_read_real8_d2
+        module procedure adios_read_complex8_d2
+        module procedure adios_read_complex16_d2
+        module procedure adios_read_char_d2
+        module procedure adios_read_logical1_d2
+        module procedure adios_read_logical2_d2
+        module procedure adios_read_logical4_d2
+        module procedure adios_read_logical8_d2
+        module procedure adios_read_int1_d3
+        module procedure adios_read_int2_d3
+        module procedure adios_read_int4_d3
+        module procedure adios_read_int8_d3
+        module procedure adios_read_real4_d3
+        module procedure adios_read_real8_d3
+        module procedure adios_read_complex8_d3
+        module procedure adios_read_complex16_d3
+        module procedure adios_read_char_d3
+        module procedure adios_read_logical1_d3
+        module procedure adios_read_logical2_d3
+        module procedure adios_read_logical4_d3
+        module procedure adios_read_logical8_d3
+        module procedure adios_read_int1_d4
+        module procedure adios_read_int2_d4
+        module procedure adios_read_int4_d4
+        module procedure adios_read_int8_d4
+        module procedure adios_read_real4_d4
+        module procedure adios_read_real8_d4
+        module procedure adios_read_complex8_d4
+        module procedure adios_read_complex16_d4
+        module procedure adios_read_char_d4
+        module procedure adios_read_logical1_d4
+        module procedure adios_read_logical2_d4
+        module procedure adios_read_logical4_d4
+        module procedure adios_read_logical8_d4
+        module procedure adios_read_int1_d5
+        module procedure adios_read_int2_d5
+        module procedure adios_read_int4_d5
+        module procedure adios_read_int8_d5
+        module procedure adios_read_real4_d5
+        module procedure adios_read_real8_d5
+        module procedure adios_read_complex8_d5
+        module procedure adios_read_complex16_d5
+        module procedure adios_read_char_d5
+        module procedure adios_read_logical1_d5
+        module procedure adios_read_logical2_d5
+        module procedure adios_read_logical4_d5
+        module procedure adios_read_logical8_d5
+        module procedure adios_read_int1_d6
+        module procedure adios_read_int2_d6
+        module procedure adios_read_int4_d6
+        module procedure adios_read_int8_d6
+        module procedure adios_read_real4_d6
+        module procedure adios_read_real8_d6
+        module procedure adios_read_complex8_d6
+        module procedure adios_read_complex16_d6
+        module procedure adios_read_char_d6
+        module procedure adios_read_logical1_d6
+        module procedure adios_read_logical2_d6
+        module procedure adios_read_logical4_d6
+        module procedure adios_read_logical8_d6
+    end interface
+
+
+    contains
+
+    !
+    !
+    ! ADIOS_WRITE generic interface 
+    !
+    ! Usage: call adios_write (fd, varname, data, err)
+    !
+    !
+        !
+        ! scalars
+        !
+
+        ! INTEGER*1 scalar
+        subroutine adios_write_int1_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*2 scalar
+        subroutine adios_write_int2_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*4 scalar
+        subroutine adios_write_int4_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4,      intent(in) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*8 scalar
+        subroutine adios_write_int8_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*4 scalar
+        subroutine adios_write_real4_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,         intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*8 scalar
+        subroutine adios_write_real8_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,         intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) scalar
+        subroutine adios_write_complex8_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,        intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX scalar
+        subroutine adios_write_complex16_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,     intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! CHARACTER scalar (Same as 1D?)
+        !subroutine adios_write_char_d0 (fd, varname, data, err)
+        !    implicit none
+        !    integer*8,      intent(in)  :: fd
+        !    character(*),   intent(in)  :: varname
+        !    character(*),   intent(inout) :: data
+        !    integer,        intent(in)  :: err 
+        !
+        !    call adios_write_f2c (fd, varname, data, err)
+        !end subroutine
+
+        ! LOGICAL*1 scalar
+        subroutine adios_write_logical1_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*2 scalar
+        subroutine adios_write_logical2_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*4 scalar
+        subroutine adios_write_logical4_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*8 scalar
+        subroutine adios_write_logical8_d0 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+
+        !
+        ! 1D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_int1_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_int2_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_int4_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_int8_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_real4_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_real8_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_complex8_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_complex16_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_char_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),   intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_logical1_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_logical2_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_logical4_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_logical8_d1 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        !
+        ! 2D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_int1_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_int2_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_int4_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_int8_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_real4_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_real8_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_complex8_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_complex16_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_char_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_logical1_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_logical2_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_logical4_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_logical8_d2 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        !
+        ! 3D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_int1_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_int2_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_int4_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_int8_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_real4_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_real8_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_complex8_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_complex16_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_char_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(:,:),  intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_logical1_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_logical2_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_logical4_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_logical8_d3 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        !
+        ! 4D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_int1_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_int2_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_int4_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_int8_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_real4_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_real8_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_complex8_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_complex16_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_char_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_logical1_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_logical2_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_logical4_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_logical8_d4 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        !
+        ! 5D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_int1_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_int2_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_int4_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_int8_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_real4_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_real8_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_complex8_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_complex16_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_char_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(:,:,:,:),intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_logical1_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_logical2_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_logical4_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_logical8_d5 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        !
+        ! 6D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_int1_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_int2_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_int4_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_int8_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_real4_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_real8_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_complex8_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_complex16_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_char_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(:,:,:,:,:),intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_logical1_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_logical2_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_logical4_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_logical8_d6 (fd, varname, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_f2c (fd, varname, data, err)
+        end subroutine
+
+    ! end of ADIOS_WRITE functions
+
+
+    !
+    !
+    ! ADIOS_WRITE_BYID generic interface 
+    !
+    ! Usage: call adios_write_byid (fd, varid, data, err)
+    !
+    !
+        !
+        ! scalars
+        !
+
+        ! INTEGER*1 scalar
+        subroutine adios_write_byid_int1_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*1,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*2 scalar
+        subroutine adios_write_byid_int2_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*2,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*4 scalar
+        subroutine adios_write_byid_int4_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*4,      intent(in) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*8 scalar
+        subroutine adios_write_byid_int8_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*8,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*4 scalar
+        subroutine adios_write_byid_real4_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*4,         intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*8 scalar
+        subroutine adios_write_byid_real8_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*8,         intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) scalar
+        subroutine adios_write_byid_complex8_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex,        intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX scalar
+        subroutine adios_write_byid_complex16_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex*16,     intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! CHARACTER scalar (Same as 1D?)
+        !subroutine adios_write_byid_char_d0 (fd, varid, data, err)
+        !    implicit none
+        !    integer*8,      intent(in)  :: fd
+        !    integer*8,      intent(in)  :: varid
+        !    character(*),   intent(inout) :: data
+        !    integer,        intent(in)  :: err 
+        !
+        !    call adios_write_byid_f2c (fd, varid, data, err)
+        !end subroutine
+
+        ! LOGICAL*1 scalar
+        subroutine adios_write_byid_logical1_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*1,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*2 scalar
+        subroutine adios_write_byid_logical2_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*2,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*4 scalar
+        subroutine adios_write_byid_logical4_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*4,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*8 scalar
+        subroutine adios_write_byid_logical8_d0 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*8,      intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+
+        !
+        ! 1D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_byid_int1_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*1, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_byid_int2_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*2, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_byid_int4_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*4, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_byid_int8_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*8, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_byid_real4_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*4,    dimension(*), intent(out) :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_byid_real8_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*8,   dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_byid_complex8_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex,   dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_byid_complex16_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex*16,dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_byid_char_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            character(*),   intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_byid_logical1_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*1, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_byid_logical2_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*2, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_byid_logical4_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*4, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_byid_logical8_d1 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*8, dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        !
+        ! 2D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_byid_int1_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*1, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_byid_int2_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*2, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_byid_int4_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*4, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_byid_int8_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*8, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_byid_real4_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*4,    dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_byid_real8_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*8,   dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_byid_complex8_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex,   dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_byid_complex16_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex*16,dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_byid_char_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            character(*),dimension(*), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_byid_logical1_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*1, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_byid_logical2_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*2, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_byid_logical4_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*4, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_byid_logical8_d2 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*8, dimension(:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        !
+        ! 3D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_byid_int1_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*1, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_byid_int2_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*2, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_byid_int4_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*4, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_byid_int8_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*8, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_byid_real4_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*4,    dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_byid_real8_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*8,   dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_byid_complex8_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex,   dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_byid_complex16_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex*16,dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_byid_char_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            character(*),dimension(:,:),  intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_byid_logical1_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*1, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_byid_logical2_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*2, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_byid_logical4_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*4, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_byid_logical8_d3 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*8, dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        !
+        ! 4D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_byid_int1_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*1, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_byid_int2_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*2, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_byid_int4_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*4, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_byid_int8_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*8, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_byid_real4_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*4,    dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_byid_real8_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*8,   dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_byid_complex8_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex,   dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_byid_complex16_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex*16,dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_byid_char_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            character(*),dimension(:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_byid_logical1_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*1, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_byid_logical2_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*2, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_byid_logical4_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*4, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_byid_logical8_d4 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*8, dimension(:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        !
+        ! 5D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_byid_int1_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*1, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_byid_int2_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*2, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_byid_int4_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*4, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_byid_int8_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*8, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_byid_real4_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*4,    dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_byid_real8_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*8,   dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_byid_complex8_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex,   dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_byid_complex16_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex*16,dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_byid_char_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            character(*),dimension(:,:,:,:),intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_byid_logical1_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*1, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_byid_logical2_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*2, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_byid_logical4_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*4, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_byid_logical8_d5 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*8, dimension(:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        !
+        ! 6D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_write_byid_int1_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*1, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_write_byid_int2_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*2, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_write_byid_int4_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*4, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_write_byid_int8_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            integer*8, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_write_byid_real4_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*4,    dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_write_byid_real8_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            real*8,   dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_write_byid_complex8_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex,   dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_write_byid_complex16_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            complex*16,dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_write_byid_char_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            character(*),dimension(:,:,:,:,:),intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_write_byid_logical1_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*1, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_write_byid_logical2_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*2, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_write_byid_logical4_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*4, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_write_byid_logical8_d6 (fd, varid, data, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            integer*8,      intent(in)  :: varid
+            logical*8, dimension(:,:,:,:,:,:), intent(in)  :: data
+            integer,        intent(in)  :: err 
+
+            call adios_write_byid_f2c (fd, varid, data, err)
+        end subroutine
+
+    ! end of ADIOS_WRITE functions
+
+
+
+
+    !
+    !
+    ! ADIOS_READ generic interface 
+    !
+    ! Usage: call adios_read (fd, varname, buffer, buffer_size, err)
+    !
+    !
+        !
+        ! scalar data
+        !
+
+        ! INTEGER*1 scalar
+        subroutine adios_read_int1_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1,      intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*2 scalar
+        subroutine adios_read_int2_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2,      intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*4 scalar
+        subroutine adios_read_int4_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4,      intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*8 scalar
+        subroutine adios_read_int8_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8,      intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*4 scalar
+        subroutine adios_read_real4_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,         intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*8 scalar
+        subroutine adios_read_real8_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,         intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! COMPLEX (*8) scalar
+        subroutine adios_read_complex8_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,        intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX scalar
+        subroutine adios_read_complex16_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,     intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! CHARACTER scalar
+        !subroutine adios_read_char_d0 (fd, varname, buffer, buffer_size, err)
+        !    implicit none
+        !    integer*8,      intent(in)  :: fd
+        !    character(*),   intent(in)  :: varname
+        !    character(*),   intent(out) :: buffer
+        !    integer*8,      intent(in)  :: buffer_size 
+        !    integer,        intent(in)  :: err 
+        !
+        !    call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        !end subroutine
+
+        ! LOGICAL*1 scalar
+        subroutine adios_read_logical1_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1,      intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*2 scalar
+        subroutine adios_read_logical2_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2,      intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*4 scalar
+        subroutine adios_read_logical4_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4,      intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*8 scalar
+        subroutine adios_read_logical8_d0 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8,      intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+
+        !
+        ! 1D data
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_read_int1_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_read_int2_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_read_int4_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_read_int8_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_read_real4_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_read_real8_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_read_complex8_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_read_complex16_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_read_char_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),   intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_read_logical1_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_read_logical2_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_read_logical4_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_read_logical8_d1 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        !
+        ! 2D buffer
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_read_int1_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_read_int2_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_read_int4_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_read_int8_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_read_real4_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_read_real8_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_read_complex8_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_read_complex16_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_read_char_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(*), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_read_logical1_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_read_logical2_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_read_logical4_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_read_logical8_d2 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        !
+        ! 3D buffer
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_read_int1_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_read_int2_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_read_int4_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_read_int8_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_read_real4_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_read_real8_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_read_complex8_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_read_complex16_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_read_char_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(:,:),  intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_read_logical1_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_read_logical2_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_read_logical4_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_read_logical8_d3 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        !
+        ! 4D buffer
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_read_int1_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_read_int2_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_read_int4_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_read_int8_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_read_real4_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_read_real8_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_read_complex8_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_read_complex16_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_read_char_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_read_logical1_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_read_logical2_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_read_logical4_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_read_logical8_d4 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        !
+        ! 5D buffer
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_read_int1_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_read_int2_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_read_int4_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_read_int8_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_read_real4_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_read_real8_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_read_complex8_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_read_complex16_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_read_char_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(:,:,:,:),intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_read_logical1_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_read_logical2_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_read_logical4_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_read_logical8_d5 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        !
+        ! 6D buffer
+        !
+
+        ! INTEGER*1 array
+        subroutine adios_read_int1_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*1, dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*2 array
+        subroutine adios_read_int2_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*2, dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*4 array
+        subroutine adios_read_int4_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*4, dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! INTEGER*8 array
+        subroutine adios_read_int8_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            integer*8, dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*4 array
+        subroutine adios_read_real4_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*4,    dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! REAL*8 array
+        subroutine adios_read_real8_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            real*8,   dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! COMPLEX (*8) array
+        subroutine adios_read_complex8_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex,   dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! DOUBLE-COMPLEX array
+        subroutine adios_read_complex16_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            complex*16,dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! CHARACTER array
+        subroutine adios_read_char_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            character(*),dimension(:,:,:,:,:),intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*1 array
+        subroutine adios_read_logical1_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*1, dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*2 array
+        subroutine adios_read_logical2_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*2, dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*4 array
+        subroutine adios_read_logical4_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*4, dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+        ! LOGICAL*8 array
+        subroutine adios_read_logical8_d6 (fd, varname, buffer, buffer_size, err)
+            implicit none
+            integer*8,      intent(in)  :: fd
+            character(*),   intent(in)  :: varname
+            logical*8, dimension(:,:,:,:,:,:), intent(out) :: buffer
+            integer*8,      intent(in)  :: buffer_size 
+            integer,        intent(in)  :: err 
+
+            call adios_read_f2c (fd, varname, buffer, buffer_size, err)
+        end subroutine
+
+    ! end of ADIOS_READ functions
+
+end module
+
diff --git a/src/bp_types.h b/src/core/bp_types.h
similarity index 86%
rename from src/bp_types.h
rename to src/core/bp_types.h
index cf6d761..6b52973 100644
--- a/src/bp_types.h
+++ b/src/core/bp_types.h
@@ -8,8 +8,9 @@
 #ifndef __BP_TYPES_H__
 #define __BP_TYPES_H__
 
-#include "adios_bp_v1.h"
-#include "adios_types.h"
+#include "public/adios_types.h"
+#include "core/adios_bp_v1.h"
+#include "core/util.h" /* struct read_request */
 
 #define BP_MAX_RANK 32
 #define BP_MAX_NDIMS (BP_MAX_RANK+1)
@@ -51,7 +52,7 @@ struct BP_file_handle
 
 typedef struct BP_file_handle BP_file_handle_list;
 
-struct BP_FILE {
+typedef struct BP_FILE {
     MPI_File mpi_fh;
     char * fname; // Main file name is needed to calculate subfile names
     BP_file_handle_list * sfh; // This list links all the subfiles handle together
@@ -66,7 +67,17 @@ struct BP_FILE {
     uint32_t tidx_start;
     uint32_t tidx_stop;
     void * priv;
-};
+} BP_FILE;
+
+// save per proc info
+typedef struct BP_PROC {
+    struct BP_FILE * fh;
+    int streaming;
+    int * varid_mapping;
+    read_request * local_read_request_list;
+    void * b; //internal buffer for chunk reading
+    void * priv;
+} BP_PROC;
 
 struct BP_GROUP_VAR {
 	uint16_t group_count;
diff --git a/src/bp_utils.c b/src/core/bp_utils.c
similarity index 53%
rename from src/bp_utils.c
rename to src/core/bp_utils.c
index 8e66b20..6bdc431 100644
--- a/src/bp_utils.c
+++ b/src/core/bp_utils.c
@@ -7,14 +7,17 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <assert.h>
 #include <stdarg.h>
 #include <sys/types.h>
 #include <string.h>
-#include "adios.h"
-#include "bp_utils.h"
-#include "adios_bp_v1.h"
-#include "adios_error.h"
-#include "adios_endianness.h"
+#include "public/adios.h"
+#include "public/adios_read.h"
+#include "public/adios_error.h"
+#include "core/bp_utils.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_endianness.h"
+#include "core/adios_logger.h"
 #define BYTE_ALIGN 8
 #define MINIFOOTER_SIZE 28
 
@@ -86,6 +89,54 @@ void bp_realloc_aligned (struct adios_bp_buffer_struct_v1 * b
     b->length = size;
 }
 
+/* Return 0: if file is little endian, 1 if file is big endian 
+ * We know if it is different from the current system, so here
+ * we determine the current endianness and report accordingly.
+ */
+int bp_get_endianness( uint32_t change_endianness )
+{
+   int LE = 0;
+   int BE = !LE;
+   int i = 1;
+   char *p = (char *) &i;
+   int current_endianness;
+   if (p[0] == 1) // Lowest address contains the least significant byte
+       current_endianness = LE;
+   else
+       current_endianness = BE;
+    if (change_endianness == adios_flag_yes)
+        return !current_endianness;
+    else
+        return current_endianness;
+}
+
+/* Convert 'step' to time, which is used in ADIOS internals.
+ * 'step' should start from 0.
+ */
+int get_time (struct adios_index_var_struct_v1 * v, int step)
+{
+    int i = 0;
+    int prev_ti = 0, counter = 0;
+
+    while (i < v->characteristics_count)
+    {
+        if (v->characteristics[i].time_index != prev_ti)
+        {
+            counter ++;
+            if (counter == (step + 1))
+            {
+                return v->characteristics[i].time_index;
+            }
+            prev_ti = v->characteristics[i].time_index;
+        }
+
+        i++;
+    }
+
+    return -1;
+
+}
+
 int bp_read_open (const char * filename,
           MPI_Comm comm,
           struct BP_FILE * fh)
@@ -101,13 +152,13 @@ int bp_read_open (const char * filename,
     // open a file by the multiple processors within the same
     // communicator
     err = MPI_File_open (comm, (char *) filename, MPI_MODE_RDONLY, 
-            MPI_INFO_NULL, &(fh->mpi_fh));
+            (MPI_Info) MPI_INFO_NULL, &(fh->mpi_fh));
     if (err != MPI_SUCCESS) {
         char e [MPI_MAX_ERROR_STRING];
         int len = 0;
         memset (e, 0, MPI_MAX_ERROR_STRING);
         MPI_Error_string (err, e, &len);
-        adios_error (err_MPI_open_error, "MPI open failed for %s: '%s'\n", filename, e);
+        adios_error (err_file_open_error, "MPI open failed for %s: '%s'\n", filename, e);
         return adios_flag_no;
     }
 
@@ -118,6 +169,358 @@ int bp_read_open (const char * filename,
     return 0;
 }
 
+/* This routine does the parallel bp file open and index parsing.
+ */
+int bp_open (const char * fname,
+             MPI_Comm comm,
+             struct BP_FILE * fh)
+{
+    int rank;
+    uint64_t header_size;
+
+    MPI_Comm_rank (comm, &rank);
+
+    adios_buffer_struct_init (fh->b);
+
+    if (bp_read_open (fname, comm, fh))
+    {
+        return -1;
+    }
+
+    /* Only rank 0 reads the footer and it broadcasts to all other processes */
+    if (rank == 0)
+    {
+        if (bp_read_minifooter (fh))
+        {
+            return -1;
+        }
+    }
+
+    /* Broadcast to all other processors */
+    MPI_Bcast (&fh->mfooter, sizeof (struct bp_minifooter), MPI_BYTE, 0, comm);
+
+    header_size = fh->mfooter.file_size-fh->mfooter.pgs_index_offset;
+
+    if (rank != 0)
+    {
+        if (!fh->b->buff)
+        {
+            bp_alloc_aligned (fh->b, header_size);
+            assert (fh->b->buff);
+
+            memset (fh->b->buff, 0, header_size);
+            fh->b->offset = 0;
+        }
+    }
+
+    MPI_Barrier (comm);
+    MPI_Bcast (fh->b->buff, fh->mfooter.file_size-fh->mfooter.pgs_index_offset, MPI_BYTE, 0, comm);
+
+    /* Everyone parses the index on its own */
+    bp_parse_pgs (fh);
+    bp_parse_vars (fh);
+    bp_parse_attrs (fh);
+
+    return 0;
+}
+
+ADIOS_VARINFO * bp_inq_var_byid (const ADIOS_FILE * fp, int varid)
+{
+    struct BP_PROC * p;
+    BP_FILE * fh;
+    ADIOS_VARINFO * varinfo;
+    int file_is_fortran, i, k, timedim, size;
+    struct adios_index_var_struct_v1 * v;
+
+    adios_errno = 0;
+
+    p = (struct BP_PROC *) fp->fh;
+    fh = (BP_FILE *)p->fh;
+    v = bp_find_var_byid (fh, varid);
+
+    varinfo = (ADIOS_VARINFO *) malloc (sizeof (ADIOS_VARINFO));
+    assert (varinfo);
+
+    /* Note: set varid as the real varid.
+       Common read layer should convert it to the perceived id after the read me
+thod returns.
+    */
+    varinfo->varid = varid;
+    varinfo->type = v->type;
+    file_is_fortran = is_fortran_file (fh);
+
+    assert (v->characteristics_count);
+
+    bp_get_and_swap_dimensions (fh, v, file_is_fortran,
+                                &varinfo->ndim, &varinfo->dims,
+                                &varinfo->nsteps,
+                                file_is_fortran != futils_is_called_from_fortran()
+                               );
+
+    if (p->streaming)
+    {
+        varinfo->nsteps = 1;
+    }
+
+    // set value for scalar
+    if (v->characteristics [0].value)
+    {
+        size = bp_get_type_size (v->type, v->characteristics [0].value);
+        varinfo->value = (void *) malloc (size);
+        assert (varinfo->value);
+
+        memcpy (varinfo->value, v->characteristics [0].value, size);
+    }
+    else
+    {
+        varinfo->value = NULL;
+    }
+
+    varinfo->global = is_global_array (&(v->characteristics[0]));
+
+    varinfo->nblocks = get_var_nblocks (v, varinfo->nsteps);
+
+    assert (varinfo->nblocks);
+
+    varinfo->sum_nblocks = v->characteristics_count;
+    varinfo->statistics = 0;
+    varinfo->blockinfo = 0;
+
+    return varinfo;
+}
+
+MPI_File * get_BP_file_handle(struct BP_file_handle * l, uint32_t file_index)
+{
+    if (!l)
+        return 0;
+
+    while (l)
+    {
+        if (l->file_index == file_index)
+            return &l->fh;
+
+        l = l->next;
+    }
+
+    return 0;
+}
+
+void add_BP_file_handle (struct BP_file_handle ** l, struct BP_file_handle * n)
+{
+    if (!n)
+        return;
+
+    n->next = *l;
+    *l = n;
+}
+
+void close_all_BP_files (struct BP_file_handle * l)
+{
+    struct BP_file_handle * n;
+
+    while (l)
+    {
+        n = l->next;
+
+        MPI_File_close (&l->fh);
+        free (l);
+
+        l = n;
+    }
+}
+
+int bp_close (BP_FILE * fh)
+{
+    struct BP_GROUP_VAR * gh = fh->gvar_h;
+    struct BP_GROUP_ATTR * ah = fh->gattr_h;
+    struct adios_index_var_struct_v1 * vars_root = fh->vars_root, *vr;
+    struct adios_index_attribute_struct_v1 * attrs_root = fh->attrs_root, *ar;
+    struct bp_index_pg_struct_v1 * pgs_root = fh->pgs_root, *pr;
+    int i,j;
+    MPI_File mpi_fh = fh->mpi_fh;
+
+    adios_errno = 0;
+    if (fh->mpi_fh)
+        MPI_File_close (&mpi_fh);
+
+    if (fh->sfh)
+        close_all_BP_files (fh->sfh);
+
+    if (fh->b) {
+        adios_posix_close_internal (fh->b);
+        free(fh->b);
+    }
+
+    /* Free variable structures */
+    /* alloc in bp_utils.c: bp_parse_vars() */
+    while (vars_root) {
+        vr = vars_root;
+        vars_root = vars_root->next;
+        for (j = 0; j < vr->characteristics_count; j++) {
+            // alloc in bp_utils.c:bp_parse_characteristics() <- bp_get_characteristics_data()
+            if (vr->characteristics[j].dims.dims)
+                free (vr->characteristics[j].dims.dims);
+            if (vr->characteristics[j].value)
+                free (vr->characteristics[j].value);
+            // NCSU - Clearing up statistics
+            if (vr->characteristics[j].stats)
+            {
+                uint8_t k = 0, idx = 0;
+                uint8_t i = 0, count = adios_get_stat_set_count(vr->type);
+
+                while (vr->characteristics[j].bitmap >> k)
+                {
+                    if ((vr->characteristics[j].bitmap >> k) & 1)
+                    {
+                        for (i = 0; i < count; i ++)
+                        {
+                            if (k == adios_statistic_hist)
+                            {
+                                struct adios_index_characteristics_hist_struct * hist = (struct adios_index_characteristics_hist_struct *) (vr->characteristics [j].stats[i][idx].data);
+                                free (hist->breaks);
+                                free (hist->frequencies);
+                                free (hist);
+                            }
+                            else
+                            free (vr->characteristics[j].stats [i][idx].data);
+                        }
+                        idx ++;
+                    }
+                    k ++;
+                }
+
+                for (i = 0; i < count; i ++)
+                    free (vr->characteristics[j].stats [i]);
+
+                free (vr->characteristics[j].stats);
+                vr->characteristics[j].stats = 0;
+            }
+        }
+        if (vr->characteristics)
+            free (vr->characteristics);
+        if (vr->group_name)
+            free (vr->group_name);
+        if (vr->var_name)
+            free (vr->var_name);
+        if (vr->var_path)
+            free (vr->var_path);
+        free(vr);
+    }
+
+    fh->vars_root = 0;
+
+    /* Free attributes structures */
+    /* alloc in bp_utils.c bp_parse_attrs() */
+    while (attrs_root) {
+        ar = attrs_root;
+        attrs_root = attrs_root->next;
+        for (j = 0; j < ar->characteristics_count; j++) {
+            if (ar->characteristics[j].value)
+                free (ar->characteristics[j].value);
+        }
+        if (ar->characteristics)
+            free (ar->characteristics);
+        if (ar->group_name)
+            free (ar->group_name);
+        if (ar->attr_name)
+            free (ar->attr_name);
+        if (ar->attr_path)
+            free (ar->attr_path);
+        free(ar);
+    }
+
+    fh->attrs_root = 0;
+
+    /* Free process group structures */
+    /* alloc in bp_utils.c bp_parse_pgs() first loop */
+    //printf ("pgs: %d\n", fh->mfooter.pgs_count);
+    while (pgs_root) {
+        pr = pgs_root;
+        pgs_root = pgs_root->next;
+        //printf("%d\tpg pid=%d addr=%x next=%x\n",i, pr->process_id, pr, pr->next);
+        if (pr->group_name)
+            free(pr->group_name);
+        if (pr->time_index_name)
+            free(pr->time_index_name);
+        free(pr);
+    }
+
+    fh->pgs_root = 0;
+
+    /* Free variable structures in BP_GROUP_VAR */
+    if (gh) {
+        for (j=0;j<2;j++) {
+            for (i=0;i<gh->group_count;i++) {
+                if (gh->time_index && gh->time_index[j] && gh->time_index[j][i])
+                    free(gh->time_index[j][i]);
+            }
+            if (gh->time_index && gh->time_index[j])
+                free(gh->time_index[j]);
+        }
+        free (gh->time_index);
+
+        for (i=0;i<gh->group_count;i++) {
+            if (gh->namelist && gh->namelist[i])
+                free(gh->namelist[i]);
+        }
+        if (gh->namelist)
+            free (gh->namelist);
+
+        for (i=0;i<fh->mfooter.vars_count;i++) {
+            if (gh->var_namelist && gh->var_namelist[i])
+                free(gh->var_namelist[i]);
+            if (gh->var_offsets && gh->var_offsets[i])
+                free(gh->var_offsets[i]);
+        }
+        if (gh->var_namelist)
+            free (gh->var_namelist);
+
+        if (gh->var_offsets)
+            free(gh->var_offsets);
+
+        if (gh->var_counts_per_group)
+            free(gh->var_counts_per_group);
+
+        if (gh->pg_offsets)
+            free (gh->pg_offsets);
+
+        free (gh);
+    }
+
+    fh->gvar_h = 0;
+
+    /* Free attribute structures in BP_GROUP_ATTR */
+    if (ah) {
+        for (i = 0; i < fh->mfooter.attrs_count; i++) {
+            if (ah->attr_offsets && ah->attr_offsets[i])
+                free(ah->attr_offsets[i]);
+            if (ah->attr_namelist && ah->attr_namelist[i])
+                free(ah->attr_namelist[i]);
+        }
+        if (ah->attr_offsets)
+            free(ah->attr_offsets);
+        if (ah->attr_namelist)
+            free(ah->attr_namelist);
+        if (ah->attr_counts_per_group)
+            free(ah->attr_counts_per_group);
+
+        free(ah);
+    }
+
+    fh->gattr_h = 0;
+
+    if (fh->fname)
+    {
+        free (fh->fname);
+        fh->fname = 0;
+    }
+
+    if (fh)
+        free (fh);
+
+    return 0;
+}
+
 int bp_read_minifooter (struct BP_FILE * bp_struct)
 {
     struct adios_bp_buffer_struct_v1 * b = bp_struct->b;
@@ -437,11 +840,11 @@ int bp_parse_attrs (struct BP_FILE * fh)
     int i;
 
     if (b->length - b->offset < VARS_MINIHEADER_SIZE) {
-        fprintf (stderr, "adios_parse_attrs_index_v1 requires a buffer "
-                "of at least %d bytes.  Only %llu were provided\n"
-                ,VARS_MINIHEADER_SIZE
-                ,b->length - b->offset
-            );
+        adios_error (err_invalid_buffer, 
+                     "adios_parse_attrs_index_v1 requires a buffer "
+                     "of at least %d bytes.  Only %llu were provided\n",
+                     VARS_MINIHEADER_SIZE,
+                     b->length - b->offset);
 
         return 1;
     }
@@ -642,11 +1045,11 @@ int bp_parse_vars (struct BP_FILE * fh)
     struct adios_index_var_struct_v1 ** root;
 
     if (b->length - b->offset < VARS_MINIHEADER_SIZE) {
-        fprintf (stderr, "adios_parse_vars_index_v1 requires a buffer "
-                "of at least %d bytes.  Only %llu were provided\n"
-                ,VARS_MINIHEADER_SIZE
-                ,b->length - b->offset
-            );
+        adios_error (err_invalid_buffer, 
+                     "bp_parse_vars requires a buffer "
+                     "of at least %d bytes.  Only %llu were provided\n",
+                     VARS_MINIHEADER_SIZE,
+                     b->length - b->offset);
 
         return 1;
     }
@@ -802,6 +1205,8 @@ int bp_parse_characteristics (struct adios_bp_buffer_struct_v1 * b,
                   uint64_t j)
 {
     uint8_t flag;
+    float fr, fi;
+    double dr, di;
     enum ADIOS_CHARACTERISTICS c;
 
     BUFREAD8(b, flag)
@@ -811,21 +1216,223 @@ int bp_parse_characteristics (struct adios_bp_buffer_struct_v1 * b,
 
         case adios_characteristic_value:
             (*root)->characteristics [j].value = bp_read_data_from_buffer(b, (*root)->type);
+            if (!((*root)->characteristics [j].stats))
+            {
+                (*root)->characteristics [j].stats = malloc (sizeof(struct adios_index_characteristics_stat_struct *));
+                (*root)->characteristics [j].bitmap = 0;
+            }
+
+            (*root)->characteristics [j].bitmap |= (1 << adios_statistic_min);
+            (*root)->characteristics [j].bitmap |= (1 << adios_statistic_max);
+            (*root)->characteristics [j].bitmap |= (1 << adios_statistic_cnt);
+            (*root)->characteristics [j].bitmap |= (1 << adios_statistic_sum);
+            (*root)->characteristics [j].bitmap |= (1 << adios_statistic_sum_square);
+
+            uint8_t i, c, idx;
+            uint8_t count = adios_get_stat_set_count ((*root)->type);
+            uint16_t characteristic_size;
+
+            for (c = 0; c < count; c ++)
+            {
+                i = idx = 0;
+                (*root)->characteristics [j].stats[c] =
+                    malloc (ADIOS_STAT_LENGTH * sizeof(struct adios_index_characteristics_stat_struct));
+
+                while ((*root)->characteristics [j].bitmap >> i)
+                {
+                    (*root)->characteristics [j].stats[c][i].data = 0;
+                    if (((*root)->characteristics[j].bitmap >> i) & 1)
+                    {
+                        characteristic_size = adios_get_stat_size(
+                                (*root)->characteristics [j].stats[c][idx].data
+                               ,(*root)->type
+                               ,(enum ADIOS_STAT)i
+                               );
+                        (*root)->characteristics [j].stats[c][idx].data = malloc (characteristic_size);
+                        void * data = (*root)->characteristics [j].stats[c][idx].data;
+                        if (idx == adios_statistic_cnt)
+                        {
+                            * (uint32_t *) data = 1;
+                        }
+#define IS_MIN_MAX \
+if (idx == adios_statistic_min \
+ || idx == adios_statistic_max) 
+
+#define IS_SUM \
+if (idx == adios_statistic_sum)
+
+#define IS_SUM2 \
+if (idx == adios_statistic_sum_square)
+
+#define SET_DATA_1(t) \
+* (t *) data = *(t *) (*root)->characteristics [j].value;
+
+#define SET_DATA_2(t) \
+* (double *) data = *(t *) (*root)->characteristics [j].value;
+
+#define SET_DATA_3(t) \
+* (double *) data = *(t *) (*root)->characteristics [j].value * (* (t *)(*root)->characteristics [j].value);
+
+#define SET_DATA(t) \
+IS_MIN_MAX \
+{ \
+SET_DATA_1(t) \
+} \
+else IS_SUM \
+{ \
+SET_DATA_2(t) \
+} \
+else IS_SUM2 \
+{ \
+SET_DATA_3(t) \
+}
+                        switch ((*root)->type)
+                        {
+                            case adios_byte:
+                                SET_DATA(int8_t)
+                                break;
+                            case adios_short:
+                                SET_DATA(int16_t)
+                                break;
+                            case adios_integer:
+                                SET_DATA(int32_t)
+                                break;
+                            case adios_long:
+                                SET_DATA(int64_t)
+                                break;
+                            case adios_unsigned_byte:
+                                SET_DATA(uint8_t)
+                                break;
+                            case adios_unsigned_short:
+                                SET_DATA(uint16_t)
+                                break;
+                            case adios_unsigned_integer:
+                                SET_DATA(uint32_t)
+                                break;
+                            case adios_unsigned_long:
+                                SET_DATA(uint64_t)
+                                break;
+                            case adios_real:
+                                SET_DATA(float)
+                                break;
+                            case adios_double:
+                                SET_DATA(double)
+                                break;
+                            case adios_long_double:
+                                // I don't think long double is currently supported for stats.
+                                break;
+                            case adios_complex:
+                                fr = * (float *) (*root)->characteristics [j].value;
+                                fi = * ((float *) (*root)->characteristics [j].value + 1);
+
+                                if (idx == adios_statistic_min || idx == adios_statistic_max) 
+                                {
+                                    if (c == 0)
+                                    {
+                                        * (float *) data = fr;
+                                    }
+                                    else if (c == 1)
+                                    {
+                                        * (float *) data = fi;
+                                    }
+                                    else if (c == 2)
+                                    {
+                                        * (float *) data = sqrt (fr * fr + fi * fi); 
+                                    }
+                                }
+                                else if (idx == adios_statistic_sum)
+                                {
+                                    if (c == 0)
+                                    {
+                                        * (double *) data = fr;
+                                    }
+                                    else if (c == 1)
+                                    {
+                                        * (double *) data = fi;
+                                    }
+                                    else if (c == 2)
+                                    {
+                                        * (double *) data = sqrt (fr * fr + fi * fi);
+                                    }
+                                }
+                                else if (idx == adios_statistic_sum_square)
+                                {
+                                    if (c == 0)
+                                    {
+                                        * (double *) data = fr * fr;
+                                    }
+                                    else if (c == 1)
+                                    {
+                                        * (double *) data = fi * fi;
+                                    }
+                                    else if (c == 2)
+                                    {
+                                        * (double *) data = fr * fr + fi * fi;
+                                    }
+                                }
+                                break;
+                            case adios_double_complex:
+                                dr = * (double *) (*root)->characteristics [j].value;
+                                di = * ((double *) (*root)->characteristics [j].value + 1);
+
+                                if (idx == adios_statistic_min
+                                 || idx == adios_statistic_max
+                                 || idx == adios_statistic_sum
+                                   )
+                                {
+                                    if (c == 0)
+                                    {
+                                        * (double *) data = dr;
+                                    }
+                                    else if (c == 1)
+                                    {
+                                        * (double *) data = di;
+                                    }
+                                    else if (c == 2)
+                                    {
+                                        * (double *) data = sqrt (dr * dr + di * di);
+                                    }
+                                }
+                                else if (idx == adios_statistic_sum_square)
+                                {
+                                    if (c == 0)
+                                    {
+                                        * (double *) data = dr * dr;
+                                    }
+                                    else if (c == 1)
+                                    {
+                                        * (double *) data = di * di;
+                                    }
+                                    else if (c == 2)
+                                    {
+                                        * (double *) data = dr * dr + di * di;
+                                    }
+                                }
+
+                                break;
+                        }
+                        idx ++;
+                    }
+                    i ++;
+                }
+            }
+
             break;
 
-		// NCSU - Adding in backward compatibility
-		case adios_characteristic_max:
-		{
-			if (!((*root)->characteristics [j].stats))
-			{
-				(*root)->characteristics [j].stats = malloc (sizeof(struct adios_index_characteristics_stat_struct *));
-				(*root)->characteristics [j].stats[0] = malloc (2 * sizeof(struct adios_index_characteristics_stat_struct));
-				(*root)->characteristics [j].bitmap = 0;
-			}
-			(*root)->characteristics [j].bitmap |= (1 << adios_statistic_max);
-			(*root)->characteristics [j].stats[0][adios_statistic_max].data = bp_read_data_from_buffer(b, (*root)->type);
-			break;
-		}
+        // NCSU - Adding in backward compatibility
+        case adios_characteristic_max:
+        {
+            if (!((*root)->characteristics [j].stats))
+            {
+                (*root)->characteristics [j].stats = malloc (sizeof(struct adios_index_characteristics_stat_struct *));
+                (*root)->characteristics [j].stats[0] = malloc (2 * sizeof(struct adios_index_characteristics_stat_struct));
+                (*root)->characteristics [j].bitmap = 0;
+            }
+
+            (*root)->characteristics [j].bitmap |= (1 << adios_statistic_max);
+            (*root)->characteristics [j].stats[0][adios_statistic_max].data = bp_read_data_from_buffer(b, (*root)->type);
+            break;
+        }
 
         // NCSU - Adding in backward compatibility
         case adios_characteristic_min:
@@ -838,76 +1445,79 @@ int bp_parse_characteristics (struct adios_bp_buffer_struct_v1 * b,
             }
             (*root)->characteristics [j].bitmap |= (1 << adios_statistic_min);
             (*root)->characteristics [j].stats[0][adios_statistic_min].data = bp_read_data_from_buffer(b, (*root)->type);
-			break;
+            break;
         }
 
-		// NCSU - Parse the statistical information based in the bitmap
+        // NCSU - Parse the statistical information based in the bitmap
         case adios_characteristic_stat:
-		{
-			uint8_t i, c, idx; 
-			uint8_t count = adios_get_stat_set_count ((*root)->type);
-			uint16_t characteristic_size;
-
-			(*root)->characteristics [j].stats = malloc (count * sizeof(struct adios_index_characteristics_stat_struct *));
-
-			for (c = 0; c < count; c ++)
-			{
-				i = idx = 0;
-				(*root)->characteristics [j].stats[c] = malloc (ADIOS_STAT_LENGTH * sizeof(struct adios_index_characteristics_stat_struct));
-
-				while ((*root)->characteristics[j].bitmap >> i)
-				{
-					(*root)->characteristics [j].stats[c][i].data = 0;
-					if (((*root)->characteristics[j].bitmap >> i) & 1)
-					{
-						if (i == adios_statistic_hist)
-						{
-							uint32_t bi;
-							
-							(*root)->characteristics [j].stats[c][idx].data = malloc (sizeof(struct adios_index_characteristics_hist_struct));
-							struct adios_index_characteristics_hist_struct * hist = (*root)->characteristics [j].stats[c][idx].data; 
-
-            				BUFREAD32(b, hist->num_breaks)
-            				hist->min = * (double *) bp_read_data_from_buffer(b, adios_double);
-            				hist->max = * (double *) bp_read_data_from_buffer(b, adios_double);
-
-            				hist->frequencies = malloc((hist->num_breaks + 1) * adios_get_type_size(adios_unsigned_integer, ""));
-            				for (bi = 0; bi <= hist->num_breaks; bi ++) {
-            				    BUFREAD32(b, hist->frequencies[bi])
-            				}
-
-            				hist->breaks = malloc(hist->num_breaks * adios_get_type_size(adios_double, ""));
-            				for (bi = 0; bi < hist->num_breaks; bi ++) {
-            				    hist->breaks[bi] = * (double *) bp_read_data_from_buffer(b, adios_double);
-            				}
-						}
-						else
-						{
-							characteristic_size = adios_get_stat_size((*root)->characteristics [j].stats[c][idx].data
-                                                                                                 ,(*root)->type
-                                                                                                 ,(enum ADIOS_STAT)i
-                                                                                                 );
-							(*root)->characteristics [j].stats[c][idx].data = malloc (characteristic_size);
-
-							void * data = (*root)->characteristics [j].stats[c][idx].data;
-			            	memcpy (data, (b->buff + b->offset), characteristic_size);
-            				b->offset += characteristic_size;
-
-            				if(b->change_endianness == adios_flag_yes) 
-                        		swap_ptr(data, characteristic_size * 8);
-						}
-						idx ++;
-					}
-					i ++;
-				}	
-			}	
-			break;
-		}
-
-		// NCSU - Statistics. Read the bitmap
-		case adios_characteristic_bitmap:
-			BUFREAD32(b, (*root)->characteristics [j].bitmap);
-			break;
+        {
+            uint8_t i, c, idx; 
+            uint8_t count = adios_get_stat_set_count ((*root)->type);
+            uint16_t characteristic_size;
+
+            (*root)->characteristics [j].stats = malloc (count * sizeof(struct adios_index_characteristics_stat_struct *));
+
+            for (c = 0; c < count; c ++)
+            {
+                i = idx = 0;
+                (*root)->characteristics [j].stats[c] = malloc (ADIOS_STAT_LENGTH * sizeof(struct adios_index_characteristics_stat_struct));
+
+                while ((*root)->characteristics[j].bitmap >> i)
+                {
+                    (*root)->characteristics [j].stats[c][i].data = 0;
+                    if (((*root)->characteristics[j].bitmap >> i) & 1)
+                    {
+                        if (i == adios_statistic_hist)
+                        {
+                            uint32_t bi;
+
+                            (*root)->characteristics [j].stats[c][idx].data = malloc (sizeof(struct adios_index_characteristics_hist_struct));
+                            struct adios_index_characteristics_hist_struct * hist = (*root)->characteristics [j].stats[c][idx].data; 
+
+                            BUFREAD32(b, hist->num_breaks)
+                            hist->min = * (double *) bp_read_data_from_buffer(b, adios_double);
+                            hist->max = * (double *) bp_read_data_from_buffer(b, adios_double);
+
+                            hist->frequencies = malloc((hist->num_breaks + 1) * adios_get_type_size(adios_unsigned_integer, ""));
+                            for (bi = 0; bi <= hist->num_breaks; bi ++)
+                            {
+                                BUFREAD32(b, hist->frequencies[bi])
+                            }
+
+                            hist->breaks = malloc(hist->num_breaks * adios_get_type_size(adios_double, ""));
+                            for (bi = 0; bi < hist->num_breaks; bi ++)
+                            {
+                                hist->breaks[bi] = * (double *) bp_read_data_from_buffer(b, adios_double);
+                            }
+                        }
+                        else
+                        {
+                            characteristic_size = adios_get_stat_size(
+                                (*root)->characteristics [j].stats[c][idx].data
+                               ,(*root)->type
+                               ,(enum ADIOS_STAT)i
+                               );
+                            (*root)->characteristics [j].stats[c][idx].data = malloc (characteristic_size);
+
+                            void * data = (*root)->characteristics [j].stats[c][idx].data;
+			    memcpy (data, (b->buff + b->offset), characteristic_size);
+                            b->offset += characteristic_size;
+
+                            if(b->change_endianness == adios_flag_yes) 
+                                swap_ptr(data, characteristic_size * 8);
+                        }
+                        idx ++;
+                    }
+                    i ++;
+                }	
+            }	
+            break;
+	}
+
+       // NCSU - Statistics. Read the bitmap
+       case adios_characteristic_bitmap:
+           BUFREAD32(b, (*root)->characteristics [j].bitmap);
+           break;
 
         case adios_characteristic_offset: 
             BUFREAD64(b, (*root)->characteristics [j].offset)
@@ -941,12 +1551,504 @@ int bp_parse_characteristics (struct adios_bp_buffer_struct_v1 * b,
         }
 
         default:
-            fprintf (stderr, "Unknown characteristic:%d. skipped.\n", c);
+            log_warn ("Unknown characteristic: %d. skipped.\n", c);
             break;
     }
     return 0;
 }
 
+// Search for the start var index.
+int64_t get_var_start_index (struct adios_index_var_struct_v1 * v, int t)
+{
+    int64_t i = 0;
+
+    while (i < v->characteristics_count) {
+        if (v->characteristics[i].time_index == t) {
+            return i;
+        }
+
+        i++;
+    }
+
+    return -1;
+}
+
+// Search for the stop var index
+int64_t get_var_stop_index (struct adios_index_var_struct_v1 * v, int t)
+{
+    int64_t i = v->characteristics_count - 1;
+
+    while (i > -1) {
+        if (v->characteristics[i].time_index == t) {
+            return i;
+        }
+
+        i--;
+    }
+
+    return -1;
+}
+
+/* Seek to the specified step and prepare a few fields
+ * in ADIOS_FILE structure, i.e., nvars, var_namelist,
+ * nattrs, attr_namelist. This routine also sets the
+ * current_step in ADIOS_FILE. 
+ * Note: in file mode, tostep should be given -1.
+ */
+int bp_seek_to_step (ADIOS_FILE * fp, int tostep, int show_hidden_attrs)
+{
+    int j, k, t, allstep;
+    struct BP_PROC * p = (struct BP_PROC *) fp->fh;
+    struct BP_FILE * fh = p->fh;
+    struct adios_index_var_struct_v1 * var_root;
+    struct adios_index_attribute_struct_v1 * attr_root;
+    uint64_t i;
+
+    /* Streaming starts with step 0. However, time index in BP file
+     * starts with 1. If 'tostep' is -1, that means we want to get all steps.
+     * If not, we seek to the specified step.
+     */
+    if (tostep == -1)
+    {
+        allstep = 1;
+    }
+    else
+    {
+        allstep = 0;
+        t = tostep + 1;
+    }
+
+    /* Prepare vars */
+    fp->nvars = 0;
+    var_root = fh->vars_root;
+
+    while (var_root)
+    {
+        for (i = 0; i < var_root->characteristics_count; i++)
+        {
+            if (allstep || (!allstep && var_root->characteristics[i].time_index == t))
+            {
+                fp->nvars++;
+                break;    
+            }
+        }
+      
+        var_root = var_root->next;
+    }
+
+    fp->var_namelist = (char **) malloc (sizeof (char *) * fp->nvars);
+    p->varid_mapping = (int *) malloc (fp->nvars * 4);
+    assert (p->varid_mapping);
+    
+    var_root = fh->vars_root;
+    j = 0;
+    k = 0;
+    while (var_root)
+    {
+        for (i = 0; i < var_root->characteristics_count; i++)
+        {
+            if (allstep || (!allstep && var_root->characteristics[i].time_index == t))
+            {
+                if (strcmp (var_root->var_path,"/"))
+                {
+                    fp->var_namelist[j] = (char *)malloc (strlen((var_root)->var_name)
+                                          + strlen (var_root->var_path) + 1 + 1   // extra / and ending \0
+                                          );
+                    strcpy (fp->var_namelist[j], var_root->var_path);
+                }
+                else
+                {
+                    fp->var_namelist[j] = (char *) malloc (strlen (var_root->var_name) + 1 + 1);
+                    fp->var_namelist[j][0] = '\0';
+                }
+
+                strcat (fp->var_namelist[j], "/");
+                strcat (fp->var_namelist[j], var_root->var_name);
+                p->varid_mapping[j] = k;
+
+                j++;
+
+                break;
+            }
+        }
+
+        k++;
+        var_root = var_root->next;
+    }
+
+    /* Prepare attrs */
+    fp->nattrs = 0;
+    attr_root = fh->attrs_root;
+
+    while (attr_root)
+    {
+        if (!show_hidden_attrs && strstr (attr_root->attr_path, "__adios__"))
+        {
+        }
+        else
+        {
+            for (i = 0; i < attr_root->characteristics_count; i++)
+            {
+                if (allstep || (!allstep && attr_root->characteristics[i].time_index == t))
+                {
+                    fp->nattrs++;
+                    break;
+                }
+            }
+        }
+
+        attr_root = attr_root->next;
+    }
+
+    alloc_namelist (&fp->attr_namelist, fp->nattrs);
+
+    attr_root = fh->attrs_root;
+    j = 0;
+    while (attr_root)
+    {
+        if (!show_hidden_attrs && strstr (attr_root->attr_path, "__adios__"))
+        {
+        }
+        else
+        {
+            for (i = 0; i < attr_root->characteristics_count; i++)
+            {
+                if (allstep || (!allstep && attr_root->characteristics[i].time_index == t))
+                {
+                    if (strcmp (attr_root->attr_path,"/"))
+                    {
+                        fp->attr_namelist[j] = (char *)malloc (strlen((attr_root)->attr_name)
+                                              + strlen (attr_root->attr_path) + 1 + 1   // extra / and ending \0
+                                              );
+                        strcpy (fp->attr_namelist[j], attr_root->attr_path);
+                    }
+                    else
+                    {
+                        fp->attr_namelist[j] = (char *) malloc (strlen (attr_root->attr_name) + 1 + 1);
+                        fp->attr_namelist[j][0] = '\0';
+                    }
+
+                    strcat (fp->attr_namelist[j], "/");
+                    strcat (fp->attr_namelist[j], attr_root->attr_name);
+
+                    j++;
+
+                    break;
+                }
+            }
+        }
+
+        attr_root = attr_root->next;
+    }
+
+    fp->current_step = tostep;
+
+    return 0;
+}
+
+/* get local and global dimensions and offsets from a variable characteristics 
+   return: 1 = it is a global array, 0 = local array
+*/
+int bp_get_dimension_characteristics(struct adios_index_characteristic_struct_v1 *ch,
+                                    uint64_t *ldims, uint64_t *gdims, uint64_t *offsets)
+{
+    int is_global = 0; // global array or just an array written by one process?
+    int ndim = ch->dims.count;
+    int k;
+
+    for (k = 0; k < ndim; k++)
+    {
+        ldims[k] = ch->dims.dims[k * 3];
+        gdims[k] = ch->dims.dims[k * 3 + 1];
+        offsets[k] = ch->dims.dims[k * 3 + 2];
+        is_global = is_global || gdims[k];
+    }
+
+    return is_global;
+}
+
+/* As opposed to bp_get_dimension_characteristics, this routine returns
+   ldims/gdims/offsets with 'time' extracted. */
+int bp_get_dimension_characteristics_notime (struct adios_index_characteristic_struct_v1 *ch,
+                                            uint64_t *ldims, uint64_t *gdims, uint64_t *offsets,
+                                            int file_is_fortran)
+{
+    int is_global = 0, dummy = 0, has_time;
+    int ndim = ch->dims.count; //ndim possibly has 'time' dimension
+    int k;
+
+    for (k = 0; k < ndim; k++)
+    {
+        ldims[k] = ch->dims.dims[k * 3];
+        gdims[k] = ch->dims.dims[k * 3 + 1];
+        offsets[k] = ch->dims.dims[k * 3 + 2];
+        is_global = is_global || gdims[k];
+    }
+
+    has_time = (gdims[ndim - 1] == 0);
+    // change all the stuff to C ordering
+    if (file_is_fortran)
+    {
+        swap_order (ndim, gdims, &dummy);
+        swap_order (ndim, ldims, &dummy);
+        swap_order (ndim, offsets, &dummy);
+    }
+
+    if (!is_global)
+    {
+        /* local array */
+        for (k =0; k < ndim; k++)
+        {
+            gdims[k] = ldims[k];
+        }
+    }
+    else
+    {
+        if (has_time)
+        {
+            if (!file_is_fortran)
+            {
+                /* first dimension is the time (C array)
+                 * ldims[0] = 1 but gdims does not contain time info and 
+                 * gdims[0] is 1st data dimension and 
+                 * gdims is shorter by one value than ldims in case of C.
+                 * Therefore, gdims[*ndim-1] = 0 if there is a time dimension. 
+                 */
+                // error check
+                if (ndim > 1 && ldims[0] != 1)
+                {
+                    log_error ("ADIOS Error 1: this is a BP file with C ordering "
+                               "but we didn't find an array to have time dimension "
+                               "in the first dimension. l:g:o = (");
+                    for (k = 0; k < ndim; k++)
+                    {
+                        log_error_cont ("%llu:%llu:%llu%s", 
+                                   ldims[k], gdims[k], offsets[k], 
+                                   (k<ndim-1 ? ", " : "") );
+                    }
+
+                    log_error_cont ("\n");
+                }
+
+                for (k = 0; k < ndim - 1; k++)
+                {
+                    ldims[k] = ldims[k + 1];
+                }
+            }
+            else
+            {
+                // last dimension is the time (Fortran array)
+                if (ndim > 1 && ldims[0] != 1)
+                {
+                    log_error ("ADIOS Error: this is a BP file with Fortran array "
+                               "ordering but we didn't find an array to have time "
+                               "dimension in the last dimension. l:g:o = (");
+                    for (k = 0; k < ndim; k++)
+                    {
+                        log_error_cont ("%llu:%llu:%llu%s", 
+                                        ldims[k], gdims[k], offsets[k], 
+                                        (k<ndim-1 ? ", " : "") );
+                    }
+
+                    log_error_cont (")\n");
+                }
+
+                for (k = 0; k < ndim - 1; k++)
+                {
+                    gdims[k] = gdims[k + 1];
+                    ldims[k] = ldims[k + 1];
+                    offsets[k] = offsets[k + 1]; 
+                }
+            }
+        }
+    }
+
+    return is_global;
+}
+
+/* Fill out ndim and dims for the variable.
+   ndim and dims doesn't include 'time' dimension.
+*/
+void bp_get_dimensions (BP_FILE * fh, struct adios_index_var_struct_v1 * var_root, int file_is_fortran,
+                        int * ndim, uint64_t ** dims, int * nsteps)
+{
+    int i, j, has_time_index_characteristic;
+    int is_global; // global array or just an array written by one process?
+    uint64_t ldims[32];
+    uint64_t gdims[32];
+    uint64_t offsets[32];
+
+    has_time_index_characteristic = fh->mfooter.version & ADIOS_VERSION_HAVE_TIME_INDEX_CHARACTERISTIC;
+    /* Get dimension information */
+    * ndim = var_root->characteristics [0].dims.count;
+    * dims = 0;
+    * nsteps = (has_time_index_characteristic ?
+               get_var_nsteps (var_root) : fh->tidx_stop - fh->tidx_start + 1);
+
+    if (* ndim == 0)
+    {
+        /* done with this scalar variable */
+        return ;
+    }
+
+    * dims = (uint64_t *) malloc (sizeof (uint64_t) * (* ndim));
+    assert (* dims);
+
+    memset (*dims, 0, sizeof (uint64_t) * (* ndim));
+
+    is_global = bp_get_dimension_characteristics (&(var_root->characteristics[0]),
+                                                  ldims, gdims, offsets);
+
+    if (!is_global)
+    {
+        j = 0;
+        /* local array */
+        for (i = 0; i < * ndim; i++)
+        {
+            /* size of time dimension is always registered as 1 for an array */
+            if (ldims[i] == 1 && var_root->characteristics_count > 1)
+            {
+                * ndim = * ndim - 1;
+            }
+            else
+            {
+                (* dims)[j++] = ldims[i];
+            }
+        }
+    }
+    else
+    {
+        /* global array:
+           time dimension: ldims=1, gdims=0
+           in C array, it can only be the first dim
+           in Fortran array, it can only be the last dim
+           (always the slowest changing dim)
+        */
+        if (gdims[* ndim - 1] == 0) // with time
+        {
+            if (!file_is_fortran)
+            {
+                /* first dimension is the time (C array)
+                 * ldims[0] = 1 but gdims does not contain time info and 
+                 * gdims[0] is 1st data dimension and 
+                 * gdims is shorter by one value than ldims in case of C.
+                 * Therefore, gdims[*ndim-1] = 0 if there is a time dimension. 
+                 */
+                // error check
+                if (* ndim > 1 && ldims[0] != 1)
+                {
+                    log_error ("ADIOS Error 2: this is a BP file with C ordering "
+                               "but we didn't find an array to have time dimension "
+                               "in the first dimension. l:g:o = (");
+                    for (i = 0; i < * ndim; i++)
+                    {
+                        log_error_cont ("%llu:%llu:%llu%s", 
+                                        ldims[i], gdims[i], offsets[i], 
+                                        (i<*ndim-1 ? ", " : "") );
+                    }
+
+                    log_error_cont(")\n");
+                }
+            }
+            else
+            {
+                // last dimension is the time (Fortran array)
+                if (* ndim > 1 && ldims[* ndim - 1] != 1)
+                {
+                    log_error ("ADIOS Error: this is a BP file with Fortran array "
+                               "ordering but we didn't find an array to have time "
+                               "dimension in the last dimension. l:g:o = (");
+                    for (i = 0; i < * ndim; i++)
+                    {
+                        log_error_cont ("%llu:%llu:%llu%s", 
+                                        ldims[i], gdims[i], offsets[i], 
+                                        (i<*ndim-1 ? ", " : "") );
+                    }
+
+                    log_error_cont(")\n");
+                }
+            }
+
+            * ndim = * ndim - 1;
+        }
+
+        for (i = 0; i < * ndim; i++)
+        {
+            (* dims)[i] = gdims[i];
+        }
+
+    }
+}
+
+/* Get dimensions of a variable and flip them if swap_flag is set.
+   ndim: has already taken time dimension out if there is any.
+   dims: is local dims if local array. is global dims if global array.
+*/
+void bp_get_and_swap_dimensions (BP_FILE * fh, struct adios_index_var_struct_v1 *var_root, int file_is_fortran,
+                                 int *ndim, uint64_t **dims, int *nsteps, int swap_flag)
+{
+    int dummy = 0;
+
+    bp_get_dimensions (fh, var_root, file_is_fortran, ndim, dims, nsteps);
+
+    if (swap_flag)
+    {
+        /* dummy timedim */
+        swap_order (*ndim, *dims, &dummy);
+    }
+}
+
+/* Get # of steps of a variable */
+int get_var_nsteps (struct adios_index_var_struct_v1 * var_root)
+{
+    uint64_t i;
+    int nsteps = 0;
+    int prev_step = -1;
+
+    /* This following loops, of course, assumes indices
+     * are sorted by time_index already.
+     */
+    for (i = 0; i < var_root->characteristics_count; i++)
+    {
+        if (var_root->characteristics[i].time_index != prev_step)
+        {
+            prev_step = var_root->characteristics[i].time_index;
+            nsteps ++;
+        }
+    }
+
+    return nsteps;
+}
+
+/* Get # of blocks per step */
+int * get_var_nblocks (struct adios_index_var_struct_v1 * var_root, int nsteps)
+{
+    int i, j, prev_step = -1;
+    int * nblocks = (int *) malloc (sizeof (int) * nsteps);
+
+    assert (nblocks); 
+
+    memset (nblocks, 0, sizeof (int) * nsteps);
+
+    j = -1;
+    for (i = 0; i < var_root->characteristics_count; i++)
+    {
+        if (var_root->characteristics[i].time_index != prev_step)
+        {
+            j ++;
+            if (j > nsteps - 1)
+            {
+                break;
+            }
+            prev_step = var_root->characteristics[i].time_index;
+        }
+
+        nblocks[j] ++;
+    }
+
+    return nblocks;
+}
+
 void * bp_read_data_from_buffer(struct adios_bp_buffer_struct_v1 *b, enum ADIOS_DATATYPES type)
 {
     int16_t data_size;
@@ -961,7 +2063,8 @@ void * bp_read_data_from_buffer(struct adios_bp_buffer_struct_v1 *b, enum ADIOS_
     }
 
     if (!data) {
-        fprintf (stderr, "bp_read_data_from_buffer: cannot allocate %d bytes\n",data_size);
+        adios_error (err_no_memory, 
+                     "bp_read_data_from_buffer: cannot allocate %d bytes\n",data_size);
         return 0;
     }
 
@@ -1123,7 +2226,7 @@ int bp_read_pgs (struct BP_FILE * bp_struct)
         MPI_Get_count (&status, MPI_BYTE, &r);
     }
     if (r != b->pg_size)
-        fprintf (stderr, "could not read %llu bytes. read only: %llu\n",
+        log_error("could not read %llu bytes. read only: %llu\n",
                 b->pg_size, r);
 
     return 0;
@@ -1159,7 +2262,7 @@ int bp_read_vars (struct BP_FILE * bp_struct)
         MPI_Get_count (&status, MPI_BYTE, &r);
     }
     if (r != b->vars_size)
-        fprintf (stderr, "could not read %llu bytes. read only: %llu\n",
+        log_error ("could not read %llu bytes. read only: %llu\n",
                 b->vars_size, r);
 
     return 0;
@@ -1451,131 +2554,52 @@ void print_var_header (struct adios_var_header_struct_v1 * var_header)
 }
 */
 
-/* Change endianness of each element in an array */
-/* input: array, size in bytes(!), size of one element */
-void change_endianness( void *data, uint64_t slice_size, enum ADIOS_DATATYPES type) 
+int is_fortran_file (struct BP_FILE * fh)
 {
-    int size_of_type = bp_get_type_size(type, "");
-    uint64_t n = slice_size / size_of_type;
-    uint64_t i;
-    char *ptr = (char *) data;
-
-    if (slice_size % size_of_type != 0) {
-        fprintf(stderr, "Adios error in bp_utils.c:change_endianness(): "
-                    "An array's endianness is to be converted but the size of array "
-                    "is not dividable by the size of the elements: "
-                    "size = %lld, element size = %d\n", slice_size, size_of_type);
-    }
+    return (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
+}
 
-    switch (type)
-    {
-        case adios_byte:
-        case adios_short:
-        case adios_integer:
-        case adios_long:
-        case adios_unsigned_byte:
-        case adios_unsigned_short:
-        case adios_unsigned_integer:
-        case adios_unsigned_long:
-        case adios_real:
-        case adios_double:
-        case adios_long_double:
-            switch (size_of_type) {
-                /* case 1: nothing to do */
-                case 2:
-                    for (i=0; i < n; i++) {
-                        swap_16_ptr(ptr);
-                        ptr += size_of_type;
-                    }
-                    break;
-                case 4:
-                    for (i=0; i < n; i++) {
-                        swap_32_ptr(ptr);
-                        ptr += size_of_type;
-                    }
-                    break;
-                case 8:
-                    for (i=0; i < n; i++) {
-                        swap_64_ptr(ptr);
-                        ptr += size_of_type;
-                    }
-                    break;
-                case 16:
-                    for (i=0; i < n; i++) {
-                        swap_128_ptr(ptr);
-                        ptr += size_of_type;
-                    }
-                    break;
-            }
-            break;
+int has_subfiles (struct BP_FILE * fh)
+{
+    return (fh->mfooter.version & ADIOS_VERSION_HAVE_SUBFILE);
+}
 
-        case adios_complex:
-            for (i=0; i < n; i++) {
-                swap_32_ptr(ptr);   // swap REAL part 4 bytes 
-                swap_32_ptr(ptr+4); // swap IMG part 4 bytes
-                ptr += size_of_type;
-            }
-            break;
+/****************************************************
+  Find the var associated with the given variable id 
+*****************************************************/
+struct adios_index_var_struct_v1 * bp_find_var_byid (BP_FILE * fh, int varid)
+{
+    struct adios_index_var_struct_v1 * var_root = fh->vars_root;
+    int i;
 
-        case adios_double_complex:
-            for (i=0; i < n; i++) {
-                swap_64_ptr(ptr);   // swap REAL part 8 bytes 
-                swap_64_ptr(ptr+8); // swap IMG part 8 bytes
-                ptr += size_of_type;
-            }
-            break;
+    for (i = 0; i < varid && var_root; i++)
+    {
+        var_root = var_root->next;
+    }
 
-        case adios_string:
-        default:
-            /* nothing to do */
-            break;
+    if (i != varid)
+    {
+        adios_error (err_corrupted_variable,
+               "Variable id=%d is valid but was not found in internal data structures!",
+               varid);
+        return NULL;
     }
+
+    return var_root;
 }
 
-void copy_data (void *dst, void *src,
-        int idim,
-        int ndim,
-        uint64_t* size_in_dset, 
-        uint64_t* ldims, 
-        const uint64_t * readsize, 
-        uint64_t dst_stride, 
-        uint64_t src_stride,
-        uint64_t dst_offset, 
-        uint64_t src_offset,
-        uint64_t ele_num,
-        int      size_of_type
-        )
+/* Check whether an array is global */
+int is_global_array (struct adios_index_characteristic_struct_v1 *ch)
 {
-    unsigned int i, j;
-    uint64_t dst_offset_new=0; 
-    uint64_t src_offset_new=0;
-    uint64_t src_step, dst_step;
-    if (ndim-1==idim) {
-        for (i=0;i<size_in_dset[idim];i++) {
-            memcpy ((char *)dst + (i*dst_stride+dst_offset)*size_of_type,
-                    (char *)src + (i*src_stride+src_offset)*size_of_type,
-                    ele_num*size_of_type);
-        }
-        return;
-    }
+    int is_global = 0; // global array or just an array written by one process?
+    int ndim = ch->dims.count, k;
 
-    for (i = 0; i<size_in_dset[idim];i++) {
-        // get the different step granularity 
-        // for each different reading pattern broke
-        src_step = 1;
-        dst_step = 1;
-        for (j = idim+1; j <= ndim-1;j++) {
-            src_step *= ldims[j];
-            dst_step *= readsize[j];
-        }
-        src_offset_new =src_offset + i * src_stride * src_step;
-        dst_offset_new = dst_offset + i * dst_stride * dst_step;
-        copy_data ( dst, src, idim+1, ndim, size_in_dset,
-                ldims,readsize, 
-                dst_stride, src_stride,
-                dst_offset_new, src_offset_new,
-                ele_num, size_of_type);
+    for (k = 0; k < ndim; k ++)
+    {
+        is_global = is_global || ch->dims.dims[k*3 + 1];
     }
+
+    return is_global;
 }
 
 /** Return the memory size of one data element of an adios type.
@@ -1681,26 +2705,65 @@ double bp_value_to_double (enum ADIOS_DATATYPES type, void * data)
     }
 }
 
-void alloc_namelist (char ***namelist, int length)
+/* This routine checks whether the file is a valid ADIOS-BP file.
+ * This is done by check whether the 'ADIOS-BP' string has been written
+ * before minifooter.
+ */
+int check_bp_validity (const char * fname)
 {
-        int j;
+    int  err, flag;
+    MPI_File fh;
+    MPI_Offset  file_size;
+    MPI_Status status;
+    char str[9];
 
-        *namelist = (char **) malloc(length*sizeof(char*));
-        for (j=0;j<length;j++)
-                (*namelist)[j] = (char *) malloc(255);
+    err = MPI_File_open (MPI_COMM_SELF, (char *) fname, MPI_MODE_RDONLY,
+                        (MPI_Info) MPI_INFO_NULL, &fh);
+    if (err != MPI_SUCCESS)
+    {
+        char e [MPI_MAX_ERROR_STRING];
+        int len = 0;
+        memset (e, 0, MPI_MAX_ERROR_STRING);
+        MPI_Error_string (err, e, &len);
+        adios_error (err_file_open_error, "MPI open failed for %s: '%s'\n", fname, e);
+        return 0;
+    }
 
-        return;
+    MPI_File_get_size (fh, &file_size);
+    // Since 1.4, there is an additional 28 bytes written ahead of minifooter.
+    MPI_File_seek (fh, (MPI_Offset) file_size - MINIFOOTER_SIZE - 28, MPI_SEEK_SET);
+    MPI_File_read (fh, str, 8, MPI_BYTE, &status);
+    MPI_File_close (&fh);
+          
+    //printf ("check_bp_validity: %s\n", str);
+    str[8] = '\0';
+
+    flag = (strcmp (str, "ADIOS-BP") == 0 ) ? 1 : 0; 
+
+    return flag;
 }
 
-void free_namelist (char **namelist, int length)
+int get_num_subfiles (struct BP_FILE * fh)
 {
-        int i;
-        if (namelist) {
-                for (i=0;i<length;i++) {
-                        if(namelist[i])
-                                free(namelist[i]);
-                }
-                free(namelist);
+    struct adios_bp_buffer_struct_v1 * b = fh->b;
+    struct adios_index_var_struct_v1 ** vars_root = &(fh->vars_root);
+    struct bp_minifooter * mh = &(fh->mfooter);
+    struct adios_index_var_struct_v1 ** root;
+    int i, j, n = 0;
+
+    root = vars_root;
+    for (i = 0; i < mh->vars_count; i++)
+    {
+        for (j = 0; j < (*root)->characteristics_count; j++)
+        {
+            if ((*root)->characteristics [j].file_index > n)
+            {
+                n = (*root)->characteristics [j].file_index;
+            }
         }
-        return;
+    }
+
+    return n + 1;
 }
+
+
diff --git a/src/core/bp_utils.h b/src/core/bp_utils.h
new file mode 100644
index 0000000..1172ab3
--- /dev/null
+++ b/src/core/bp_utils.h
@@ -0,0 +1,78 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#ifndef __BP_UTILS_H__
+#define __BP_UTILS_H__
+
+#include <stdio.h>
+#include <sys/types.h>
+#   include "public/adios_read.h" // ADIOS_FILE*
+#ifdef _NOMPI
+#   include "public/mpidummy.h"
+#else
+#   include "mpi.h"
+#endif
+#include "core/bp_types.h"
+#define VARS_MINIHEADER_SIZE 10
+
+void bp_alloc_aligned (struct adios_bp_buffer_struct_v1 * b, uint64_t size);
+void bp_realloc_aligned (struct adios_bp_buffer_struct_v1 * b, uint64_t size);
+int bp_get_endianness( uint32_t change_endianness );
+int bp_parse_characteristics (struct adios_bp_buffer_struct_v1 * b,
+		  	      struct adios_index_var_struct_v1 ** root,
+			      uint64_t j);
+int bp_get_characteristics_data (void ** ptr_data,
+				 void * buffer,
+				 int data_size,
+				 enum ADIOS_DATATYPES type);
+int bp_read_close (struct adios_bp_buffer_struct_v1 * b);
+int bp_read_open (const char * filename,
+	 	  MPI_Comm comm, 
+		  struct BP_FILE * fh);
+MPI_File * get_BP_file_handle(struct BP_file_handle * l, uint32_t file_index);
+void add_BP_file_handle (struct BP_file_handle ** l, struct BP_file_handle * n);
+void close_all_BP_files (struct BP_file_handle * l);
+int get_time (struct adios_index_var_struct_v1 * v, int step);
+int bp_open (const char * fname,
+             MPI_Comm comm,
+             struct BP_FILE * fh);
+ADIOS_VARINFO * bp_inq_var_byid (const ADIOS_FILE * fp, int varid);
+int bp_close (BP_FILE * fh);
+int bp_read_minifooter (struct BP_FILE * bp_struct);
+int bp_parse_pgs (struct BP_FILE * fh);
+int bp_parse_attrs (struct BP_FILE * fh);
+int bp_parse_vars (struct BP_FILE * fh);
+int bp_seek_to_step (ADIOS_FILE * fp, int tostep, int show_hidden_attrs);
+int64_t get_var_start_index (struct adios_index_var_struct_v1 * v, int t);
+int64_t get_var_stop_index (struct adios_index_var_struct_v1 * v, int t);
+
+const char * bp_value_to_string (enum ADIOS_DATATYPES type, void * data);
+int bp_get_type_size (enum ADIOS_DATATYPES type, void * var);
+int bp_get_dimensioncharacteristics(struct adios_index_characteristic_struct_v1 *ch,
+                                    uint64_t *ldims, uint64_t *gdims, uint64_t *offsets);
+int bp_get_dimension_characteristics_notime (struct adios_index_characteristic_struct_v1 *ch,
+                                            uint64_t *ldims, uint64_t *gdims, uint64_t *offsets,
+                                            int file_is_fortran);
+void bp_get_dimensions (BP_FILE *fh, struct adios_index_var_struct_v1 *var_root, int file_is_fortran,
+                        int *ndim, uint64_t **dims, int *nsteps);
+void bp_get_and_swap_dimensions (BP_FILE *fh, struct adios_index_var_struct_v1 *var_root, int file_is_fortran,
+                                 int *ndim, uint64_t **dims, int *nsteps, int swap_flag);
+int get_var_nsteps (struct adios_index_var_struct_v1 * var_root);
+int * get_var_nblocks (struct adios_index_var_struct_v1 * var_root, int nsteps);
+void print_process_group_index (
+                         struct adios_index_process_group_struct_v1 * pg_root
+                         );
+/* Return 1 if a < b wrt. the given type, otherwise 0 */
+int adios_lt(int type, void *a, void *b);
+double bp_value_to_double(enum ADIOS_DATATYPES type, void * data);
+int is_fortran_file (struct BP_FILE * fh);
+int has_subfiles (struct BP_FILE * fh);
+struct adios_index_var_struct_v1 * bp_find_var_byid (BP_FILE * fh, int varid);
+int is_global_array (struct adios_index_characteristic_struct_v1 * ch);
+int check_bp_validity (const char * fname);
+int get_num_subfiles (struct BP_FILE * fh);
+#endif
diff --git a/src/buffer.c b/src/core/buffer.c
similarity index 83%
rename from src/buffer.c
rename to src/core/buffer.c
index 3a54f6f..b427f47 100644
--- a/src/buffer.c
+++ b/src/core/buffer.c
@@ -14,7 +14,9 @@
 #	include <mach/mach.h>
 #endif
 
-#include "buffer.h"
+#include "core/buffer.h"
+#include "core/adios_logger.h"
+#include "public/adios_error.h"
 
 // buffer sizing may be problematic.  To get a more accurate picture, check:
 // http://chandrashekar.info/vault/linux-system-programs.html
@@ -54,7 +56,7 @@ static inline size_t adios_get_avphys_pages ()
                         HOST_VM_INFO,
                         (host_info_t)&host_info,
                         &host_info_outCnt) != KERN_SUCCESS ) {
-        fprintf (stderr, "adios_get_avphys_pages (): host_statistics failed.\n");
+        log_error("adios_get_avphys_pages (): host_statistics failed.\n");
         return 0;   // Best we can do
     }
 
@@ -98,13 +100,13 @@ int adios_set_buffer_size ()
             }
             else
             {
-                fprintf (stderr, "adios_allocate_buffer (): insufficient memory: "
-                                 "%llu requested, %llu available.  Using "
-                                 "available.\n"
-                        ,adios_buffer_size_requested
-                        ,(uint64_t)(((uint64_t) pagesize) * pages)
-                        );
-                 adios_buffer_size_max = (uint64_t)((uint64_t) pagesize) * pages;
+                adios_error (err_no_memory,
+                             "adios_allocate_buffer (): insufficient memory: "
+                             "%llu requested, %llu available.  Using "
+                             "available.\n",
+                             adios_buffer_size_requested,
+                             (uint64_t)(((uint64_t) pagesize) * pages));
+                adios_buffer_size_max = (uint64_t)((uint64_t) pagesize) * pages;
            }
         }
 
@@ -114,10 +116,7 @@ int adios_set_buffer_size ()
     }
     else
     {
-        fprintf (stderr, "adios_allocate_buffer already called. "
-                         "No changes made.\n"
-                );
-
+        log_error ("adios_allocate_buffer already called. No changes made.\n");
         return 0;
     }
 }
@@ -144,9 +143,9 @@ int adios_method_buffer_free (uint64_t size)
 {
     if (size + adios_buffer_size_remaining > adios_buffer_size_max)
     {
-        fprintf (stderr, "ERROR: attempt to return more bytes to buffer "
-                         "pool than were originally available\n"
-                );
+        adios_error (err_invalid_buffer, 
+                     "ERROR: attempt to return more bytes to buffer "
+                     "pool than were originally available\n");
 
         adios_buffer_size_remaining = adios_buffer_size_max;
 
diff --git a/src/buffer.h b/src/core/buffer.h
similarity index 96%
rename from src/buffer.h
rename to src/core/buffer.h
index c302538..b2b1ee4 100644
--- a/src/buffer.h
+++ b/src/core/buffer.h
@@ -8,7 +8,7 @@
 #ifndef ADIOS_BUFFER_H
 #define ADIOS_BUFFER_H
 
-#include "adios_types.h"
+#include "public/adios_types.h"
 
 void      adios_buffer_size_requested_set (uint64_t v);
 uint64_t  adios_buffer_size_requested_get (void);
diff --git a/src/common_adios.c b/src/core/common_adios.c
similarity index 67%
rename from src/common_adios.c
rename to src/core/common_adios.c
index ed20228..0a0b6c5 100644
--- a/src/common_adios.c
+++ b/src/core/common_adios.c
@@ -5,21 +5,34 @@
  * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
  */
 
+#include "../config.h"
+
 #include <stdlib.h>
 #include <math.h>
 #include <string.h>
 #include <unistd.h>
 #include <stdint.h>
+#include <sys/time.h> // gettimeofday
+
+#ifdef _NOMPI
+/* Sequential processes can use the library compiled with -D_NOMPI */
+#   include "public/mpidummy.h"
+#else
+/* Parallel applications should use MPI to communicate file info and slices of data */
+#   include "mpi.h"
+#endif
 
 // xml parser
 #include <mxml.h>
 
-#include "common_adios.h"
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
-#include "adios_internals.h"
-#include "adios_internals_mxml.h"
-#include "buffer.h"
+#include "core/common_adios.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_internals.h"
+#include "core/adios_internals_mxml.h"
+#include "core/buffer.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_logger.h"
+#include "public/adios_error.h"
 
 #ifdef DMALLOC
 #include "dmalloc.h"
@@ -30,8 +43,9 @@ extern struct adios_transport_struct * adios_transports;
 ///////////////////////////////////////////////////////////////////////////////
 int common_adios_init (const char * config)
 {
+    MPI_Comm comm = MPI_COMM_WORLD; // FIXME: this should be an argument from app
     // parse the config file
-    return adios_parse_config (config);
+    return adios_parse_config (config, comm);
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -101,9 +115,9 @@ int common_adios_open (int64_t * fd, const char * group_name
                     mode = adios_mode_update;
                 else
                 {
-                    fprintf (stderr, "adios_open: unknown file mode: %s\n"
-                            ,file_mode
-                            );
+                    adios_error(err_invalid_file_mode, 
+                        "adios_open: unknown file mode: %s, supported r,w,a,u\n",
+                        file_mode);
 
                     *fd = 0;
 
@@ -125,8 +139,40 @@ int common_adios_open (int64_t * fd, const char * group_name
     fd_p->base_offset = 0;
     fd_p->pg_start_in_file = 0;
 
-    if (mode != adios_mode_read)
+#ifdef SKEL_TIMING
+	fd_p->timing_obj = 0;
+#endif
+
+#if 1
+    /* Time index magic done here */
+    if (mode == adios_mode_write) 
+    {
+        /* Traditionally, time=1 at the first step, and for subsequent file 
+           creations, time increases. Although, each file contains one step,
+           the time index indicates that they are in a series.
+        */
+        g->time_index++;
+    } 
+    else if (mode == adios_mode_append)
+    {
         g->time_index++;
+    }
+    else if (mode == adios_mode_update && g->time_index > 1)
+    {
+        /* Update from Append differs only in the time index. All methods had
+           code for Append, now for Update we decrease the counter by one,
+           for all methods. (But do not go below 1).
+        */
+        g->time_index--;
+    }
+    /* time starts from 1 not from 0 (traditionally; now no one cares */
+    if (g->time_index == 0)
+        g->time_index = 1;
+#else
+    /* old way pre-1.4*/
+    if (mode != adios_mode_read) 
+        g->time_index++;
+#endif
 
     while (methods)
     {
@@ -148,6 +194,8 @@ int common_adios_open (int64_t * fd, const char * group_name
 }
 
 ///////////////////////////////////////////////////////////////////////////////
+static const char ADIOS_ATTR_PATH[] = "/__adios__";
+
 int common_adios_group_size (int64_t fd_p
                      ,uint64_t data_size
                      ,uint64_t * total_size
@@ -156,7 +204,7 @@ int common_adios_group_size (int64_t fd_p
     struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
     if (!fd)
     {
-        fprintf (stderr, "Invalid handle passed to adios_group_size\n");
+        adios_error (err_invalid_file_pointer, "Invalid handle passed to adios_group_size\n");
 
         return 1;
     }
@@ -171,6 +219,59 @@ int common_adios_group_size (int64_t fd_p
         return 0;
     }
 
+    /* Add ADIOS internal attributes now (should be before calculating the overhead) */
+    if (fd->mode != adios_mode_read && 
+         (fd->group->process_id == 0 || fd->subfile_index != -1)
+       ) 
+    {
+        struct timeval tp;
+        char epoch[16];
+        gettimeofday(&tp, NULL); 
+        sprintf(epoch, "%d", (int) tp.tv_sec);
+
+        int def_adios_init_attrs = 1;
+        // if we append/update, define these attributes only at the first step
+        if (fd->mode != adios_mode_write && fd->group->time_index > 1)
+            def_adios_init_attrs = 0;
+
+        if (def_adios_init_attrs) {
+            log_debug ("Define ADIOS extra attributes, "
+                       "time = %d, rank = %d, epoch = %s subfile=%d\n", 
+                       fd->group->time_index, fd->group->process_id, epoch, fd->subfile_index);
+
+            adios_common_define_attribute ((int64_t)fd->group, "version", ADIOS_ATTR_PATH, 
+                    adios_string, VERSION, NULL);
+
+            adios_common_define_attribute ((int64_t)fd->group, "create_time_epoch", ADIOS_ATTR_PATH,
+                    adios_integer, epoch, NULL);
+            adios_common_define_attribute ((int64_t)fd->group, "update_time_epoch", ADIOS_ATTR_PATH,
+                    adios_integer, epoch, NULL);
+            // id of last attribute is fd->group->member_count
+            fd->group->attrid_update_epoch = fd->group->member_count;
+            
+        }
+        /* FIXME: this code works fine, it does not duplicate the attribute, 
+           but the index will still contain all copies and the read will see 
+           only the first one. Thus updating an attribute does not work 
+           in practice.
+         */
+        else 
+        {
+            // update attribute of update time (define would duplicate it) 
+            struct adios_attribute_struct * attr = adios_find_attribute_by_id
+                   (fd->group->attributes, fd->group->attrid_update_epoch); 
+            if (attr) {
+                log_debug ("Update ADIOS extra attribute name=%s, "
+                           "time = %d, rank = %d, epoch = %s, subfile=%d\n", 
+                           attr->name, fd->group->time_index, fd->group->process_id, 
+                           epoch, fd->subfile_index);
+
+                free(attr->value);
+                adios_parse_scalar_string (adios_integer, (void *) epoch, &attr->value);
+            }
+        }
+    }
+
     fd->write_size_bytes = data_size;
 
     uint64_t overhead = adios_calc_overhead_v1 (fd);
@@ -188,10 +289,9 @@ int common_adios_group_size (int64_t fd_p
     {
         fd->shared_buffer = adios_flag_no;
 
-        fprintf (stderr, "adios_group_size (%s): Not buffering. "
-                         "needs: %llu available: %llu.\n"
-                ,fd->group->name, fd->write_size_bytes, allocated
-                );
+        log_warn ("adios_group_size (%s): Not buffering. "
+                  "needs: %llu available: %llu.\n", 
+                  fd->group->name, fd->write_size_bytes, allocated);
     }
     else
     {
@@ -236,7 +336,7 @@ int common_adios_group_size (int64_t fd_p
         fd->bytes_written = 0;
         if (!fd->buffer)
         {
-            fprintf (stderr, "Cannot allocate %llu bytes for buffered output.\n",
+            adios_error (err_no_memory, "Cannot allocate %llu bytes for buffered output.\n",
                     fd->write_size_bytes);
 
             return 1;
@@ -257,6 +357,86 @@ int common_adios_group_size (int64_t fd_p
     return 0;
 }
 
+int common_adios_write_byid (struct adios_file_struct * fd, struct adios_var_struct * v, void * var)
+{
+    struct adios_method_list_struct * m = fd->group->methods;
+
+    if (m && m->next == NULL && m->method->m == ADIOS_METHOD_NULL)
+    {
+        return 0;
+    }
+
+    if (v->data)
+    {
+        free (v->data);
+        v->data = 0;
+    }
+
+    if (v->dimensions)
+    {
+        v->data = var;
+    }
+    else
+    {
+        uint64_t element_size = adios_get_type_size (v->type, var);
+
+        switch (v->type)
+        {
+            case adios_byte:
+            case adios_short:
+            case adios_integer:
+            case adios_long:
+            case adios_unsigned_byte:
+            case adios_unsigned_short:
+            case adios_unsigned_integer:
+            case adios_unsigned_long:
+            case adios_real:
+            case adios_double:
+            case adios_long_double:
+            case adios_complex:
+            case adios_double_complex:
+                v->data = malloc (element_size);
+                if (!v->data)
+                {
+                    adios_error (err_no_memory,
+                                 "In adios_write, cannot allocate %lld bytes to copy scalar %s\n",
+                                 element_size, v->name);
+
+                    return 0;
+                }
+
+                memcpy ((char *) v->data, var, element_size);
+                break;
+
+            case adios_string:
+                v->data = malloc (element_size + 1);
+                if (!v->data)
+                {
+                    adios_error (err_no_memory,
+                                 "In adios_write, cannot allocate %lld bytes to copy string %s\n",
+                                 element_size, v->name);
+
+                    return 0;
+                }
+                ((char *) v->data) [element_size] = 0;
+                memcpy ((char *) v->data, var, element_size);
+                break;
+
+            default:
+                v->data = 0;
+                break;
+        }
+    }
+
+    common_adios_write (fd, v, var);
+    // v->data is set to NULL in the above call
+
+    if (fd->mode == adios_mode_write || fd->mode == adios_mode_append)
+    {
+        adios_copy_var_written (&fd->group->vars_written, v, fd);
+    }
+}
+
 ///////////////////////////////////////////////////////////////////////////////
 /* common_adios_write is just a partial implementation. It expects filled out
  * structures. This is because C and Fortran implementations of adios_write are 
@@ -307,7 +487,7 @@ int common_adios_get_write_buffer (int64_t fd_p, const char * name
     struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
     if (!fd)
     {
-        fprintf (stderr, "Invalid handle passed to adios_get_write_buffer\n");
+        adios_error (err_invalid_file_pointer, "Invalid handle passed to adios_group_size\n");
 
         return 1;
     }
@@ -318,20 +498,17 @@ int common_adios_get_write_buffer (int64_t fd_p, const char * name
 
     if (!v)
     {
-        fprintf (stderr
-                ,"Bad var name (ignored): '%s' (%c%c%c)\n"
-                ,name, name[0], name[1], name[2]
-                );
+        adios_error (err_invalid_varname, "Bad var name (ignored): '%s' (%c%c%c)\n",
+                     name, name[0], name[1], name[2]);
 
         return 1;
     }
 
     if (fd->mode == adios_mode_read)
     {
-        fprintf (stderr, "write attempted on %s in %s.  This was opened for"
-                         " read\n"
-                ,name , fd->name
-                );
+        adios_error (err_invalid_file_mode, 
+                     "write attempted on %s in %s. This was opened for read\n",
+                     name , fd->name);
 
         return 1;
     }
@@ -364,7 +541,7 @@ int common_adios_read (int64_t fd_p, const char * name, void * buffer
     struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
     if (!fd)
     {
-        fprintf (stderr, "Invalid handle passed to adios_read\n");
+        adios_error (err_invalid_file_pointer, "Invalid handle passed to adios_group_size\n");
 
         return 1;
     }
@@ -379,9 +556,9 @@ int common_adios_read (int64_t fd_p, const char * name, void * buffer
 
     if (!(fd->mode == adios_mode_read))
     {
-        fprintf (stderr, "read attempted on %s which was opened for write\n"
-                ,fd->name
-                );
+        adios_error (err_invalid_file_mode, 
+                     "read attempted on %s which was opened for write\n",
+                     fd->name);
 
         return 1;
     }
@@ -410,9 +587,8 @@ int common_adios_read (int64_t fd_p, const char * name, void * buffer
     }
     else
     {
-        fprintf (stderr, "var %s in file %s not found on read\n"
-                ,name, fd->name
-                );
+        adios_error (err_invalid_varname, "var %s in file %s not found on read\n",
+                     name, fd->name);
 
         return 1;
     }
@@ -426,7 +602,7 @@ int common_adios_set_path (int64_t fd_p, const char * path)
     struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
     if (!fd)
     {
-        fprintf (stderr, "Invalid handle passed to adios_set_path\n");
+        adios_error (err_invalid_file_pointer, "Invalid handle passed to adios_set_path\n");
 
         return 1;
     }
@@ -469,7 +645,7 @@ int common_adios_set_path_var (int64_t fd_p, const char * path
     struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
     if (!fd)
     {
-        fprintf (stderr, "Invalid handle passed to adios_set_path_var\n");
+        adios_error (err_invalid_file_pointer, "Invalid handle passed to adios_set_path_var\n");
 
         return 1;
     }
@@ -490,9 +666,9 @@ int common_adios_set_path_var (int64_t fd_p, const char * path
     }
     else
     {
-        fprintf (stderr, "adios_set_path_var (path=%s, var=%s): var not found\n"
-                ,path, name
-                );
+        adios_error (err_invalid_varname, 
+                     "adios_set_path_var (path=%s, var=%s): var not found\n",
+                     path, name);
 
         return 1;
     }
@@ -569,7 +745,7 @@ int common_adios_close (int64_t fd_p)
     struct adios_file_struct * fd = (struct adios_file_struct *) fd_p;
     if (!fd)
     {
-        fprintf (stderr, "Invalid handle passed to adios_close\n");
+        adios_error (err_invalid_file_pointer, "Invalid handle passed to adios_close\n");
 
         return 1;
     }
@@ -587,13 +763,21 @@ int common_adios_close (int64_t fd_p)
     {
         adios_write_close_vars_v1 (fd);
 
+        /* FIXME: this strategy writes all attributes defined in time step 0
+           and thus duplicates them in the PGs and in the attribute index.
+           For write mode, where files are new, this is good.
+           For append/update it is unnecessary and replicates the attributes
+           in the index.
+           One should write the newly created attributes only in append mode.
+        */
         adios_write_open_attributes_v1 (fd);
 
-        while (a)
-        {
-            adios_write_attribute_v1 (fd, a);
-
-            a = a->next;
+        if (!fd->group->process_id || fd->subfile_index != -1) {
+            // from ADIOS 1.4, only rank 0 writes attributes (or to subfiles)
+            while (a) {
+                adios_write_attribute_v1 (fd, a);
+                a = a->next;
+            }
         }
 
         adios_write_close_attributes_v1 (fd);
diff --git a/src/common_adios.h b/src/core/common_adios.h
similarity index 60%
rename from src/common_adios.h
rename to src/core/common_adios.h
index cc123c3..49dfa53 100644
--- a/src/common_adios.h
+++ b/src/core/common_adios.h
@@ -9,8 +9,8 @@
 #define COMMON_ADIOS_H
 
 #include <stdint.h>
-#include "adios_types.h"
-#include "adios_internals.h"
+#include "public/adios_types.h"
+#include "core/adios_internals.h"
 
 /* Write functions for ADIOS
  *
@@ -64,33 +64,4 @@ int common_adios_stop_calculation (void);
 
 int common_adios_close (int64_t fd_p);
 
-// Generally internal use called when parsing the XML file
-int common_adios_declare_group (int64_t * id, const char * name
-                        ,const char * coordination_comm
-                        ,const char * coordination_var
-                        ,const char * time_index
-                        );
-
-int common_adios_define_var (int64_t group_id, const char * name
-                     ,const char * path, int type
-                     ,const char * dimensions
-                     ,const char * global_dimensions
-                     ,const char * local_offsets
-                     );
-
-int common_adios_define_attribute (int64_t group, const char * name
-                           ,const char * path, enum ADIOS_DATATYPES type
-                           ,const char * value, const char * var
-                           );
-
-int common_adios_select_method (int priority, const char * method
-                        ,const char * parameters, const char * type
-                        ,const char * base_path, int iters
-                        );
-
-int common_adios_select_method (int priority, const char * method
-                        ,const char * parameters, const char * type
-                        ,const char * base_path, int iters
-                        );
-
 #endif
diff --git a/src/core/common_read.c b/src/core/common_read.c
new file mode 100644
index 0000000..616d3bc
--- /dev/null
+++ b/src/core/common_read.c
@@ -0,0 +1,914 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include "public/adios_error.h"
+#include "core/adios_logger.h"
+#include "core/common_read.h"
+#include "core/adios_read_hooks.h"
+#include "core/futils.h"
+#include "core/bp_utils.h" // struct namelists_struct
+#define BYTE_ALIGN 8
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+
+/* Note: MATLAB reloads the mex64 files each time, so all static variables get the original value.
+   Therefore static variables cannot be used to pass info between two Matlab/ADIOS calls */
+static struct adios_read_hooks_struct * adios_read_hooks = 0;
+
+struct common_read_internals_struct {
+    enum ADIOS_READ_METHOD method;
+    struct adios_read_hooks_struct * read_hooks; /* Save adios_read_hooks for each fopen for Matlab */
+    
+    /* Group view information *//* Actual method provides the group names */
+    int     ngroups;
+    char ** group_namelist;
+    int   * nvars_per_group;     /* # of variables per each group */
+    int   * nattrs_per_group;    /* # of attributes per each group */
+    int     group_in_view;       /* 0..ngroups-1: selected group in view,
+                                  -1: all groups */
+    int     group_varid_offset;  /* offset of var IDs from specific group to full list
+                                    if a selected group is in view */
+    int     group_attrid_offset;
+    int     full_nvars;          /* fp->nvars to save here for a group view */
+    char ** full_varnamelist;    /* fp->var_namelist to save here if one group is viewed */
+    int     full_nattrs;         /* fp->nvars to save here for a group view */
+    char ** full_attrnamelist;   /* fp->attr_namelist to save here if one group is viewed */
+};
+
+
+int common_read_init_method (enum ADIOS_READ_METHOD method,
+                             MPI_Comm comm,
+                             const char * parameters)
+{
+    PairStruct *params, *p, *prev_p;
+    int verbose_level, removeit, save;
+    int retval; 
+    char *end;
+
+    adios_errno = err_no_error;
+    if ((int)method < 0 || (int)method >= ADIOS_READ_METHOD_COUNT) {
+        adios_error (err_invalid_read_method, 
+            "Invalid read method (=%d) passed to adios_read_init_method().\n", (int)method);
+        return err_invalid_read_method;
+    } 
+    // init the adios_read_hooks_struct if not yet initialized  
+    adios_read_hooks_init (&adios_read_hooks); 
+
+    // process common parameters here
+    params = text_to_name_value_pairs (parameters);
+    p = params;
+    prev_p = NULL;
+    while (p) {
+        removeit = 0;
+        if (!strcasecmp (p->name, "verbose")) 
+        {
+            if (p->value) {
+                errno = 0;
+                verbose_level = strtol(p->value, &end, 10);
+                if (errno || (end != 0 && *end != '\0')) {
+                    log_error ("Invalid 'verbose' parameter passed to read init function: '%s'\n", p->value);
+                    verbose_level = 1; // print errors only
+                }
+            } else {
+                verbose_level = 3;  // info level
+            }
+            adios_verbose_level = verbose_level;
+            removeit = 1;
+        }
+        else if (!strcasecmp (p->name, "quiet")) 
+        {
+            adios_verbose_level = 0; //don't print errors
+            removeit = 1;
+        }
+        else if (!strcasecmp (p->name, "logfile")) 
+        {
+            if (p->value) {
+                adios_logger_open (p->value, -1);
+            }
+            removeit = 1;
+        }
+        else if (!strcasecmp (p->name, "abort_on_error")) 
+        {
+            adios_abort_on_error = 1;
+            save = adios_verbose_level;
+            adios_verbose_level = 2;
+            log_warn ("ADIOS is set to abort on error\n");
+            adios_verbose_level = save;
+            removeit = 1;
+        }
+        if (removeit) {
+            if (p == params) {
+                // remove head
+                p = p->next;
+                params->next = NULL;
+                free_name_value_pairs (params);
+                params = p;
+            } else {
+                // remove from middle of the list
+                prev_p->next = p->next;
+                p->next = NULL;
+                free_name_value_pairs (p);
+                p = prev_p->next;
+            }
+        } else {
+            prev_p = p;
+            p = p->next;
+        }
+    }
+
+    // call method specific init 
+    retval = adios_read_hooks[method].adios_init_method_fn (comm, params);
+    free_name_value_pairs (params);
+    return retval;
+}
+
+
+int common_read_finalize_method(enum ADIOS_READ_METHOD method)
+{
+    adios_errno = err_no_error;
+    if ((int)method < 0 || (int)method >= ADIOS_READ_METHOD_COUNT) {
+        adios_error (err_invalid_read_method, 
+            "Invalid read method (=%d) passed to adios_read_finalize_method().\n", (int)method);
+        return err_invalid_read_method;
+    } 
+
+    return adios_read_hooks[method].adios_finalize_method_fn ();
+}
+
+
+ADIOS_FILE * common_read_open_stream (const char * fname, 
+                                      enum ADIOS_READ_METHOD method, 
+                                      MPI_Comm comm, 
+                                      enum ADIOS_LOCKMODE lock_mode, 
+                                      float timeout_sec)
+{
+    ADIOS_FILE * fp;
+    struct common_read_internals_struct * internals; 
+
+    if ((int)method < 0 || (int)method >= ADIOS_READ_METHOD_COUNT) {
+        adios_error (err_invalid_read_method, 
+            "Invalid read method (=%d) passed to adios_read_open_stream().\n", (int)method);
+        return NULL;
+    } 
+
+    adios_errno = err_no_error;
+    internals = (struct common_read_internals_struct *) 
+                    calloc(1,sizeof(struct common_read_internals_struct));
+    // init the adios_read_hooks_struct if not yet initialized 
+    adios_read_hooks_init (&adios_read_hooks); 
+
+    internals->method = method;
+    internals->read_hooks = adios_read_hooks;
+
+    fp = adios_read_hooks[internals->method].adios_open_stream_fn (fname, comm, lock_mode, timeout_sec);
+
+    // save the method and group information in fp->internal_data
+    if (fp){
+        adios_read_hooks[internals->method].adios_get_groupinfo_fn (fp, &internals->ngroups, 
+                &internals->group_namelist, &internals->nvars_per_group, &internals->nattrs_per_group);
+        internals->group_in_view = -1;
+        internals->group_varid_offset = 0;
+        internals->group_attrid_offset = 0;
+        fp->internal_data = (void *)internals;
+    } else {
+        free (internals);
+    }
+    return fp;
+}
+
+
+ADIOS_FILE * common_read_open_file (const char * fname, 
+                                    enum ADIOS_READ_METHOD method,
+                                    MPI_Comm comm)
+{
+    ADIOS_FILE * fp;
+    struct common_read_internals_struct * internals; 
+
+    if ((int)method < 0 || (int)method >= ADIOS_READ_METHOD_COUNT) {
+        adios_error (err_invalid_read_method, 
+            "Invalid read method (=%d) passed to adios_read_open_file().\n", (int)method);
+        return NULL;
+    } 
+
+    adios_errno = err_no_error;
+    internals = (struct common_read_internals_struct *) 
+                    calloc(1,sizeof(struct common_read_internals_struct));
+    // init the adios_read_hooks_struct if not yet initialized 
+    adios_read_hooks_init (&adios_read_hooks); 
+
+    internals->method = method;
+    internals->read_hooks = adios_read_hooks;
+
+    fp = adios_read_hooks[internals->method].adios_open_file_fn (fname, comm);
+
+    // save the method and group information in fp->internal_data
+    if (fp){
+        adios_read_hooks[internals->method].adios_get_groupinfo_fn (fp, &internals->ngroups, 
+                &internals->group_namelist, &internals->nvars_per_group, &internals->nattrs_per_group);
+        internals->group_in_view = -1;
+        internals->group_varid_offset = 0;
+        internals->group_attrid_offset = 0;
+        fp->internal_data = (void *)internals;
+    } else {
+        free (internals);
+    }
+    return fp;
+}
+
+int common_read_close (ADIOS_FILE *fp) 
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        if (internals->group_in_view != -1) {
+            // reset from group view before calling the real close
+            common_read_group_view (fp, -1);
+        }
+        retval = internals->read_hooks[internals->method].adios_close_fn (fp);
+        free_namelist (internals->group_namelist, internals->ngroups);
+        free (internals->nvars_per_group);
+        free (internals->nattrs_per_group);
+        free (internals);
+    } else {
+        adios_error ( err_invalid_file_pointer, "Invalid file pointer at adios_read_close()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+void common_read_reset_dimension_order (const ADIOS_FILE *fp, int is_fortran)
+{
+    struct common_read_internals_struct * internals;
+
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        internals->read_hooks[internals->method].adios_reset_dimension_order_fn (fp, is_fortran);
+    } else {
+        adios_error ( err_invalid_file_pointer, "Invalid file pointer at adios_reset_dimension_order()\n");
+    }
+}
+
+
+int common_read_advance_step (ADIOS_FILE *fp, int last, float timeout_sec)
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        retval = internals->read_hooks[internals->method].adios_advance_step_fn (fp, last, timeout_sec);
+        if (!retval) {
+            /* Update group information too */
+            adios_read_hooks[internals->method].adios_get_groupinfo_fn (fp, &internals->ngroups, 
+                    &internals->group_namelist, &internals->nvars_per_group, &internals->nattrs_per_group);
+            if (internals->group_in_view > -1) {
+                /* if we have a group view, we need to update the presented list again */
+                /* advance_step updated fp->nvars, nattrs, var_namelist, attr_namelist */
+                int groupid = internals->group_in_view;
+                internals->group_in_view = -1; // we have the full view at this moment 
+                common_read_group_view (fp, groupid);
+            }
+        }
+    } else {
+        adios_error ( err_invalid_file_pointer, "Invalid file pointer at adios_advance_step()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+
+void common_read_release_step (ADIOS_FILE *fp) 
+{
+    struct common_read_internals_struct * internals;
+
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        internals->read_hooks[internals->method].adios_release_step_fn (fp);
+    } else {
+        adios_error ( err_invalid_file_pointer, "Invalid file pointer at adios_reset_dimension_order()\n");
+    }
+}
+
+
+static int common_read_find_name (int n, char ** namelist, const char *name, int role)
+{
+    /** Find a string name in a list of names and return the index. 
+        Search should work with starting / characters and without.
+        Create adios error and return -1 if name is null or
+          if name is not found in the list.
+        role = 0 for variable search, 1 for attribute search
+     */
+    int id, nstartpos=0, sstartpos;
+    char ** s = namelist;
+    char *rolename[2] = { "variable", "attribute" };
+    enum ADIOS_ERRCODES roleerror[2] = { err_invalid_varname, err_invalid_attrname };
+
+    if (!name) {
+        adios_error (roleerror[role!=0], "Null pointer passed as %s name!\n", rolename[role!=0]);
+        return -1;
+    }
+
+    // find names with or without beginning /
+    if (*name == '/') nstartpos = 1;
+
+    for (id=0; id < n; id++) {
+        if (*s[0] == '/') sstartpos = 1;
+        else sstartpos = 0;
+        //DBG_PRINTF("     check %s, startpos=%d\n", *s, sstartpos);
+        if (!strcmp (*s+sstartpos, name+nstartpos))
+            break; // found this name
+        s++;
+    }
+
+    if (id == n) {
+        adios_error (roleerror[role!=0], "%s '%s' is not found! One "
+                "possible error is to set the view to a specific group and "
+                "then try to read a %s of another group. In this case, "
+                "reset the group view with adios_group_view(fp,-1).\n", 
+                rolename[role!=0], name, rolename[role!=0]);
+        return -1;
+    }
+    return id;
+}
+
+
+ADIOS_VARINFO * common_read_inq_var (const ADIOS_FILE *fp, const char * varname) 
+{
+    struct common_read_internals_struct * internals;
+    ADIOS_VARINFO * retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        int varid = common_read_find_name (fp->nvars, fp->var_namelist, varname, 0);
+        if (varid >= 0) {
+            retval = common_read_inq_var_byid (fp, varid);
+        } else {
+            retval = NULL;
+        }
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_inq_var()\n");
+        retval = NULL;
+    }
+    return retval;
+}
+
+
+ADIOS_VARINFO * common_read_inq_var_byid (const ADIOS_FILE *fp, int varid)
+{
+    struct common_read_internals_struct * internals;
+    ADIOS_VARINFO * retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        if (varid >= 0 && varid < fp->nvars) {
+            internals = (struct common_read_internals_struct *) fp->internal_data;
+            /* Translate varid to varid in global varlist if a selected group is in view */ 
+            retval = internals->read_hooks[internals->method].adios_inq_var_byid_fn 
+                                            (fp, varid+internals->group_varid_offset);
+            if (retval) {
+                /* Translate real varid to the group varid presented to the user */
+                retval->varid = varid;
+            }
+        } else {
+            adios_error (err_invalid_varid, 
+                         "Variable ID %d is not valid adios_inq_var_byid(). "
+                         "Available 0..%d\n", varid, fp->nvars-1);
+            retval = NULL;
+        }
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_inq_var_byid()\n");
+        retval = NULL;
+    }
+    return retval;
+}
+
+
+int common_read_inq_var_stat (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo,
+                             int per_step_stat, int per_block_stat)
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    int group_varid;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        if (varinfo) {
+            /* Translate group varid presented to the user to the real varid */
+            group_varid = varinfo->varid;
+            varinfo->varid = varinfo->varid + internals->group_varid_offset;
+        }
+        retval = internals->read_hooks[internals->method].adios_inq_var_stat_fn (fp, varinfo, per_step_stat, per_block_stat);
+        /* Translate back real varid to the group varid presented to the user */
+        varinfo->varid = group_varid;
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_inq_var_stat()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+int common_read_inq_var_blockinfo (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo)
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    int group_varid;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        if (varinfo) {
+            /* Translate group varid presented to the user to the real varid */
+            group_varid = varinfo->varid;
+            varinfo->varid = varinfo->varid + internals->group_varid_offset;
+        }
+        retval = internals->read_hooks[internals->method].adios_inq_var_blockinfo_fn (fp, varinfo);
+        /* Translate back real varid to the group varid presented to the user */
+        varinfo->varid = group_varid;
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_inq_var_blockinfo()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+#define MYFREE(p) {free(p); p=NULL;}
+void common_read_free_varinfo (ADIOS_VARINFO *vp)
+{
+    int i;
+    if (vp) {
+        if (vp->blockinfo) {
+            ADIOS_VARBLOCK *bp = vp->blockinfo;
+            for (i=0; i<vp->sum_nblocks; i++) {
+                if (bp->start) MYFREE (bp->start);
+                if (bp->count) MYFREE (bp->count);
+                bp++;
+            }
+            MYFREE(vp->blockinfo);
+        }
+
+        if (vp->statistics) {
+            ADIOS_VARSTAT *sp = vp->statistics;
+            if (sp->min && sp->min != vp->value)   MYFREE(sp->min);
+            if (sp->max && sp->max != vp->value)   MYFREE(sp->max);
+            if (sp->avg && sp->avg != vp->value)   MYFREE(sp->avg);
+            if (sp->std_dev)                       MYFREE(sp->std_dev);
+
+            if (sp->steps) {
+                if (sp->steps->mins)        MYFREE(sp->steps->mins);
+                if (sp->steps->maxs)        MYFREE(sp->steps->maxs);
+                if (sp->steps->avgs)        MYFREE(sp->steps->avgs);
+                if (sp->steps->std_devs)    MYFREE(sp->steps->std_devs);
+                MYFREE(sp->steps);
+            }
+
+            if (sp->blocks) {
+                if (sp->blocks->mins)        MYFREE(sp->blocks->mins);
+                if (sp->blocks->maxs)        MYFREE(sp->blocks->maxs);
+                if (sp->blocks->avgs)        MYFREE(sp->blocks->avgs);
+                if (sp->blocks->std_devs)    MYFREE(sp->blocks->std_devs);
+                MYFREE(sp->blocks);
+            }
+
+            if (sp->histogram) {
+                if (sp->histogram->breaks)        MYFREE(sp->histogram->breaks);
+                if (sp->histogram->frequencies)   MYFREE(sp->histogram->frequencies);
+                if (sp->histogram->gfrequencies)  MYFREE(sp->histogram->gfrequencies);
+                MYFREE(sp->histogram);
+            }
+
+            MYFREE(vp->statistics);
+        }
+
+        if (vp->dims)    MYFREE(vp->dims);
+        if (vp->value)   MYFREE(vp->value);
+        if (vp->nblocks) MYFREE(vp->nblocks);
+
+        free(vp);
+    }
+}
+
+
+int common_read_schedule_read (const ADIOS_FILE      * fp,
+                               const ADIOS_SELECTION * sel,
+                               const char            * varname,
+                               int                     from_steps,
+                               int                     nsteps,
+                               void                  * data)
+
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        int varid = common_read_find_name (fp->nvars, fp->var_namelist, varname, 0);
+        if (varid >= 0) {
+            retval = common_read_schedule_read_byid (fp, sel, varid, from_steps, nsteps, data);
+        } else {
+            retval = adios_errno; // adios_errno was set in common_read_find_name
+        }
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_schedule_read()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+
+int common_read_schedule_read_byid (const ADIOS_FILE      * fp,
+        const ADIOS_SELECTION * sel,
+        int                     varid,
+        int                     from_steps,
+        int                     nsteps,
+        void                  * data)
+
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        if (varid >=0 && varid < fp->nvars) {
+            internals = (struct common_read_internals_struct *) fp->internal_data;
+            retval = internals->read_hooks[internals->method].adios_schedule_read_byid_fn (fp, sel, varid+internals->group_varid_offset, from_steps, nsteps, data);
+        } else {
+            adios_error (err_invalid_varid, 
+                         "Variable ID %d is not valid in adios_schedule_read_byid(). "
+                         "Available 0..%d\n", varid, fp->nvars-1);
+            retval = err_invalid_varid;
+        }
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_schedule_read_byid()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+
+int common_read_perform_reads (const ADIOS_FILE *fp, int blocking)
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        retval = internals->read_hooks[internals->method].adios_perform_reads_fn (fp, blocking);
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_perform_reads()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+
+int common_read_check_reads (const ADIOS_FILE * fp, ADIOS_VARCHUNK ** chunk)
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        retval = internals->read_hooks[internals->method].adios_check_reads_fn (fp, chunk);
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_check_reads()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+
+void common_read_free_chunk (ADIOS_VARCHUNK *chunk)
+{
+    /** Free the memory of a chunk allocated inside adios_check_reads().
+     * It only frees the ADIOS_VARCHUNK struct and the ADIOS_SELECTION struct
+     * pointed by the chunk. The data pointer should never be freed since
+     * that memory belongs to the reading method.
+     */
+     if (chunk) {
+        if (chunk->sel) {
+            free(chunk->sel);
+            chunk->sel = NULL;
+        }
+        free(chunk);
+     }
+}
+
+
+int common_read_get_attr (const ADIOS_FILE * fp, 
+                          const char * attrname, 
+                          enum ADIOS_DATATYPES * type,
+                          int * size, 
+                          void ** data)
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        int attrid = common_read_find_name (fp->nattrs, fp->attr_namelist, attrname, 1);
+        if (attrid > -1) {
+            retval = common_read_get_attr_byid (fp, attrid, type, size, data);
+        } else {
+            retval = adios_errno; // adios_errno was set in common_read_find_name
+        }
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_read_get_attr()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+
+int common_read_get_attr_byid (const ADIOS_FILE * fp, 
+                               int attrid, 
+                               enum ADIOS_DATATYPES * type, 
+                               int * size, 
+                               void ** data)
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        if (attrid >= 0 && attrid < fp->nattrs) {
+            internals = (struct common_read_internals_struct *) fp->internal_data;
+            retval = internals->read_hooks[internals->method].adios_get_attr_byid_fn (fp, attrid+internals->group_attrid_offset, type, size, data);
+        } else {
+            adios_error (err_invalid_attrid, 
+                         "Attribute ID %d is not valid in adios_get_attr_byid(). "
+                         "Available 0..%d\n", attrid, fp->nattrs-1);
+            retval = err_invalid_attrid;
+        }
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_read_get_attr_byid()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+
+const char * common_read_type_to_string (enum ADIOS_DATATYPES type)
+{
+    switch (type)
+    {
+        case adios_unsigned_byte:    return "unsigned byte";
+        case adios_unsigned_short:   return "unsigned short";
+        case adios_unsigned_integer: return "unsigned integer";
+        case adios_unsigned_long:    return "unsigned long long";
+
+        case adios_byte:             return "byte";
+        case adios_short:            return "short";
+        case adios_integer:          return "integer";
+        case adios_long:             return "long long";
+
+        case adios_real:             return "real";
+        case adios_double:           return "double";
+        case adios_long_double:      return "long double";
+
+        case adios_string:           return "string";
+        case adios_complex:          return "complex";
+        case adios_double_complex:   return "double complex";
+
+        default:
+        {
+            static char buf [50];
+            sprintf (buf, "(unknown: %d)", type);
+            return buf;
+        }
+    }
+}
+
+
+int common_read_type_size(enum ADIOS_DATATYPES type, void *data)
+{
+    return bp_get_type_size(type, data);
+}
+
+
+int common_read_get_grouplist (const ADIOS_FILE  *fp, char ***group_namelist)
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        retval = internals->ngroups;
+        *group_namelist = internals->group_namelist;
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_get_grouplist()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+/** Select a subset of variables and attributes to present in ADIOS_FILE struct.
+    ADIOS_FILE-> nvars, nattrs, var_namelist, attr_namelist will contain
+    only a subset of all variables and attributes.
+    internals-> full_* stores the complete lists for reset or change of group
+ */
+int common_read_group_view (ADIOS_FILE  *fp, int groupid)
+{
+    struct common_read_internals_struct * internals;
+    int retval, i;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        if (groupid >= 0 && groupid < internals->ngroups) {
+            /* 1. save complete list if first done */
+            if (internals->group_in_view == -1) {
+                internals->full_nvars = fp->nvars;
+                internals->full_varnamelist = fp->var_namelist;
+                internals->full_nattrs = fp->nattrs;
+                internals->full_attrnamelist = fp->attr_namelist;
+            }
+            /* Set ID offsets for easier indexing of vars/attrs in other functions */
+            internals->group_varid_offset = 0;
+            internals->group_attrid_offset = 0;
+            for (i=0; i<groupid; i++) {
+                internals->group_varid_offset += internals->nvars_per_group[i];
+                internals->group_attrid_offset += internals->nattrs_per_group[i];
+            }
+            /* Set view to this group */
+            fp->nvars = internals->nvars_per_group[groupid];
+            fp->var_namelist = &(internals->full_varnamelist [internals->group_varid_offset]);
+            fp->nattrs = internals->nattrs_per_group[groupid];
+            fp->attr_namelist = &(internals->full_attrnamelist [internals->group_attrid_offset]);
+            internals->group_in_view = groupid;
+            retval = 0;
+
+        } else if (groupid == -1) {
+            /* Reset to full view */
+            fp->nvars  = internals->full_nvars;
+            fp->var_namelist  = internals->full_varnamelist;
+            fp->nattrs = internals->full_nattrs;
+            fp->attr_namelist  = internals->full_attrnamelist;
+            internals->group_varid_offset = 0;
+            internals->group_attrid_offset = 0;
+            internals->group_in_view = -1;
+            retval = 0;
+        } else {
+            adios_error (err_invalid_group, "Invalid group ID in adios_group_view()\n");
+            retval = err_invalid_group;
+        }
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to adios_group_view()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+/* internal function to support version 1 time-dimension reads
+   called from adios_read_v1.c and adiosf_read_v1.c 
+*/
+int common_read_is_var_timed (const ADIOS_FILE *fp, int varid)
+{
+    struct common_read_internals_struct * internals;
+    int retval;
+    
+    adios_errno = err_no_error;
+    if (fp) {
+        internals = (struct common_read_internals_struct *) fp->internal_data;
+        retval = internals->read_hooks[internals->method].adios_is_var_timed_fn (fp, varid+internals->group_varid_offset);
+    } else {
+        adios_error (err_invalid_file_pointer, "Null pointer passed as file to common_read_is_var_timed()\n");
+        retval = err_invalid_file_pointer;
+    }
+    return retval;
+}
+
+void common_read_print_fileinfo (const ADIOS_FILE *fp) 
+{
+    int i;
+    int ngroups;
+    char **group_namelist;
+    ngroups = common_read_get_grouplist (fp, &group_namelist);
+
+    printf ("---------------------------\n");
+    printf ("     file information\n");
+    printf ("---------------------------\n");
+    printf ("  # of groups:     %d\n"
+            "  # of variables:  %d\n"
+            "  # of attributes: %d\n"
+            "  current step:    %d\n"
+            "  last step:       %d\n",
+            ngroups,
+            fp->nvars,
+            fp->nattrs,
+            fp->current_step,
+            fp->last_step);
+    printf ("---------------------------\n");
+    printf ("     var information\n");
+    printf ("---------------------------\n");
+    printf ("    var id\tname\n");
+    if (fp->var_namelist) {
+        for (i=0; i<fp->nvars; i++)
+            printf("\t%d)\t%s\n", i, fp->var_namelist[i]);
+    }
+    printf ("---------------------------\n");
+    printf ("     attribute information\n");
+    printf ("---------------------------\n");
+    printf ("    attr id\tname\n");
+    if (fp->attr_namelist) {
+        for (i=0; i<fp->nattrs; i++)
+            printf("\t%d)\t%s\n", i, fp->attr_namelist[i]);
+    }
+    printf ("---------------------------\n");
+    printf ("     group information\n");
+    printf ("---------------------------\n");
+    if (group_namelist) {
+        for (i=0; i<ngroups; i++)
+            printf("\t%d)\t%s\n", i, group_namelist[i]);
+    }
+
+
+    return;
+}
+
+
+/**    SELECTIONS   **/ 
+ADIOS_SELECTION * common_read_selection_boundingbox (uint64_t ndim, const uint64_t *start, const uint64_t *count)
+{   
+    adios_errno = err_no_error;
+    ADIOS_SELECTION * sel = (ADIOS_SELECTION *) malloc (sizeof(ADIOS_SELECTION));
+    if (sel) {
+        sel->type = ADIOS_SELECTION_BOUNDINGBOX;
+        sel->u.bb.ndim = ndim;
+        sel->u.bb.start = (uint64_t *)start;
+        sel->u.bb.count = (uint64_t *)count;
+    } else {
+        adios_error(err_no_memory, "Cannot allocate memory for bounding box selection\n");
+    }
+    return sel;
+}
+
+
+ADIOS_SELECTION * common_read_selection_points (uint64_t ndim, uint64_t npoints, const uint64_t *points)
+{   
+    adios_errno = err_no_error;
+    ADIOS_SELECTION * sel = (ADIOS_SELECTION *) malloc (sizeof(ADIOS_SELECTION));
+    if (sel) {
+        sel->type = ADIOS_SELECTION_POINTS;
+        sel->u.points.ndim = ndim;
+        sel->u.points.npoints = npoints;
+        sel->u.points.points = (uint64_t *) points;
+    } else {
+        adios_error(err_no_memory, "Cannot allocate memory for points selection\n");
+    }
+    return sel;
+}
+
+ADIOS_SELECTION * common_read_selection_writeblock (int index)
+{   
+    adios_errno = err_no_error;
+    ADIOS_SELECTION * sel = (ADIOS_SELECTION *) malloc (sizeof(ADIOS_SELECTION));
+    if (sel) {
+        sel->type = ADIOS_SELECTION_WRITEBLOCK;
+        sel->u.block.index = index;
+    } else {
+        adios_error(err_no_memory, "Cannot allocate memory for writeblock selection\n");
+    }
+    return sel;
+}
+
+ADIOS_SELECTION * common_read_selection_auto (char *hints)
+{   
+    adios_errno = err_no_error;
+    ADIOS_SELECTION * sel = (ADIOS_SELECTION *) malloc (sizeof(ADIOS_SELECTION));
+    if (sel) {
+        sel->type = ADIOS_SELECTION_AUTO;
+        sel->u.autosel.hints = hints;
+    } else {
+        adios_error(err_no_memory, "Cannot allocate memory for auto selection\n");
+    }
+    return sel;
+}
+
+void common_read_selection_delete (ADIOS_SELECTION *sel)
+{
+    free(sel);
+}
diff --git a/src/core/common_read.h b/src/core/common_read.h
new file mode 100644
index 0000000..181e724
--- /dev/null
+++ b/src/core/common_read.h
@@ -0,0 +1,106 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/*
+ *   Internal read API for C and Fortran read APIs
+ */
+#ifndef __COMMON_READ_H__
+#define __COMMON_READ_H__
+
+#include "public/adios_types.h"
+#include "public/adios_read_v2.h"  /* C API's struct's are used here */
+
+#ifdef _NOMPI
+    /* Sequential processes can use the library compiled with -D_NOMPI */
+#   include "public/mpidummy.h"
+#else
+    /* Parallel applications should use MPI to communicate file info and slices of data */
+#   include "mpi.h"
+#endif
+
+#include <stdint.h>
+
+int common_read_init_method (enum ADIOS_READ_METHOD method, 
+                             MPI_Comm comm, 
+                             const char * parameters);
+
+int common_read_finalize_method(enum ADIOS_READ_METHOD method);
+
+ADIOS_FILE * common_read_open_stream (const char * fname,
+                                     enum ADIOS_READ_METHOD method,
+                                     MPI_Comm comm,
+                                     enum ADIOS_LOCKMODE lock_mode,
+                                     float timeout_sec);
+
+ADIOS_FILE * common_read_open_file   (const char * fname,
+                                     enum ADIOS_READ_METHOD method,
+                                     MPI_Comm comm);
+
+int common_read_close (ADIOS_FILE *fp);
+
+int common_read_advance_step (ADIOS_FILE *fp, int last, float timeout_sec);
+void common_read_release_step (ADIOS_FILE *fp);
+
+ADIOS_VARINFO * common_read_inq_var (const ADIOS_FILE  *fp, const char * varname);
+ADIOS_VARINFO * common_read_inq_var_byid (const ADIOS_FILE  *fp, int varid);
+int common_read_inq_var_stat (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo,
+                             int per_step_stat, int per_block_stat);
+int common_read_inq_var_blockinfo (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo);
+void common_read_free_varinfo (ADIOS_VARINFO *vp);
+
+int common_read_schedule_read (const ADIOS_FILE      * fp,
+                               const ADIOS_SELECTION * sel,
+                               const char            * varname,
+                               int                     from_steps,
+                               int                     nsteps,
+                               void                  * data);
+
+int common_read_schedule_read_byid (const ADIOS_FILE      * fp,
+                                    const ADIOS_SELECTION * sel,
+                                    int                     varid,
+                                    int                     from_steps,
+                                    int                     nsteps,
+                                    void                  * data);
+
+int common_read_perform_reads (const ADIOS_FILE *fp, int blocking);
+int common_read_check_reads (const ADIOS_FILE * fp, ADIOS_VARCHUNK ** chunk);
+void common_read_free_chunk (ADIOS_VARCHUNK *chunk);
+
+
+int common_read_get_attr (const ADIOS_FILE            * fp,
+                    const char            * attrname,
+                    enum ADIOS_DATATYPES  * type,
+                    int                   * size,
+                    void                 ** data);
+
+int common_read_get_attr_byid (const ADIOS_FILE  * fp, int attrid, enum ADIOS_DATATYPES * type, 
+                         int * size, void ** data); 
+
+const char * common_read_type_to_string (enum ADIOS_DATATYPES type);
+int common_read_type_size(enum ADIOS_DATATYPES type, void *data);
+
+int common_read_get_grouplist (const ADIOS_FILE  *fp, char ***group_namelist);
+int common_read_group_view (ADIOS_FILE  *fp, int groupid);
+
+/* internal function to support version 1 time-dimension reads
+   called from adios_read_v1.c and adiosf_read_v1.c 
+*/
+int common_read_is_var_timed (const ADIOS_FILE *fp, int varid);
+
+void common_read_reset_dimension_order (const ADIOS_FILE *fp, int is_fortran);
+void common_read_print_fileinfo (const ADIOS_FILE *fp);
+
+// selections 
+ADIOS_SELECTION * common_read_selection_boundingbox (uint64_t ndim, const uint64_t *start, const uint64_t *count);
+ADIOS_SELECTION * common_read_selection_points (uint64_t ndim, uint64_t npoints, const uint64_t *points);
+ADIOS_SELECTION * common_read_selection_writeblock (int index);
+ADIOS_SELECTION * common_read_selection_auto (char *hints);
+void common_read_selection_delete (ADIOS_SELECTION *sel);
+
+
+
+#endif
diff --git a/src/ds_metadata.h b/src/core/ds_metadata.h
similarity index 81%
rename from src/ds_metadata.h
rename to src/core/ds_metadata.h
index c5c4050..7df57a7 100644
--- a/src/ds_metadata.h
+++ b/src/core/ds_metadata.h
@@ -6,7 +6,7 @@
  */
 
 /*
- *  Metadata (index) for DART and DIMES methods
+ *  Metadata (index) for DATASPACES and DIMES methods
  * 
  *  Data structures to store the index (aka footer for BP format) that can be
  *  put into DataSpaces to describe the variables/attributes there
@@ -15,11 +15,11 @@
 #define __SPACES_INDEX_H__
 
 #include <stdint.h>
-#include "adios_types.h"
-#include "adios_read.h"
+#include "public/adios_types.h"
+#include "public/adios_read.h"
 
 
-/* functions currently defined in adios_dart.c and read_dart.c */
+/* functions currently defined in adios_dataspaces.c and read_dataspaces.c */
 
 /* Tell the DataSpaces order of dimensions for a 1-3 dim array written from Fortran or C.
    unpack=1: the reverse of packing (to retrieve the original order).
@@ -48,7 +48,6 @@ void ds_pack_group_info (struct adios_file_struct *fd
 
 SI = sizeof(int) = 4
 
-CURRENT structure
         128 fix bytes, 1 group
         bytes   content
          SI      = length of this buffer (=128 bytes fixed right now)
@@ -58,18 +57,6 @@ CURRENT structure
          SI      = length of group index (in GROUP at fn/gn variable)
          SI      = N length of name  
          N      = group name (no \0)
-GOAL structure (needs read from space before writing)
-        bytes   content
-         SI      = length of this buffer (=128 bytes fixed right now)
-         SI      = time index
-         SI      = number of variables in file 
-         SI      = number of attributes in file
-         SI      = G number of groups
-    G*  ( 
-         SI      = length of group index (in GROUP at fn/gn variable)
-         SI      = N length of name 
-         N      = group name (no \0)
-        )
 */
 
 
@@ -78,7 +65,7 @@ GOAL structure (needs read from space before writing)
 
    SI = sizeof(int) = 4
 
-   Size = N bytes, N is found in FILE buffer
+   Size = N bytes, N is found in FILE buffer (length of group index)
         bytes   content
          SI      = length of this buffer  (=N above)
          SI      = NV number of variables in file (actually in the group)
diff --git a/src/futils.c b/src/core/futils.c
similarity index 93%
rename from src/futils.c
rename to src/core/futils.c
index aa9fd44..5d12fee 100644
--- a/src/futils.c
+++ b/src/core/futils.c
@@ -7,9 +7,9 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include "futils.h"
-#include "bp_utils.h" // error()
-#include "adios_error.h" // err_no_memory
+#include "core/futils.h"
+#include "core/bp_utils.h" // error()
+#include "public/adios_error.h" // err_no_memory
 
 #ifdef DMALLOC
 #include "dmalloc.h"
diff --git a/src/futils.h b/src/core/futils.h
similarity index 100%
rename from src/futils.h
rename to src/core/futils.h
diff --git a/src/globals.c b/src/core/globals.c
similarity index 63%
rename from src/globals.c
rename to src/core/globals.c
index 961d9fc..6321588 100644
--- a/src/globals.c
+++ b/src/core/globals.c
@@ -6,7 +6,7 @@
  */
 
 /*
- *   Functions, constants globally for both the Write and Read API
+ *   Functions, constants globally for both the Write and Read API of Staging methods
  */
 
 #include "globals.h"
@@ -25,59 +25,59 @@ int globals_adios_get_application_id (int *was_set)
     return globals_adios_appid;
 }
 
-#ifdef HAVE_DART
-enum DART_CONNECTION { dart_disconnected = 0, 
-                       dart_connected_from_reader = 1,
-                       dart_connected_from_writer = 2,
-                       dart_connected_from_both = 3
+#ifdef HAVE_DATASPACES
+enum DATASPACES_CONNECTION { dataspaces_disconnected = 0, 
+                       dataspaces_connected_from_reader = 1,
+                       dataspaces_connected_from_writer = 2,
+                       dataspaces_connected_from_both = 3
                      };
-static enum DART_CONNECTION globals_adios_connected_to_dart = dart_disconnected;
+static enum DATASPACES_CONNECTION globals_adios_connected_to_dataspaces = dataspaces_disconnected;
 
-void globals_adios_set_dart_connected_from_reader()
+void globals_adios_set_dataspaces_connected_from_reader()
 { 
-    if (globals_adios_connected_to_dart == dart_disconnected)
-        globals_adios_connected_to_dart = dart_connected_from_reader;
-    else if (globals_adios_connected_to_dart == dart_connected_from_writer)
-        globals_adios_connected_to_dart = dart_connected_from_both;
+    if (globals_adios_connected_to_dataspaces == dataspaces_disconnected)
+        globals_adios_connected_to_dataspaces = dataspaces_connected_from_reader;
+    else if (globals_adios_connected_to_dataspaces == dataspaces_connected_from_writer)
+        globals_adios_connected_to_dataspaces = dataspaces_connected_from_both;
 }
-void globals_adios_set_dart_disconnected_from_reader()
+void globals_adios_set_dataspaces_disconnected_from_reader()
 { 
-    if (globals_adios_connected_to_dart == dart_connected_from_reader)
-        globals_adios_connected_to_dart = dart_disconnected;
-    else if (globals_adios_connected_to_dart == dart_connected_from_both)
-        globals_adios_connected_to_dart = dart_connected_from_writer;
+    if (globals_adios_connected_to_dataspaces == dataspaces_connected_from_reader)
+        globals_adios_connected_to_dataspaces = dataspaces_disconnected;
+    else if (globals_adios_connected_to_dataspaces == dataspaces_connected_from_both)
+        globals_adios_connected_to_dataspaces = dataspaces_connected_from_writer;
 }
-void globals_adios_set_dart_connected_from_writer()
+void globals_adios_set_dataspaces_connected_from_writer()
 {
-    if (globals_adios_connected_to_dart == dart_disconnected)
-        globals_adios_connected_to_dart = dart_connected_from_writer;
-    else if (globals_adios_connected_to_dart == dart_connected_from_reader)
-        globals_adios_connected_to_dart = dart_connected_from_both;
+    if (globals_adios_connected_to_dataspaces == dataspaces_disconnected)
+        globals_adios_connected_to_dataspaces = dataspaces_connected_from_writer;
+    else if (globals_adios_connected_to_dataspaces == dataspaces_connected_from_reader)
+        globals_adios_connected_to_dataspaces = dataspaces_connected_from_both;
 }
-void globals_adios_set_dart_disconnected_from_writer()
+void globals_adios_set_dataspaces_disconnected_from_writer()
 { 
-    if (globals_adios_connected_to_dart == dart_connected_from_writer)
-        globals_adios_connected_to_dart = dart_disconnected;
-    else if (globals_adios_connected_to_dart == dart_connected_from_both)
-        globals_adios_connected_to_dart = dart_connected_from_reader;
+    if (globals_adios_connected_to_dataspaces == dataspaces_connected_from_writer)
+        globals_adios_connected_to_dataspaces = dataspaces_disconnected;
+    else if (globals_adios_connected_to_dataspaces == dataspaces_connected_from_both)
+        globals_adios_connected_to_dataspaces = dataspaces_connected_from_reader;
 }
-int  globals_adios_is_dart_connected()
+int  globals_adios_is_dataspaces_connected()
 { 
-    return (globals_adios_connected_to_dart != dart_disconnected);
+    return (globals_adios_connected_to_dataspaces != dataspaces_disconnected);
 }
-int  globals_adios_is_dart_connected_from_reader()
+int  globals_adios_is_dataspaces_connected_from_reader()
 { 
-    return (globals_adios_connected_to_dart == dart_connected_from_reader || 
-            globals_adios_connected_to_dart == dart_connected_from_both);
+    return (globals_adios_connected_to_dataspaces == dataspaces_connected_from_reader || 
+            globals_adios_connected_to_dataspaces == dataspaces_connected_from_both);
 }
-int  globals_adios_is_dart_connected_from_writer()
+int  globals_adios_is_dataspaces_connected_from_writer()
 { 
-    return (globals_adios_connected_to_dart == dart_connected_from_writer || 
-            globals_adios_connected_to_dart == dart_connected_from_both);
+    return (globals_adios_connected_to_dataspaces == dataspaces_connected_from_writer || 
+            globals_adios_connected_to_dataspaces == dataspaces_connected_from_both);
 }
-int  globals_adios_is_dart_connected_from_both()
+int  globals_adios_is_dataspaces_connected_from_both()
 {
-    return (globals_adios_connected_to_dart == dart_connected_from_both);
+    return (globals_adios_connected_to_dataspaces == dataspaces_connected_from_both);
 }
 #endif
 
diff --git a/src/globals.h b/src/core/globals.h
similarity index 71%
rename from src/globals.h
rename to src/core/globals.h
index 8fcece8..6c46d79 100644
--- a/src/globals.h
+++ b/src/core/globals.h
@@ -15,7 +15,7 @@
 
 /** Set an application ID for this program. 
  *  This function is necessary for methods who needs a unique ID from each participating applications.
- *  Currently, this is the DART method for code coupling of independent applications.
+ *  Currently, this is the DATASPACES/DIMES methods for code coupling of independent applications.
  *
  *  This function is called from the applicatin through adios_set_application_id()
  */
@@ -30,16 +30,16 @@ int globals_adios_get_application_id (int *was_set);
 
 
 /* Note: would be nice a <string, int> map for arbitrary globals */
-#ifdef HAVE_DART
-void globals_adios_set_dart_connected_from_reader();
-void globals_adios_set_dart_disconnected_from_reader();
-void globals_adios_set_dart_connected_from_writer();
-void globals_adios_set_dart_disconnected_from_writer();
-int  globals_adios_is_dart_connected(); // from any
-int  globals_adios_is_dart_connected_from_reader();
-int  globals_adios_is_dart_connected_from_writer();
-int  globals_adios_is_dart_connected_from_both();
-#endif /* HAVE_DART */
+#ifdef HAVE_DATASPACES
+void globals_adios_set_dataspaces_connected_from_reader();
+void globals_adios_set_dataspaces_disconnected_from_reader();
+void globals_adios_set_dataspaces_connected_from_writer();
+void globals_adios_set_dataspaces_disconnected_from_writer();
+int  globals_adios_is_dataspaces_connected(); // from any
+int  globals_adios_is_dataspaces_connected_from_reader();
+int  globals_adios_is_dataspaces_connected_from_writer();
+int  globals_adios_is_dataspaces_connected_from_both();
+#endif /* HAVE_DATASPACES */
 
 #ifdef HAVE_DIMES
 void globals_adios_set_dimes_connected_from_reader();
diff --git a/src/mpidummy.c b/src/core/mpidummy.c
similarity index 69%
rename from src/mpidummy.c
rename to src/core/mpidummy.c
index 5b0b508..e32d27e 100644
--- a/src/mpidummy.c
+++ b/src/core/mpidummy.c
@@ -14,9 +14,10 @@
 #include <string.h>
 //#define _LARGEFILE64_SOURCE
 #include <sys/types.h>
+#include <sys/time.h>
 #include <unistd.h>
 
-#include "mpidummy.h"
+#include "public/mpidummy.h"
 
 #if defined(__APPLE__) || defined(__WIN32__) 
 #    define lseek64 lseek
@@ -37,6 +38,12 @@ int MPI_Finalize()
     return MPI_SUCCESS; 
 }
 
+int MPI_Initialized( int* flag )
+{
+  *flag = 1 ;
+  return MPI_SUCCESS;
+}
+
 int MPI_Comm_split ( MPI_Comm comm, int color, int key, MPI_Comm *comm_out ) {return MPI_SUCCESS;}
 
 int MPI_Barrier(MPI_Comm comm) { return MPI_SUCCESS; }
@@ -47,6 +54,47 @@ int MPI_Comm_rank(MPI_Comm comm, int *rank) { *rank = 0; return MPI_SUCCESS; }
 int MPI_Comm_size(MPI_Comm comm, int *size) { *size = 1; return MPI_SUCCESS; }
 MPI_Comm MPI_Comm_f2c(MPI_Fint comm) { return comm; }
 
+int MPI_Gather(void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPI_Comm comm)
+{
+  int ier = MPI_SUCCESS;
+  size_t n=0, nsent=0, nrecv=0 ;
+  if( !sendbuf || !recvbuf )        ier = MPI_ERR_BUFFER ;
+  if( comm==MPI_COMM_NULL || root ) ier = MPI_ERR_COMM ;
+
+  switch( sendtype )
+  {
+    case MPI_INT : n = sizeof( int ) ;
+    default      : return MPI_ERR_TYPE ;
+  }
+  nsent = n * sendcnt ;
+
+  switch( recvtype )
+  {
+    case MPI_INT : nrecv = sizeof( int ) ;
+    default      : return MPI_ERR_TYPE ;
+  }
+  nrecv = n * recvcnt ;
+
+  if( nrecv!=nsent ) ier = MPI_ERR_COUNT ;
+
+  if( ier == MPI_SUCCESS ) memcpy( recvbuf, sendbuf, nsent );
+  else snprintf(mpierrmsg, ier, "could not gather data\n" );
+
+  return ier ;
+}
+
+int MPI_Gatherv(void *sendbuf, int sendcnt, MPI_Datatype sendtype, 
+                void *recvbuf, int *recvcnts, int *displs, 
+                MPI_Datatype recvtype, int root, MPI_Comm comm)
+{
+  int ier = MPI_SUCCESS;
+  if( !recvcnts || !displs ) ier = MPI_ERR_BUFFER ;
+
+  if( ier == MPI_SUCCESS )
+    ier = MPI_Gather(sendbuf, sendcnt, sendtype, recvbuf, recvcnts[0], recvtype, root, comm ) ;
+
+  return ier ;
+}
 
 int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh) 
 {
@@ -106,4 +154,10 @@ int MPI_Error_string(int errorcode, char *string, int *resultlen)
     return MPI_SUCCESS;
 }
 
-
+double MPI_Wtime()
+{
+	// Implementation not tested
+	struct timeval tv;
+	gettimeofday (&tv, NULL);
+	return (double)(tv.tv_sec) + (double)(tv.tv_usec) / 1000000;	
+}
diff --git a/src/core/util.c b/src/core/util.c
new file mode 100644
index 0000000..2cd39ba
--- /dev/null
+++ b/src/core/util.c
@@ -0,0 +1,551 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <errno.h>
+#include <assert.h>
+
+#include "../config.h"
+#include "core/util.h"
+#include "core/adios_logger.h"
+
+
+/* Reverse the order in an array in place.
+   use swapping from Fortran/column-major order to ADIOS-read-api/C/row-major order and back
+*/
+void swap_order(int n, uint64_t *array, int *timedim)
+{
+    int i;
+    uint64_t tmp;
+    for (i=0; i<n/2; i++) {
+        tmp = array[i];
+        array[i] = array[n-1-i];
+        array[n-1-i] = tmp;
+    }
+    if (*timedim > -1)
+        *timedim = (n-1) - *timedim; // swap the time dimension too
+}
+
+/* Change endianness of each element in an array */
+/* input: array, size in bytes(!), size of one element */
+void change_endianness( void *data, uint64_t slice_size, enum ADIOS_DATATYPES type)
+{
+    int size_of_type = bp_get_type_size(type, "");
+    uint64_t n = slice_size / size_of_type;
+    uint64_t i;
+    char *ptr = (char *) data;
+
+    if (slice_size % size_of_type != 0) {
+       log_error ("Adios error in bp_utils.c:change_endianness(): "
+                  "An array's endianness is to be converted but the size of array "
+                  "is not dividable by the size of the elements: "
+                  "size = %lld, element size = %d\n", slice_size, size_of_type);
+    }
+
+    switch (type)
+    {
+        case adios_byte:
+        case adios_short:
+        case adios_integer:
+        case adios_long:
+        case adios_unsigned_byte:
+        case adios_unsigned_short:
+        case adios_unsigned_integer:
+        case adios_unsigned_long:
+        case adios_real:
+        case adios_double:
+        case adios_long_double:
+            switch (size_of_type) {
+                /* case 1: nothing to do */
+                case 2:
+                    for (i=0; i < n; i++) {
+                        swap_16_ptr(ptr);
+                        ptr += size_of_type;
+                    }
+                    break;
+                case 4:
+                    for (i=0; i < n; i++) {
+                        swap_32_ptr(ptr);
+                        ptr += size_of_type;
+                    }
+                    break;
+                case 8:
+                    for (i=0; i < n; i++) {
+                        swap_64_ptr(ptr);
+                        ptr += size_of_type;
+                    }
+                    break;
+                case 16:
+                    for (i=0; i < n; i++) {
+                        swap_128_ptr(ptr);
+                        ptr += size_of_type;
+                    }
+                    break;
+            }
+            break;
+
+        case adios_complex:
+            for (i=0; i < n; i++) {
+                swap_32_ptr(ptr);   // swap REAL part 4 bytes 
+                swap_32_ptr(ptr+4); // swap IMG part 4 bytes
+                ptr += size_of_type;
+            }
+            break;
+
+        case adios_double_complex:
+            for (i=0; i < n; i++) {
+                swap_64_ptr(ptr);   // swap REAL part 8 bytes 
+                swap_64_ptr(ptr+8); // swap IMG part 8 bytes
+                ptr += size_of_type;
+            }
+            break;
+
+        case adios_string:
+        default:
+            /* nothing to do */
+            break;
+    }
+}
+
+void copy_data (void *dst, void *src,
+        int idim,
+        int ndim,
+        uint64_t* size_in_dset,
+        uint64_t* ldims,
+        const uint64_t * readsize,
+        uint64_t dst_stride,
+        uint64_t src_stride,
+        uint64_t dst_offset,
+        uint64_t src_offset,
+        uint64_t ele_num,
+        int      size_of_type
+        )
+{
+    unsigned int i, j;
+    uint64_t dst_offset_new=0;
+    uint64_t src_offset_new=0;
+    uint64_t src_step, dst_step;
+    if (ndim-1==idim) {
+        for (i=0;i<size_in_dset[idim];i++) {
+            memcpy ((char *)dst + (i*dst_stride+dst_offset)*size_of_type,
+                    (char *)src + (i*src_stride+src_offset)*size_of_type,
+                    ele_num*size_of_type);
+        }
+        return;
+    }
+
+    for (i = 0; i<size_in_dset[idim];i++) {
+        // get the different step granularity 
+        // for each different reading pattern broke
+        src_step = 1;
+        dst_step = 1;
+        for (j = idim+1; j <= ndim-1;j++) {
+            src_step *= ldims[j];
+            dst_step *= readsize[j];
+        }
+        src_offset_new =src_offset + i * src_stride * src_step;
+        dst_offset_new = dst_offset + i * dst_stride * dst_step;
+        copy_data ( dst, src, idim+1, ndim, size_in_dset,
+                ldims,readsize,
+                dst_stride, src_stride,
+                dst_offset_new, src_offset_new,
+                ele_num, size_of_type);
+    }
+}
+
+void alloc_namelist (char ***namelist, int length)
+{
+        int j;
+
+        *namelist = (char **) malloc(length*sizeof(char*));
+        for (j=0;j<length;j++)
+                (*namelist)[j] = (char *) malloc(255);
+
+        return;
+}
+
+void free_namelist (char **namelist, int length)
+{
+        int i;
+        if (namelist) {
+                for (i=0;i<length;i++) {
+                        if(namelist[i])
+                                free(namelist[i]);
+                }
+                free(namelist);
+        }
+        return;
+}
+
+void list_insert_read_request_tail (read_request ** h, read_request * q)
+{
+    read_request * head;
+    if (!h || !q)
+    {
+        printf ("Error: list_insert_read_request_tail cannot handle NULL parameters ()\n");
+        return;
+    }
+
+    head = * h;
+    if (!head)
+    {
+        * h = q;
+        q->next = NULL;
+
+        return;
+    }
+
+    while (head->next)
+    {
+        head = head->next;
+    }
+
+    head->next = q;
+    q->next = NULL;
+
+    return;
+}
+
+void list_append_read_request_list (read_request ** h, read_request * q)
+{
+    read_request * head;
+    if (!h || !q)
+    {
+        printf ("Error: list_append_read_request_list: h: %d, q: %d\n", h == 0, q == 0);
+        return;
+    }
+
+    head = * h;
+    if (!head)
+    {
+        * h = q;
+        return;
+    }
+
+    while (head->next)
+    {
+        head = head->next;
+    }
+
+    head->next = q;
+
+    return;
+}
+
+void list_insert_read_request_next (read_request ** h, read_request * q)
+{
+    read_request * head;
+    if (!h || !q)
+    {
+        printf ("Error: list_insert_read_request_next cannot handle NULL parameters ()\n");
+        return;
+    }
+
+    head = * h;
+    if (!head)
+    {
+        * h = q;
+        q->next = NULL;
+    }
+    else
+    {
+        q->next = head->next;
+        head->next = q;
+    }
+
+    return;
+}
+
+
+void list_free_read_request (read_request * h)
+{
+    read_request * n;
+
+    while (h)
+    {
+        n = h->next;
+
+        free_selection (h->sel);
+        if (h->priv)
+        {
+            free (h->priv);
+            h->priv = 0;
+        }
+        free (h);
+        h = n;
+    }
+}
+
+int list_get_length (read_request * h)
+{
+    int l = 0;
+
+    while (h)
+    {
+        h = h->next;
+        l++;
+    }
+
+    return l;
+}
+
+read_request * copy_read_request (const read_request * r)
+{
+    read_request * newreq;
+
+    newreq = (read_request *) malloc (sizeof (read_request));
+    assert (newreq);
+
+    newreq->sel = copy_selection (r->sel);
+    newreq->varid = r->varid;
+    newreq->from_steps = r->from_steps;
+    newreq->nsteps = r->nsteps;
+    newreq->data = r->data;
+    newreq->datasize = r->datasize;
+    newreq->priv = r->priv;
+    newreq->next = 0;
+
+    return newreq;
+}
+
+ADIOS_SELECTION * copy_selection (const ADIOS_SELECTION * sel)
+{
+    ADIOS_SELECTION * nsel;
+
+    nsel = (ADIOS_SELECTION *) malloc (sizeof (ADIOS_SELECTION));
+    assert (nsel);
+
+    nsel->type = sel->type;
+
+    if (sel->type == ADIOS_SELECTION_BOUNDINGBOX)
+    {
+        nsel->u.bb.ndim = sel->u.bb.ndim;
+        nsel->u.bb.start = (uint64_t *) malloc (sel->u.bb.ndim * 8);
+        nsel->u.bb.count = (uint64_t *) malloc (sel->u.bb.ndim * 8);
+        assert (nsel->u.bb.start && nsel->u.bb.count);
+
+        memcpy (nsel->u.bb.start, sel->u.bb.start, sel->u.bb.ndim * 8);
+        memcpy (nsel->u.bb.count, sel->u.bb.count, sel->u.bb.ndim * 8);
+    }
+    else if (sel->type == ADIOS_SELECTION_POINTS)
+    {
+        nsel->u.points.ndim = sel->u.points.ndim;
+        nsel->u.points.npoints = sel->u.points.npoints;
+        nsel->u.points.points = (uint64_t *) malloc (nsel->u.points.npoints * nsel->u.points.ndim * 8);
+        assert (nsel->u.points.points);
+
+        memcpy (nsel->u.points.points, sel->u.points.points, sel->u.points.npoints * sel->u.points.ndim * 8);
+    }
+    else if (sel->type == ADIOS_SELECTION_WRITEBLOCK)
+    {
+        nsel->u.block.index = sel->u.block.index;
+    }
+    else if (sel->type == ADIOS_SELECTION_AUTO)
+    {
+        //TODO
+    }
+    else
+    {
+        //adios_error (err_invalid_argument, "Wrong ADIOS selection type.\n");
+    }
+
+    return nsel;
+}
+
+void free_selection (ADIOS_SELECTION * sel)
+{
+    sel->type = sel->type;
+
+    if (sel->type == ADIOS_SELECTION_BOUNDINGBOX)
+    {
+        free (sel->u.bb.start);
+        free (sel->u.bb.count);
+    }
+    else if (sel->type == ADIOS_SELECTION_POINTS)
+    {
+        free (sel->u.points.points);
+    }
+
+    free (sel);
+}
+
+
+
+
+/*******************************************************
+   Processing parameter lists
+**********************************************************/
+static char * remove_whitespace (char *start, char *end) 
+{
+    char *s = start;
+    char *e = end;
+    int orig_len = (int) (e-s);
+    int final_len;
+    char *res;
+    // remove front whitespace (but do not go far beyond the end)
+    while (s <= e && 
+           (*s==' ' || *s=='\t' || *s=='\n')
+          ) s++;
+    if (s <= e) { // there is some text 
+        // remove tail whitespace
+        while (s <= e && 
+               (*e==' ' || *e=='\t' || *e=='\n')
+              ) e--;
+        // create result 
+        final_len = e - s + 1; //  length of result 
+        if (final_len > 0) {
+            res = (char *) malloc (final_len + 1); // allocate space s..e and \0
+            memcpy(res, s, final_len);
+            res[final_len] = 0;
+        } else {
+            // "   = something" patterns end here
+            res = NULL;
+        }
+    } else {
+        // no non-whitespace character found
+        res = NULL;
+    }
+    return res;
+}
+
+
+/* Split a line at = sign into name and value pair
+   Remove " ", TAB and Newline from around names and values
+   Return NULL for name and value if there is no = sign in line
+   Return newly allocated strings otherwise
+   Used by: esimmon_internal_text_to_name_value_pairs
+ */
+static void splitnamevalue (const char * line, int linelen,  char **name, char **value)
+{
+    char *equal; // position of first = sign in line
+
+    equal = strchr (line, '=');
+    if (equal && equal != line) {
+        /* 1. name */
+        // from first char to before =
+        *name = remove_whitespace ((char*)line, equal-1);
+        //printf ("      --name=[%s]\n", *name);
+        /* 2. value */
+        // from after = to the last character of line
+        *value = remove_whitespace (equal+1, (char*)line+linelen-1);
+        //printf ("      --value=[%s]\n", *value);
+
+    } else if (equal != line) {
+        /* check if it as name without = value statement */
+        *name = remove_whitespace ((char*)line, (char*)line+linelen-1);
+        //printf ("      --name only=[%s]\n", *name);
+        *value = NULL;
+    } else { 
+        // funny text starting with =. E.g. "=value" 
+        *name = NULL;
+        *value = NULL;
+    }
+}
+
+PairStruct * text_to_name_value_pairs (const char * text)
+{
+    /* Process a multi-line and/or ;-separated text and create a list
+       of name=value pairs from each line which has a 
+           name = value 
+       pattern. Whitespaces are removed. 
+         "X = 1
+          Y = 2"  
+       is not valid because of missing ';', but
+          "X=1; Y=5;
+          Z=apple"  
+       is valid
+    */
+    char *name, *value; 
+    char *item, *delim;
+    int len;
+    char line[256];
+    PairStruct *res = NULL, *last = NULL, *pair;
+
+    if (!text) return res;
+
+    item  = (char *)text; 
+    while (item) {
+        delim = strchr (item, ';');
+        if (delim) 
+            len = (int) (delim-item); 
+        else 
+            len = strlen (item);
+
+        strncpy (line, item, len);
+        line[len] = '\0';
+
+        //printf ("    --Line=[%s]\n", line);
+        splitnamevalue(line, len, &name, &value);
+        if (name) {
+            pair = (PairStruct *) malloc (sizeof(PairStruct));
+            pair->name = name;
+            pair->value = value;
+            pair->next = NULL;
+            if (last) {
+                last->next = pair;
+                last = pair;
+            } else {
+                res = pair; 
+                last = pair;
+            }
+        }
+        if (delim && delim+1 != 0)
+            item = delim+1;
+        else
+            item = NULL;
+    }
+    return res;
+}
+
+
+void free_name_value_pairs (PairStruct * pairs)
+{
+    PairStruct *p;
+    while (pairs) {
+        free(pairs->name);
+        free(pairs->value);
+        p = pairs;
+        pairs=pairs->next;
+        free(p);
+    }
+}
+
+
+/*******************************************************
+   Timing
+**********************************************************/
+#include <time.h> // nanosleep 
+void adios_nanosleep (int sec, int nanosec)
+{
+#if HAVE_NANOSLEEP
+    struct timespec treq = {.tv_sec=sec, .tv_nsec=nanosec};
+    struct timespec trem;
+    int r;
+    r = nanosleep(&treq, &trem);
+    //log_debug("adios_nanosleep: Nanoslept for %d.%9.9d sec, r=%d, errno=%d\n",
+    //          treq.tv_sec, treq.tv_nsec, r, errno);
+    while (r == -1 && errno == EINTR) {
+        treq.tv_sec = trem.tv_sec;
+        treq.tv_nsec = trem.tv_nsec;
+        r = nanosleep (&treq, &trem);
+    }
+#else
+    if (sec>0) {
+        //log_debug("adios_nanosleep: Slept for %d seconds\n");
+        sleep(sec);
+    } else {
+        //log_debug("adios_nanosleep: Slept for 1 second\n");
+        sleep(1);
+    }
+
+#endif
+}   
+
+#include <sys/time.h>
+struct timeval adios_timer_tp;
+double adios_gettime() 
+{
+    gettimeofday(&adios_timer_tp, NULL); \
+        return  ((double)adios_timer_tp.tv_sec + ((double)adios_timer_tp.tv_usec)/1000000.0);
+}
+
diff --git a/src/core/util.h b/src/core/util.h
new file mode 100644
index 0000000..e922c38
--- /dev/null
+++ b/src/core/util.h
@@ -0,0 +1,78 @@
+#ifndef UTIL_H_
+#define UTIL_H_
+
+#include <stdint.h>
+#include "public/adios_types.h"
+#include "public/adios_selection.h"
+
+typedef struct read_request
+{
+    ADIOS_SELECTION * sel;
+    int varid;
+    int from_steps;
+    int nsteps;
+    void * data;
+    uint64_t datasize; // size of selection to hold data
+// above is the common fields that all read method will use
+    void * priv; // private structure for each read method
+    struct read_request * next;
+} read_request;
+
+/* Reverse the order in an array in place.
+   use swapping from Fortran/column-major order to ADIOS-read-api/C/row-major order and back
+*/
+void swap_order(int n, uint64_t *array, int *timedim);
+void change_endianness( void *data, uint64_t slice_size, enum ADIOS_DATATYPES type);
+void copy_data (void *dst, void *src,
+                int idim,
+                int ndim,
+                uint64_t* size_in_dset,
+                uint64_t* ldims,
+                const uint64_t * readsize,
+                uint64_t dst_stride,
+                uint64_t src_stride,
+                uint64_t dst_offset,
+                uint64_t src_offset,
+                uint64_t ele_num,
+                int      size_of_type
+                );
+void alloc_namelist (char ***namelist, int length);
+void free_namelist (char **namelist, int length);
+void list_insert_read_request_tail (read_request ** h, read_request * q);
+void list_insert_read_request_next (read_request ** h, read_request * q);
+void list_append_read_request_list (read_request ** h, read_request * q);
+void list_free_read_request (read_request * h);
+int list_get_length (read_request * h);
+ADIOS_SELECTION * copy_selection (const ADIOS_SELECTION * sel);
+void free_selection (ADIOS_SELECTION * sel);
+
+/*******************************************************
+   Processing parameter lists
+**********************************************************/
+/*
+   Process a ;-separated and possibly multi-line text and 
+   create a list of name=value pairs from each 
+   item which has a "name=value" pattern. Whitespaces are removed. 
+   Input is not modified. Space is allocated;
+   Also, simple "name" or "name=" patterns are processed and 
+   returned with value=NULL. 
+*/
+struct PairStruct {
+    char * name;
+    char * value;
+    struct PairStruct * next;
+};
+typedef struct PairStruct PairStruct;
+
+PairStruct * text_to_name_value_pairs (const char * text);
+void free_name_value_pairs (PairStruct * pairs);
+
+/**********************************************************
+   Timing
+**********************************************************/
+/* sleep for a bit */
+void adios_nanosleep (int sec, int nanosec);
+/* get current time as double (in seconds) */
+double adios_gettime();
+
+#endif
diff --git a/src/adios_nssi_args.x b/src/nssi/adios_nssi_args.x
similarity index 100%
rename from src/adios_nssi_args.x
rename to src/nssi/adios_nssi_args.x
diff --git a/src/adios_nssi_config.c b/src/nssi/adios_nssi_config.c
similarity index 100%
rename from src/adios_nssi_config.c
rename to src/nssi/adios_nssi_config.c
diff --git a/src/adios_nssi_config.h b/src/nssi/adios_nssi_config.h
similarity index 100%
rename from src/adios_nssi_config.h
rename to src/nssi/adios_nssi_config.h
diff --git a/src/adios_nssi_filter.c b/src/nssi/adios_nssi_filter.c
similarity index 100%
rename from src/adios_nssi_filter.c
rename to src/nssi/adios_nssi_filter.c
diff --git a/src/aggregation.cpp b/src/nssi/aggregation.cpp
similarity index 100%
rename from src/aggregation.cpp
rename to src/nssi/aggregation.cpp
diff --git a/src/aggregation.h b/src/nssi/aggregation.h
similarity index 100%
rename from src/aggregation.h
rename to src/nssi/aggregation.h
diff --git a/src/io_timer.h b/src/nssi/io_timer.h
similarity index 100%
rename from src/io_timer.h
rename to src/nssi/io_timer.h
diff --git a/src/nssi_coupling_server.cpp b/src/nssi/nssi_coupling_server.cpp
similarity index 100%
rename from src/nssi_coupling_server.cpp
rename to src/nssi/nssi_coupling_server.cpp
diff --git a/src/nssi_staging_server.cpp b/src/nssi/nssi_staging_server.cpp
similarity index 100%
rename from src/nssi_staging_server.cpp
rename to src/nssi/nssi_staging_server.cpp
diff --git a/src/public/adios.h b/src/public/adios.h
new file mode 100644
index 0000000..61196dd
--- /dev/null
+++ b/src/public/adios.h
@@ -0,0 +1,144 @@
+/*
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#ifndef ADIOS_H
+#define ADIOS_H
+
+#include "adios_types.h"
+#include "adios_error.h"
+#include <stdint.h>
+
+#ifdef _NOMPI
+/* Sequential processes can use the library compiled with -D_NOMPI */
+#   include "mpidummy.h"
+#else
+/* Parallel applications should use MPI to communicate file info and slices of data */
+#   include "mpi.h"
+#endif
+
+// ADIOS - Adaptable IO System
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Global setup using the XML file
+int adios_init (const char * config);
+
+int adios_finalize (int mype);
+
+// end user calls for each I/O operation
+// modes = "r" = "read", "w" = "write", "a" = "append", "u" = "update"
+int adios_open (int64_t * fd, 
+                const char * group_name, 
+                const char * name,
+                const char * mode, 
+                void * comm
+               );
+
+int adios_group_size (int64_t fd_p, 
+                      uint64_t data_size,
+                      uint64_t * total_size
+                     ); 
+
+int adios_write (int64_t fd_p, const char * name, void * var);
+
+int adios_get_write_buffer (int64_t fd_p, 
+                            const char * name,
+                            uint64_t * size,
+                            void ** buffer
+                           );
+
+int adios_read (int64_t fd_p, 
+                const char * name, 
+                void * buffer,
+                uint64_t buffer_size
+               );
+
+int adios_set_path (int64_t fd_p, const char * path);
+
+int adios_set_path_var (int64_t fd_p, const char * path, const char * name);
+
+int adios_end_iteration (void);
+
+int adios_start_calculation (void);
+
+int adios_stop_calculation (void);
+
+int adios_close (int64_t fd_p);
+
+// ADIOS No-XML API's
+int adios_init_noxml (void);
+
+// To allocate ADIOS buffer
+int adios_allocate_buffer (
+        enum ADIOS_BUFFER_ALLOC_WHEN adios_buffer_alloc_when,
+        uint64_t buffer_size
+        );
+
+// To declare a ADIOS group
+int adios_declare_group (int64_t * id, 
+                         const char * name,
+                         const char * time_index, 
+                         enum ADIOS_FLAG stats
+                        );
+
+// To free a ADIOS group
+int adios_free_group (int64_t id);
+
+// To select a I/O method for a ADIOS group
+int adios_select_method (int64_t group, 
+                         const char * method,
+                         const char * parameters,
+                         const char * base_path
+                        );
+
+// To define a ADIOS variable
+int64_t adios_define_var (int64_t group_id, 
+                          const char * name,
+                          const char * path,
+                          enum ADIOS_DATATYPES type,
+                          const char * dimensions,
+                          const char * global_dimensions,
+                          const char * local_offsets
+                         );
+
+int adios_define_attribute (int64_t group, 
+                            const char * name,
+                            const char * path, 
+                            enum ADIOS_DATATYPES type,
+                            const char * value, 
+                            const char * var
+                           );
+/** This function does similar function as adios_write. It is, however, used
+ * in the following scenario that
+ * 1. numbers, instead of a variable, are used to annotate array dimensions, and
+ * 2. a variable is written mutiple times on a processor (e.g., AMR codes)
+ */
+int adios_write_byid (int64_t fd_p, int64_t id, void * var);
+
+/** Set the application's ID for adios_read_init()
+ *  when using a staging method (DATASPACES, DIMES, NSSI or DATATAP).
+ *  The ID should be unique for each application accessing the staging area
+ *  IN:  id   a number unique for this application
+ *  RETURN:       0 if accepted, <0 on error
+ *  It is optional to use it before calling adios_init. Default is 1. 
+ *  It has no effect for file based methods.
+ *  Note: this function is defined both in adios.h and adios_read.h so that
+ *  writing-only and reading-only applications can both use it.
+ */ 
+/*int adios_set_application_id (int id);*/
+
+void adios_timing_write_xml (int64_t fd_p, const char* filename);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/src/public/adios_error.h b/src/public/adios_error.h
new file mode 100644
index 0000000..e8bc761
--- /dev/null
+++ b/src/public/adios_error.h
@@ -0,0 +1,103 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+#ifndef __ADIOS_ERROR_H_
+#define __ADIOS_ERROR_H_
+
+enum ADIOS_ERRCODES {
+    err_no_error                        = 0,
+    err_no_memory                       = -1,
+    err_file_open_error                 = -2,
+    err_file_not_found                  = -3,
+    err_invalid_file_pointer            = -4,
+    err_invalid_group                   = -5,
+    err_invalid_group_struct            = -6,
+    err_invalid_varid                   = -7,
+    err_invalid_varname                 = -8,
+    err_corrupted_variable              = -9,
+
+    err_invalid_attrid                  = -10,
+    err_invalid_attrname                = -11,
+    err_corrupted_attribute             = -12,
+    err_invalid_attribute_reference     = -13,
+    err_invalid_timestep                = -14,
+    err_no_data_at_timestep             = -15,
+    err_time_at_wrong_dimension         = -16,
+    err_invalid_read_method             = -17,
+    err_connection_failed               = -18,
+    err_out_of_bound                    = -19,
+
+    err_operation_not_supported         = -20,
+    err_end_of_stream                   = -21, /* stream: reached end of stream, 
+                                                  returned by adios_read_open() or
+                                                           by adios_advance_step()         */
+    err_step_notready                   = -22, /* stream: tried to advance the step, 
+                                                  but no new step has arrived yet          */
+    err_step_disappeared                = -23, /* stream: tried to advance the step, 
+                                                  but next step has already disappeared    */
+    err_too_many_files                  = -24, /* some staging methods allow for using only
+                                                  a fixed number of different filenames    */
+
+    err_unknown_char                    = -30,
+
+    // XML parsing errors
+    err_invalid_host_language           = -50,
+    err_global_dim_required             = -51,
+    err_global_offset_required          = -52,
+    err_invalid_method                  = -53,
+    err_invalid_buffer_size             = -54,
+    err_missing_config_file             = -55,
+    err_expected_read_size_mismatch     = -56,
+    err_allocating_buffer_size          = -57,
+    err_invalid_xml_doc                 = -58,
+    err_no_group_defined                = -59,
+    err_no_method_defined               = -60,
+    err_no_buffer_defined               = -61,
+    err_missing_invalid_group           = -62,
+    err_group_method_mismatch           = -63,
+    err_dimension_required              = -64,
+    err_offset_required                 = -65,
+    err_invalid_dimension               = -66,
+    err_invalid_global_dimension        = -67,
+    err_invalid_offset                  = -68,
+    err_invalid_var_as_dimension        = -69,
+    err_invalid_type_attr               = -70,
+    err_invalid_value_attr              = -71,
+    err_histogram_error                 = -72,
+
+    // Write method errors
+    err_invalid_file_mode               = -100,
+    err_invalid_file_version            = -101,
+    err_invalid_data                    = -102,
+    err_buffer_overflow                 = -103,
+    err_too_many_variables              = -104,
+    err_invalid_write_method            = -105,
+    err_write_error                     = -106,
+
+    //buffering errors
+    err_invalid_buffer                  = -130,
+    err_invalid_buffer_version          = -131,
+    err_invalid_buffer_index            = -132,
+    err_invalid_buffer_group            = -133,
+    err_invalid_buffer_vars             = -134,
+    err_invalid_buffer_attrs            = -135,
+    
+    
+
+    //invalid argument to function
+    err_invalid_argument                = -140,
+
+
+    err_unspecified                     = -200
+};
+
+void adios_error (enum ADIOS_ERRCODES errcode, char *fmt, ...);
+void adios_error_at_line (enum ADIOS_ERRCODES errcode, const char* filename, unsigned int linenum, char *fmt, ...);
+
+const char* adios_get_last_errmsg (void);
+
+#endif
diff --git a/src/public/adios_read.h b/src/public/adios_read.h
new file mode 100644
index 0000000..e7e48f0
--- /dev/null
+++ b/src/public/adios_read.h
@@ -0,0 +1,21 @@
+/*
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/*
+ *   Read C API for ADIOS BP format files
+ */
+#ifndef __ADIOS_READ_H__
+#define __ADIOS_READ_H__
+
+#ifdef ADIOS_USE_READ_API_1
+#  include "adios_read_v1.h"
+#else 
+#  include "adios_read_v2.h"
+#endif
+
+
+#endif  /*__ADIOS_READ_H__*/
diff --git a/src/adios_read.h b/src/public/adios_read_v1.h
similarity index 90%
rename from src/adios_read.h
rename to src/public/adios_read_v1.h
index 83e87bf..1423750 100644
--- a/src/adios_read.h
+++ b/src/public/adios_read_v1.h
@@ -7,10 +7,13 @@
 
 /*
  *   Read C API for ADIOS BP format files
+ *   Define -DADIOS_USE_READ_API_1 at compile time when including "adios_read.h" 
+ *   to use this version of the API. 
  */
-#ifndef __ADIOS_READ_H__
-#define __ADIOS_READ_H__
+#ifndef __ADIOS_READ_V1_H__
+#define __ADIOS_READ_V1_H__
 
+#include "adios_read_v1_defs.h"
 #include "adios_types.h"
 
 #ifdef _NOMPI
@@ -23,6 +26,10 @@
 
 #include <stdint.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*************************/
 /* Types used in the API */
 /*************************/
@@ -82,17 +89,21 @@ typedef struct {
             uint32_t **frequenciess;
             uint32_t *gfrequencies;
         } *hist;
+
+        void * internal_data;       /* internal storage for version 2 read API data */
 } ADIOS_VARINFO;
 
 /* The list of the available read methods */
 enum ADIOS_READ_METHOD {
-         ADIOS_READ_METHOD_BP         = 0    /* Read from ADIOS BP file (written by POSIX, MPI etc methods) */
-        ,ADIOS_READ_METHOD_BP_STAGED  = 1    /* Read from ADIOS BP file (written by POSIX, MPI_AMR etc methods) */
-        ,ADIOS_READ_METHOD_HDF5       = 2    /* Read from HDF5 file (written by PHDF5 method)               */
-        ,ADIOS_READ_METHOD_DART       = 3    /* Read from memory written by DART method                     */
-        ,ADIOS_READ_METHOD_DIMES      = 4    /* Read from memory written by DIMES method                    */
-        ,ADIOS_READ_METHOD_NSSI       = 5    /* Read from memory written by NSSI method                     */
-        ,ADIOS_READ_METHOD_DATATAP    = 6    /* Read from memory written by DATATAP method                  */
+         ADIOS_READ_METHOD_BP           = 0    /* Read from ADIOS BP file (written by POSIX, MPI etc methods) */
+        ,ADIOS_READ_METHOD_BP_STAGED    = 1    /* Read from ADIOS BP file (written by POSIX, MPI_AMR etc methods */
+        ,ADIOS_READ_METHOD_BP_AGGREGATE = 1    /* Alias of STAGED method                                      */
+        ,ADIOS_READ_METHOD_HDF5         = 2    /* Read from HDF5 file (written by PHDF5 method)               */
+        ,ADIOS_READ_METHOD_DART         = 3    /* Read from memory written by DART method                     */
+        ,ADIOS_READ_METHOD_DIMES        = 4    /* Read from memory written by DIMES method                    */
+        ,ADIOS_READ_METHOD_NSSI         = 5    /* Read from memory written by NSSI method                     */
+        ,ADIOS_READ_METHOD_DATATAP      = 6    /* Read from memory written by DATATAP method                  */
+        ,ADIOS_READ_METHOD_BP_STAGED1   = 7    /* Read from ADIOS BP file (written by POSIX, MPI_AMR etc methods) */
 };
 
 #ifndef __INCLUDED_FROM_FORTRAN_API__
@@ -282,4 +293,9 @@ const char * adios_type_to_string (enum ADIOS_DATATYPES type);
 int adios_type_size(enum ADIOS_DATATYPES type, void *data);
 
 #endif  /*__INCLUDED_FROM_FORTRAN_API__*/
-#endif  /*__ADIOS_READ_H__*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /*__ADIOS_READ_V1_H__*/
diff --git a/src/public/adios_read_v1_defs.h b/src/public/adios_read_v1_defs.h
new file mode 100644
index 0000000..b5f4ab3
--- /dev/null
+++ b/src/public/adios_read_v1_defs.h
@@ -0,0 +1,56 @@
+/*
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/*
+ *   Read C API for ADIOS BP format files
+ */
+#ifndef __ADIOS_READ_V1_DEFS_H__
+#define __ADIOS_READ_V1_DEFS_H__
+
+#define ADIOS_FILE ADIOS_FILE_V1
+#define ADIOS_GROUP ADIOS_GROUP_V1
+#define ADIOS_VARINFO ADIOS_VARINFO_V1
+#define ADIOS_HIST ADIOS_HIST_V1
+
+#define ADIOS_READ_METHOD ADIOS_READ_METHOD_V1
+#define ADIOS_READ_METHOD_BP ADIOS_READ_METHOD_BP_V1
+#define ADIOS_READ_METHOD_BP_AGGREGATE ADIOS_READ_METHOD_BP_AGGREGATE_V1
+#define ADIOS_READ_METHOD_BP_STAGED ADIOS_READ_METHOD_BP_STAGED_V1
+#define ADIOS_READ_METHOD_HDF5 ADIOS_READ_METHOD_HDF5_V1
+#define ADIOS_READ_METHOD_DART ADIOS_READ_METHOD_DART_V1
+#define ADIOS_READ_METHOD_DIMES ADIOS_READ_METHOD_DIMES_V1
+#define ADIOS_READ_METHOD_NSSI ADIOS_READ_METHOD_NSSI_V1
+#define ADIOS_READ_METHOD_DATATAP ADIOS_READ_METHOD_DATATAP_V1
+#define ADIOS_READ_METHOD_BP_STAGED1 ADIOS_READ_METHOD_BP_STAGED1_V1
+
+#define adios_read_init adios_read_init_v1
+#define adios_read_finalize adios_read_finalize_v1
+#define adios_set_read_method adios_set_read_method_v1
+#define adios_fopen adios_fopen_v1
+#define adios_fopen adios_fopen_v1
+#define adios_fclose adios_fclose_v1
+#define adios_reset_dimension_order adios_reset_dimension_order_v1
+#define adios_gopen adios_gopen_v1
+#define adios_gopen_byid adios_gopen_byid_v1
+#define adios_gclose adios_gclose_v1
+#define adios_inq_var adios_inq_var_v1
+#define adios_inq_var_byid adios_inq_var_byid_v1
+#define adios_stat_cor adios_stat_cor_v1
+#define adios_stat_cov adios_stat_cov_v1
+#define adios_free_varinfo adios_free_varinfo_v1
+#define adios_read_var adios_read_var_v1
+#define adios_read_var_byid adios_read_var_byid_v1
+#define adios_read_local_var adios_read_local_var_v1
+#define adios_get_attr adios_get_attr_v1
+#define adios_get_attr_byid adios_get_attr_byid_v1
+#define adios_type_to_string adios_type_to_string_v1
+#define adios_type_size adios_type_size_v1
+
+
+#define err_end_of_file err_end_of_stream
+
+#endif  /*__ADIOS_READ_VER1_DEFS_H__*/
diff --git a/src/public/adios_read_v2.h b/src/public/adios_read_v2.h
new file mode 100644
index 0000000..8190618
--- /dev/null
+++ b/src/public/adios_read_v2.h
@@ -0,0 +1,541 @@
+/*
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/*
+ *   Streaming/Chunking/Selection Read API in C for ADIOS BP format 
+ */
+#ifndef __ADIOS_READ_VER2_H__
+#define __ADIOS_READ_VER2_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "adios_types.h"
+#include "adios_selection.h"
+
+#ifdef _NOMPI
+    /* Sequential processes can use the library compiled with -D_NOMPI */
+#   include "mpidummy.h"
+#else
+    /* Parallel applications should use MPI to communicate file info and slices of data */
+#   include "mpi.h"
+#endif
+
+#include <stdint.h>
+
+/*************************/
+/* Types used in the API */
+/*************************/
+
+typedef struct {
+        uint64_t fh;                /* File handler                                                   */
+        int      nvars;             /* Number of variables in all groups (with full path)             */
+        char     ** var_namelist;   /* Variable names in a char* array                                */
+        int      nattrs;            /* Number of attributes in all groups                             */
+        char     ** attr_namelist;  /* Attribute names in a char* array                               */
+
+        /* Stream step information */
+        int      current_step;      /* The current step in a stream. For a file, it is always 0.      */
+        int      last_step;         /* The currently available latest step in the stream/file.        */
+
+        /* Information about file/stream */
+        char     *path;             /* Full path file name (as passed at open)                        */
+        int      endianness;        /* 0: little endian, 1: big endian                                */
+                                    /*   the read API takes care of conversion automatically          */
+        int      version;           /* Version of ADIOS-BP format                                     */
+        uint64_t file_size;         /* Size of file in bytes not including subfiles                   */
+
+        /* Internals */
+        void     * internal_data;   /* Data for internal use                                          */
+} ADIOS_FILE;
+
+
+typedef struct {
+        void     * min;            /* minimum value in an array variable, = value for a scalar       */
+        void     * max;            /* maximum value of an array variable (over all steps)            */
+        double   * avg;            /* average value of an array variable (over all steps)            */
+        double   * std_dev;        /* standard deviation value of an array variable (over all steps) */
+
+        struct ADIOS_STAT_STEP     /* per step statistics (if requested and recorded at writing) */
+        {
+            void     ** mins;      /* minimum per each step (array of 'nsteps' elements)             */
+            void     ** maxs;      /* maximum per each step (array of 'nsteps' elements)             */
+            double   ** avgs;      /* average per each step (array of 'nsteps' elements)             */
+            double   ** std_devs;  /* standard deviation per each step (array of 'nsteps' elements)  */
+        } *steps;
+
+        struct ADIOS_STAT_BLOCK    /* per block statistics (if requested and recorded at writing) */
+        {
+            void     ** mins;      /* minimum per each block (array of 'nblocks' elements)         */
+            void     ** maxs;      /* maximum per each block (array of 'nblocks' elements)         */
+            double   ** avgs;      /* average per each block (array of 'nblocks' elements)         */
+            double   ** std_devs;  /* std deviation per each block (array of 'nblocks' elements)   */
+        } *blocks;
+
+        struct ADIOS_HIST           /* Histogram if recorded at writing */
+        {
+            uint32_t    num_breaks;
+            double      max;
+            double      min;
+            double *    breaks;
+            uint32_t ** frequencies;
+            uint32_t *  gfrequencies;
+        } *histogram;
+
+} ADIOS_VARSTAT;
+
+
+typedef struct {
+    uint64_t * start;      /* offset start point in global array ('ndim' elements)         */
+    uint64_t * count;      /* local sizes in global array ('ndim' elements)                */
+} ADIOS_VARBLOCK;
+
+
+typedef struct {
+        int        varid;           /* variable index (0..ADIOS_FILE.nvars-1)                         */
+        enum ADIOS_DATATYPES type;  /* type of variable                                               */
+        int        ndim;            /* number of dimensions, 0 for scalars                            */
+        uint64_t * dims;            /* size of each dimension.
+                                       If variable has no global view 'dims' report the size of the 
+                                       local array written by process rank 0. 
+                                    */
+        int        nsteps;          /* Number of steps of the variable in file. 
+                                       There is always at least one step.                             */
+                                    /* In streams it always equals 1.                                 */
+        void     * value;           /* value of a scalar variable, NULL for array.                    */
+        int        global;          /* 1: global view (was defined by writer), 
+                                       0: pieces written by writers without defining a global array   */
+        int      * nblocks;         /* Number of blocks that comprise this variable in a step
+                                       It is an array of 'nsteps' integers                            */
+        int        sum_nblocks;     /* Number of all blocks of all steps, the sum of the nblocks array*/
+        ADIOS_VARSTAT  *statistics; /* Statistics, retrieved in separate call: adios_inq_var_stat()   */
+        ADIOS_VARBLOCK *blockinfo;  /* Spatial arrangement of written blocks, 
+                                       retrieved in separate call: adios_inq_var_blockinfo()       
+                                       It is an array of 'sum_nblocks' elements                       */
+} ADIOS_VARINFO;
+
+
+typedef struct {
+        int                   varid;    /* variable index (0..ADIOS_FILE.nvars-1)              */
+        enum ADIOS_DATATYPES  type;     /* type of variable                                    */
+        ADIOS_SELECTION     * sel;      /* sub-selection of requested selection                */
+        void                * data;     /* pointer to data, at next adios_read_check() memory 
+                                           will likely be overwritten                          */
+} ADIOS_VARCHUNK;
+
+/* The list of the available read methods */
+enum ADIOS_READ_METHOD {
+        ADIOS_READ_METHOD_BP            = 0,  /* Read from ADIOS BP file (written by POSIX, MPI etc methods) */
+        ADIOS_READ_METHOD_BP_AGGREGATE  = 1,  /* Read from ADIOS BP file (written by POSIX, MPI_AMR etc methods)  */
+        ADIOS_READ_METHOD_DATASPACES    = 3,  /* Read from memory written by DATASPACES method               */
+        ADIOS_READ_METHOD_DIMES         = 4,  /* Read from memory written by DIMES method                    */
+        ADIOS_READ_METHOD_FLEXIO        = 5,  /* Read from memory written by FLEXIO method                   */
+};
+
+/** Locking mode for streams. 
+ *  In case of real streams, a step may need to be locked in memory to be able
+ *  to read all data of the step completely.
+ *     ADIOS_LOCKMODE_NONE = no locking. A step can disappear between open and read
+ *     ADIOS_LOCKMODE_CURRENT = lock current step. Do not allow to be removed until
+ *         closing or moving away from this step. Future steps may be removed by
+ *         the method to store even newer steps. Therefore, steps may be missing.
+ *     ADIOS_LOCKMODE_ALL = lock current step and all newer steps
+ *  In case of a file opened as a stream, locking mode has no effect. 
+ */
+enum ADIOS_LOCKMODE { 
+        ADIOS_LOCKMODE_NONE = 0, 
+        ADIOS_LOCKMODE_CURRENT = 1,
+        ADIOS_LOCKMODE_ALL = 2
+}; 
+
+#ifndef __INCLUDED_FROM_FORTRAN_API__
+
+/** Functions that return a pointer to some data structures (e.g. adios_fopen),
+ *  return NULL on error and set adios_errno to a non-zero value and writes an
+ *  error string.
+ *  You have direct access to that string so you can print it.
+ *  Do not write anything into it.
+ *  The last error message is always available; it is not cleared until another error is detected.
+ */
+extern int adios_errno;
+const char *adios_errmsg();
+
+/** Initialize a reading method before opening a file/stream with using 
+ *  the method.
+ *  IN:  method     read method to use
+ *       comm       MPI communicator of all processes participating
+ *                  in a file/stream operation
+ *       parameters A series of name=value pairs separated by ;
+ *                  E.g. "max_memory=200; app_id = 1"
+ *                  List of parameters is documented for each method 
+ *                  separately. 
+ *                  
+ *  RETURN:       0 if accepted, <0 on error
+ *  Initialization is required for the staging methods, where init/finalize 
+ *  perform the connection/disconnection to the staging server once.
+ *  The ADIOS_READ_METHOD_BP does not need to be initialized/finalized.
+ */
+int adios_read_init_method (enum ADIOS_READ_METHOD method, 
+                            MPI_Comm comm, 
+                            const char * parameters);
+ 
+/*  max_memory 
+ *                  maximum size of memory to be used by the read method,
+ *                  in MB, for caching. The methods use this size for 
+ *                  caching/staging the data as a limit but use other 
+ *                  memory for all internal data structures.
+ *                  0 means, it can use as much memory as necessary
+ *  app_id
+ *      when using a staging method (DATASPACES, DIMES, NSSI or DATATAP).
+ *      The ID should be unique for each application accessing the staging area
+ */
+
+/** Finalize the selected method. Required for all methods that are initialized. 
+ */
+int adios_read_finalize_method(enum ADIOS_READ_METHOD method);
+
+/** Open an adios file/stream as a stream.
+ *  Only one step at a time can be read. The list of variables will change when
+ *  advancing the step if the writing application writes different variables at
+ *  different times. 
+ *
+ *  IN:  fname    pathname of file/stream to be opened
+ *       method   read method to use for this particular stream
+ *       comm     the MPI communicator of all processes that want to read data from the stream
+ *                If compiled with -D_NOMPI, pass any integer here.
+ *       lock_mode   In case of real streams, a step may need to be locked in memory to be able
+ *                      to read all data of the step completely.
+ *       timeout_sec  >=0.0: block until the stream becomes available but 
+ *                           for max 'timeout_sec' seconds.
+ *                           0.0 means return immediately if stream is not available
+ *                     <0.0: block possibly forever
+ *                     Note: <0.0 does not ever return with err_file_not_found error, 
+ *                        which is dangerous if the stream name is simply mistyped in the code.
+ *  RETURN:       pointer to an ADIOS_FILE struct, NULL on error (sets adios_errno)
+ *
+ *  Note: the current_step field of the returned struct indicates which step the stream is at.
+ *        Steps start from 0.
+ *
+ *  Possible errors (adios_errno values):
+ *       err_file_not_found_error  File/stream does not exist / not yet available
+ *       err_end_of_stream         Stream has ended, nothing is available and
+ *                                 no more steps should be expected.
+ */
+ADIOS_FILE * adios_read_open_stream (const char * fname, 
+                                     enum ADIOS_READ_METHOD method, 
+                                     MPI_Comm comm, 
+                                     enum ADIOS_LOCKMODE lock_mode,
+                                     float timeout_sec);
+
+/** Open an adios file as a file.
+ *  Each variable can have different number of steps, which is reported in adios_inq_var(). 
+ *  Arbitrary steps of a variable can be read at any time. 
+ *  In general, the 'last_step' field of the returned ADIOS_FILE struct indicates
+ *  the number of open-write-close cycles of the writing application, while 
+ *  'current_step' is always 0. If all variables have been written at each writing step, 
+ *  'last_step' equals the 'nsteps' available for each variable reported by adios_inq_var().
+ *  
+ *
+ *  IN:  fname    pathname of file to be opened
+ *       method   read method to use for this particular file
+ *       comm     the MPI communicator of all processes that want to read data from the file
+ *                If compiled with -D_NOMPI, pass any integer here.
+ *  RETURN:       pointer to an ADIOS_FILE struct, NULL on error (sets adios_errno)
+ *
+ *  Possible errors (adios_errno values):
+ *       err_file_not_found_error  File does not exist 
+ */
+ADIOS_FILE * adios_read_open_file (const char * fname, 
+                                   enum ADIOS_READ_METHOD method, 
+                                   MPI_Comm comm);
+
+/** Close an adios file.
+ *  It will free the content of the underlying data structures and the fp pointer itself.
+ *  IN:   fp       pointer to an ADIOS_FILE struct
+ *  RETURN: 0 OK, !=0 on error (also sets adios_errno)
+ */
+int adios_read_close (ADIOS_FILE *fp);
+
+
+/** Advance the current step of a stream.
+ *  In case of streams, 
+ *     - An error should be expected for any step, 
+ *       since that might not yet be available 
+ *     - Also, only the current step can be read.
+ *     - Seeking to step N informs the read method that all steps 
+ *       before N can be removed if space is needed.
+ *  For files opened as file, stepping has no effect.
+ *
+ *  IN:   fp       pointer to an ADIOS_FILE struct
+ *        last     0: next available step, !=0: newest available step 
+ *        timeout_sec  >=0.0: block until the next step becomes available but 
+ *                            for max 'timeout_sec' seconds.
+ *                            0.0 means return immediately if step is not available
+ *                 <0.0: block forever if necessary
+ *  RETURN: 0 OK, !=0 on error (also sets adios_errno)
+ *      
+ *  Possible errors (adios_errno values):
+ *       err_end_of_stream    Stream has ended, no more steps should be expected
+ *       err_step_notready    The requested step is not yet available
+ *       err_step_disappeared The requested step is not available anymore
+ */
+int adios_advance_step (ADIOS_FILE *fp, int last, float timeout_sec); 
+
+/** Release a step in a stream without seeking to the next step.
+  * This function is to inform the read method that the current step is
+  * no longer needed, but the reader does not yet want to read another step.
+  * This function releases the lock on the step only. The current step is not
+  * changed in the ADIOS_FILE struct, but reading any variable may fail due to
+  * removal. If no locking is requested at open time, this function has no
+  * effect at all.
+  *
+  * adios_advance_step() also releases the step from which one advances 
+  * forward so it is not necessary to call this function.
+  */
+void adios_release_step (ADIOS_FILE *fp);
+
+/** Inquiry about a variable.
+ *  This function does not read anything from the file but processes info
+ *  already in memory after fopen.
+ *  It allocates memory for the ADIOS_VARINFO struct and content, so
+ *  you need to free resources later with adios_free_varinfo().
+ *
+ *  Note that you can get a scalar variable's value (including strings)
+ *  with this operation without touching the file/stream.
+ *  The 'stats' element will be NULL after this call. To get the statistics, 
+ *  another call must be made after this: adios_inq_var_stat().
+ *  The 'blocks' element will be NULL after this call. To get the decomposition
+ *  of a variable in the file/stream, another call must be made after this: 
+ *  adios_inq_var_blockinfo().
+ *
+ *  IN:  fp       pointer to an (opened) ADIOS_FILE struct
+ *       varname  name of the variable
+ *  RETURN:       pointer to and ADIOS_VARINFO struct, NULL on error (sets adios_errno)
+ */
+ADIOS_VARINFO * adios_inq_var (ADIOS_FILE *fp, const char * varname);
+
+/** Inquiry a variable by index
+ *       varid    index of variable (0..fp->nvars-1)
+ *                in fp->vars_namelist of ADIOS_FILE struct
+ */
+ADIOS_VARINFO * adios_inq_var_byid (ADIOS_FILE *fp, int varid);
+
+/** Free memory used by an ADIOS_VARINFO struct */
+void adios_free_varinfo (ADIOS_VARINFO *cp);
+
+/** Get statistics recorded about a variable.
+ *  The information to calculate the statistics are recorded in the metadata,
+ *  so no extra file access is necessary after adios_fopen() for this operation.
+ *  The result is stored in the ADIOS_VARSTAT struct under varinfo.stats. 
+ * 
+ *  adios_free_varinfo() will free the extra memory allocated in this call.
+ *
+ *  IN:  fp             pointer to an (opened) ADIOS_FILE struct
+ *       varinfo        result of adios_inq_var() 
+ *       per_step_stat  !=0: return statistics also per step
+ *       per_block_stat !=0: return statistics also per writer block 
+ *  RETURN: 0 OK, !=0 on error (also sets adios_errno)
+ */
+int adios_inq_var_stat (ADIOS_FILE *fp, ADIOS_VARINFO * varinfo,
+                        int per_step_stat, int per_block_stat);
+
+/** Get the block-decomposition of the variable about how it is stored in 
+ *  the file or stream. The decomposition information are recorded in the
+ *  metadata, so no extra file access is necessary after adios_fopen() for 
+ *  this operation. The result is stored in the array of 
+ *  ADIOS_VARBLOCK structs under varinfo.blocks. 
+ * 
+ *  adios_free_varinfo() will free the extra memory allocated in this call.
+ *
+ *  IN:  fp       pointer to an (opened) ADIOS_FILE struct
+ *       varinfo  result of adios_inq_var() 
+ *  RETURN: 0 OK, !=0 on error (also sets adios_errno)
+ */
+int adios_inq_var_blockinfo (ADIOS_FILE *fp, ADIOS_VARINFO * varinfo);
+
+/** Schedule reading a variable (slice) from the file.
+ *  You need to call adios_perform_reads() to do the reading of
+ *  variables.
+ *  IN:  fp         pointer to an (opened) ADIOS_FILE struct
+ *       sel        selection created beforehand with adios_selection...().
+ *                  sel=NULL means global selection (whole variable)
+ *       varname    name of the variable
+ *       from_step  File mode only: read the 'nsteps' consecutive steps
+ *                  of a variable from 'from_step'.
+ *                  It is not used in case of a stream.
+ *       nsteps     Read 'nsteps' consecutive steps of a variable.
+ *                  Must be 1 for a stream. 
+ *  OUT: data       pointer to the memory to hold data of the variable
+ *                  In blocking read mode, the memory should be 
+ *                  pre-allocated. In non-blocking mode, memory can be
+ *                  allocated or not, and that changes the behavior of
+ *                  the chunked read. If memory is allocated, 
+ *                  adios_check_read() returns a variable if it is completed.
+ *                  If memory is not allocated, the check returns any chunk
+ *                  already available of a variable (in ADIOS own memory)
+ *                  and the application has to rearrange the data. The user
+ *                  has to process/copy the data before getting new chunks.
+ *  RETURN: 0 OK, !=0 on error, sets adios_errno too
+ */
+int adios_schedule_read (const ADIOS_FILE * fp,
+                         const ADIOS_SELECTION * sel,
+                         const char            * varname,
+                         int                     from_steps,
+                         int                     nsteps,
+                         void                  * data);
+
+/** Read a variable by index
+ *       varid    index of variable (0..fp->nvars-1)
+ *                in fp->vars_namelist of ADIOS_FILE struct
+ */
+int adios_schedule_read_byid (const ADIOS_FILE * fp, 
+                              const ADIOS_SELECTION * sel,
+                              int                     varid,
+                              int                     from_steps,
+                              int                     nsteps,
+                              void                  * data);
+
+
+/** Let ADIOS perform the scheduled reads 
+ *  IN:  blocking  If non-zero, return only when all reads are completed.
+ *                 If zero, return immediately and report partial completions
+ *                 through adios_check_reads()
+ */
+int adios_perform_reads (const ADIOS_FILE *fp, int blocking);
+
+/** Get a chunk of completed read(s) in a chunking read scenario.
+ *  Note that a selection of an array specified in a read may be completed in
+ *  multiple chunks (usually when they come from multiple sources, like
+ *  different disks or different application processes). 
+ *  This function should be called in a loop until all chunks are processed. 
+ *  That is indicated by a 0 return value. A NULL result for chunk only
+ *  indicates that no chunk is available at the time of call. 
+ *
+ *  IN:  fp         Handler to file or stream
+ *  OUT: chunk      A chunk completed by the time of calling this function.
+ *                  It is NULL if no chunk is returned.
+ *  RETURN:         0: all chunks have been returned previously, 
+ *                     no need to call again (chunk is NULL, too)
+ *                  1: some chunks are/will be available, call again
+ *                  <0 on error, sets adios_errno too
+ */
+int adios_check_reads (const ADIOS_FILE  * fp, 
+                       ADIOS_VARCHUNK   ** chunk);
+
+/** Free the memory of a chunk allocated inside adios_check_reads().
+  * It only frees the ADIOS_VARCHUNK struct and the ADIOS_SELECTION struct
+  * pointed by the chunk. The data pointer should never be freed since
+  * that memory belongs to the reading method.
+  */
+void adios_free_chunk (ADIOS_VARCHUNK *chunk);
+
+
+/** Get an attribute in a file.
+ *  This function does not read anything from the file but processes info
+ *  already in memory after fopen.
+ *  The memory for the data is allocated within the library.
+ *  You can use free() to free the memory after use.
+ *
+ *  IN:  fp       pointer to an (opened) ADIOS_FILE struct
+ *       attrname name of the attribute
+ *  OUT: type     adios type of attribute (see enum ADIOS_DATATYPES in adios_types.h)
+ *       size     memory size of value (n+1 for a string of n characters)
+ *       data     pointer to the value. You need to cast it afterward according to the type.
+ *  RETURN: 0 OK, error: set and return adios_errno
+ */
+int adios_get_attr (ADIOS_FILE            * fp,
+                    const char            * attrname,
+                    enum ADIOS_DATATYPES  * type,
+                    int                   * size,
+                    void                 ** data);
+
+/** Convenience function to get an attribute by name
+ *       attrid   index of attribute (0..fp->nattrs-1)
+ *                in fp->attr_namelist of ADIOS_FILE struct
+ */
+int adios_get_attr_byid (ADIOS_FILE  * fp, int attrid, 
+                         enum ADIOS_DATATYPES * type,
+                         int * size, void ** data);
+
+/** Return the name of an adios type */
+const char * adios_type_to_string (enum ADIOS_DATATYPES type);
+
+/** Return the memory size of one data element of an adios type.
+ *  If the type is adios_string, and the second argument is
+ *  the string itself, it returns strlen(data)+1.
+ *  For other types, it does not care about data and returns
+ *  the size occupied by one element.
+ */
+int adios_type_size(enum ADIOS_DATATYPES type, void *data);
+
+
+
+/* ADIOS Read API v1 style grouping  */
+
+/** Return the list of groups (names) that are written into
+ *  the file. There is always at least one group there.
+ *
+ *  IN:   fp              pointer to an (opened) ADIOS_FILE struct
+ *  OUT:  group_namelist  list of strings,
+ *                        Note: one should pass a pointer to char** list
+ *  RETURN:               number of groups, <0 on error 
+ *                        (sets adios_errno too)
+ *  
+ */
+int adios_get_grouplist (ADIOS_FILE  *fp, char ***group_namelist);
+
+/** Restrict the view of variables/attributes to a certain group.
+ *  The provided ADIOS_FILE structure is directly modified but
+ *  another calls can change to a different group view, or reset
+ *  back to full view.
+ *
+ *  IN:       groupid    id of the selected group (0..# of groups-1)
+ *                       use -1 to reset to the complete list
+ *  IN/OUT:   fp         pointer to an (opened) ADIOS_FILE struct
+ *                       nvars, var_namelist, nattrs, and
+ *                       attr_namelist will be modified.
+ *  RETURN:              0 on success, adios_errno otherwise
+ *                        (sets adios_errno too)
+ *  Note: a stream does not have groups. Only a file can have
+ *  multiple groups (from separate adios_open/adios_close operations)
+ */
+int adios_group_view (ADIOS_FILE  *fp, int groupid);
+
+/** OTHER API FUNCTIONS **/
+
+/* NCSU - Timeseries analysis functions */
+double adios_stat_cor (ADIOS_VARINFO * vix, ADIOS_VARINFO * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag);
+double adios_stat_cov (ADIOS_VARINFO * vix, ADIOS_VARINFO * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag);
+
+/** This function can be called if user defines the sequences of 
+ *  dimensions in reversed order for a variable in the ADIOS XML 
+ *  definition to view the variable with the correct order of 
+ *  dimensions. Call this before reading variables.
+ */
+void adios_reset_dimension_order (ADIOS_FILE *fp, int is_fortran);
+
+#endif  /*__INCLUDED_FROM_FORTRAN_API__*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /*__ADIOS_READ_VER2_H__*/
+
+/****************
+  TODOs and MISSING 
+
+1. where and how do we specify how much memory a read method can use internally. E.g. to control how big chunks it can handle. 
+2. FORTRAN API: v1 API has the same names with different signatures, while the C API does this with #define-s, so
+   adios_fopen() of v1 is actually adios_fopen_v1() in the compiled library. Do we need to create two separate fortran libs?
+3. Option to tell somewhere: abort on error (after printing error to stderr) to help finding bugs.
+
+
+
+
+****************/
diff --git a/src/public/adios_selection.h b/src/public/adios_selection.h
new file mode 100644
index 0000000..4954346
--- /dev/null
+++ b/src/public/adios_selection.h
@@ -0,0 +1,177 @@
+/*
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/*
+ *   Streaming/Chunking/Selection Read API in C for ADIOS BP format 
+ *
+ *   A SELECTION is the data ranges resulting from a QUERY over a file and variable(s).
+ *
+ *   A SELECTION can be a list of bounding boxes and point-sets. Other data structures
+ *   are not supported. Any query will result in such a selection. 
+ *   Other selections are the write-block and auto. 
+ *
+ *   Write block is a block of data written
+ *   by a writer process, it is identified by an index. If each writer outputs one block
+ *   then the index equals to the rank of the write process. With multi-var writing and
+ *   multiple steps in a file, index runs from 0 as rank 0 process' first block. 
+ *
+ *   Auto selection lets the read method to automatically choose what to return. It will
+ *   be a block / blocks of selected writers. 
+ *
+ *   If a query is a simple bounding box, the selection is the bounding box itself, so
+ *   the application does not need to retrieve the selection to work on the read data.
+ */
+#ifndef __ADIOS_SELECTION_H__
+#define __ADIOS_SELECTION_H__
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*************************/
+/* Types used in the API */
+/*************************/
+
+/* Type of selection */
+enum ADIOS_SELECTION_TYPE {
+    ADIOS_SELECTION_BOUNDINGBOX  = 0,   /* Contiguous block of data defined by offsets and counts in each dimension */
+    ADIOS_SELECTION_POINTS       = 1,   /* List of individual points                                                */
+    ADIOS_SELECTION_WRITEBLOCK   = 2,   /* Selection of an individual block written by a writer process             */
+    ADIOS_SELECTION_AUTO         = 3    /* Let the method decide what to return                                     */
+};
+
+
+/* A Bounding Box */
+typedef struct { 
+    int       ndim;
+    uint64_t *start;
+    uint64_t *count;
+} ADIOS_SELECTION_BOUNDINGBOX_STRUCT;
+
+/* A list of points.
+ * It is a 1D array of indices, linearized for all dimension
+ *     (e.g.  [i1,j1,k1,i2,j2,k2,...,in,jn,kn] for n points in a 3D space.
+ */
+typedef struct { 
+    int       ndim;
+    uint64_t  npoints;
+    uint64_t *points;
+} ADIOS_SELECTION_POINTS_STRUCT;
+
+/* A selected block produced by a writer
+ * Identified with an index in current versions.
+ */
+typedef struct { 
+    int index;
+} ADIOS_SELECTION_WRITEBLOCK_STRUCT;
+
+/* Let the read method decide what to return to each reading client. 
+ * Hints are method-dependent parameters to influence what and how to 
+ * return (e.g. the ordering of returned chunks, decomposition among
+ * read processes, etc.)
+ */
+typedef struct { 
+    char     *hints;
+} ADIOS_SELECTION_AUTO_STRUCT;
+
+/** Selection for reading a subset of a variable. 
+ *  // A selection is an additive list of bounding boxes and point-sets 
+ */
+//typedef struct ADIOS_SELECTION_STRUCT  ADIOS_SELECTION;
+typedef struct { 
+       enum ADIOS_SELECTION_TYPE    type; /* Type of selection */
+       union {
+            ADIOS_SELECTION_BOUNDINGBOX_STRUCT bb;
+            ADIOS_SELECTION_POINTS_STRUCT points;
+            ADIOS_SELECTION_WRITEBLOCK_STRUCT block;
+            ADIOS_SELECTION_AUTO_STRUCT autosel;
+       } u;
+       /*ADIOS_SELECTION             *next;*/
+} ADIOS_SELECTION;
+
+#ifndef __INCLUDED_FROM_FORTRAN_API__
+
+/** Boundingbox selection to read a subset of a non-scalar variable.
+ *  IN:
+ *       ndim      Number of dimensions
+ *       start     array of offsets to start reading in each dimension
+ *       count     number of data elements to read in each dimension
+ *  RETURN:        A selection which can be used to read variables
+ */
+ADIOS_SELECTION * adios_selection_boundingbox (uint64_t ndim, const uint64_t *start, const uint64_t *count);
+
+
+/** Selection for a selection of an enumeration of positions.
+ *  IN:
+ *       ndim      Number of dimensions
+ *       npoints   Number of points of the selection
+ *       points    1D array of indices, compacted for all dimension
+ *                 (e.g.  [i1,j1,k1,i2,j2,k2,...,in,jn,kn] for
+ *                 n points in a 3D space.
+ */
+ADIOS_SELECTION* adios_selection_points (uint64_t ndim, uint64_t npoints, const uint64_t *points);
+
+/** Selection for a block of data coming from a certain producer.
+ *
+ *  IN:
+ *       index      Identifier of the written block, starting from 0 for the first block
+ *                  written by producer rank 0. If each writer outputs one block
+ *                  then the index equals to the rank of the write process. 
+ *                  With multi-var writing and multiple steps in a file, index should be
+ *                  calculated by the reading application using outside information beyond
+ *                  what is provided by the ADIOS Read API.
+ */
+ADIOS_SELECTION* adios_selection_writeblock (int index);
+
+/** Let the method decide what data gets to what reader process.
+ *  This selection enables each reading method to provide an 'optimal'
+ *  data transfer from writers to readers. It depends on the method and the 
+ *  circumstances, what this selection actually means.
+ *
+ *  E.g. in situ processing: readers on a compute node will receive all data 
+ *       from the writers on the same compute node.
+ *
+ *  IN:
+ *       hints    Method dependent parameters to influence what and how to 
+ *                return (e.g. decomposition; ordering of returned chunks)
+ */
+ADIOS_SELECTION* adios_selection_auto (char * hints);
+
+/** Make a strided hyperslab selection the same way as in HDF5. 
+ *  IN:
+ *       ndim      Number of dimentsions
+ *       start     array of offsets to start reading in each dimension
+ *       strides   striding steps, NULL=1 in all dimensions (= boundingbox) 
+ *       count     number of data elements to read in each dimension
+ *       blocks    block size at each stride, NULL=1 in all dimensions
+ */
+/*
+   No support: Klasky, Podhorszki
+   Support: 
+
+ADIOS_SELECTION* adios_selection_hyperslab (uint64_t ndim, uint64_t *start, uint64_t *strides, 
+                                    uint64_t *count, uint64_t *blocks);
+*/
+
+
+/** Delete a selection and free up memory used by the selection.
+  * IN: selection
+  * RESULT: None
+  * The ADIOS_SELECTION object can be simply freed by free(), too. 
+  */
+void adios_selection_delete (ADIOS_SELECTION *selection);
+
+
+#endif  /*__INCLUDED_FROM_FORTRAN_API__*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /*__ADIOS_SELECTION_H__*/
diff --git a/src/adios_types.h b/src/public/adios_types.h
similarity index 100%
rename from src/adios_types.h
rename to src/public/adios_types.h
diff --git a/src/mpidummy.h b/src/public/mpidummy.h
similarity index 74%
rename from src/mpidummy.h
rename to src/public/mpidummy.h
index 8157cdc..868eaa4 100644
--- a/src/mpidummy.h
+++ b/src/public/mpidummy.h
@@ -27,6 +27,11 @@ typedef uint64_t MPI_Offset;
 typedef int MPI_Fint;
 
 #define MPI_SUCCESS                 0
+#define MPI_ERR_BUFFER              1      /* Invalid buffer pointer */
+#define MPI_ERR_COUNT               2      /* Invalid count argument */
+#define MPI_ERR_TYPE                3      /* Invalid datatype argument */
+#define MPI_ERR_TAG                 4      /* Invalid tag argument */
+#define MPI_ERR_COMM                5      /* Invalid communicator */
 #define MPI_MAX_ERROR_STRING        512
 #define MPI_MODE_RDONLY             O_RDONLY
 #define MPI_SEEK_SET                SEEK_SET
@@ -40,12 +45,14 @@ typedef int MPI_Fint;
 #define MPI_COMM_SELF               2
 
 #define MPI_INT                     1
+#define MPI_CHAR                    2
 
 #define MPI_ANY_SOURCE              0
 #define MPI_ANY_TAG                 0
 
 int MPI_Init(int *argc, char ***argv);
 int MPI_Finalize();
+int MPI_Initialized( int* flag ) ;
 
 int MPI_Barrier(MPI_Comm comm);
 int MPI_Bcast(void *buffer, int count, MPI_Datatype datatype, int root, MPI_Comm comm);
@@ -55,6 +62,9 @@ int MPI_Comm_rank(MPI_Comm comm, int *rank);
 int MPI_Comm_size(MPI_Comm comm, int *size);
 MPI_Comm MPI_Comm_f2c(MPI_Fint comm);
 
+int MPI_Gather(void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int recvcnt, MPI_Datatype recvtype, int root, MPI_Comm comm) ;
+int MPI_Gatherv(void *sendbuf, int sendcnt, MPI_Datatype sendtype, void *recvbuf, int *recvcnts, int *displs, MPI_Datatype recvtype, int root, MPI_Comm comm);
+
 int MPI_File_open(MPI_Comm comm, char *filename, int amode, MPI_Info info, MPI_File *fh);
 int MPI_File_close(MPI_File *fh);
 int MPI_File_get_size(MPI_File fh, MPI_Offset *size);
@@ -65,5 +75,6 @@ int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count);
 int MPI_Error_string(int errorcode, char *string, int *resultlen);
 int MPI_Comm_split ( MPI_Comm comm, int color, int key, MPI_Comm *comm_out );
 
+double MPI_Wtime();
 
 #endif
diff --git a/src/read/read_bp.c b/src/read/read_bp.c
new file mode 100644
index 0000000..4f26f65
--- /dev/null
+++ b/src/read/read_bp.c
@@ -0,0 +1,3524 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+
+/****************************/
+/* Read method for BP files */
+/****************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <assert.h>
+#include <errno.h>
+#include "public/adios_read.h"
+#include "public/adios_error.h"
+#include "public/adios_types.h"
+#include "core/util.h"
+#include "core/bp_utils.h"
+#include "core/bp_types.h"
+#include "core/adios_read_hooks.h"
+#include "core/futils.h"
+#include "core/common_read.h"
+#include "core/adios_logger.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+static int chunk_buffer_size = 1024*1024*16;
+static int poll_interval_msec = 10000; // 10 secs by default
+static int show_hidden_attrs = 0; // don't show hidden attr by default
+
+static ADIOS_VARCHUNK * read_var_bb (const ADIOS_FILE * fp, read_request * r);
+static ADIOS_VARCHUNK * read_var_wb (const ADIOS_FILE * fp, read_request * r);
+
+static int adios_step_to_time (const ADIOS_FILE * fp, int varid, int from_steps);
+static int map_req_varid (const ADIOS_FILE * fp, int varid);
+static int adios_wbidx_to_pgidx (const ADIOS_FILE * fp, read_request * r);
+
+// NCSU - For custom memory allocation 
+#define CALLOC(var, num, sz, comment)\
+{\
+    var = calloc (num, sz); \
+    if (!var)    {\
+        adios_error_at_line (err_no_memory, __FILE__, __LINE__, "Could not allocate memory for ", comment, " in common_read_get_characteristics"); \
+        return 0; \
+    }\
+}
+
+#define MALLOC(var,sz,comment)\
+{\
+    var = malloc (sz); \
+    if (!var)    {\
+        adios_error_at_line (err_no_memory, __FILE__, __LINE__, "Could not allocate memory for ", comment, " in common_read_get_characteristics"); \
+        return 0; \
+    }\
+}\
+
+#define MPI_FILE_READ_OPS1                          \
+        bp_realloc_aligned(fh->b, slice_size);      \
+        fh->b->offset = 0;                          \
+                                                    \
+        MPI_File_seek (fh->mpi_fh                   \
+                      ,(MPI_Offset)slice_offset     \
+                      ,MPI_SEEK_SET                 \
+                      );                            \
+                                                    \
+        MPI_File_read (fh->mpi_fh                   \
+                      ,fh->b->buff                  \
+                      ,slice_size                   \
+                      ,MPI_BYTE                     \
+                      ,&status                      \
+                      );                            \
+        fh->b->offset = 0;                          \
+
+// To read subfiles
+#define MPI_FILE_READ_OPS2                                                                  \
+        bp_realloc_aligned(fh->b, slice_size);                                              \
+        fh->b->offset = 0;                                                                  \
+                                                                                            \
+        MPI_File * sfh;                                                                     \
+        sfh = get_BP_file_handle (fh->sfh                                                   \
+                                 ,v->characteristics[start_idx + idx].file_index            \
+                                 );                                                         \
+        if (!sfh)                                                                           \
+        {                                                                                   \
+            int err;                                                                        \
+            char * ch, * name_no_path, * name;                                              \
+            MPI_Info info = MPI_INFO_NULL;                                                  \
+            struct BP_file_handle * new_h =                                                 \
+                  (struct BP_file_handle *) malloc (sizeof (struct BP_file_handle));        \
+            new_h->file_index = v->characteristics[start_idx + idx].file_index;             \
+            new_h->next = 0;                                                                \
+            if (ch = strrchr (fh->fname, '/'))                                              \
+            {                                                                               \
+                name_no_path = (char *) malloc (strlen (ch + 1) + 1);                       \
+                strcpy (name_no_path, ch + 1);                                              \
+            }                                                                               \
+            else                                                                            \
+            {                                                                               \
+                name_no_path = (char *) malloc (strlen (fh->fname) + 1);                    \
+                strcpy (name_no_path, fh->fname);                                           \
+            }                                                                               \
+                                                                                            \
+            name = (char *) malloc (strlen (fh->fname) + 5 + strlen (name_no_path) + 1 + 10 + 1); \
+            sprintf (name, "%s.dir/%s.%d", fh->fname, name_no_path, new_h->file_index);     \
+            err = MPI_File_open (MPI_COMM_SELF                                                   \
+                                ,name                                                       \
+                                ,MPI_MODE_RDONLY                                            \
+                                ,info                                                       \
+                                ,&new_h->fh                                                 \
+                                );                                                          \
+                                                                                            \
+           if (err)                                                                         \
+           {                                                                                \
+               fprintf (stderr, "can not open file %s\n", name);                            \
+               return 0;                                                                    \
+           }                                                                                \
+           add_BP_file_handle (&fh->sfh                                                     \
+                              ,new_h                                                        \
+                              );                                                            \
+           sfh = &new_h->fh;                                                                \
+                                                                                            \
+           free (name_no_path);                                                             \
+           free (name);                                                                     \
+        }                                                                                   \
+                                                                                            \
+        MPI_File_seek (*sfh                                                                 \
+                      ,(MPI_Offset)slice_offset                                             \
+                      ,MPI_SEEK_SET                                                         \
+                      );                                                                    \
+        MPI_File_read (*sfh                                                                 \
+                      ,fh->b->buff                                                          \
+                      ,slice_size                                                           \
+                      ,MPI_BYTE                                                             \
+                      ,&status                                                              \
+                      );                                                                    \
+        fh->b->offset = 0;                                                                  \
+
+//We also need to be able to read old .bp which doesn't have 'payload_offset'
+#define MPI_FILE_READ_OPS3                                                                  \
+        MPI_File_seek (fh->mpi_fh                                                           \
+                      ,(MPI_Offset) v->characteristics[start_idx + idx].offset       \
+                      ,MPI_SEEK_SET);                                                       \
+        MPI_File_read (fh->mpi_fh, fh->b->buff, 8, MPI_BYTE, &status);                      \
+        tmpcount= *((uint64_t*)fh->b->buff);                                                \
+                                                                                            \
+        bp_realloc_aligned(fh->b, tmpcount + 8);                                            \
+        fh->b->offset = 0;                                                                  \
+                                                                                            \
+        MPI_File_seek (fh->mpi_fh                                                           \
+                      ,(MPI_Offset) (v->characteristics[start_idx + idx].offset)     \
+                      ,MPI_SEEK_SET);                                                       \
+        MPI_File_read (fh->mpi_fh, fh->b->buff, tmpcount + 8, MPI_BYTE, &status);           \
+        fh->b->offset = 0;                                                                  \
+        adios_parse_var_data_header_v1 (fh->b, &var_header);                                \
+
+
+/* This routine release one step. It only frees the var/attr namelist. */
+static void release_step (ADIOS_FILE *fp)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    
+    if (p->varid_mapping)
+    {
+        free (p->varid_mapping);
+        p->varid_mapping = 0;
+    }
+
+    if (fp->var_namelist)
+    {
+        free_namelist (fp->var_namelist, fp->nvars);
+        fp->var_namelist = 0;
+        fp->nvars = 0;
+    }
+
+    if (fp->attr_namelist)
+    {
+        free_namelist (fp->attr_namelist, fp->nattrs);
+        fp->attr_namelist = 0;
+        fp->nattrs = 0;
+    }
+}
+
+/* This routin open a ADIOS-BP file with no timeout.
+ * It first checks whether this is a valid BP file. This is done by
+ * checking the validity on rank 0 and communicating to other ranks (avoiding
+ * the situation where every one kicks the tire.
+ * If the file is ok, then go ahead get the metadata.
+ */
+static BP_FILE * open_file (const char * fname, MPI_Comm comm)
+{
+    int i, rank, file_ok;
+    BP_FILE * fh;
+
+    MPI_Comm_rank (comm, &rank);
+
+    if (rank == 0)
+    {
+        file_ok = check_bp_validity (fname);
+
+        MPI_Bcast (&file_ok, 1, MPI_INT, 0, comm);
+    }
+    else
+    {
+        MPI_Bcast (&file_ok, 1, MPI_INT, 0, comm);
+    }
+
+    if (!file_ok)
+    {
+        return 0;
+    }
+
+    fh = (BP_FILE *) malloc (sizeof (BP_FILE));
+    assert (fh);
+
+    fh->fname = (fname ? strdup (fname) : 0L);
+    fh->sfh = 0;
+    fh->comm = comm;
+    fh->gvar_h = 0;
+    fh->pgs_root = 0;
+    fh->vars_root = 0;
+    fh->attrs_root = 0;
+    fh->b = malloc (sizeof (struct adios_bp_buffer_struct_v1));
+    assert (fh->b);
+
+    bp_open (fname, comm, fh);
+
+    return fh;
+}
+
+/* This routine set ADIOS_FILE fields from BP_FILE struct */
+void build_ADIOS_FILE_struct (ADIOS_FILE * fp, BP_FILE * fh)
+{
+    BP_PROC * p;
+    int rank;
+
+    log_debug ("build_ADIOS_FILE_struct is called\n");
+
+    MPI_Comm_rank (fh->comm, &rank);
+
+    p = (struct BP_PROC *) malloc (sizeof (struct BP_PROC));
+    assert (p);
+    p->fh = fh;
+    p->streaming = 1;
+    p->varid_mapping = 0;
+    p->local_read_request_list = 0;
+    p->b = 0;
+    p->priv = 0;
+
+    fp->fh = (uint64_t) p;
+    fp->file_size = fh->mfooter.file_size;
+    fp->version = fh->mfooter.version;
+    fp->endianness = bp_get_endianness (fh->mfooter.change_endianness);
+    fp->last_step = fh->tidx_stop - 1;
+
+    /* Seek to the initial step. */
+    release_step (fp);
+    bp_seek_to_step (fp, 0, show_hidden_attrs);
+
+    /* For file, the last step is tidx_stop */
+    fp->last_step = fh->tidx_stop - 1;
+
+    return;
+}
+
+static int get_new_step (ADIOS_FILE * fp, const char * fname, MPI_Comm comm, int last_step, float timeout_sec)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    int err, i;
+    BP_FILE * fh;
+    double t1 = adios_gettime();
+
+    log_debug ("enter get_new_step\n");
+    /* First check if the file has been updated with more steps. */
+    /* While loop for handling timeout
+       timeout > 0: wait up to this long to open the stream
+       timeout = 0: return immediately
+       timeout < 0: wait forever
+    */
+    int stay_in_poll_loop = 1;
+    int found_stream = 0;
+
+    while (stay_in_poll_loop)
+    {
+        /* Re-open the file */
+        fh = open_file (fname, comm);
+        if (!fh)
+        {
+            // file is bad so keeps polling.
+            stay_in_poll_loop = 1;
+        }
+        else if (fh && (fh->tidx_stop - 1 == last_step))
+        {
+            // file is good but no new steps in it. Continue polling.
+            bp_close (fh);
+            stay_in_poll_loop = 1;
+        }
+        else
+        {
+            // the file looks good and there are new steps written.
+            build_ADIOS_FILE_struct (fp, fh);
+            stay_in_poll_loop = 0;
+            found_stream = 1;
+        }
+        // check if we need to stay in loop 
+        if (stay_in_poll_loop)
+        {
+            if (timeout_sec == 0.0)
+            {
+                stay_in_poll_loop = 0;
+            }
+            else if (timeout_sec < 0.0)
+            {
+                stay_in_poll_loop = 1;
+            }
+            else if (timeout_sec > 0.0 && (adios_gettime () - t1 > timeout_sec))
+            {
+                log_debug ("Time is out in get_new_step()\n");
+                stay_in_poll_loop = 0;
+            }
+            else
+            {
+                adios_nanosleep (poll_interval_msec/1000,
+                    (int)(((uint64_t)poll_interval_msec * 1000000L)%1000000000L));
+            }
+        }
+
+    } // while (stay_in_poll_loop)
+
+    log_debug ("exit get_new_step\n");
+
+    return found_stream;
+}
+
+/* This routine processes a read request and returns data in ADIOS_VARCHUNK.
+   If the selection type is not bounding box, convert it. The basic file reading
+   functionality is implemented in read_var_bb() routine.
+*/
+static ADIOS_VARCHUNK * read_var (const ADIOS_FILE * fp, read_request * r)
+{
+    BP_PROC * p;
+    BP_FILE * fh;
+    int size_of_type;
+    struct adios_index_var_struct_v1 * v;
+    uint64_t i;
+    read_request * nr;
+    ADIOS_SELECTION * sel, * nsel;
+    ADIOS_VARCHUNK * chunk;
+
+    log_debug ("read_var()\n");
+    sel = r->sel;
+    p = (BP_PROC *) fp->fh;
+    fh = (BP_FILE *) p->fh; 
+
+    v = bp_find_var_byid (fh, r->varid);
+
+    switch (sel->type)
+    {
+        case ADIOS_SELECTION_BOUNDINGBOX:
+            chunk = read_var_bb (fp, r);
+            break;
+        case ADIOS_SELECTION_POINTS:
+            /* The idea is we convert a point selection to bounding box section. */
+            size_of_type = bp_get_type_size (v->type, v->characteristics [0].value);
+            nr = (read_request *) malloc (sizeof (read_request));
+            assert (nr);
+
+            nr->varid = r->varid;
+            nr->from_steps = r->from_steps;
+            nr->nsteps = r->nsteps;
+            nr->data = r->data;
+            nr->datasize  = size_of_type;
+            nr->priv = r->priv;
+
+            nsel = (ADIOS_SELECTION *) malloc (sizeof (ADIOS_SELECTION));
+            nr->sel = nsel;
+            assert (nsel);
+
+            nsel->type = ADIOS_SELECTION_BOUNDINGBOX;
+            nsel->u.bb.ndim = sel->u.points.ndim;
+            nsel->u.bb.start = (uint64_t *) malloc (nsel->u.bb.ndim * 8);
+            nsel->u.bb.count = (uint64_t *) malloc (nsel->u.bb.ndim * 8);
+            assert (nsel->u.bb.start && nsel->u.bb.count);
+            
+            for (i = 0; i < nsel->u.bb.ndim; i++)
+            {
+                nsel->u.bb.count[i] = 1; 
+            }
+
+            for (i = 0; i < sel->u.points.npoints; i++)
+            {
+                memcpy (nsel->u.bb.start, sel->u.points.points + i * sel->u.points.ndim, sel->u.points.ndim * 8);
+
+                chunk = read_var_bb (fp, nr);
+                nr->data = (char *) nr->data + size_of_type;
+
+                common_read_free_chunk (chunk);
+            }
+
+            free_selection (nsel);
+            free (nr);
+
+            chunk = (ADIOS_VARCHUNK *) malloc (sizeof (ADIOS_VARCHUNK));
+            assert (chunk);
+
+            chunk->varid = r->varid;
+            chunk->type = v->type;
+            chunk->sel = copy_selection (r->sel);
+            chunk->data = r->data;
+
+            break;
+        case ADIOS_SELECTION_WRITEBLOCK:
+            chunk = read_var_wb (fp, r);
+            break;
+        case ADIOS_SELECTION_AUTO:
+            break;
+        default:
+            log_debug ("ADIOS selection type is wrong\n");
+            break;
+    }
+
+    return chunk;
+}
+
+/* This routine reads in data for bounding box selection.
+   If the selection is not bounding box, it should be converted to it.
+   The data returned is saved in ADIOS_VARCHUNK.
+ */
+static ADIOS_VARCHUNK * read_var_bb (const ADIOS_FILE *fp, read_request * r)
+{
+    BP_PROC * p;
+    BP_FILE * fh;
+    ADIOS_SELECTION * sel;
+    struct adios_index_var_struct_v1 * v;
+    int i, j, k, t, time, nsteps;
+    int64_t start_idx, stop_idx, idx;
+    int ndim, has_subfile, file_is_fortran;
+    uint64_t size, * dims, tmpcount;
+    uint64_t ldims[32], gdims[32], offsets[32];
+    uint64_t datasize, dset_stride,var_stride, total_size=0, items_read;
+    uint64_t * count, * start;
+    void * data;
+    int dummy = -1, is_global = 0, size_of_type;
+    uint64_t slice_offset, slice_size;
+    MPI_Status status;
+    ADIOS_VARCHUNK * chunk;
+    struct adios_var_header_struct_v1 var_header;
+    struct adios_var_payload_struct_v1 var_payload;
+
+//    log_debug ("read_var_bb()\n");
+    p = (BP_PROC *) fp->fh;
+    fh = (BP_FILE *) p->fh;
+    file_is_fortran = is_fortran_file (fh);
+    has_subfile = has_subfiles (fh);
+
+    sel = r->sel;
+    start = sel->u.bb.start;
+    count = sel->u.bb.count;
+    data = r->data;
+
+    v = bp_find_var_byid (fh, r->varid);
+
+    /* Get dimensions and flip if caller != writer language */
+    /* Note: ndim below doesn't include time if there is any */
+    bp_get_and_swap_dimensions (fh, v, file_is_fortran, &ndim, &dims, &nsteps, file_is_fortran);
+ 
+    assert (ndim == sel->u.bb.ndim);
+    ndim = sel->u.bb.ndim;
+
+    /* Fortran reader was reported of Fortran dimension order so it gives counts and starts in that order.
+       We need to swap them here to read correctly in C order */
+    if (futils_is_called_from_fortran ())
+    {
+        swap_order (ndim, start, &dummy);
+        swap_order (ndim, count, &dummy);
+    }
+/*
+    log_debug ("read_var_bb(): start(");
+    for (i = 0; i < ndim; i++)
+    {
+        log_debug_cont ("%lu", start[i]);
+        if (i != ndim - 1)
+        {
+            log_debug_cont (",");
+        }
+    }
+    log_debug_cont (")\n");
+
+    log_debug ("read_var_bb(): count(");
+    for (i = 0; i < ndim; i++)
+    {
+        log_debug_cont ("%lu", count[i]);
+        if (i != ndim - 1)
+        {
+            log_debug_cont (",");
+        }
+    }
+    log_debug_cont (")\n");
+*/
+    /* items_read = how many data elements are we going to read in total (per timestep) */
+    items_read = 1;
+    for (i = 0; i < ndim; i++)
+    {
+        items_read *= count[i];
+    }
+
+    size_of_type = bp_get_type_size (v->type, v->characteristics [0].value);
+
+//    log_debug ("read_var_bb: from_steps = %d, nsteps = %d\n", r->from_steps, r->nsteps);
+
+    /* Note fp->current_step is always 0 for file mode. */
+    for (t = fp->current_step + r->from_steps; t < fp->current_step + r->from_steps + r->nsteps; t++)
+    {
+
+        if (!p->streaming)
+        { 
+            time = get_time (v, t);
+        }
+        else
+        {
+            time = t + 1;
+        }
+//printf ("t = %d(%d,%d), time = %d\n", t, fp->current_step, r->from_steps, time);
+//printf ("c = %d, f = %d, time = %d\n", fp->current_step, r->from_steps, time);
+        start_idx = get_var_start_index (v, time);
+        stop_idx = get_var_stop_index (v, time);
+
+        if (start_idx < 0 || stop_idx < 0)
+        {
+            adios_error (err_no_data_at_timestep,"Variable %s has no data at %d time step\n",
+                         v->var_name, t);
+            continue;
+        }
+
+        if (ndim == 0)
+        {
+            /* READ A SCALAR VARIABLE */
+            /* Prepare slice_offset, slice_size and idx for the later macro:
+               MPI_FILE_READ_OPS1 and MPI_FILE_READ_OPS2 
+            */
+            idx = 0;
+            slice_offset = v->characteristics[start_idx + idx].payload_offset;
+            slice_size = size_of_type;
+
+            if (v->type == adios_string)
+            {
+                // Note: strings are stored without \0 in file
+                // size_of_type above includes \0 so decrease by one
+                size_of_type--;
+            }
+
+            if (v->characteristics[start_idx + idx].payload_offset > 0)
+            {
+                if (!has_subfile)
+                {
+                    MPI_FILE_READ_OPS1
+                }
+                else
+                {
+                    MPI_FILE_READ_OPS2
+                }
+            }
+            else
+            {
+                slice_offset = 0;
+                MPI_FILE_READ_OPS3
+            }
+
+            memcpy ((char *)data, fh->b->buff + fh->b->offset, size_of_type);
+
+            if (fh->mfooter.change_endianness == adios_flag_yes)
+            {
+                change_endianness ((char *)data, size_of_type, v->type);
+            }
+
+            if (v->type == adios_string)
+            {
+                // add \0 to the end of string
+                // size_of_type here is the length of string
+                // FIXME: how would this work for strings written over time?
+                ((char*)data)[size_of_type] = '\0';
+            }
+
+            data = (char *)data + (v->type == adios_string?  size_of_type + 1 : size_of_type);
+        }
+        else
+        {
+            /* READ AN ARRAY VARIABLE */
+            int * idx_table = (int *) malloc (sizeof (int) * (stop_idx - start_idx + 1));
+            uint64_t write_offset = 0;
+/* 
+                printf ("count   = "); for (j = 0; j<ndim; j++) printf ("%d ",count[j]); printf ("\n");
+                printf ("start   = "); for (j = 0; j<ndim; j++) printf ("%d ",start[j]); printf ("\n");
+*/
+            // loop over the list of pgs to read from one-by-one
+            for (idx = 0; idx < stop_idx - start_idx + 1; idx++)
+            {
+                int flag;
+                datasize = 1;
+                var_stride = 1;
+                dset_stride = 1;
+                idx_table[idx] = 1;
+                uint64_t payload_size = size_of_type;
+    
+                is_global = bp_get_dimension_characteristics_notime (&(v->characteristics[start_idx + idx]),
+                                                                    ldims, gdims, offsets, file_is_fortran);
+                if (!is_global)
+                {
+                    // we use gdims below, which is 0 for a local array; set to ldims here
+                    for (j = 0; j < ndim; j++)
+                    {
+                        gdims[j] = ldims[j];
+                    }
+                    // we need to read only the first PG, not all, so let's prevent a second loop
+                    stop_idx = start_idx;
+                }
+/*
+                printf ("ldims   = "); for (j = 0; j<ndim; j++) printf ("%d ",ldims[j]); printf ("\n");
+                printf ("gdims   = "); for (j = 0; j<ndim; j++) printf ("%d ",gdims[j]); printf ("\n");
+                printf ("offsets = "); for (j = 0; j<ndim; j++) printf ("%d ",offsets[j]); printf ("\n");
+*/             
+                for (j = 0; j < ndim; j++)
+                {
+                    payload_size *= ldims [j];
+    
+                    if ( (count[j] > gdims[j]) 
+                      || (start[j] > gdims[j]) 
+                      || (start[j] + count[j] > gdims[j]))
+                    {
+                        adios_error ( err_out_of_bound, "Error: Variable (id=%d) out of bound 1("
+                            "the data in dimension %d to read is %llu elements from index %llu"
+                            " but the actual data is [0,%llu])\n",
+                            r->varid, j + 1, count[j], start[j], gdims[j] - 1);
+                        return 0;
+                    }
+    
+                    /* check if there is any data in this pg and this dimension to read in */
+                    flag = (offsets[j] >= start[j] 
+                            && offsets[j] < start[j] + count[j])
+                        || (offsets[j] < start[j]
+                            && offsets[j] + ldims[j] > start[j] + count[j]) 
+                        || (offsets[j] + ldims[j] > start[j] 
+                            && offsets[j] + ldims[j] <= start[j] + count[j]);
+                    idx_table [idx] = idx_table[idx] && flag;
+                }
+
+                if (!idx_table[idx])
+                {
+                    continue;
+                }
+    
+                /* determined how many (fastest changing) dimensions can we read in in one read */
+                int hole_break; 
+                for (i = ndim - 1; i > -1; i--)
+                {
+                    if (offsets[i] == start[i] && ldims[i] == count[i])
+                    {
+                        datasize *= ldims[i];
+                    }
+                    else
+                        break;
+                }
+    
+                hole_break = i;
+                slice_offset = 0;
+                slice_size = 0;
+
+                if (hole_break == -1)
+                {
+                    /* The complete read happens to be exactly one pg, and the entire pg */
+                    /* This means we enter this only once, and npg=1 at the end */
+                    /* This is a rare case. FIXME: cannot eliminate this? */
+                    slice_size = payload_size;
+    
+                    slice_offset = v->characteristics[start_idx + idx].payload_offset;
+                    if (v->characteristics[start_idx + idx].payload_offset > 0)
+                    {
+                        if (!has_subfile)
+                        {
+                            MPI_FILE_READ_OPS1
+                        }
+                        else
+                        {
+                            MPI_FILE_READ_OPS2
+                        }
+                    }
+                    else
+                    {
+                         slice_offset = 0;
+                         MPI_FILE_READ_OPS3
+                    }
+
+                    memcpy ((char *)data, fh->b->buff + fh->b->offset, slice_size);
+                    if (fh->mfooter.change_endianness == adios_flag_yes)
+                    {
+                        change_endianness (data, slice_size, v->type);
+                    }
+                }
+                else if (hole_break == 0) 
+                {
+                    /* The slowest changing dimensions should not be read completely but
+                       we still need to read only one block */
+                    int isize;
+                    uint64_t size_in_dset = 0;
+                    uint64_t offset_in_dset = 0;
+                    uint64_t offset_in_var = 0;
+    
+                    isize = offsets[0] + ldims[0];
+                    if (start[0] >= offsets[0])
+                    {
+                        // head is in
+                        if (start[0]<isize)
+                        {
+                            if (start[0] + count[0] > isize)
+                                size_in_dset = isize - start[0];
+                            else
+                                size_in_dset = count[0];
+                            offset_in_dset = start[0] - offsets[0];
+                            offset_in_var = 0;
+                        }
+                    }
+                    else
+                    {
+                        // middle is in
+                        if (isize < start[0] + count[0])
+                            size_in_dset = ldims[0];
+                        else
+                        // tail is in
+                            size_in_dset = count[0] + start[0] - offsets[0];
+                        offset_in_dset = 0;
+                        offset_in_var = offsets[0] - start[0];
+                    }
+    
+                    slice_size = size_in_dset * datasize * size_of_type;
+                    write_offset = offset_in_var * datasize * size_of_type;
+ 
+                    if (v->characteristics[start_idx + idx].payload_offset > 0)
+                    {
+                        slice_offset = v->characteristics[start_idx + idx].payload_offset 
+                                     + offset_in_dset * datasize * size_of_type;
+                        if (!has_subfile)
+                        {
+                            MPI_FILE_READ_OPS1
+                        }
+                        else
+                        {
+                            MPI_FILE_READ_OPS2
+                        }
+                    }
+                    else
+                    {
+                        slice_offset = 0;
+                        MPI_FILE_READ_OPS3
+                    }
+    
+                    memcpy ((char *)data + write_offset, fh->b->buff + fh->b->offset, slice_size);
+                    if (fh->mfooter.change_endianness == adios_flag_yes)
+                    {
+                        change_endianness((char *)data + write_offset, slice_size, v->type);
+                    }
+    
+                    //write_offset +=  slice_size;
+                }
+                else 
+                {
+                    uint64_t stride_offset = 0;
+                    int isize;
+                    uint64_t size_in_dset[10];
+                    uint64_t offset_in_dset[10];
+                    uint64_t offset_in_var[10];
+
+                    memset(size_in_dset, 0 , 10 * 8);
+                    memset(offset_in_dset, 0 , 10 * 8);
+                    memset(offset_in_var, 0 , 10 * 8);
+
+                    for (i = 0; i < ndim; i++)
+                    {
+                        isize = offsets[i] + ldims[i];
+                        if (start[i] >= offsets[i])
+                        {
+                            // head is in
+                            if (start[i]<isize)
+                            {
+                                if (start[i] + count[i] > isize)
+                                    size_in_dset[i] = isize - start[i];
+                                else
+                                    size_in_dset[i] = count[i];
+                                offset_in_dset[i] = start[i] - offsets[i];
+                                offset_in_var[i] = 0;
+                            }
+                            else
+                            {
+                            }
+                        }
+                        else
+                        {
+                            // middle is in
+                            if (isize < start[i] + count[i])
+                            {
+                                size_in_dset[i] = ldims[i];
+                            }
+                            else
+                            {
+                                // tail is in
+                                size_in_dset[i] = count[i] + start[i] - offsets[i];
+                            }
+                            offset_in_dset[i] = 0;
+                            offset_in_var[i] = offsets[i] - start[i];
+                        }
+                    }
+                    datasize = 1;
+                    var_stride = 1;
+    
+                    for (i = ndim - 1; i >= hole_break; i--)
+                    {
+                        datasize *= size_in_dset[i];
+                        dset_stride *= ldims[i];
+                        var_stride *= count[i];
+                    }
+    
+                    uint64_t start_in_payload = 0, end_in_payload = 0, s = 1;
+                    for (i = ndim - 1; i > -1; i--)
+                    {
+                        start_in_payload += s * offset_in_dset[i] * size_of_type;
+                        end_in_payload += s * (offset_in_dset[i] + size_in_dset[i] - 1) * size_of_type;
+                        s *= ldims[i];
+                    }
+    
+                    slice_size = end_in_payload - start_in_payload + 1 * size_of_type;
+                    if (v->characteristics[start_idx + idx].payload_offset > 0)
+                    {
+                        slice_offset =  v->characteristics[start_idx + idx].payload_offset
+                                  + start_in_payload;
+                        if (!has_subfile)
+                        {
+                            MPI_FILE_READ_OPS1
+                        }
+                        else
+                        {
+                           MPI_FILE_READ_OPS2
+                        }
+                    }
+                    else
+                    {
+                        slice_offset =  start_in_payload;
+                        MPI_FILE_READ_OPS3
+                    }
+ 
+                    for (i = 0; i < ndim; i++)
+                    {
+                        offset_in_dset[i] = 0;
+                    }
+
+                    uint64_t var_offset = 0;
+                    uint64_t dset_offset = 0;
+    
+                    for (i = 0; i < ndim; i++)
+                    {
+                        var_offset = offset_in_var[i] + var_offset * count[i];
+                        dset_offset = offset_in_dset[i] + dset_offset * ldims[i];
+                    }
+    
+                    copy_data (data
+                              ,fh->b->buff + fh->b->offset
+                              ,0
+                              ,hole_break
+                              ,size_in_dset
+                              ,ldims
+                              ,count
+                              ,var_stride
+                              ,dset_stride
+                              ,var_offset
+                              ,dset_offset
+                              ,datasize
+                              ,size_of_type 
+                              );
+                }
+            }  // end for (idx ... loop over pgs
+    
+            free (idx_table);
+    
+            total_size += items_read * size_of_type;
+            // shift target pointer for next read in
+            data = (char *)data + (items_read * size_of_type);
+
+//FIXME
+/*
+        if (timedim == -1)
+            break;
+*/
+        }
+    } // end for t
+
+    free (dims);
+
+//    log_debug ("read_var_bb(): build ADIOS_VARCHUNK\n");
+    chunk = (ADIOS_VARCHUNK *) malloc (sizeof (ADIOS_VARCHUNK));
+    assert (chunk);
+
+    chunk->varid = r->varid;
+    chunk->type = v->type;
+    chunk->sel = copy_selection (r->sel);
+    chunk->data = r->data;
+    return chunk;
+}
+
+int adios_read_bp_init_method (MPI_Comm comm, PairStruct * params)
+{
+    int  max_chunk_size, pollinterval;
+    PairStruct * p = params;
+
+    while (p)
+    {
+        if (!strcasecmp (p->name, "max_chunk_size"))
+        {
+            max_chunk_size = strtol(p->value, NULL, 10);
+            if (max_chunk_size > 0)
+            {
+                log_debug ("max_chunk_size set to %dMB for the read method\n", max_chunk_size);
+                chunk_buffer_size = max_chunk_size * 1024 * 1024;
+            }
+            else
+            { 
+                log_error ("Invalid 'max_chunk_size' parameter given to the read method: '%s'\n", p->value);
+            }
+        }
+        else if (!strcasecmp (p->name, "poll_interval"))
+        {
+            errno = 0;
+            pollinterval = strtol(p->value, NULL, 10);
+            if (pollinterval > 0 && !errno)
+            {
+                log_debug ("poll_interval set to %d secs for READ_BP read method\n",
+                            pollinterval);
+                poll_interval_msec = pollinterval;
+            }
+            else
+            {
+                log_error ("Invalid 'poll_interval' parameter given to the READ_BP "
+                            "read method: '%s'\n", p->value);
+            }
+        }
+        else if (!strcasecmp (p->name, "show_hidden_attrs"))
+        {
+            show_hidden_attrs = 1;
+
+            log_debug ("show_hidden_attrs is set\n");
+        }
+
+        p = p->next;
+    }
+
+    return 0;
+}
+
+int adios_read_bp_finalize_method ()
+{
+    /* Set these back to default */
+    chunk_buffer_size = 1024*1024*16;
+    poll_interval_msec = 10000; // 10 secs by default
+    show_hidden_attrs = 0; // don't show hidden attr by default
+
+    return 0;
+}
+
+static int open_stream (ADIOS_FILE * fp, const char * fname, 
+                        MPI_Comm comm, float timeout_sec)
+{
+    int i, rank, ret;
+    struct BP_PROC * p;
+    BP_FILE * fh;
+    int err, stay_in_poll_loop = 1;
+    int file_ok = 0;
+    double t1 = adios_gettime();
+
+    MPI_Comm_rank (comm, &rank);
+    // We need to first check if this is a valid ADIOS-BP file. This is done by
+    // check whether there is 'ADIOS-BP' string written before the 28-bytes minifooter. 
+    // If it is valid, we will proceed with bp_open(). The potential issue is that before
+    // calling bp_open, the next step could start writing and the footer will be corrupted.
+    // This needs to be fixed later. Q. Liu, 06/2012
+    /* While loop for handling timeout
+       timeout > 0: wait up to this long to open the stream
+       timeout = 0: return immediately
+       timeout < 0: wait forever
+    */
+
+    // Only rank 0 does the poll
+    if (rank == 0)
+    {
+        while (stay_in_poll_loop)
+        {
+            adios_errno = err_no_error; // clear previous intermittent error
+            file_ok = check_bp_validity (fname);
+            if (!file_ok)
+            {
+                // This stream does not exist yet
+                log_debug ("file %s found!\n", fname);
+            
+                if (stay_in_poll_loop)
+                {
+                    // check if we need to stay in loop 
+                    if (timeout_sec == 0.0)  //return immediately, which means check file once
+                    {
+                        stay_in_poll_loop = 0;
+                    }
+                    else if (timeout_sec < 0.0) // check file until it arrives
+                    {
+                        adios_nanosleep (poll_interval_msec/1000,
+                            (int)(((uint64_t)poll_interval_msec * 1000000L)%1000000000L));
+                        stay_in_poll_loop = 1;
+                    }
+                    else if (timeout_sec > 0.0 && (adios_gettime () - t1 > timeout_sec))
+                    {
+                        stay_in_poll_loop = 0;
+                    }
+                    else
+                    {
+                        adios_nanosleep (poll_interval_msec/1000,
+                            (int)(((uint64_t)poll_interval_msec * 1000000L)%1000000000L));
+                    }
+                }
+            }
+            else
+            {
+                stay_in_poll_loop = 0;
+            }
+        } // while (stay_in_poll_loop)
+
+        if (!file_ok)
+        {
+            adios_error (err_file_open_error, "File not found: %s\n", fname);
+        }
+
+        MPI_Bcast (&file_ok, 1, MPI_INT, 0, comm);
+    }
+    else
+    {
+        MPI_Bcast (&file_ok, 1, MPI_INT, 0, comm);
+    }
+
+    if (!file_ok)
+    {
+        return err_file_not_found;
+    }
+
+    fh = (BP_FILE *) malloc (sizeof (BP_FILE));
+    assert (fh);
+
+    fh->fname = (fname ? strdup (fname) : 0L);
+    fh->sfh = 0;
+    fh->comm = comm;
+    fh->gvar_h = 0;
+    fh->pgs_root = 0;
+    fh->vars_root = 0;
+    fh->attrs_root = 0;
+    fh->b = malloc (sizeof (struct adios_bp_buffer_struct_v1));
+    assert (fh->b);
+
+    p = (struct BP_PROC *) malloc (sizeof (struct BP_PROC));
+    assert (p);
+    p->fh = fh;
+    p->streaming = 1;
+    p->varid_mapping = 0;
+    p->local_read_request_list = 0;
+    p->b = 0;
+    p->priv = 0;
+
+    /* BP file open and gp/var/att parsing */
+    bp_open (fname, comm, fh);
+
+    fp->fh = (uint64_t) p;
+    fp->file_size = fh->mfooter.file_size;
+    fp->version = fh->mfooter.version;
+    fp->path = strdup (fh->fname);
+    fp->endianness = bp_get_endianness (fh->mfooter.change_endianness);
+
+    /* Seek to the initial step. */
+    bp_seek_to_step (fp, 0, show_hidden_attrs);
+
+    fp->current_step = 0;
+    /* For file, the last step is tidx_stop */
+    fp->last_step = fh->tidx_stop - 1;
+
+    return 0;
+}
+
+/* As opposed to open_file, open_stream opens the first step in the file only.
+ * The lock_mode for file reading is ignored for now.
+ */
+ADIOS_FILE * adios_read_bp_open_stream (const char * fname, MPI_Comm comm, enum ADIOS_LOCKMODE lock_mode, float timeout_sec)
+{
+    log_debug ("adios_read_bp_open_stream\n");
+
+    ADIOS_FILE * fp = (ADIOS_FILE *) malloc (sizeof (ADIOS_FILE));
+    assert (fp);
+
+    if (open_stream (fp, fname, comm, timeout_sec) < 0)
+    {
+        free (fp);
+        fp = 0;
+    }
+
+    return fp;
+}
+
+ADIOS_FILE * adios_read_bp_open_file (const char * fname, MPI_Comm comm)
+{
+    int i, rank;
+    struct BP_PROC * p;
+    BP_FILE * fh;
+    ADIOS_FILE * fp;
+
+    log_debug ("adios_read_bp_open_file\n");
+
+    MPI_Comm_rank (comm, &rank);
+
+    fh = (BP_FILE *) malloc (sizeof (BP_FILE));
+    assert (fh);
+
+    fh->fname = (fname ? strdup (fname) : 0L);
+    fh->sfh = 0;
+    fh->comm = comm;
+    fh->gvar_h = 0;
+    fh->pgs_root = 0;
+    fh->vars_root = 0;
+    fh->attrs_root = 0;
+    fh->b = malloc (sizeof (struct adios_bp_buffer_struct_v1));
+    assert (fh->b);
+
+    p = (struct BP_PROC *) malloc (sizeof (struct BP_PROC));
+    assert (p);
+    p->fh = fh;
+    p->streaming = 0;
+    p->varid_mapping = 0; // maps perceived id to real id
+    p->local_read_request_list = 0;
+    p->b = 0;
+    p->priv = 0;
+
+    /* The ADIOS_FILE struct looks like the following */
+#if 0
+typedef struct {
+        uint64_t fh;                /* File handler                                                   */
+        int      nvars;             /* Number of variables in all groups (with full path)             */
+        char     ** var_namelist;   /* Variable names in a char* array                                */
+        int      nattrs;            /* Number of attributes in all groups                             */
+        char     ** attr_namelist;  /* Attribute names in a char* array                               */
+
+        /* Step */
+        int      current_step;      /* The current step                                               */
+        int      last_step;         /* The currently available latest step in the stream/file         */
+
+        /* Information about file/stream */
+        char     *path;             /* Full path file name (as passed at open)                        */
+        int      endianness;        /* 0: little endian, 1: big endian                                */
+                                    /*   the read API takes care of conversion automatically          */
+        int      version;           /* Version of ADIOS-BP format                                     */
+        uint64_t file_size;         /* Size of file in bytes not including subfiles                   */
+
+        /* Internals */
+        void     * internal_data;   /* Data for internal use                                          */
+} ADIOS_FILE;
+#endif
+    fp = (ADIOS_FILE *) malloc (sizeof (ADIOS_FILE));
+    assert (fp);
+
+    if (bp_open (fname, comm, fh) < 0)
+    {
+        adios_error (err_file_open_error, "File open failed: %s", fname);
+        return 0;
+    }
+
+    /* fill out ADIOS_FILE struct */
+    fp->fh = (uint64_t) p;
+
+    /* '-1' means that we want all steps. 
+     * This will seek to the last step. So we need to set current_step back properly.
+     * Usually bp_seek_to_step comes after release_step call, to first free up some
+     * memory allocated by the previous step. This is the first seek call and, therefore,
+     * no release_step.
+     */
+    bp_seek_to_step (fp, -1, show_hidden_attrs);
+    /* It was agreed that, for file open the current step should be set to 0,
+     * instead of the start time. The var_namelist and attr_namelist should
+     * consist of all steps. For stream open, this is done differently.
+     * 07/2012 - Q.Liu
+     */
+    fp->current_step = 0;
+    fp->last_step = fh->tidx_stop - fh->tidx_start;
+
+    fp->path = strdup (fh->fname);
+    fp->endianness = bp_get_endianness (fh->mfooter.change_endianness);
+    fp->version = fh->mfooter.version;
+    fp->file_size = fh->mfooter.file_size;
+
+    return fp;
+}
+
+int adios_read_bp_close (ADIOS_FILE * fp)
+{
+    struct BP_PROC * p;
+    BP_FILE * fh;
+
+    if (!fp)
+    {
+        return 0;
+    }
+
+    p = (struct BP_PROC *) fp->fh;
+    assert (p);
+
+    fh = p->fh;
+
+    if (p->fh)
+    {
+        bp_close (fh);
+        p->fh = 0;
+    }
+
+    if (p->varid_mapping)
+    {
+        free (p->varid_mapping);
+        p->varid_mapping = 0;
+    }
+
+    if (p->local_read_request_list)
+    {
+        list_free_read_request (p->local_read_request_list);
+        p->local_read_request_list = 0;
+    }
+
+    free (p);
+
+    if (fp->var_namelist)
+    {
+        free_namelist (fp->var_namelist, fp->nvars);
+        fp->var_namelist = 0;
+    }
+
+    if (fp->attr_namelist)
+    {
+        free_namelist (fp->attr_namelist, fp->nattrs);
+        fp->attr_namelist = 0;
+    }
+  
+    if (fp->path)
+    {
+        free (fp->path);
+        fp->path = 0;
+    }
+    // internal_data field is taken care of by common reader layer
+    free (fp);
+
+    return 0;
+}
+
+/* Since we have no way to know that the end of the stream has been reached, we cannot
+ * block the call and expect new step will arrive. Therefore, if last == 0, we simply sleep
+ * for a specified period of time and re-open the file to see if there is any new steps came in.
+ * The trick is that when step is being advanced, it is likely that file has
+ * already being appended with new steps. Therefore, we have to close and reopen 
+ * the file if the expected step is not found.
+ * last - 0: next available step, !=0: newest available step 
+ *  RETURN: 0 OK, !=0 on error (also sets adios_errno)
+ *      
+ *  Possible errors (adios_errno values):
+ *       err_end_of_stream    Stream has ended, no more steps should be expected
+ *       err_step_notready    The requested step is not yet available
+ *       err_step_disappeared The requested step is not available anymore
+
+ */
+int adios_read_bp_advance_step (ADIOS_FILE * fp, int last, float timeout_sec)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    int last_step;
+    MPI_Comm comm;
+    char * fname;
+
+    log_debug ("adios_read_bp_advance_step\n");
+
+    //TODO: this part of code needs to cleaned up a bit. Some if-else branches can be merged. Q.Liu
+    adios_errno = 0;
+    if (last == 0) // read in the next step
+    {
+        if (fp->current_step < fp->last_step) // no need to re-open file. The next step is already in.
+        {
+            release_step (fp);
+            bp_seek_to_step (fp, ++fp->current_step, show_hidden_attrs);
+        }
+        else // re-open to read in footer again. We should keep polling until there are new steps in OR 
+             // time out.
+        {
+            last_step = fp->last_step;
+            fname = strdup (fh->fname);
+            comm = fh->comm;
+
+            if (p->fh)
+            {
+                bp_close (fh);
+                p->fh = 0;
+            }
+
+            if (!get_new_step (fp, fname, comm, last_step, timeout_sec))
+            {
+                // With file reading, how can we tell it is the end of the streams?
+                adios_errno = err_step_notready;
+            }
+
+            free (fname); 
+
+            log_debug ("Seek from step %d to step %d\n", last_step, last_step + 1);
+
+            if (adios_errno == 0)
+            {
+                release_step (fp);
+                bp_seek_to_step (fp, last_step + 1, show_hidden_attrs);
+                fp->current_step = last_step + 1;
+            }
+        }
+    }
+    else // read in newest step. Re-open no matter whether current_step < last_step
+    {
+        last_step = fp->last_step;
+        fname = strdup (fh->fname);
+        comm = fh->comm;
+
+        if (p->fh)
+        {
+            bp_close (fh);
+            p->fh = 0;
+        }
+
+        // lockmode is currently not supported.
+        if (!get_new_step (fp, fh->fname, fh->comm, last_step, timeout_sec))
+        {
+            adios_errno = err_step_notready;
+        }
+
+        free (fname);
+
+        if (adios_errno == 0)
+        {
+            release_step (fp);
+            bp_seek_to_step (fp, fp->last_step, show_hidden_attrs);
+            fp->current_step = fp->last_step;
+        }
+    }
+
+    return adios_errno;
+}
+
+/* Right now, this function does nothing, since locking hasn't been implemented yet */
+void adios_read_bp_release_step (ADIOS_FILE *fp)
+{
+}
+
+ADIOS_VARINFO * adios_read_bp_inq_var_byid (const ADIOS_FILE * fp, int varid)
+{
+    ADIOS_VARINFO * varinfo;
+
+    int mapped_id = map_req_varid (fp, varid);;
+
+    adios_errno = 0;
+
+    /* this call sets varinfo->varid as the real mapped id.
+     * Therefore, we need to set it back to perceived id.
+     */
+    varinfo = bp_inq_var_byid (fp, mapped_id);
+    varinfo->varid = varid;
+
+    return varinfo;
+}
+
+
+/* Note: most of the code of this routine is copied from previous 1.3.1 implementation
+ * of NCSU. One thing to fix is that any counter related to characteristic index should be of uint64_t,
+ * instead of int.
+ */
+int adios_read_bp_inq_var_stat (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo, int per_step_stat, int per_block_stat)
+{
+#if 0
+typedef struct {
+        void     * min;            /* minimum value in an array variable, = value for a scalar       */
+        void     * max;            /* maximum value of an array variable (over all steps)            */
+        double   * avg;            /* average value of an array variable (over all steps)            */
+        double   * std_dev;        /* standard deviation value of an array variable (over all steps) */
+
+        struct ADIOS_STAT_STEP     /* per step statistics (if requested and recorded at writing) */
+        {
+            void     ** mins;      /* minimum per each step (array of 'nsteps' elements)             */
+            void     ** maxs;      /* maximum per each step (array of 'nsteps' elements)             */
+            double   ** avgs;      /* average per each step (array of 'nsteps' elements)             */
+            double   ** std_devs;  /* standard deviation per each step (array of 'nsteps' elements)  */
+        } *steps;
+
+        struct ADIOS_STAT_BLOCK    /* per block statistics (if requested and recorded at writing) */
+        {
+            void     ** mins;      /* minimum per each block (array of 'nblocks' elements)         */
+            void     ** maxs;      /* maximum per each block (array of 'nblocks' elements)         */
+            double   ** avgs;      /* average per each block (array of 'nblocks' elements)         */
+            double   ** std_devs;  /* std deviation per each block (array of 'nblocks' elements)   */
+        } *blocks;
+
+        struct ADIOS_HIST           /* Histogram if recorded at writing */
+        {
+            uint32_t    num_breaks;
+            double      max;
+            double      min;
+            double *    breaks;
+            uint32_t ** frequencies;
+            uint32_t *  gfrequencies;
+        } *histogram;
+
+} ADIOS_VARSTAT;
+#endif
+    int i, j, c, count = 1, timestep;
+    int size, sum_size, sum_type, nsteps, prev_timestep;
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    ADIOS_VARSTAT * vs;
+    struct adios_index_var_struct_v1 * var_root;
+ 
+    assert (varinfo);
+
+    varinfo->statistics = vs = (ADIOS_VARSTAT *) malloc (sizeof (ADIOS_VARSTAT));
+    assert (vs);
+
+    vs->min = 0;
+    vs->max = 0;
+    vs->avg = 0;
+    vs->std_dev = 0;
+
+    vs->steps = (struct ADIOS_STAT_STEP *) malloc (sizeof (struct ADIOS_STAT_STEP));
+    assert (vs->steps);
+    vs->steps->mins = 0;
+    vs->steps->maxs = 0;
+    vs->steps->avgs = 0;
+    vs->steps->std_devs = 0;
+
+    //TODO
+    vs->blocks = 0;
+    vs->histogram = 0;
+
+    uint64_t gcnt = 0, * cnts;
+
+    double *gsum = NULL, *gsum_square = NULL;
+    double **sums = NULL, **sum_squares = NULL;
+
+    int16_t map[32];
+    memset (map, -1, sizeof(map));
+
+    var_root = bp_find_var_byid (fh, varinfo->varid);
+
+    // Bitmap shows which statistical information has been calculated
+    i = j = 0;
+    while (var_root->characteristics[0].bitmap >> j)
+    {
+        if ((var_root->characteristics[0].bitmap >> j) & 1)
+        {
+            map [j] = i ++;
+        }
+
+        j ++;
+    }
+
+    nsteps = varinfo->nsteps;
+
+    if (map[adios_statistic_min] != -1)
+    {
+        MALLOC(vs->steps->mins, nsteps * sizeof(void *), "minimum per timestep");
+        for (i = 0; i < nsteps; i++)
+        {
+            vs->steps->mins[i] = 0;
+        }
+    }
+
+    if (map[adios_statistic_max] != -1)
+    {
+        MALLOC(vs->steps->maxs, nsteps * sizeof(void *), "maximum per timestep");
+        for (i = 0; i < nsteps; i++)
+        {
+            vs->steps->maxs[i] = 0;
+        }
+    }
+
+    if (map[adios_statistic_sum] != -1)
+    {
+        MALLOC(sums, nsteps * sizeof(double *), "summation per timestep");
+        MALLOC(vs->steps->avgs, nsteps * sizeof(double *), "average per timestep");
+
+        for (i = 0; i < nsteps; i++)
+        {
+            sums[i] = vs->steps->avgs[i] = 0;
+        }
+        CALLOC(cnts, nsteps, sizeof(uint64_t), "count of elements per timestep");
+    }
+
+    if (map[adios_statistic_sum_square] != -1)
+    {
+        MALLOC(sum_squares, nsteps * sizeof(double *), "summation per timestep");
+        MALLOC(vs->steps->std_devs, nsteps * sizeof(double *), "standard deviation per timestep");
+
+        for (i = 0; i < nsteps; i++)
+        {
+            vs->steps->std_devs[i] = sum_squares[i] = 0;
+        }
+    }
+/*
+    if (map[adios_statistic_hist] != -1 && (var_root->characteristics[0].stats[0][map[adios_statistic_hist]].data))
+    {
+        struct adios_index_characteristics_stat_struct * stats = var_root->characteristics[0].stats[0];
+        struct adios_index_characteristics_hist_struct * hist = stats[map[adios_statistic_hist]].data;
+        int num_breaks = hist->num_breaks;
+
+        MALLOC(vi->hist, sizeof(struct ADIOS_HIST), "histogram");
+        MALLOC(vi->hist->breaks, num_breaks * sizeof(double), "break points of histogram");
+        MALLOC(vi->hist->gfrequencies, (num_breaks + 1) * sizeof(uint32_t), "global frequencies of histogram");
+
+        vi->hist->num_breaks = hist->num_breaks;
+        vi->hist->min = hist->min;
+        vi->hist->max = hist->max;
+
+        memcpy(vi->hist->breaks, hist->breaks, num_breaks * sizeof(double));
+        CALLOC(vi->hist->gfrequencies, (num_breaks + 1), bp_get_type_size(adios_unsigned_integer, ""), "global frequency");
+
+        if (ntimes > 0)
+        {
+            MALLOC(vi->hist->frequenciess, (ntimes * sizeof(int32_t *)), "frequencies for timesteps");
+            for(i = 0; i < ntimes; i++)
+                CALLOC(vi->hist->frequenciess[i], (num_breaks + 1), bp_get_type_size(adios_unsigned_integer, ""), "frequency at timestep");
+        }
+    }
+*/
+    size = bp_get_type_size (var_root->type, "");
+    sum_size = bp_get_type_size (adios_double, "");
+
+    if (var_root->type == adios_complex || var_root->type == adios_double_complex)
+    {
+        int type;
+        count = 3;
+        timestep = -1;
+        prev_timestep = 0;
+
+        if (var_root->type == adios_complex)
+        {
+            type = adios_double;
+        }
+        else
+        {
+            type = adios_long_double;
+        }
+
+        // Only a double precision returned for all complex values
+        size = bp_get_type_size (adios_double, "");
+
+        for (i = 0; i < var_root->characteristics_count; i++)
+        {
+            // changes for 1.4.x. Q. Liu
+            if (var_root->characteristics[i].time_index != prev_timestep)
+            {
+                timestep++;
+                prev_timestep = var_root->characteristics[i].time_index;
+            }
+
+            assert (timestep < nsteps);
+
+            if (!var_root->characteristics[i].stats)
+                continue;
+
+            struct adios_index_characteristics_stat_struct ** stats = var_root->characteristics[i].stats;
+
+            if ((map[adios_statistic_finite] != -1) && (* ((uint8_t *) stats[0][map[adios_statistic_finite]].data) == 0))
+                continue;
+
+            if (map[adios_statistic_min] != -1 && stats[0][map[adios_statistic_min]].data)
+            {
+                double data[3];
+                for (c = 0; c < count; c ++)
+                    data[c] = bp_value_to_double((enum ADIOS_DATATYPES)type, stats[c][map[adios_statistic_min]].data);
+
+                if(!vs->min)
+                {
+                    MALLOC (vs->min, count * size, "global minimum")
+                    for (c = 0; c < count; c ++)
+                           ((double * ) vs->min)[c] = data[c];
+
+                }
+                else
+                {
+                    for (c = 0; c < count; c ++)
+                        if (data[c] < ((double *) vs->min)[c])
+                               ((double * ) vs->min)[c] = data[c];
+                }
+
+                if(!vs->steps->mins[timestep])
+                {
+                    MALLOC (vs->steps->mins[timestep], count * size, "minimum per timestep")
+                    for (c = 0; c < count; c ++)
+                    {
+                        ((double **) vs->steps->mins)[timestep][c] = data[c];
+                    }
+                }
+                else
+                {
+                    for (c = 0; c < count; c ++)
+                    {
+                        if (data[c] < ((double **) vs->steps->mins)[timestep][c])
+                        {
+                            ((double **) vs->steps->mins)[timestep][c] = data[c];
+                        }
+                    }
+                }
+            }
+
+            if (map[adios_statistic_max] != -1 && stats[0][map[adios_statistic_max]].data)
+            {
+                double data[3];
+                for (c = 0; c < count; c ++)
+                    data[c] = bp_value_to_double((enum ADIOS_DATATYPES)type, stats[c][map[adios_statistic_max]].data);
+
+                if(!vs->max) {
+                    MALLOC (vs->max, count * size, "global minimum")
+                    for (c = 0; c < count; c ++)
+                        ((double * ) vs->max)[c] = data[c];
+
+                } else {
+                    for (c = 0; c < count; c ++)
+                        if (data[c] > ((double *) vs->max)[c])
+                            ((double * ) vs->max)[c] = data[c];
+                }
+
+                if(!vs->steps->maxs[timestep]) {
+                    MALLOC (vs->steps->maxs[timestep], count * size, "minimum per timestep")
+                    for (c = 0; c < count; c ++)
+                        ((double **) vs->steps->maxs)[timestep][c] = data[c];
+
+                } else {
+                    for (c = 0; c < count; c ++)
+                        if (data[c] > ((double **) vs->steps->maxs)[timestep][c])
+                            ((double **) vs->steps->maxs)[timestep][c] = data[c];
+                }
+            }
+
+            if (map[adios_statistic_sum] != -1 && stats[0][map[adios_statistic_sum]].data)
+            {
+                double data[3];
+                for (c = 0; c < count; c ++)
+                    data[c] = bp_value_to_double((enum ADIOS_DATATYPES)type, stats[c][map[adios_statistic_sum]].data);
+
+                if(!gsum) {
+                    MALLOC(gsum, count * sum_size, "global summation")
+                    for (c = 0; c < count; c ++)
+                           gsum[c] = data[c];
+
+                } else {
+                    for (c = 0; c < count; c ++)
+                        gsum[c] = gsum[c] + data[c];
+                }
+
+                if(!sums[timestep]) {
+                    MALLOC(sums[timestep], count * sum_size, "summation per timestep")
+                    for (c = 0; c < count; c ++)
+                        sums[timestep][c] = data[c];
+
+                } else {
+                    for (c = 0; c < count; c ++)
+                        sums[timestep][c] = sums[timestep][c] + data[c];
+                }
+            }
+
+            if (map[adios_statistic_sum_square] != -1 && stats[0][map[adios_statistic_sum_square]].data)
+            {
+                double data[3];
+                for (c = 0; c < count; c ++)
+                    data[c] = bp_value_to_double((enum ADIOS_DATATYPES)type, stats[c][map[adios_statistic_sum_square]].data);
+
+                if(!gsum_square) {
+                    MALLOC(gsum_square, count * sum_size, "global summation of squares")
+                    for (c = 0; c < count; c ++)
+                        gsum_square[c] = data[c];
+
+                } else {
+                    for (c = 0; c < count; c ++)
+                           gsum_square[c] = gsum_square[c] + data[c];
+                }
+
+                if(!sum_squares[timestep]) {
+                    MALLOC(sum_squares[timestep], count * sum_size, "summation of square per timestep")
+                    for (c = 0; c < count; c ++)
+                        sum_squares[timestep][c] = data[c];
+
+                } else {
+                    for (c = 0; c < count; c ++)
+                        sum_squares[timestep][c] = sum_squares[timestep][c] + data[c];
+                }
+            }
+
+            if (map[adios_statistic_cnt] != -1 && stats[0][map[adios_statistic_cnt]].data)
+            {
+                cnts[timestep] += * ((uint32_t *) stats[0][map[adios_statistic_cnt]].data);
+                gcnt += * (uint32_t *) stats[0][map[adios_statistic_cnt]].data;
+            }
+        }
+
+        if(vs->min && (map[adios_statistic_sum] != -1) && (map[adios_statistic_sum_square] != -1)) {
+            // min, max, summation exists only for arrays
+            // Calculate average / timestep
+
+            for(timestep = 0; timestep < nsteps; timestep ++) {
+                MALLOC(vs->steps->avgs[timestep], count * sum_size, "average per timestep")
+                for (c = 0; c < count; c ++)
+                    vs->steps->avgs[timestep][c] = sums[timestep][c] / cnts[timestep];
+
+                MALLOC(vs->steps->std_devs[timestep], count * sum_size, "standard deviation per timestep")
+                for (c = 0; c < count; c ++)
+                    vs->steps->std_devs[timestep][c] = sqrt((sum_squares[timestep][c] / cnts[timestep]) - (vs->steps->avgs[timestep][c] * vs->steps->avgs[timestep][c]));
+
+                free (sums[timestep]);
+                free (sum_squares[timestep]);
+            }
+        }
+
+        // Calculate global average
+        if(vs->min && gsum && (map[adios_statistic_sum] != -1) && (map[adios_statistic_sum_square] != -1)) {
+            MALLOC(vs->avg, count * sum_size, "global average")
+
+            if(gcnt > 0)
+                for (c = 0; c < count; c ++)
+                    vs->avg[c] = gsum[c] / gcnt;
+            else
+                for (c = 0; c < count; c ++)
+                    vs->avg[c] = gsum[c];
+
+            MALLOC(vs->std_dev, count * sum_size, "global average")
+            if(vs->avg && gcnt > 0)
+                for (c = 0; c < count; c ++)
+                    vs->std_dev[c] = sqrt(gsum_square[c] / gcnt - (vs->avg[c] * vs->avg[c]));
+            else
+                for (c = 0; c < count; c ++)
+                    vs->std_dev[c] = 0;
+        }
+    }
+    else
+    {
+        timestep = -1;
+        prev_timestep = 0;
+
+        for (i = 0; i < var_root->characteristics_count; i++)
+        {
+            // changes for 1.4.x. Q. Liu
+            if (var_root->characteristics[i].time_index != prev_timestep)
+            {
+                timestep++;
+                prev_timestep = var_root->characteristics[i].time_index;
+            }
+
+            assert (timestep < nsteps);
+
+            if (!var_root->characteristics[i].stats)
+            {
+                continue;
+            }
+
+            struct adios_index_characteristics_stat_struct * stats = var_root->characteristics[i].stats[0];
+            struct adios_index_characteristics_hist_struct * hist = stats[map[adios_statistic_hist]].data;
+
+            if (map[adios_statistic_finite] != -1 && (* ((uint8_t *) stats[map[adios_statistic_finite]].data) == 0))
+                continue;
+
+            if (map[adios_statistic_min] != -1 && stats[map[adios_statistic_min]].data)
+            {
+                if(!vs->min)
+                {
+                    MALLOC (vs->min, size, "global minimum")
+                    memcpy(vs->min, stats[map[adios_statistic_min]].data, size);
+
+                }
+                else if (adios_lt(var_root->type, stats[map[adios_statistic_min]].data, vs->min))
+                {
+                    memcpy(vs->min, stats[map[adios_statistic_min]].data, size);
+                }
+
+                if(!vs->steps->mins[timestep])
+                {
+                    MALLOC (vs->steps->mins[timestep], size, "minimum per timestep")
+                    memcpy(vs->steps->mins[timestep], stats[map[adios_statistic_min]].data, size);
+                }
+                else if (adios_lt(var_root->type, stats[map[adios_statistic_min]].data, vs->steps->mins[timestep]))
+                {
+                    memcpy(vs->steps->mins[timestep], stats[map[adios_statistic_min]].data, size);
+                }
+            }
+
+            if (map[adios_statistic_max] != -1 && stats[map[adios_statistic_max]].data)
+            {
+                if(!vs->max)
+                {
+                    MALLOC (vs->max, size, "global maximum")
+                    memcpy(vs->max, stats[map[adios_statistic_max]].data, size);
+
+                }
+                else if (adios_lt(var_root->type, vs->max, stats[map[adios_statistic_max]].data))
+                {
+                    memcpy(vs->max, stats[map[adios_statistic_max]].data, size);
+                }
+
+                if(!vs->steps->maxs[timestep])
+                {
+                    MALLOC (vs->steps->maxs[timestep], size, "maximum per timestep")
+                    memcpy(vs->steps->maxs[timestep], stats[map[adios_statistic_max]].data, size);
+                }
+                else if (adios_lt(var_root->type, vs->steps->maxs[timestep], stats[map[adios_statistic_max]].data))
+                {
+                    memcpy(vs->steps->maxs[timestep], stats[map[adios_statistic_max]].data, size);
+                }
+            }
+
+            if (map[adios_statistic_sum] != -1 && stats[map[adios_statistic_sum]].data)
+            {
+                if(!gsum)
+                {
+                    MALLOC(gsum, sum_size, "global summation")
+                    memcpy(gsum, stats[map[adios_statistic_sum]].data, sum_size);
+                }
+                else
+                {
+                    *gsum = *gsum + * ((double *) stats[map[adios_statistic_sum]].data);
+                }
+
+                if(!sums[timestep])
+                {
+                    MALLOC(sums[timestep], sum_size, "summation per timestep")
+                    memcpy(sums[timestep], stats[map[adios_statistic_sum]].data, sum_size);
+                }
+                else
+                {
+                    *sums[timestep] = *sums[timestep] + * ((double *) stats[map[adios_statistic_sum]].data);
+                }
+            }
+
+            if (map[adios_statistic_sum_square] != -1 && stats[map[adios_statistic_sum_square]].data)
+            {
+                if(!gsum_square)
+                {
+                    MALLOC(gsum_square, sum_size, "global summation of squares")
+                    memcpy(gsum_square, stats[map[adios_statistic_sum_square]].data, sum_size);
+
+                }
+                else
+                {
+                    *gsum_square = *gsum_square + * ((double *) stats[map[adios_statistic_sum_square]].data);
+                }
+
+                if(!sum_squares[timestep])
+                {
+                    MALLOC(sum_squares[timestep], sum_size, "summation of square per timestep")
+                    memcpy(sum_squares[timestep], stats[map[adios_statistic_sum_square]].data, sum_size);
+                }
+                else
+                {
+                    *sum_squares[timestep] = *sum_squares[timestep] + * ((double *) stats[map[adios_statistic_sum_square]].data);
+                }
+            }
+//TODO
+/*
+            if(map[adios_statistic_hist] != -1 && stats[map[adios_statistic_hist]].data)
+            {
+                for(j = 0; j <= vi->hist->num_breaks; j++)
+                {
+                    uint32_t freq = hist->frequencies[j];
+                    vi->hist->gfrequencies[j] += freq;
+                    if (ntimes > 0)
+                        vi->hist->frequenciess[timestep][j] += freq;
+                }
+            }
+*/
+            if (map[adios_statistic_cnt] != -1 && stats[map[adios_statistic_cnt]].data)
+            {
+                cnts[timestep] += * (uint32_t *) stats[map[adios_statistic_cnt]].data;
+                gcnt += * (uint32_t *) stats[map[adios_statistic_cnt]].data;
+            }
+        }
+
+//TODO
+#if 0
+        if(ntimes > 0 && vs->min && (map[adios_statistic_sum] != -1) && (map[adios_statistic_sum_square] != -1))
+        {
+            // min, max, summation exists only for arrays
+            // Calculate average / timestep
+
+            for(timestep = 0; timestep < ntimes; timestep ++)
+            {
+                MALLOC(vs->steps->avgs[timestep], sum_size, "average per timestep")
+                *(vs->steps->avgs[timestep]) = *(sums[timestep]) / cnts[timestep];
+
+                MALLOC(vs->steps->std_devs[timestep], sum_size, "standard deviation per timestep")
+                *(vs->steps->std_devs[timestep]) = sqrt(*(sum_squares[timestep]) / cnts[timestep] - ((*(vs->steps->avgs[timestep]) * (*(vs->steps->avgs[timestep])))));
+
+                free (sums[timestep]);
+                free (sum_squares[timestep]);
+            }
+        }
+#endif
+        // Calculate global average
+        if(vs->min && gsum && (map[adios_statistic_sum] != -1) && (map[adios_statistic_sum_square] != -1))
+        {
+            MALLOC(vs->avg, sum_size, "global average")
+            if(gcnt > 0)
+                *vs->avg = *gsum / gcnt;
+            else
+                vs->avg = gsum;
+
+            MALLOC(vs->std_dev, sum_size, "global average")
+            if(vs->avg && gcnt > 0)
+                *vs->std_dev = sqrt(*gsum_square / gcnt - ((*(vs->avg)) * (*(vs->avg))));
+            else
+                *vs->std_dev = 0;
+        }
+    }
+
+    if (!varinfo->value && vs->min)
+    {
+        varinfo->value = vs->min; // arrays have no value but we assign here the minimum
+    }
+
+    if(!vs->min)
+    {
+        vs->min = varinfo->value; // scalars have value but not min
+    }
+
+    if(!vs->max)
+    {
+        vs->max = varinfo->value; // scalars have value but not max
+    }
+
+    if (sums && gsum)
+    {
+        free (sums);
+        free (gsum);
+    }
+
+    if (sum_squares && gsum_square)
+    {
+        free (sum_squares);
+        free (gsum_square);
+    }
+
+    return 0;
+}
+
+int adios_read_bp_inq_var_blockinfo (const ADIOS_FILE * fp, ADIOS_VARINFO * varinfo)
+{
+    struct BP_PROC * p = (struct BP_PROC *) fp->fh;
+    int i, file_is_fortran, timedim;
+    uint64_t * ldims, * gdims, * offsets;
+    BP_FILE * fh;
+    struct adios_index_var_struct_v1 * var_root;
+
+    assert (varinfo);
+
+    fh = (BP_FILE *) p->fh;
+    file_is_fortran = is_fortran_file (fh);
+    var_root = bp_find_var_byid (fh, varinfo->varid);
+
+    varinfo->blockinfo = (ADIOS_VARBLOCK *) malloc (varinfo->sum_nblocks * sizeof (ADIOS_VARBLOCK));
+    assert (varinfo->blockinfo);
+
+    /* dim.count possibily include 'time' dim in it. */
+    ldims = (uint64_t *) malloc (var_root->characteristics[0].dims.count);
+    gdims = (uint64_t *) malloc (var_root->characteristics[0].dims.count);
+    offsets = (uint64_t *) malloc (var_root->characteristics[0].dims.count);
+    assert (ldims && gdims && offsets); 
+
+    for (i = 0; i < varinfo->sum_nblocks; i++)
+    {
+        varinfo->blockinfo[i].start = (uint64_t *) malloc (varinfo->ndim * 8);
+        varinfo->blockinfo[i].count = (uint64_t *) malloc (varinfo->ndim * 8);
+        assert (varinfo->blockinfo[i].start && varinfo->blockinfo[i].count);
+
+        bp_get_dimension_characteristics_notime (&(var_root->characteristics[i]),
+                                                 ldims, gdims, offsets, file_is_fortran
+                                                );
+
+        memcpy (varinfo->blockinfo[i].start, offsets, varinfo->ndim * 8);
+        memcpy (varinfo->blockinfo[i].count, ldims, varinfo->ndim * 8);
+    }
+    
+    free (ldims);
+    free (gdims);
+    free (offsets);
+
+    return 0;
+}
+
+uint64_t get_req_datasize (const ADIOS_FILE * fp, read_request * r, struct adios_index_var_struct_v1 * v)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    ADIOS_SELECTION * sel = r->sel;
+    uint64_t datasize = bp_get_type_size (v->type, "");
+    int i, time, pgidx, ndims;
+
+    if (sel->type == ADIOS_SELECTION_BOUNDINGBOX)
+    {
+        for (i = 0; i < sel->u.bb.ndim; i++)
+        {
+            datasize *=  sel->u.bb.count[i];
+        }
+    }
+    else if (sel->type == ADIOS_SELECTION_POINTS)
+    {
+        datasize *= sel->u.points.npoints;
+    }
+    else if (sel->type == ADIOS_SELECTION_WRITEBLOCK)
+    {
+        pgidx = adios_wbidx_to_pgidx (fp, r);
+
+        ndims = v->characteristics[pgidx].dims.count;
+        for (i = 0; i < ndims; i++)
+        {
+            datasize *= v->characteristics[pgidx].dims.dims[i * 3];
+        }
+    }
+
+    return datasize;   
+}
+
+/* Note: the varid isn't the perceived varid from the user */
+/** Schedule reading a variable (slice) from the file.
+ *  You need to allocate the memory for the data.
+ *  You need to call adios_perform_reads() to do the reading of
+ *  variables.
+ *  IN:  fp         pointer to an (opened) ADIOS_FILE struct
+ *       sel        selection created beforehand with adios_selection...().
+ *                  sel=NULL means global selection (whole variable)
+ *       varname    name of the variable
+ *       from_step  Read the 'nsteps' consecutive steps from this
+ *                  step of a file variable.
+                    It is not used in case of a stream.
+ *       nsteps     Read 'nsteps' consecutive steps from current step.
+ *                  Must be 1 for a stream. 
+ *  OUT: data       pointer to the memory to hold data of the variable
+ *                  In blocking read mode, the memory should be 
+ *                  pre-allocated. In non-blocking mode, memory can be
+ *                  allocated or not, and that changes the behavior of
+ *                  the chunked read. If memory is allocated, 
+ *                  adios_check_read() returns a variable if it is completed.
+ *                  If memory is not allocated, the check returns any chunk
+ *                  already available of a variable (in ADIOS own memory)
+ *                  and the application has to rearrange the data. The user
+ *                  has to process/copy the data before getting new chunks.
+ *  RETURN: 0 OK, !=0 on error, sets adios_errno too
+ */
+int adios_read_bp_schedule_read_byid (const ADIOS_FILE * fp, const ADIOS_SELECTION * sel,
+                                      int varid, int from_steps, int nsteps, void * data)
+{
+    BP_PROC * p;
+    BP_FILE * fh;
+    read_request * r;
+    ADIOS_SELECTION * nullsel = 0;
+    struct adios_index_var_struct_v1 * v;
+    int i, type_size, ndim, ns, file_is_fortran, mapped_varid;
+    uint64_t * dims = 0;
+
+    assert (fp);
+
+    p = (BP_PROC *) fp->fh;
+    fh = (BP_FILE *) p->fh;
+
+    mapped_varid = p->varid_mapping[varid];
+    v = bp_find_var_byid (fh, mapped_varid);
+    file_is_fortran = is_fortran_file (fh);
+
+    r = (read_request *) malloc (sizeof (read_request));
+    assert (r);
+
+    if (!sel)
+    {
+        bp_get_and_swap_dimensions (fh, v, file_is_fortran,
+                                    &ndim, &dims,
+                                    &ns,
+                                    file_is_fortran != futils_is_called_from_fortran()
+                                    );
+
+        nullsel = (ADIOS_SELECTION *) malloc (sizeof (ADIOS_SELECTION));
+        assert (nullsel);
+
+        nullsel->type == ADIOS_SELECTION_BOUNDINGBOX;
+        nullsel->u.bb.ndim = ndim;
+        nullsel->u.bb.start = (uint64_t *) malloc (nullsel->u.bb.ndim * 8);
+        assert (nullsel->u.bb.start);
+        nullsel->u.bb.count = (uint64_t *) malloc (nullsel->u.bb.ndim * 8);
+        assert (nullsel->u.bb.count);
+
+        for (i = 0; i < nullsel->u.bb.ndim; i++)
+        {
+            nullsel->u.bb.start[i] = 0;
+            nullsel->u.bb.count[i] = dims[i];
+        }
+
+        free (dims);
+    }
+
+    /* copy selection since we don't want to operate on user memory.
+     */
+    r->sel = (!nullsel ? copy_selection (sel) : nullsel);
+    r->varid = mapped_varid;
+    if (!p->streaming)
+    {
+        r->from_steps = from_steps;
+        r->nsteps = nsteps;
+    }
+    else
+    {
+        r->from_steps = 0;
+        r->nsteps = 1;
+    }
+
+    r->data = data;
+    r->datasize = get_req_datasize (fp, r, v);
+    r->priv = 0;
+    r->next = 0;
+
+    list_insert_read_request_next (&p->local_read_request_list, r);
+
+    return 0;
+}
+
+int adios_read_bp_perform_reads (const ADIOS_FILE *fp, int blocking)
+{
+    struct BP_PROC * p;
+    read_request * r;
+    ADIOS_VARCHUNK * chunk;
+
+    p = (struct BP_PROC *) fp->fh;
+
+    /* 1. prepare all reads */
+    // check if all user memory is provided for blocking read
+    if (blocking)
+    {
+        r = p->local_read_request_list;
+        while (r)
+        {
+            if (!r->data)
+            {
+                adios_error (err_operation_not_supported,
+                    "Blocking mode at adios_perform_reads() requires that user "
+                    "provides the memory for each read request. Request for "
+                    "variable %d was scheduled without user-allocated memory\n",
+                    r->varid);
+                return err_operation_not_supported;
+            }
+
+            r = r->next;
+        }
+    }
+    else
+    {
+        return 0;
+    }
+
+    while (p->local_read_request_list)
+    {
+        chunk = read_var (fp, p->local_read_request_list);
+
+        // remove head from list
+        r = p->local_read_request_list;
+        p->local_read_request_list = p->local_read_request_list->next;
+        free(r);
+
+        common_read_free_chunk (chunk);
+    }
+
+    return 0;
+}
+
+/* This routine split a 'big' request into smaller ones which can be fit into
+ * buffer_size bytes of memory.
+ */
+static read_request * split_req (const ADIOS_FILE * fp, const read_request * r, int buffer_size)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    read_request * newreq, * h = 0;
+    ADIOS_SELECTION * sel = r->sel;
+    struct adios_index_var_struct_v1 * v;
+    int type_size, n_elements, ndim;
+    int i, j, varid, remain, done;
+    uint64_t pos[32], subbb[32], start[32], count[32];
+
+    log_debug ("split_req()\n");
+    varid = map_req_varid (fp, r->varid);
+    v = bp_find_var_byid (fh, varid);
+    type_size = bp_get_type_size (v->type, "");
+    assert (type_size);
+
+    n_elements = buffer_size / type_size;
+    
+    printf ("n_elements = %d\n", n_elements);
+    //TODO: handle string 
+    if (sel->type == ADIOS_SELECTION_BOUNDINGBOX)
+    {
+        ndim = sel->u.bb.ndim;
+        // convert chunk size to position within the bounding box
+        for (i = ndim - 1; i > -1; i--)
+        {
+            pos[i] = n_elements % sel->u.bb.count[i];
+            assert (sel->u.bb.count[i]);
+            n_elements /= sel->u.bb.count[i];
+        }
+
+        log_debug ("pos = ");
+        for (i = 0; i < ndim; i++)
+        {
+            log_debug_cont ("%lu ", pos[i]);
+        }
+        log_debug_cont ("\n");
+
+        // calculate sub-bounding-box
+        for (i = ndim - 1; i > -1; i--)
+        {
+            if (pos[i] != sel->u.bb.count[i] - 1)
+            {
+                j = 0;
+                while (j <= i && pos[j] == 0)
+                {
+                    subbb[j] = 0;
+                    j++;
+                }
+
+                if (j <= i)
+                {
+                    subbb[j] = pos[j];
+                    j++;
+                    while (j <= i)
+                    {
+                        subbb[j] = sel->u.bb.count[j];
+                        j++;
+                    }
+                }
+                break;
+            }
+            else
+            {
+                subbb[i] = sel->u.bb.count[i];
+            }
+        }
+
+        log_debug ("subbb = ");
+        for (i = 0; i < ndim; i++)
+        {
+            log_debug_cont ("%lu ", subbb[i]);
+        }
+        log_debug_cont ("\n");
+
+        memcpy (start, sel->u.bb.start, ndim * 8);
+        memcpy (count, sel->u.bb.count, ndim * 8);
+
+        while (1)
+        {
+            read_request * newreq = (read_request *) malloc (sizeof (read_request));
+            assert (newreq);
+
+            newreq->sel = (ADIOS_SELECTION *) malloc (sizeof (ADIOS_SELECTION));
+            assert (newreq->sel);
+            newreq->sel->type = ADIOS_SELECTION_BOUNDINGBOX;
+            newreq->sel->u.bb.ndim = ndim;
+            newreq->sel->u.bb.start = malloc (ndim * 8);
+            newreq->sel->u.bb.count = malloc (ndim * 8);
+            assert (newreq->sel->u.bb.start);
+            assert (newreq->sel->u.bb.count);
+
+            memcpy (newreq->sel->u.bb.start,
+                    start,
+                    ndim * 8 
+                   );
+
+            // check whether the start + count will be out of bound
+            for (i = 0; i < ndim; i++)
+            {
+                if (start[i] + subbb[i] > sel->u.bb.start[i] + sel->u.bb.count[i])
+                {
+                    count[i] = sel->u.bb.start[i] + sel->u.bb.count[i] - start[i];
+                }
+                else
+                {
+                    count[i] = subbb[i];
+                }
+            }
+
+            memcpy (newreq->sel->u.bb.count,
+                    count,
+                    ndim * 8 
+                   );
+
+            log_debug ("bb: (");
+            for (i = 0; i < ndim; i++)
+            {
+                log_debug_cont ("%lu", newreq->sel->u.bb.start[i]);
+                if (i != ndim - 1)
+                {
+                    log_debug_cont (",");
+                }
+            }
+            log_debug_cont (") (");
+            for (i = 0; i < ndim; i++)
+            {
+                log_debug_cont ("%lu", newreq->sel->u.bb.start[i] + newreq->sel->u.bb.count[i] - 1);
+                if (i != ndim - 1)
+                {
+                    log_debug_cont (",");
+                }
+            }
+            log_debug_cont (")\n");
+
+            done = 0;
+            for (i = ndim - 1; i > -1; i--)
+            {
+                // This dimension is finished.
+                if (start[i] + count[i] == sel->u.bb.start[i] + sel->u.bb.count[i])
+                {
+                    start[i] = sel->u.bb.start[i];
+                }
+                else
+                {
+                    start[i] += count[i];
+                    break;
+                }
+            }
+
+            if (i == -1)
+            {
+                done = 1;
+            }
+
+            newreq->varid = r->varid;
+            newreq->from_steps = r->from_steps;
+            newreq->nsteps = r->nsteps;
+            newreq->data = r->data;
+            newreq->datasize = type_size;
+            for (i = 0; i < ndim; i++)
+            {
+                newreq->datasize *= count[i];
+            }
+
+            newreq->priv = r->priv;
+            newreq->next = 0;
+
+            list_insert_read_request_next (&h, newreq);
+
+            // all dimensions are finished and we are done
+            if (done)
+            {
+                break;
+            }
+        }
+    }
+    else if (sel->type == ADIOS_SELECTION_POINTS)
+    {
+        remain = sel->u.points.npoints;
+        while (remain)
+        {
+            read_request * newreq = (read_request *) malloc (sizeof (read_request));
+            assert (newreq);
+
+            newreq->sel = (ADIOS_SELECTION *) malloc (sizeof (ADIOS_SELECTION));
+            assert (newreq->sel);
+            newreq->sel->type = ADIOS_SELECTION_POINTS;
+            newreq->sel->u.points.ndim = sel->u.points.ndim;
+            newreq->sel->u.points.npoints = (remain > n_elements ? n_elements : remain);
+            newreq->sel->u.points.points = malloc (newreq->sel->u.points.npoints * newreq->sel->u.points.ndim * 8);
+            assert (newreq->sel->u.points.points);
+            memcpy (newreq->sel->u.points.points, 
+                    sel->u.points.points + (sel->u.points.npoints - remain) * sel->u.points.ndim,
+                    newreq->sel->u.points.npoints * sel->u.points.ndim * 8
+                   );
+  
+            newreq->varid = r->varid;
+            newreq->from_steps = r->from_steps;
+            newreq->nsteps = r->nsteps;
+            newreq->data = r->data;
+            newreq->datasize = type_size * newreq->sel->u.points.npoints;
+            newreq->priv = r->priv;
+            newreq->next = 0;
+
+            list_insert_read_request_next (&h, newreq);
+
+            remain -= n_elements;
+        }
+    }
+    else if (sel->type == ADIOS_SELECTION_WRITEBLOCK)
+    {
+
+    }
+
+    return h;
+}
+
+int adios_read_bp_check_reads (const ADIOS_FILE * fp, ADIOS_VARCHUNK ** chunk)
+{
+    BP_PROC * p;
+    read_request * r;
+    ADIOS_VARCHUNK * varchunk;
+    int type_size;
+/*
+ *  RETURN:         0: all chunks have been returned previously, 
+ *                     no need to call again (chunk is NULL, too)
+ *                  1: some chunks are/will be available, call again
+ *                  <0 on error, sets adios_errno too
+ */
+    log_debug ("adios_read_bp_check_reads()\n");
+    p = (struct BP_PROC *) fp->fh;
+
+    if (!p->local_read_request_list)
+    {
+        return 0;
+    }
+
+    // if memory is pre-allocated
+    if (p->local_read_request_list->data)
+    {
+        log_debug ("adios_read_bp_check_reads(): memory is pre-allocated\n");
+        varchunk = read_var (fp, p->local_read_request_list);
+
+        if (varchunk)
+        {
+            // remove head from list
+            r = p->local_read_request_list;
+            p->local_read_request_list = p->local_read_request_list->next;
+            free(r);
+
+            * chunk = varchunk;
+            return 1;
+        }
+        else
+        {
+            return adios_errno;
+        }
+    }
+    else // if memory is not pre-allocated
+    {
+        log_debug ("adios_read_bp_check_reads(): memory is not pre-allocated\n");
+        // memory is large enough to contain the data
+        if (chunk_buffer_size >= p->local_read_request_list->datasize)
+        {
+            log_debug ("adios_read_bp_check_reads(): memory is large enough to contain the data (%d)\n",
+                       p->local_read_request_list->datasize);
+            assert (p->local_read_request_list->datasize);
+            p->b = realloc (p->b, p->local_read_request_list->datasize);
+            p->local_read_request_list->data = p->b;
+
+            varchunk = read_var (fp, p->local_read_request_list);
+
+            if (varchunk)
+            {
+                // remove head from list
+                r = p->local_read_request_list;
+                p->local_read_request_list = p->local_read_request_list->next;
+                free(r);
+
+                * chunk = varchunk;
+                return 1;
+            }
+            else
+            {
+                return adios_errno;
+            }
+        }
+        else // memory is smaller than what it takes to read the entire thing in.
+        {
+            log_debug ("adios_read_bp_check_reads(): memory is not large enough to contain the data (%d)\n",
+                       p->local_read_request_list->datasize);
+            read_request * subreqs = split_req (fp, p->local_read_request_list, chunk_buffer_size);
+            assert (subreqs);
+
+            // remove head from list
+            r = p->local_read_request_list;
+            p->local_read_request_list = p->local_read_request_list->next;
+            free(r);
+
+            r = subreqs;
+            while (r->next)
+            {
+                r = r->next;
+            }
+
+            r->next = p->local_read_request_list;
+            p->local_read_request_list = subreqs;
+
+            p->b = realloc (p->b, p->local_read_request_list->datasize);
+            p->local_read_request_list->data = p->b;
+
+            varchunk = read_var (fp, p->local_read_request_list);
+
+            if (varchunk)
+            {
+                // remove head from list
+                r = p->local_read_request_list;
+                p->local_read_request_list = p->local_read_request_list->next;
+                free(r);
+
+                * chunk = varchunk;
+                return 1;
+            }
+            else
+            {
+                return adios_errno;
+            }
+        } 
+    }
+
+    return 0;
+}
+
+int adios_read_bp_get_attr_byid (const ADIOS_FILE * fp, int attrid, enum ADIOS_DATATYPES * type, int * size, void ** data)
+{
+    int i, offset, count;
+    struct BP_GROUP * gh;
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    struct adios_index_attribute_struct_v1 * attr_root;
+    struct adios_index_var_struct_v1 * var_root, * v1;
+    int file_is_fortran, last_step = fp->last_step, show_hidden_attrs;
+    uint64_t k, attr_c_index, var_c_index;
+
+    adios_errno = 0;
+
+    show_hidden_attrs = 0;
+    for (i = 0; i < fp->nattrs; i++)
+    {
+        if (strstr (fp->attr_namelist[i], "__adios__"))
+        {
+            show_hidden_attrs = 1;
+            break;
+        }
+    }
+
+    attr_root = fh->attrs_root; /* need to traverse the attribute list of the group */
+    i = 0;
+
+    if (show_hidden_attrs)
+    {
+        while (i < attrid && attr_root)
+        {
+            i++;
+            attr_root = attr_root->next;
+        }
+    }
+    else
+    {
+        while (i < attrid && attr_root)
+        {
+            if (strstr (attr_root->attr_path, "__adios__"))
+            {
+            }
+            else
+            {
+                i++;
+            }
+
+            attr_root = attr_root->next;
+        }
+
+        while (attr_root && strstr (attr_root->attr_path, "__adios__"))
+        {
+            attr_root = attr_root->next;
+        }
+    }
+
+    assert (attr_root);
+
+    if (i != attrid)
+    {
+        adios_error (err_corrupted_attribute, "Attribute id=%d is valid but was not found in internal data structures!\n",attrid);
+        return adios_errno;
+    }
+
+    /* Look for the last step because some of the hidden attributes, such as last update time,
+     * make sense for the most recent value. 07/2011 - Q.Liu
+     */
+
+    attr_c_index = -1;
+    for (k = 0; k < attr_root->characteristics_count; k++)
+    {
+        if (attr_root->characteristics[k].time_index - 1 == last_step)
+        {
+            attr_c_index = k;
+            break;
+        } 
+    }
+
+    if (attr_c_index == -1)
+    {
+        log_debug ("adios_read_bp_get_attr_byid: cannot find step : %d\n", last_step);
+        attr_c_index = 0;
+    }
+
+    file_is_fortran = is_fortran_file (fh);
+
+    // check the last version
+    if (attr_root->characteristics[attr_c_index].value)
+    {
+        /* Attribute has its own value */
+        *size = bp_get_type_size (attr_root->type, attr_root->characteristics[attr_c_index].value);
+        *type = attr_root->type;
+        *data = (void *) malloc (*size);
+        assert (*data);
+       
+        memcpy(*data, attr_root->characteristics[attr_c_index].value, *size);
+    }
+    else if (attr_root->characteristics[attr_c_index].var_id)
+    {
+        /* Attribute is a reference to a variable */
+        /* FIXME: var ids are not unique in BP. If a group of variables are written several
+           times under different path using adios_set_path(), the id of a variable is always
+           the same (should be different). As a temporary fix, we look first for a matching
+           id plus path between an attribute and a variable. If not found, then we look for
+           a match on the ids only.*/
+        var_root = fh->vars_root;
+        while (var_root)
+        {
+            if (var_root->id == attr_root->characteristics[attr_c_index].var_id
+               && !strcmp(var_root->var_path, attr_root->attr_path)
+               && !strcmp(var_root->group_name, attr_root->group_name)
+               )
+                break;
+            var_root = var_root->next;
+        }
+
+        if (!var_root)
+        {
+            var_root = fh->vars_root;
+            while (var_root)
+            {
+                if (var_root->id == attr_root->characteristics[attr_c_index].var_id
+                   && !strcmp(var_root->group_name, attr_root->group_name))
+                    break;
+                var_root = var_root->next;
+            }
+        }
+
+        if (!var_root)
+        {
+            var_root = fh->vars_root;
+            while (var_root)
+            {
+                if (var_root->id == attr_root->characteristics[attr_c_index].var_id)
+                    break;
+                var_root = var_root->next;
+            }
+        }
+
+        if (!var_root)
+        { 
+            adios_error (err_invalid_attribute_reference,
+                   "Attribute %s/%s in group %s is a reference to variable ID %d, which is not found\n",
+                   attr_root->attr_path, attr_root->attr_name, attr_root->group_name,
+                   attr_root->characteristics[attr_c_index].var_id);
+            return adios_errno;
+        }
+
+        /* default values in case of error */
+        *data = NULL;
+        *size = 0;
+        *type = attr_root->type;
+
+        var_c_index = -1;
+        for (k = 0; k < var_root->characteristics_count; k++)
+        {
+            if (var_root->characteristics[k].time_index - 1 == last_step)
+            {
+                var_c_index = k;
+                break;
+            }
+        }
+
+        if (var_c_index == -1)
+        {
+            var_c_index = 0;
+            log_debug ("adios_read_bp_get_attr_byid: cannot find step : %d\n", last_step);
+        }
+        /* FIXME: variable and attribute type may not match, then a conversion is needed. */
+        /* Cases:
+                1. attr has no type, var is byte array     ==> string
+                2. attr has no type, var is not byte array ==> var type
+                3. attr is string, var is byte array       ==> string
+                4. attr type == var type                   ==> var type 
+                5. attr type != var type                   ==> attr type and conversion needed 
+        */
+        /* Error check: attr cannot reference an array in general */
+        if (var_root->characteristics[var_c_index].dims.count > 0)
+        {
+            if ( (var_root->type == adios_byte || var_root->type == adios_unsigned_byte) &&
+                 (attr_root->type == adios_unknown || attr_root->type == adios_string) &&
+                 (var_root->characteristics[var_c_index].dims.count == 1))
+            {
+                 ; // this conversions are allowed
+            }
+            else
+            {
+                adios_error (err_invalid_attribute_reference,
+                    "Attribute %s/%s in group %s, typeid=%d is a reference to an %d-dimensional array variable "
+                    "%s/%s of type %s, which is not supported in ADIOS\n",
+                    attr_root->attr_path, attr_root->attr_name, attr_root->group_name, attr_root->type,
+                    var_root->characteristics[var_c_index].dims.count,
+                    var_root->var_path, var_root->var_name, common_read_type_to_string(var_root->type));
+                return adios_errno;
+            }
+        }
+
+        if ( (attr_root->type == adios_unknown || attr_root->type == adios_string) &&
+             (var_root->type == adios_byte || var_root->type == adios_unsigned_byte) &&
+             (var_root->characteristics[var_c_index].dims.count == 1) )
+        {
+            /* 1D byte arrays are converted to string */
+            /* 1. read in variable */
+            char varname[512];
+            char *tmpdata;
+            ADIOS_VARCHUNK *vc;
+            read_request * r;
+            uint64_t start, count;
+            int status, varid = 0;
+            v1 = fh->vars_root;
+            while (v1 && v1 != var_root)
+            {
+                v1 = v1->next;
+                varid++;
+            }
+
+            start = 0;
+            count = var_root->characteristics[var_c_index].dims.dims[0];
+            snprintf(varname, 512, "%s/%s", var_root->var_path, var_root->var_name);
+            tmpdata = (char *) malloc (count+1);
+            assert (tmpdata);
+
+            r = (read_request *) malloc (sizeof (read_request));
+            assert (r);
+
+            r->sel = (ADIOS_SELECTION *) malloc (sizeof (ADIOS_SELECTION));
+            r->sel->type = ADIOS_SELECTION_BOUNDINGBOX;
+            r->sel->u.bb.ndim = 1;
+            r->sel->u.bb.start = &start;
+            r->sel->u.bb.count = &count;
+            r->varid = varid;
+            r->from_steps = fp->last_step;
+            r->nsteps = 1;
+            r->data = tmpdata;
+            r->datasize = count;
+            r->priv = 0;
+            r->next = 0;
+
+            vc = read_var_bb (fp, r);
+
+            free (r->sel);
+            free (r);
+      
+            if (vc == 0)
+            {
+                char *msg = strdup(adios_get_last_errmsg());
+                adios_error ((enum ADIOS_ERRCODES) adios_errno,
+                      "Cannot read data of variable %s/%s for attribute %s/%s of group %s: %s\n",
+                      var_root->var_path, var_root->var_name,
+                      attr_root->attr_path, attr_root->attr_name, attr_root->group_name,
+                      msg);
+                free(tmpdata);
+                free(msg);
+                return adios_errno;
+            }
+
+            *type = adios_string;
+            if (file_is_fortran)
+            {
+                /* Fortran byte array to C string */
+                *data = futils_fstr_to_cstr( tmpdata, (int)count); /* FIXME: supports only 2GB strings... */
+                *size = strlen( (char *)data );
+                free(tmpdata);
+            }
+            else
+            {
+                /* C array to C string */
+                tmpdata[count] = '\0';
+                *size = count+1;
+                *data = tmpdata;
+            }
+ 
+            free (vc->sel);
+            free (vc);
+        }
+        else
+        {
+            /* other types are inherited */
+            *type = var_root->type;
+            *size = bp_get_type_size (var_root->type, var_root->characteristics[var_c_index].value);
+            *data = (void *) malloc (*size);
+            assert (*data);
+            memcpy(*data, var_root->characteristics[var_c_index].value, *size);
+        }
+    }
+
+    return 0;
+}
+
+void adios_read_bp_reset_dimension_order (const ADIOS_FILE *fp, int is_fortran)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *)(p->fh);
+    struct bp_index_pg_struct_v1 ** root = &(fh->pgs_root);
+    struct bp_minifooter * mh = &(fh->mfooter);
+    uint64_t i;
+
+    for (i = 0; i < mh->pgs_count; i++) {
+        is_fortran ? ((*root)->adios_host_language_fortran = adios_flag_yes) 
+               : ((*root)->adios_host_language_fortran = adios_flag_no);
+        root = &(*root)->next;
+    }
+}
+
+void adios_read_bp_get_groupinfo (const ADIOS_FILE *fp, int *ngroups, char ***group_namelist, int **nvars_per_group, int **nattrs_per_group)
+{
+    BP_PROC * p;
+    BP_FILE * fh;
+    int i, j, k, offset;
+
+    p = (BP_PROC *) fp->fh;
+    fh = (BP_FILE *) p->fh;
+
+    * ngroups = fh->gvar_h->group_count;
+
+    alloc_namelist (group_namelist, fh->gvar_h->group_count);
+    for (i = 0; i < fh->gvar_h->group_count; i++)
+    {
+        (*group_namelist)[i] = malloc (strlen (fh->gvar_h->namelist[i]) + 1);
+        assert ((*group_namelist)[i]);
+
+        memcpy ((*group_namelist)[i], fh->gvar_h->namelist[i], strlen (fh->gvar_h->namelist[i]) + 1);
+    }
+
+    * nvars_per_group = (int *) malloc (fh->gvar_h->group_count * sizeof (int));
+    assert (* nvars_per_group);
+
+    for (i = 0; i < fh->gvar_h->group_count; i++)
+    {
+        (* nvars_per_group)[i] = fh->gvar_h->var_counts_per_group[i];
+    }
+
+    * nattrs_per_group = (int *) malloc (fh->gattr_h->group_count * sizeof (int));
+    assert (* nattrs_per_group);
+
+    for (i = 0; i < fh->gvar_h->group_count; i++)
+    {
+        offset = 0;
+        for (j = 0; j < i; j++)
+        {
+            offset += fh->gattr_h->attr_counts_per_group[j];
+        }
+
+        (* nattrs_per_group)[i] = 0;
+        for (j = 0; j < fh->gattr_h->attr_counts_per_group[i]; j++)
+        {
+            if (!show_hidden_attrs && strstr (fh->gattr_h->attr_namelist[offset + j], "__adios__"))
+            {
+            }
+            else
+            {
+                (* nattrs_per_group)[i] ++;
+            }
+        }
+    }
+
+    return;
+}
+
+/* Check if a variable is timed. This is solely done by checking whether
+ * a variable is tagged with time in XML.
+ */
+int adios_read_bp_is_var_timed (const ADIOS_FILE *fp, int varid)
+{
+    BP_PROC * p;
+    BP_FILE * fh;
+    struct adios_index_var_struct_v1 * v;
+    struct adios_index_characteristic_struct_v1 ch;
+    int retval = 0, ndim, k, dummy, file_is_fortran;
+    uint64_t gdims[32];
+
+    p = (BP_PROC *) fp->fh;
+    fh = (BP_FILE *) p->fh;
+
+    v = bp_find_var_byid (fh, varid);
+    ch = v->characteristics[0];
+    ndim = ch.dims.count; //ndim possibly has 'time' dimension
+
+    log_debug ("adios_read_bp_is_var_timed: varid = %d, ndim = %d\n", varid, ndim);
+
+    if (ndim == 0)
+    {
+        return 0;
+    }
+
+    for (k = 0; k < ndim; k++)
+    {
+        gdims[k] = ch.dims.dims[k * 3 + 1];
+    }
+/*
+    if (is_fortran_file (fh))
+    {
+        swap_order (ndim, gdims, &dummy);
+    }
+*/
+    if (gdims[ndim - 1] == 0) // with time
+    {
+        if (v->characteristics_count <= 1) {
+            // a local array written once
+            retval = 0;
+        } else {
+            retval = 1;
+        }
+        /* FIXME: This last test tests if the last l:g:o is only an 'l'.
+           This is true for a variable over time but also 
+           true for a 1D local array (which has no global dimension)
+           The characteristics_count is 1 only if the local array is written
+           from one process and only at one timestep.
+           How do we identify local arrays written from many processes?
+           And local arrays written several times?
+        */
+    }
+
+    log_debug ("%s is_var_timed: = %d\n", v->var_name, retval);
+
+    return retval;
+}
+
+/* Since ADIOS internal use "time" instead of step, this
+ * routine convers a step to time.
+ */
+static int adios_step_to_time (const ADIOS_FILE * fp, int varid, int from_steps)
+{
+    BP_PROC * p;
+    BP_FILE * fh;
+    struct adios_index_var_struct_v1 * v;
+    int mapped_varid, time, t;
+
+    adios_errno = 0;
+
+    p = (BP_PROC *)fp->fh;
+    fh = (BP_FILE *)p->fh;
+
+    mapped_varid = p->varid_mapping[varid];
+    v = bp_find_var_byid (fh, mapped_varid);
+
+    t = fp->current_step + from_steps;
+    if (!p->streaming)
+    {
+        time = get_time (v, t);
+    }
+    else
+    {
+        time = t + 1;
+    }
+
+    return time;
+}
+
+static int map_req_varid (const ADIOS_FILE * fp, int varid)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+
+    return p->varid_mapping[varid];
+}
+
+/* This routine converts the write block index, which is of a particular step,
+ * to the adios internal PG index. 
+ */
+static int adios_wbidx_to_pgidx (const ADIOS_FILE * fp, read_request * r)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    int time, start_idx, stop_idx, c, idx;
+    int mapped_varid, ridx;
+    struct adios_index_var_struct_v1* v;
+
+    if (r->sel->type != ADIOS_SELECTION_WRITEBLOCK)
+    {
+        return -1;
+    }
+
+    time = adios_step_to_time (fp, r->varid, r->from_steps);
+    mapped_varid = map_req_varid (fp, r->varid); 
+    v = bp_find_var_byid (fh, mapped_varid);
+
+    start_idx = get_var_start_index (v, time);
+    stop_idx = get_var_stop_index (v, time);
+    if (start_idx < 0 || stop_idx < 0)
+    {
+        adios_error (err_no_data_at_timestep,
+                     "No data at step %d\n",
+                     r->from_steps);
+    }
+
+    ridx =  r->sel->u.block.index;
+    c = -1;
+    idx = start_idx;
+    while (idx <= stop_idx)
+    {
+        if (v->characteristics[idx].time_index == time)
+        {
+            c++;
+        }
+
+        if (c < ridx)
+        {
+            idx++;
+        }
+        else
+        {
+            break;
+        }
+    }
+
+    if (c != ridx)
+    {
+        log_debug ("Error in adios_wbidx_to_pgidx().\n");
+    }
+
+    return idx;
+}
+
+/* This routine reads a write block. The 'index' value in the selection is
+ * the block index within the context of the current step. Therefore, we
+ * need to translate it to an absolute index.
+ */
+static ADIOS_VARCHUNK * read_var_wb (const ADIOS_FILE * fp, read_request * r)
+{
+    BP_PROC * p = (BP_PROC *)fp->fh;
+    BP_FILE * fh = (BP_FILE *)p->fh;;
+    struct adios_index_var_struct_v1 * v;
+    int i, j, k, t, varid, start_idx, stop_idx, idx, c;
+    int ndim, time, has_subfile, file_is_fortran;
+    uint64_t size, * dims;
+    uint64_t ldims[32], gdims[32], offsets[32], datasize;
+    int is_global = 0, size_of_type;
+    uint64_t slice_offset, slice_size;
+    void * data;
+    ADIOS_VARCHUNK * chunk;
+    MPI_Status status;
+
+    adios_errno = 0;
+
+    file_is_fortran = is_fortran_file (fh);
+    has_subfile = has_subfiles (fh);
+    data = r->data;
+    varid = map_req_varid (fp, r->varid);
+    v = bp_find_var_byid (fh, varid);
+    time = adios_step_to_time (fp, r->varid, r->from_steps);
+    idx = adios_wbidx_to_pgidx (fp, r);
+    assert (idx >= 0);
+
+    ndim = v->characteristics [idx].dims.count;
+    size_of_type = bp_get_type_size (v->type, v->characteristics [idx].value);
+
+    if (ndim == 0)
+    {
+        r->datasize = size_of_type;
+        slice_size = size_of_type;
+        start_idx = 0; // OPS macros below need it
+
+        if (v->type == adios_string)
+        {
+            size_of_type--;
+        }
+
+        slice_offset = v->characteristics[idx].payload_offset;
+
+        if (!has_subfile)
+        {
+            MPI_FILE_READ_OPS1
+        }
+        else
+        {
+            MPI_FILE_READ_OPS2
+        }
+
+        memcpy((char *)data, fh->b->buff + fh->b->offset, size_of_type);
+
+        if (fh->mfooter.change_endianness == adios_flag_yes)
+        {
+            change_endianness ((char *)data,
+                               size_of_type,
+                               v->type
+                              );
+        }
+
+        if (v->type == adios_string)
+        {
+            ((char*)data)[size_of_type] = '\0';
+        }
+    }
+    else
+    {
+        slice_size = size_of_type;
+
+        /* To get ldims for the chunk and then calculate payload size */
+        bp_get_dimension_characteristics (&(v->characteristics[idx]),
+                                         ldims, gdims, offsets);
+
+        for (j = 0; j < ndim; j++)
+        {
+            slice_size *= ldims [j];
+        }
+
+        r->datasize = slice_size;
+        /* Note: MPI_FILE_READ_OPS1 - for reading single BP file.
+         *       MPI_FILE_READ_OPS2 - for reading those with subfiles.
+         * Whenever to use OPS macro, start_idx and idx variable needs to be
+         * properly set.
+         */
+        start_idx = 0;
+        slice_offset = v->characteristics[idx].payload_offset;
+
+        if (!has_subfile)
+        {
+            MPI_FILE_READ_OPS1
+        }
+        else
+        {
+            MPI_FILE_READ_OPS2
+        }
+
+        memcpy ((char *)data, fh->b->buff + fh->b->offset, slice_size);
+        if (fh->mfooter.change_endianness == adios_flag_yes)
+        {
+            change_endianness ((char *)data, slice_size, v->type);
+        }
+    }
+
+    chunk = (ADIOS_VARCHUNK *) malloc (sizeof (ADIOS_VARCHUNK));
+    assert (chunk);
+
+    chunk->varid = r->varid;
+    chunk->type = v->type;
+    chunk->sel = copy_selection (r->sel);
+    chunk->data = data;
+
+    return chunk;
+}
+
+#if 0
+// NCSU - Timer series analysis, correlation
+double adios_stat_cor (ADIOS_VARINFO * vix, ADIOS_VARINFO * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag)
+{
+    int i,j;
+
+    double avg_x = 0.0, avg_y = 0.0, avg_lag = 0.0;
+    double var_x = 0.0, var_y = 0.0, var_lag = 0.0;
+    double cov = 0;
+
+    if (vix == NULL)
+    {
+        fprintf(stderr, "Variable not defined\n");
+        return 0;
+    }
+
+    // If the vix and viy are not time series objects, return.
+    if ((vix->timedim < 0) && (viy->timedim < 0))
+    {             
+        fprintf(stderr, "Covariance must involve timeseries data\n");
+        return 0;
+    }                                                                    
+
+    uint32_t min = vix->dims[0] - 1;
+    if (viy && (min > viy->dims[0] - 1))
+        min = viy->dims[0] - 1;         
+    
+    if(time_start == 0 && time_end == 0) 
+    { //global covariance
+        if(viy == NULL) {
+            fprintf(stderr, "Must have two variables for global covariance\n");
+            return 0;
+        }                                                                          
+
+        // Assign vix to viy, and calculate covariance
+        viy = vix;
+        time_start = 0;
+        time_end = min;
+    }
+    // Check the bounds of time
+    if (    (time_start >= 0) && (time_start <= min)
+            &&      (time_end >= 0)   && (time_end <= min)
+            &&  (time_start <= time_end))
+    {
+        if(viy == NULL) //user must want to run covariance against itself
+        {
+            if(! (time_end+lag) > min)
+            {                                                                        
+                fprintf(stderr, "Must leave enough timesteps for lag\n");
+                return 0;
+            }
+
+            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (adios_double, vix->avgs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (adios_double, vix->avgs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (adios_double, vix->avgs[i]); 
+                    double val_lag = bp_value_to_double (adios_double, vix->avgs[i + lag]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (adios_double, vix->std_devs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (adios_double, vix->std_devs[i]);
+                    double val_lag = bp_value_to_double (adios_double, vix->std_devs[i + lag]);
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1);
+                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (vix->type, vix->mins[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (vix->type, vix->mins[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (vix->type, vix->mins[i]); 
+                    double val_lag = bp_value_to_double (vix->type, vix->mins[i + lag]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (vix->type, vix->maxs[i]); 
+                    double val_lag = bp_value_to_double (vix->type, vix->maxs[i + lag]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
+                }
+            }
+            else
+            {
+                fprintf (stderr, "Unknown characteristic\n");
+                return 0;
+            }
+            return cov / (sqrt (var_x) * sqrt (var_lag));
+        }
+        else
+        {
+            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(adios_double, vix->avgs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(adios_double, viy->avgs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (adios_double, vix->avgs[i]); 
+                    double val_y = bp_value_to_double (adios_double, viy->avgs[i]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(adios_double, viy->std_devs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (adios_double, vix->std_devs[i]);
+                    double val_y = bp_value_to_double (adios_double, viy->std_devs[i]);
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1);
+                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(vix->type, vix->mins[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(viy->type, viy->mins[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (vix->type, vix->mins[i]); 
+                    double val_y = bp_value_to_double (viy->type, viy->mins[i]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(vix->type, viy->maxs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    double val_x = bp_value_to_double (vix->type, vix->maxs[i]); 
+                    double val_y = bp_value_to_double (viy->type, viy->maxs[i]); 
+                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
+                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
+                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else
+            {
+                fprintf (stderr, "Unknown characteristic\n");
+                return 0;
+            }
+            return cov / (sqrt (var_x) * sqrt (var_y));
+        }
+    }
+    else
+    {
+        fprintf (stderr, "Time values out of bounds\n");
+        return 0;
+    }
+}
+
+// NCSU - Time series analysis, covariance
+//covariance(x,y) = sum(i=1,..N) [(x_1 - x_mean)(y_i - y_mean)]/N
+double adios_stat_cov (ADIOS_VARINFO * vix, ADIOS_VARINFO * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag)
+{
+    int i,j;
+
+    double avg_x = 0.0, avg_y = 0.0, avg_lag = 0.0;
+    double cov = 0;
+
+    if (vix == NULL)
+    {
+        fprintf(stderr, "Variable not defined\n");
+        return 0;
+    }
+
+    // If the vix and viy are not time series objects, return.
+    if ((vix->timedim < 0) && (viy->timedim < 0))
+    {             
+        fprintf(stderr, "Covariance must involve timeseries data\n");
+        return 0;
+    }                                                                    
+
+    uint32_t min = vix->dims[0] - 1;
+    if (viy && (min > viy->dims[0] - 1))
+        min = viy->dims[0] - 1;         
+    
+    if(time_start == 0 && time_end == 0) 
+    { //global covariance
+        if(viy == NULL) {
+            fprintf(stderr, "Must have two variables for global covariance\n");
+            return 0;
+        }                                                                          
+
+        // Assign vix to viy, and calculate covariance
+        viy = vix;
+        time_start = 0;
+        time_end = min;
+    }
+    // Check the bounds of time
+    if (    (time_start >= 0) && (time_start <= min)
+            &&      (time_end >= 0)   && (time_end <= min)
+            &&  (time_start <= time_end))
+    {
+        if(viy == NULL) //user must want to run covariance against itself
+        {
+            if(! (time_end+lag) > min)
+            {                                                                        
+                fprintf(stderr, "Must leave enough timesteps for lag\n");
+                return 0;
+            }
+
+            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (adios_double, vix->avgs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (adios_double, vix->avgs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                    cov += (bp_value_to_double (adios_double, vix->avgs[i]) - avg_x) * (bp_value_to_double (adios_double, vix->avgs[i+lag]) - avg_lag) / (time_end - time_start + 1);
+            }
+            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (adios_double, vix->std_devs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                    cov += (bp_value_to_double (adios_double, vix->std_devs[i]) - avg_x) * (bp_value_to_double (adios_double, vix->std_devs[i+lag]) - avg_lag) / (time_end - time_start + 1);
+            }
+            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (vix->type, vix->mins[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (vix->type, vix->mins[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                    cov += (bp_value_to_double (vix->type, vix->mins[i]) - avg_x) * (bp_value_to_double (vix->type, vix->mins[i+lag]) - avg_lag) / (time_end - time_start + 1);
+            }
+            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double (vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                    avg_lag += bp_value_to_double (vix->type, vix->maxs[i + lag]) / (time_end - time_start + 1);
+                }
+
+                for (i = time_start; i <= time_end; i ++)
+                    cov += (bp_value_to_double (vix->type, vix->maxs[i]) - avg_x) * (bp_value_to_double (vix->type, vix->maxs[i+lag]) - avg_lag) / (time_end - time_start + 1);
+            }
+            else
+            {
+                fprintf (stderr, "Unknown characteristic\n");
+                return 0;
+            }
+        }
+        else
+        {
+            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(adios_double, vix->avgs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(adios_double, viy->avgs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    cov += (bp_value_to_double(adios_double, vix->avgs[i]) - avg_x) * (bp_value_to_double(adios_double, viy->avgs[i]) - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(adios_double, viy->std_devs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    cov += (bp_value_to_double(adios_double, vix->std_devs[i]) - avg_x) * (bp_value_to_double(adios_double, viy->std_devs[i]) - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(vix->type, vix->mins[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(viy->type, viy->mins[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    cov += (bp_value_to_double(vix->type, vix->mins[i]) - avg_x) * (bp_value_to_double(viy->type, viy->mins[i]) - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
+            {
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    avg_x += bp_value_to_double(vix->type, vix->maxs[i]) / (time_end - time_start + 1);
+                    avg_y += bp_value_to_double(vix->type, viy->maxs[i]) / (time_end - time_start + 1);
+                }
+                for (i = time_start; i <= time_end; i ++)
+                {
+                    cov += (bp_value_to_double(vix->type, vix->maxs[i]) - avg_x) * (bp_value_to_double(viy->type, viy->maxs[i]) - avg_y) / (time_end - time_start + 1);
+                }
+            }
+            else
+            {
+                fprintf (stderr, "Unknown characteristic\n");
+                return 0;
+            }
+        }
+    }
+    else
+    {
+        fprintf (stderr, "Time values out of bounds\n");
+    }
+    return cov;
+}
+#endif
diff --git a/src/read/read_bp_staged.c b/src/read/read_bp_staged.c
new file mode 100644
index 0000000..c0fdba0
--- /dev/null
+++ b/src/read/read_bp_staged.c
@@ -0,0 +1,2597 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ *
+ * Author: Qing Liu
+ */
+
+
+/******************************/
+/* A read method for BP files */
+/******************************/
+
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <pthread.h>
+#include <assert.h>
+#include <errno.h>
+#include "public/adios_types.h"
+#include "public/adios_read.h"
+#include "public/adios_error.h"
+#include "core/bp_utils.h"
+#include "core/bp_types.h"
+#include "core/adios_read_hooks.h"
+#include "core/futils.h"
+#include "core/common_read.h"
+#include "core/adios_logger.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+#define TAG_DATA 0
+
+static int chunk_buffer_size = -1;  // chunk size - must be set
+static int poll_interval = 10; // 10 secs by default
+static int show_hidden_attrs = 0; // don't show hidden attr by default
+static int num_aggregators = -1; // number of aggregator - must be set
+
+//private structure of BP_PROC
+typedef struct bp_proc_private_struct
+{
+    int rank;
+    int num_aggregators;
+    int new_rank;
+    int size;
+    int groups;
+    int group_size;
+    int group;
+    MPI_Comm group_comm;
+    MPI_Comm new_comm;
+    MPI_Comm new_comm2;
+    int aggregator_rank;
+    int aggregator_new_rank;
+    read_request * split_read_request_list;
+    int * aggregator_rank_array;
+} bp_proc_pvt_struct;
+
+//private structure of read_request
+typedef struct read_request_private
+{
+    int rank;
+    void * data;
+    int file_idx;
+    uint64_t offset;
+    void * parent;
+} rr_pvt_struct;
+
+static void read_buffer (const ADIOS_FILE * fp,
+                         uint64_t buffer_offset,
+                         read_request * r,
+                         read_request * s
+                        );
+
+static int isAggregator (BP_PROC * p)
+{
+    assert (p);
+
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+
+    return (pvt->rank == pvt->aggregator_rank);
+}
+
+static int rank_to_group_mapping (bp_proc_pvt_struct * pvt, int rank)
+{
+    int grp_size = pvt->size / pvt->groups;
+    int remain = pvt->size - grp_size * pvt->groups;
+    int g;
+
+    if (remain == 0)
+    {
+        g = rank / grp_size;
+    }
+    else
+    {
+        if (rank < (grp_size + 1) * remain)
+        {
+            g = rank / (grp_size + 1);
+        }
+        else
+        {
+            g = remain + (rank - (grp_size + 1) * remain) / grp_size;
+        }
+    }
+
+    return g;
+}
+
+static void buffer_write (void ** buffer, void * data, int size)
+{
+    memcpy (* buffer, data, size);
+    * buffer = (char *)* buffer + size;
+}
+
+// *****************************************************************************
+static void _buffer_write (char ** buffer, uint64_t * buffer_size
+                         ,uint64_t * buffer_offset
+                         ,const void * data, uint64_t size
+                         )
+{
+    if (*buffer_offset + size > *buffer_size || *buffer == 0)
+    {
+        char * b = realloc (*buffer, *buffer_offset + size + 1000);
+        if (b)
+        {
+            *buffer = b;
+            *buffer_size = (*buffer_offset + size + 1000);
+        }
+        else
+        {
+            fprintf (stderr, "Cannot allocate memory in buffer_write.  "
+                             "Requested: %llu\n", *buffer_offset + size + 1000);
+
+            return;
+        }
+    }
+
+    memcpy (*buffer + *buffer_offset, data, size);
+    *buffer_offset += size;
+}
+
+static void _buffer_write32 (char ** buffer, uint32_t * buffer_size
+                            ,uint32_t * buffer_offset
+                            ,const void * data, uint32_t size
+                            )
+{
+    if (*buffer_offset + size > *buffer_size || *buffer == 0)
+    {
+        char * b = realloc (*buffer, *buffer_offset + size + 1000);
+        if (b)
+        {
+            *buffer = b;
+            *buffer_size = (*buffer_offset + size + 1000);
+        }
+        else
+        {
+            fprintf (stderr, "Cannot allocate memory in buffer_write.  "
+                             "Requested: %u\n", *buffer_offset + size + 1000);
+
+            return;
+        }
+    }
+
+    memcpy (*buffer + *buffer_offset, data, size);
+    *buffer_offset += size;
+}
+
+// *****************************************************************************
+static void _buffer_read (char * buffer, uint64_t * buffer_offset
+                         ,void * data, uint64_t size
+                         )
+{
+    memcpy (data, buffer + *buffer_offset, size);
+    *buffer_offset += size;
+}
+
+static int calc_data_size (BP_PROC * p)
+{
+    int i, size = 0;
+    read_request * h = p->local_read_request_list;
+
+    // count
+    size += 4;
+
+    while (h)
+    {
+        // varid + from_steps, nsteps, ndim + start + count
+        size += 4 + 4 + 4 + 4 + h->sel->u.bb.ndim * (8 + 8) + 8 + 4 + 8;
+        h = h->next;
+    }
+
+    return size;
+}
+
+/**************************************************
+* Get the subfile index and associate data offset *
+***************************************************/
+static void get_data_addr (const ADIOS_FILE * fp, int varid,
+                           const read_request * r,
+                           int * file_idx,
+                           uint64_t * offset,
+                           uint64_t * payload_size
+                          )
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    struct adios_index_var_struct_v1 * v;
+    int i, j, k, idx, t;
+    int start_time, stop_time, start_idx, stop_idx, f_idx;
+    int ndim, time, has_subfile, file_is_fortran;
+    uint64_t size, * dims = 0;
+    uint64_t ldims[32], gdims[32], offsets[32];
+    uint64_t * start, * count;
+    int nsteps, is_global = 0, flag;
+
+    file_is_fortran = is_fortran_file (fh);
+    has_subfile = has_subfiles (fh);
+    v = bp_find_var_byid (fh, varid);
+
+    /* Get dimensions and flip if caller != writer language */
+    bp_get_and_swap_dimensions (fh, v, file_is_fortran,
+                                &ndim, &dims, &nsteps,
+                                file_is_fortran);
+
+    assert (ndim == r->sel->u.bb.ndim);
+
+    start = r->sel->u.bb.start;
+    count = r->sel->u.bb.count;
+
+    /* Note fp->current_step is always 0 for file mode. */
+    for (t = fp->current_step + r->from_steps;
+         t < fp->current_step + r->from_steps + r->nsteps; t++
+        )
+    {
+
+        if (!p->streaming)
+        {
+            time = get_time (v, t);
+        }
+        else
+        {
+            time = t + 1;
+        }
+
+        start_idx = get_var_start_index (v, time);
+        stop_idx = get_var_stop_index (v, time);
+
+        if (start_idx < 0 || stop_idx < 0)
+        {
+            adios_error (err_no_data_at_timestep,
+                         "Variable (id=%d) has no data at %d time step in %s\n",
+                         varid, t, __FUNCTION__);
+            continue;
+        }
+
+        if (ndim == 0)
+        {
+            /* THIS IS A SCALAR VARIABLE */
+            idx = 0;
+
+            * file_idx = v->characteristics[start_idx + idx].file_index;
+            * offset = v->characteristics[start_idx + idx].payload_offset;
+            * payload_size = bp_get_type_size (v->type,
+                                               v->characteristics[start_idx + idx].value);
+            return;
+        }
+
+         /* READ AN ARRAY VARIABLE */
+        int * idx_table = (int *) malloc (sizeof(int) * (stop_idx - start_idx + 1));
+
+        // loop over the list of pgs to read from one-by-one
+        for (idx = 0; idx < stop_idx - start_idx + 1; idx++)
+        {
+            idx_table[idx] = 1;
+            /* Each pg can have a different sized array, so we need the actual dimensions from it */
+            is_global = bp_get_dimension_characteristics_notime (&(v->characteristics[start_idx + idx]),
+                                                                 ldims,
+                                                                 gdims,
+                                                                 offsets,
+                                                                 file_is_fortran
+                                                                );
+            if (!is_global)
+            {
+                memcpy (gdims, ldims, ndim * 8);
+            }
+
+            for (j = 0; j < ndim; j++)
+            {
+                if ( (count[j] > gdims[j])
+                  || (start[j] > gdims[j])
+                  || (start[j] + count[j] > gdims[j]))
+                {
+                    adios_error (err_out_of_bound,
+                                 "Error: Variable (id=%d) out of bound ("
+                                 "the data in dimension %d to read is %llu elements from index %llu"
+                                 " but the actual data is [0,%llu])",
+                                 varid, j + 1, count[j], start[j], gdims[j] - 1);
+                    return;
+                }
+
+                /* check if there is any data in this pg and this dimension to read in */
+                flag = (offsets[j] >= start[j]
+                        && offsets[j] < start[j] + count[j])
+                    || (offsets[j] < start[j]
+                        && offsets[j] + ldims[j] > start[j] + count[j])
+                    || (offsets[j] + ldims[j] > start[j]
+                        && offsets[j] + ldims[j] <= start[j] + count[j]);
+
+                idx_table[idx] = idx_table[idx] && flag;
+            }
+
+            //FIXME
+            if (idx_table[idx])
+            {
+                free (idx_table);
+                if (dims)
+                {
+                    free (dims);
+                }
+
+                * file_idx = v->characteristics[start_idx + idx].file_index;
+                * offset = v->characteristics[start_idx + idx].payload_offset;
+                * payload_size = bp_get_type_size (v->type, v->characteristics[start_idx + idx].value);
+                for (j = 0; j < ndim; j++)
+                {
+                    * payload_size *= ldims[j];
+                }
+                return;
+            }
+        }
+
+        free (idx_table);
+/*
+        if (isTimeless (file_tdim))
+            break;
+*/
+    } // end for (timestep ... loop over timesteps
+
+    if (dims)
+    {
+        free (dims);
+    }
+}
+
+static void sort_read_requests (BP_PROC * p)
+{
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+    rr_pvt_struct * rr_r, * rr_t; 
+    int file_idx;
+    uint64_t offset;
+    read_request * r = pvt->split_read_request_list;
+    read_request * n = 0, * t, * t_prev, * next;
+    while (r)
+    {
+//printf ("[%d]: r->ra->offset = %llu\n", p->rank, r->ra->offset);
+        rr_r = (rr_pvt_struct *) r->priv;
+        t = n;
+        t_prev = 0;
+        next = r->next;
+
+        file_idx = rr_r->file_idx;
+        offset = rr_r->offset;
+
+        //while (t && t->ra->file_idx <= file_idx)
+        while (t)
+        {
+            rr_t = (rr_pvt_struct *) t->priv;
+            if (rr_t->file_idx > file_idx ||
+                (rr_t->file_idx == file_idx && rr_t->offset > offset)
+               )
+            {
+                break;
+            }
+
+            t_prev = t;
+            t = t->next;
+        }
+
+        if (!t_prev)
+        {
+            r->next = n;
+            n = r;
+        }
+        else
+        {
+            t_prev->next = r;
+            r->next = t;
+        }
+//if (p->rank == 1) list_print_readers (p, n);
+        r = next;
+    }
+
+    pvt->split_read_request_list = n;
+}
+
+static void send_read_data1 (BP_PROC * p)
+{
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+    void * data = 0;
+    uint64_t ds;
+    int i, counter = 0;
+    read_request * r = p->local_read_request_list;
+    rr_pvt_struct * rr_pvt;
+
+    while (r)
+    {
+        rr_pvt = (rr_pvt_struct *) r->priv;
+        assert (rr_pvt);
+
+        if (pvt->rank != rr_pvt->rank)
+        {
+            MPI_Send (r->data, r->datasize, MPI_BYTE
+                     ,rr_pvt->rank - pvt->aggregator_rank, TAG_DATA, pvt->new_comm
+                     );
+        }
+
+        r = r->next;
+    }
+}
+
+static void send_read_data (BP_PROC * p)
+{
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+    int g, i;
+    char * b = 0, * recv_buff = 0;
+    uint32_t offset = 0, buffer_size = 0;
+    int size, * sizes = 0, * offsets = 0;
+    read_request * r = p->local_read_request_list;
+    rr_pvt_struct * rr_pvt;
+
+    MPI_Comm_size (pvt->new_comm, &size);
+
+    sizes = (int *) malloc (size * 4);
+    offsets = (int *) malloc (size * 4);
+    assert (sizes);
+    assert (offsets);
+
+    for (i = 0; i < size; i++)
+    {
+        sizes[i] = 0;
+        offsets[i] = -1;
+    }
+
+    while (r)    {
+        rr_pvt = (rr_pvt_struct *) r->priv;
+        assert (rr_pvt);
+
+        g = rank_to_group_mapping (pvt, rr_pvt->rank);
+
+        /*  g == p->group       -> requests are from processors that belong to th
+e group
+            p->rank != r->rank  -> requests are NOT from aggregator itself
+        */
+
+        if (g == pvt->group && pvt->rank != rr_pvt->rank)
+        {
+            assert (r->data);
+
+            if (offsets[rr_pvt->rank - pvt->aggregator_rank] == -1)
+            {
+                offsets[rr_pvt->rank - pvt->aggregator_rank] = offset;
+            }
+
+            sizes[rr_pvt->rank - pvt->aggregator_rank] += r->datasize;
+
+            _buffer_write32 (&b, &buffer_size, &offset, r->data, r->datasize);
+
+            /* Free it immediately to avoid double buffering */
+            free (r->data);
+            r->data = 0;
+        }
+
+        r = r->next;
+    }
+
+    MPI_Scatterv (b, sizes, offsets, MPI_BYTE
+                 ,recv_buff, 0, MPI_BYTE
+                 ,0, pvt->new_comm
+                 );
+
+    free (b);
+    free (sizes);
+    free (offsets);
+}
+
+static void get_read_data1 (BP_PROC * p)
+{
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+    MPI_Status status;
+    read_request * r = p->local_read_request_list;
+
+    if (pvt->rank != pvt->aggregator_rank)
+    {
+        while (r)
+        {
+            MPI_Recv (r->data, r->datasize, MPI_BYTE
+                     ,MPI_ANY_SOURCE, MPI_ANY_TAG, pvt->new_comm
+                     ,&status
+                     );
+
+            r = r->next;
+        }
+    }
+}
+
+/* Receive read data from aggregator */
+static void get_read_data (BP_PROC * p)
+{
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+    char * b = 0, * recv_buff = 0;
+    int * sizes = 0, * offsets = 0;
+    int size = 0;
+    MPI_Status status;
+    read_request * r = p->local_read_request_list;
+
+    if (pvt->rank == pvt->aggregator_rank)
+    {
+        return;
+    }
+
+    r = p->local_read_request_list;
+    while (r)
+    {
+        size += r->datasize;
+        r = r->next;
+    }
+
+    recv_buff = malloc (size);
+    if (recv_buff == 0)
+    {
+        printf ("Warning: the size of data is 0\n");
+        return;
+    }
+
+    MPI_Scatterv (b, sizes, offsets, MPI_BYTE
+                 ,recv_buff, size, MPI_BYTE
+                 ,0, pvt->new_comm
+                 );
+
+    b = recv_buff;
+    r = p->local_read_request_list;
+    while (r)
+    {
+        memcpy (r->data, b, r->datasize);
+        b += r->datasize;
+
+        r = r->next;
+    }
+
+    free (recv_buff);
+}
+
+static void parse_buffer (BP_PROC * p, char * b, int src)
+{
+    read_request * h = p->local_read_request_list;
+    int i, j, type, count, varid, ndims, size = calc_data_size (p);
+    void * buf;
+    read_request * r;
+    rr_pvt_struct * rr_pvt;
+
+    // count
+    count = * (uint32_t *) b;
+    b += 4;
+
+    for (i = 0; i < count; i++)
+    {
+        r = (read_request *) malloc (sizeof (read_request));
+        assert (r);
+
+        rr_pvt = (rr_pvt_struct *) malloc (sizeof (rr_pvt_struct));
+        assert (rr_pvt);
+        r->priv = rr_pvt;
+
+        rr_pvt->rank = src;
+
+        r->varid = * (uint32_t *) b;
+        b += 4;
+
+        r->from_steps = * (int32_t *) b;
+        b += 4;
+
+        r->nsteps = * (int32_t *) b;
+        b += 4;
+
+        r->sel = (ADIOS_SELECTION *) malloc (sizeof (ADIOS_SELECTION));
+        assert (r->sel);
+
+        //FIXME: bb only for now
+        r->sel->type = ADIOS_SELECTION_BOUNDINGBOX;
+        r->sel->u.bb.ndim = * (uint32_t *) b;
+        b += 4;
+
+        r->sel->u.bb.start = (uint64_t *) malloc (r->sel->u.bb.ndim * 8);
+        r->sel->u.bb.count = (uint64_t *) malloc (r->sel->u.bb.ndim * 8);
+        assert (r->sel->u.bb.start);
+        assert (r->sel->u.bb.count);
+
+        memcpy (r->sel->u.bb.start, b, r->sel->u.bb.ndim * 8);
+        b += r->sel->u.bb.ndim * 8;
+
+        memcpy (r->sel->u.bb.count, b, r->sel->u.bb.ndim * 8);
+        b += r->sel->u.bb.ndim * 8;
+
+        r->datasize = * (uint64_t *) b;
+        b += 8;
+#if 0
+        rr_pvt->file_idx = * (uint32_t *) b;
+        b += 4;
+
+        rr_pvt->offset = * (uint64_t *) b;
+        b += 8;
+#endif
+        r->data = malloc (r->datasize);
+        assert (r->data);
+
+        // I am already a parent.
+        rr_pvt->parent = 0;
+
+        r->next = 0;
+
+        list_insert_read_request_tail (&p->local_read_request_list, r);
+    }
+}
+
+static read_request * split_read_requests (const ADIOS_FILE * fp, read_request * r)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    struct adios_index_var_struct_v1 * v;
+    int i, j, k, idx, t, varid, nsteps, time, dummy;
+    int start_time, stop_time, start_idx, stop_idx, f_idx;
+    int ndim, has_subfile, file_is_fortran;
+    uint64_t size, * dims = 0;
+    uint64_t ldims[32], gdims[32], offsets[32];
+    uint64_t * start, * count;
+    int is_global = 0, flag;
+    ADIOS_SELECTION * sel;
+    read_request * h = 0;
+    rr_pvt_struct * rr_pvt = (rr_pvt_struct *) r->priv;
+    assert (rr_pvt);
+
+    varid = r->varid;
+    sel = r->sel;
+    start = r->sel->u.bb.start;
+    count = r->sel->u.bb.count;
+    file_is_fortran = is_fortran_file (fh);
+    has_subfile = has_subfiles (fh);
+    v = bp_find_var_byid (fh, varid);
+
+    bp_get_and_swap_dimensions (fh, v, file_is_fortran,
+                                &ndim, &dims, &nsteps,
+                                file_is_fortran);
+
+    if (futils_is_called_from_fortran ())
+    {
+        swap_order (ndim, start, &dummy);
+        swap_order (ndim, count, &dummy);
+    }
+    for (t = fp->current_step + r->from_steps;
+         t < fp->current_step + r->from_steps + r->nsteps; t++
+        )
+    {
+        if (!p->streaming)
+        {
+            time = get_time (v, t);
+        }
+        else
+        {
+            time = t + 1;
+        }
+
+        start_idx = get_var_start_index (v, time);
+        stop_idx = get_var_stop_index (v, time);
+
+        if (start_idx < 0 || stop_idx < 0)
+        {
+            log_info ("Variable (id=%d) has no data at %d time step in %s\n",
+                      varid, t, __FUNCTION__);
+            continue;
+        }
+
+        if (ndim == 0)
+        {
+            /* THIS IS A SCALAR VARIABLE */
+            idx = 0;
+
+            read_request * n = (read_request *) malloc (sizeof (read_request));
+            assert (n);
+
+            rr_pvt_struct * n_pvt = (rr_pvt_struct *) malloc (sizeof (rr_pvt_struct));
+            assert (n_pvt);
+            n->priv = n_pvt;
+           
+            n->varid = r->varid;
+            n->from_steps = r->from_steps;
+            n->nsteps = r->nsteps;
+            n_pvt->rank = rr_pvt->rank;
+            n_pvt->file_idx = v->characteristics[start_idx + idx].file_index;
+            n_pvt->offset = v->characteristics[start_idx + idx].payload_offset;
+            n_pvt->parent = r;
+            n->sel->u.bb.ndim = 0;
+            n->sel->u.bb.start = 0;
+            n->sel->u.bb.count = 0;
+            n->next = 0;
+
+            list_insert_read_request_tail (&h, n);
+
+            continue;
+        }
+
+         /* READ AN ARRAY VARIABLE */
+        int * idx_table = (int *) malloc (sizeof(int) * (stop_idx - start_idx + 1));
+        // loop over the list of pgs to read from one-by-one
+        for (idx = 0; idx < stop_idx - start_idx + 1; idx++)
+        {
+            idx_table[idx] = 1;
+            is_global = bp_get_dimension_characteristics_notime (
+                            &(v->characteristics[start_idx + idx]),
+                            ldims,
+                            gdims,
+                            offsets,
+                            file_is_fortran
+                           );
+            if (!is_global)
+            {
+                memcpy (gdims, ldims, ndim * 8);
+            }
+/*
+            printf("ldims   = "); for (j = 0; j<ndim; j++) printf("%d ",ldims[j]); printf("\n");
+            printf("gdims   = "); for (j = 0; j<ndim; j++) printf("%d ",gdims[j]); printf("\n");
+            printf("offsets = "); for (j = 0; j<ndim; j++) printf("%d ",offsets[j]); printf("\n");
+*/
+            for (j = 0; j < ndim; j++)
+            {
+                if ( (count[j] > gdims[j])
+                  || (start[j] > gdims[j])
+                  || (start[j] + count[j] > gdims[j]))
+                {
+                    fprintf (stderr, "Error: Variable (id=%d, %s) out of bound ("
+                        "the data in dimension %d to read is %llu elements from index %llu"
+                        " but the actual data is [0,%llu])\n",
+                        varid, v->var_name, j + 1, count[j], start[j], gdims[j] - 1);
+                    return 0;
+                }
+
+                /* check if there is any data in this pg and this dimension to read in */
+                flag = (offsets[j] >= start[j]
+                        && offsets[j] < start[j] + count[j])
+                    || (offsets[j] < start[j]
+                        && offsets[j] + ldims[j] > start[j] + count[j])
+                    || (offsets[j] + ldims[j] > start[j]
+                        && offsets[j] + ldims[j] <= start[j] + count[j]);
+
+                idx_table[idx] = idx_table[idx] && flag;
+            }
+
+            if (!idx_table[idx])
+            {
+                continue;
+            }
+
+            /* determined how many (fastest changing) dimensions can we read in in one read */
+            int hole_break;
+            for (i = ndim - 1; i > -1; i--)
+            {
+                if (offsets[i] == start[i] && ldims[i] == count[i])
+                {
+                }
+                else
+                {
+                    break;
+                }
+            }
+
+            hole_break = i;
+
+            read_request * n = (read_request *) malloc (sizeof (read_request));
+            assert (n);
+
+            n->varid = r->varid;
+            n->from_steps = r->from_steps;
+            n->nsteps = r->nsteps;
+            n->sel = (ADIOS_SELECTION *) malloc (sizeof (ADIOS_SELECTION));
+            assert (n->sel);
+            //FIXME
+            n->sel->type = ADIOS_SELECTION_BOUNDINGBOX;
+            n->sel->u.bb.ndim = r->sel->u.bb.ndim;
+
+            n->sel->u.bb.start = (uint64_t *) malloc (ndim * 8);
+            assert (n->sel->u.bb.start);
+            n->sel->u.bb.count = (uint64_t *) malloc (ndim * 8);
+            assert (n->sel->u.bb.count);
+
+            memcpy (n->sel->u.bb.start, start, ndim * 8);
+            memcpy (n->sel->u.bb.count, count, ndim * 8);
+
+            n->priv = (rr_pvt_struct *) malloc (sizeof (rr_pvt_struct));
+            assert (n->priv);
+            rr_pvt_struct * nrr_pvt = (rr_pvt_struct *) n->priv;
+            
+            nrr_pvt->rank = ((rr_pvt_struct *) r->priv)->rank;;
+            nrr_pvt->file_idx = v->characteristics[start_idx + idx].file_index;
+            nrr_pvt->offset = v->characteristics[start_idx + idx].payload_offset;
+            nrr_pvt->parent = r;
+            n->next = 0;
+
+            if (hole_break == -1)
+            {
+            }
+            else if (hole_break == 0)
+            {
+                int isize;
+                uint64_t size_in_dset = 0;
+                uint64_t offset_in_dset = 0;
+
+                isize = offsets[0] + ldims[0];
+                if (start[0] >= offsets[0])
+                {
+                    // head is in
+                    if (start[0] < isize)
+                    {
+                        if (start[0] + count[0] > isize)
+                        {
+                            n->sel->u.bb.count[0] = isize - start[0];
+                        }
+                        else
+                        {
+                            n->sel->u.bb.count[0] = count[0];
+                        }
+                        n->sel->u.bb.start[0] = start[0];
+                    }
+                }
+                else
+                {
+                    // middle is in
+                    if (isize < start[0] + count[0])
+                    {
+                        n->sel->u.bb.count[0] = ldims[0];
+                    //    size_in_dset = ldims[0];
+                    }
+                    else
+                    {
+                    // tail is in
+                        n->sel->u.bb.count[0] = count[0] + start[0] - offsets[0];
+                    }
+                    n->sel->u.bb.start[0] = offsets[0];
+                    //offset_in_dset = 0;
+                }
+
+            }
+            else
+            {
+                uint64_t stride_offset = 0;
+                int isize;
+                uint64_t size_in_dset[10];
+                uint64_t offset_in_dset[10];
+                uint64_t offset_in_var[10];
+
+                memset(size_in_dset, 0 , 10 * 8);
+                memset(offset_in_dset, 0 , 10 * 8);
+                memset(offset_in_var, 0 , 10 * 8);
+
+                for (i = 0; i < ndim; i++)
+                {
+                    isize = offsets[i] + ldims[i];
+                    if (start[i] >= offsets[i])
+                    {
+                        // head is in
+                        if (start[i] < isize)
+                        {
+                            if (start[i] + count[i] > isize)
+                            {
+                                n->sel->u.bb.count[i] = isize - start[i];
+                            }
+                            else
+                            {
+                                n->sel->u.bb.count[i] = count[i];
+                            }
+                            n->sel->u.bb.start[i] = start[i];
+                            offset_in_var[i] = 0;
+                        }
+                    }
+                    else
+                    {
+                        // middle is in
+                        if (isize < start[i] + count[i])
+                        {
+                            n->sel->u.bb.count[i] = ldims[i];
+                        }
+                        else
+                        {
+                            // tail is in
+                            n->sel->u.bb.count[i] = count[i] + start[i] - offsets[i];
+                        }
+                        n->sel->u.bb.start[i] = offsets[i];
+                        //offset_in_dset[i] = 0;
+                        offset_in_var[i] = offsets[i] - start[i];
+                    }
+                }
+
+            }
+
+            n->datasize = bp_get_type_size (v->type, v->characteristics[start_idx + idx].value);
+            for (i = 0; i < ndim; i++)
+            {
+                n->datasize *= n->sel->u.bb.count[i];
+            }
+
+            list_insert_read_request_tail (&h, n);
+        }
+
+        free (idx_table);
+    } // end for (timestep ... loop over timesteps
+
+    if (dims)
+    {
+        free (dims);
+    }
+
+    if (!h)
+    {
+        fprintf (stderr, "v = %s\n", v->var_name);
+    }
+    assert (h);
+
+    return h;
+}
+
+static void process_read_requests (const ADIOS_FILE * fp)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+    
+    read_request * h = p->local_read_request_list, * n;
+
+    while (h)
+    {
+        n = split_read_requests (fp, h);
+
+        list_append_read_request_list (&pvt->split_read_request_list, n);
+
+        h = h->next;
+    }
+}
+
+static void read_chunk (const ADIOS_FILE * fp,
+                        int file_idx, 
+                        uint64_t chunk_offset, 
+                        uint64_t size
+                       )
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    MPI_File * sfh;
+    MPI_Status status;
+    int has_subfile;
+
+struct timeval t0, t1;
+gettimeofday (&t0, NULL);
+
+    has_subfile = has_subfiles (fh);
+
+    bp_realloc_aligned(fh->b, size);
+    fh->b->offset = 0;
+
+    if (has_subfile)
+    {
+        sfh = get_BP_file_handle (fh->sfh, file_idx);
+
+        if (!sfh)
+        {
+            int err;
+            char * ch, * name_no_path, * name;
+            struct BP_file_handle * new_h =
+                  (struct BP_file_handle *) malloc (sizeof (struct BP_file_handle));
+
+            new_h->file_index = file_idx;
+            new_h->next = 0;
+            if (ch = strrchr (fh->fname, '/'))
+            {
+                name_no_path = malloc (strlen (ch + 1) + 1);
+                strcpy (name_no_path, ch + 1);
+            }
+            else
+            {
+                name_no_path = malloc (strlen (fh->fname) + 1);
+                strcpy (name_no_path, fh->fname);
+            }
+
+            name = malloc (strlen (fh->fname) + 5 + strlen (name_no_path) + 1 + 10 + 1);
+            sprintf (name, "%s.dir/%s.%d", fh->fname, name_no_path, new_h->file_index);
+
+            err = MPI_File_open (MPI_COMM_SELF
+                                ,name
+                                ,MPI_MODE_RDONLY
+                                ,MPI_INFO_NULL
+                                ,&new_h->fh
+                                );
+            if (err != MPI_SUCCESS)
+            {
+                adios_error (err_file_open_error, "Can not open file %s\n", name);
+                return;
+            }
+
+            add_BP_file_handle (&fh->sfh, new_h);
+            sfh = &new_h->fh;
+
+            free (name_no_path);
+            free (name);
+        }
+
+        MPI_File_seek (*sfh
+                      ,(MPI_Offset)chunk_offset
+                      ,MPI_SEEK_SET
+                      );
+        MPI_File_read (*sfh
+                      ,fh->b->buff
+                      ,size
+                      ,MPI_BYTE
+                      ,&status
+                      );
+    }
+    else
+    {
+        MPI_File_seek (fh->mpi_fh
+                      ,(MPI_Offset)chunk_offset
+                      ,MPI_SEEK_SET
+                      );
+        MPI_File_read (fh->mpi_fh
+                      ,fh->b->buff
+                      ,size
+                      ,MPI_BYTE
+                      ,&status
+                      );
+    }
+
+    fh->b->offset = 0;
+
+    gettimeofday (&t1, NULL);
+
+//    printf ("read chunk time = %f \n", t1.tv_sec - t0.tv_sec + (double)(t1.tv_usec - t0.tv_usec)/1000000 );
+}
+
+/* 
+The read request link list needs to be sorted beforehand
+*/
+static void do_read (const ADIOS_FILE * fp)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+    void * data = 0;
+    int i, counter = 0;
+    int file_idx;
+    uint64_t offset, payload_size;
+struct timeval t0;
+struct timeval t1;
+double t2, t3, t4, t5;
+
+    read_request * s = pvt->split_read_request_list, * f_start = s, * f_end = s;
+    read_request * o_start = s, * o_end = s, * o_prev_end = 0, * parent = 0;
+
+    gettimeofday (&t0, NULL);
+
+    t2 = MPI_Wtime();
+
+    while (f_start)
+    {
+        f_end = f_start;
+
+        // Find a set of reqeusts that fall into the same file, i.e., [f_start, f_end)
+        while (f_end
+          && ((rr_pvt_struct *) f_end->priv)->file_idx == ((rr_pvt_struct *) f_start->priv)->file_idx)
+        {
+            f_end = f_end->next;
+        }
+
+        o_start = f_start;
+        o_end = f_start;
+        o_prev_end = 0;
+
+        while (o_start != f_end)
+        {
+            // Find a set of requests that fall into chunk size, i.e., [o_start, o_end)
+            while (o_end && o_end != f_end
+                  && ((rr_pvt_struct *) o_end->priv)->offset - ((rr_pvt_struct *)o_start->priv)->offset <= chunk_buffer_size)
+            {
+                o_prev_end = o_end;
+                o_end = o_end->next;
+            }
+
+            // Calculate the var payload size of the last request
+            get_data_addr (fp,
+                           o_prev_end->varid, 
+                           o_prev_end, 
+                           &file_idx, 
+                           &offset, 
+                           &payload_size
+                          );
+//printf ("o_start.offset = %llu\n", o_start->ra->offset);
+//printf ("o_prev_end.offset = %llu\n", o_prev_end->ra->offset);
+
+            t4 = MPI_Wtime ();
+            // read a chunk from file into internal buffer
+            read_chunk (fp, 
+                        ((rr_pvt_struct *) o_start->priv)->file_idx, 
+                        ((rr_pvt_struct *) o_start->priv)->offset, 
+                        ((rr_pvt_struct *) o_prev_end->priv)->offset
+                         - ((rr_pvt_struct *) o_start->priv)->offset + payload_size
+                       );
+
+            t5 = MPI_Wtime ();
+//    printf ("read chunk = %f \n", t5 - t4);
+
+            s = o_start;
+            do
+            {
+                parent = ((rr_pvt_struct *) s->priv)->parent;
+                // copy data from internal buffer to user buffer
+                read_buffer (fp, ((rr_pvt_struct *) o_start->priv)->offset, parent, s);
+
+                s = s->next;
+            } while (s != o_end);
+
+            o_start = o_end;
+            o_prev_end = 0;
+        }
+
+        f_start = f_end;
+    }
+
+    gettimeofday (&t1, NULL);
+    t3 = MPI_Wtime ();
+
+//    printf ("while time = %f \n", t1.tv_sec - t0.tv_sec + (double)(t1.tv_usec - t0.tv_usec)/1000000 );
+//    printf ("while time = %f \n", t3 - t2);
+}
+
+/* r - the original read rquest
+ * s - the read request as the result of spliting
+ */
+static void read_buffer (const ADIOS_FILE * fp,
+                         uint64_t buffer_offset,
+                         read_request * r,
+                         read_request * s
+                        )
+{
+#define MAX_DIMS 32
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    struct adios_index_var_struct_v1 * v;
+    uint64_t * s_start, * s_count;
+    uint64_t * start, * count;
+    int i, j, k, idx, t, time, ndim, dummy;
+    int varid, start_idx, stop_idx, has_subfile, file_is_fortran;
+    uint64_t ldims[MAX_DIMS], gdims[MAX_DIMS], offsets[MAX_DIMS];
+    uint64_t datasize, dset_stride, var_stride, total_size = 0, items_read;
+    int is_global = 0, size_unit, break_dim, idx_check1, idx_check2;
+    uint64_t slice_offset, slice_size;
+    void * data;
+
+    varid = r->varid;
+    v = bp_find_var_byid (fh, varid);
+    data = r->data;
+    start = r->sel->u.bb.start;
+    count = r->sel->u.bb.count;
+    s_start = s->sel->u.bb.start;
+    s_count = s->sel->u.bb.count;
+    file_is_fortran = is_fortran_file (fh);
+    has_subfile = has_subfiles (fh);
+    ndim = r->sel->u.bb.ndim;
+    size_unit = bp_get_type_size (v->type,
+                                  v->characteristics [0].value
+                                 );
+
+    /* We need to swap them here to read correctly in C order */
+    if (futils_is_called_from_fortran ())
+    {
+        swap_order (ndim, start, &dummy);
+        swap_order (ndim, count, &dummy);
+    }
+
+    for (i = 0, items_read = 1; i < ndim; i++)
+    {
+        items_read *= count[i];
+    }
+
+    /* For each timestep, do the reading separately.
+     * Note fp->current_step is always 0 for file mode.
+     */
+    for (t = fp->current_step + r->from_steps;
+         t < fp->current_step + r->from_steps + r->nsteps; t++
+        )
+    {
+        if (!p->streaming)
+        {
+            time = get_time (v, t);
+        }
+        else
+        {
+            time = t + 1;
+        }
+
+        start_idx = get_var_start_index (v, time);
+        stop_idx = get_var_stop_index (v, time);
+
+        if (start_idx < 0 || stop_idx < 0)
+        {
+            log_info ("Variable (id=%d) has no data at %d time step in %s\n",
+                      varid, t, __FUNCTION__
+                     );
+            continue;
+        }
+
+        if (ndim == 0)
+        {
+            /* READ A SCALAR VARIABLE */
+            slice_size = 1 * size_unit;
+            idx = 0;
+
+            if (v->type == adios_string)
+            {
+                // strings are stored without \0 in file
+                // size_of_type here includes \0 so decrease by one
+                size_unit--;
+            }
+
+            slice_offset = v->characteristics[start_idx + idx].payload_offset;
+
+            memcpy (data, fh->b->buff + slice_offset - buffer_offset, size_unit);
+            if (fh->mfooter.change_endianness == adios_flag_yes)
+            {
+                change_endianness (data, size_unit, v->type);
+            }
+
+            if (v->type == adios_string)
+            {
+                // add \0 to the end of string
+                // size_of_type here is the length of string
+                // FIXME: how would this work for strings written over time?
+                ((char *)data + total_size)[size_unit] = '\0';
+            }
+
+            total_size += size_unit;
+
+            continue;
+        }
+
+         /* READ AN ARRAY VARIABLE */
+        // loop over the list of pgs to read from one-by-one
+        for (idx = 0; idx < stop_idx - start_idx + 1; idx++)
+        {
+            int flag1, flag2;
+            uint64_t payload_size = size_unit;
+
+            datasize = 1;
+            var_stride = 1;
+            dset_stride = 1;
+            idx_check1 = 1;
+            idx_check2 = 1;
+            is_global = bp_get_dimension_characteristics_notime (
+                                    &(v->characteristics[start_idx + idx]),
+                                    ldims,
+                                    gdims,
+                                    offsets,
+                                    file_is_fortran
+                                   );
+
+            if (!is_global)
+            {
+                memcpy (gdims, ldims, ndim * 8);
+            }
+
+            for (j = 0; j < ndim; j++)
+            {
+                payload_size *= ldims [j];
+
+                if ( (count[j] > gdims[j])
+                  || (start[j] > gdims[j])
+                  || (start[j] + count[j] > gdims[j]))
+                {
+                    log_error ("Error: Variable (id=%d) out of bound ("
+                        "the data in dimension %d to read is %llu elements from index %llu"
+                        " but the actual data is [0,%llu])",
+                        varid, j+1, count[j], start[j], gdims[j] - 1);
+                    return;
+                }
+
+                /* check if there is any data in this pg and this dimension to read in */
+                flag1 = (offsets[j] >= start[j]
+                        && offsets[j] < start[j] + count[j])
+                    || (offsets[j] < start[j]
+                        && offsets[j] + ldims[j] > start[j] + count[j])
+                    || (offsets[j] + ldims[j] > start[j]
+                        && offsets[j] + ldims[j] <= start[j] + count[j]);
+
+                idx_check1 = idx_check1 && flag1;
+
+                flag2 = (offsets[j] >= s_start[j]
+                        && offsets[j] < s_start[j] + s_count[j])
+                    || (offsets[j] < s_start[j]
+                        && offsets[j] + ldims[j] > s_start[j] + s_count[j])
+                    || (offsets[j] + ldims[j] > s_start[j]
+                        && offsets[j] + ldims[j] <= s_start[j] + s_count[j]);
+
+                idx_check2 = idx_check2 && flag2;
+            }
+
+            if (!idx_check1)
+            {
+                continue;
+            }
+
+            break_dim =  ndim - 1;
+            while (break_dim > -1)
+            {
+                if (start[break_dim] == 0 &&
+                    ldims[break_dim] == count[break_dim]
+                   )
+                {
+                    datasize *= ldims[break_dim];
+                }
+                else
+                    break;
+
+                break_dim--;
+            }
+
+            slice_offset = 0;
+            slice_size = 0;
+
+            if (break_dim == -1)
+            {
+                slice_size = payload_size;
+
+                slice_offset = v->characteristics[start_idx + idx].payload_offset;
+
+                if (idx_check2)
+                {
+                    memcpy (data, fh->b->buff + slice_offset - buffer_offset, slice_size);
+                    if (fh->mfooter.change_endianness == adios_flag_yes)
+                    {
+                        change_endianness (data, slice_size, v->type);
+                    }
+                }
+            }
+            else if (break_dim == 0)
+            {
+                int isize;
+                uint64_t size_in_dset = 0, offset_in_dset = 0;
+                uint64_t offset_in_var = 0, write_offset;
+
+                isize = offsets[0] + ldims[0];
+                if (start[0] >= offsets[0])
+                {
+                    // head is in
+                    if (start[0] < isize)
+                    {
+                        if (start[0] + count[0] > isize)
+                        {
+                            size_in_dset = isize - start[0];
+                        }
+                        else
+                        {
+                            size_in_dset = count[0];
+                        }
+                        offset_in_var = 0;
+                        offset_in_dset = start[0] - offsets[0];
+                    }
+                }
+                else
+                {
+                    // middle is in
+                    if (isize < start[0] + count[0])
+                    {
+                        size_in_dset = ldims[0];
+                    }
+                    else
+                    {
+                    // tail is in
+                        size_in_dset = count[0] + start[0] - offsets[0];
+                    }
+                    offset_in_var = offsets[0] - start[0];
+                    offset_in_dset = 0;
+                }
+
+                slice_size = size_in_dset * datasize * size_unit;
+                slice_offset = v->characteristics[start_idx + idx].payload_offset
+                                 + offset_in_dset * datasize * size_unit;
+
+                write_offset = offset_in_var * size_unit;
+                for (i = 1; i < ndim; i++)
+                {
+                    write_offset *= count[i];
+                }
+
+                if (idx_check2)
+                {
+                    memcpy ((char *) data + write_offset,
+                            fh->b->buff + slice_offset - buffer_offset,
+                            slice_size
+                           );
+                    if (fh->mfooter.change_endianness == adios_flag_yes)
+                    {
+                        change_endianness ((char *) data + write_offset, slice_size, v->type);
+                    }
+                }
+            }
+            else
+            {
+                uint64_t stride_offset = 0;
+                int isize;
+                uint64_t size_in_dset[MAX_DIMS];
+                uint64_t offset_in_dset[MAX_DIMS];
+                uint64_t offset_in_var[MAX_DIMS];
+
+                memset (size_in_dset, 0, MAX_DIMS * 8);
+                memset (offset_in_dset, 0, MAX_DIMS * 8);
+                memset (offset_in_var, 0, MAX_DIMS * 8);
+
+                for (i = 0; i < ndim; i++)
+                {
+                    isize = offsets[i] + ldims[i];
+                    if (start[i] >= offsets[i])
+                    {
+                        // head is in
+                        if (start[i] < isize)
+                        {
+                            if (start[i] + count[i] > isize)
+                            {
+                                size_in_dset[i] = isize - start[i];
+                            }
+                            else
+                            {
+                                size_in_dset[i] = count[i];
+                            }
+                            offset_in_dset[i] = start[i] - offsets[i];
+                            offset_in_var[i] = 0;
+                        }
+                        else
+                        {
+                        }
+                    }
+                    else
+                    {
+                        // middle is in
+                        if (isize < start[i] + count[i])
+                        {
+                            size_in_dset[i] = ldims[i];
+                        }
+                        else
+                        {
+                            // tail is in
+                            size_in_dset[i] = count[i] + start[i] - offsets[i];
+                        }
+                        offset_in_dset[i] = 0;
+                        offset_in_var[i] = offsets[i] - start[i];
+                    }
+                }
+
+                datasize = 1;
+                var_stride = 1;
+
+                for (i = ndim - 1; i >= break_dim; i--)
+                {
+                    datasize *= size_in_dset[i];
+                    dset_stride *= ldims[i];
+                    var_stride *= count[i];
+                }
+
+                uint64_t start_in_payload = 0, end_in_payload = 0, s = 1;
+                uint64_t var_offset = 0, dset_offset = 0;
+
+                for (i = ndim - 1; i > -1; i--)
+                {
+                    start_in_payload += s * offset_in_dset[i] * size_unit;
+                    end_in_payload += s * (offset_in_dset[i] + size_in_dset[i] - 1) * size_unit;
+                    s *= ldims[i];
+                }
+
+                slice_size = end_in_payload - start_in_payload + 1 * size_unit;
+                slice_offset =  v->characteristics[start_idx + idx].payload_offset
+                                  + start_in_payload;
+
+                for (i = 0; i < ndim; i++)
+                {
+                    offset_in_dset[i] = 0;
+                }
+
+                for (i = 0; i < ndim; i++)
+                {
+                    var_offset = offset_in_var[i] + var_offset * count[i];
+                    dset_offset = offset_in_dset[i] + dset_offset * ldims[i];
+                }
+
+                if (idx_check2)
+                {
+                    copy_data (data
+                              ,fh->b->buff + fh->b->offset + slice_offset - buffer_offset
+                              ,0
+                              ,break_dim
+                              ,size_in_dset
+                              ,ldims
+                              ,count
+                              ,var_stride
+                              ,dset_stride
+                              ,var_offset
+                              ,dset_offset
+                              ,datasize
+                              ,size_unit
+                              );
+
+                }
+            }
+        }  // for idx ... loop over pgs
+
+        // shift target pointer for next read in
+        data = (char *)data + (items_read * size_unit);
+    } // for t
+#undef MAX_DIMS
+}
+
+static void broadcast_fh_buffer (ADIOS_FILE * fp)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    struct bp_index_pg_struct_v1 * pgs_root = fh->pgs_root, * pg;
+    struct adios_index_var_struct_v1 * vars_root = fh->vars_root, * v;
+    struct adios_index_attribute_struct_v1 * attrs_root = fh->attrs_root;
+    char * buffer;
+    uint64_t buffer_size, buffer_offset = 0;
+    int i, j, nsteps;
+    uint16_t len;
+    uint8_t flag;
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+
+    bp_realloc_aligned (fh->b, 0);
+/*
+    buffer = fh->b->buff;
+*/
+    buffer = 0;
+    buffer_size = 0;
+    buffer_offset = 0;
+    if (isAggregator (p))
+    {
+        _buffer_write (&buffer, &buffer_size, &buffer_offset,
+                       &pvt->num_aggregators, 4); // n_sf
+        _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                       &fh->gvar_h->group_count, 2); //group_count 
+        _buffer_write (&buffer, &buffer_size, &buffer_offset,
+                       &fh->mfooter.pgs_count, 8); //vars_count 
+        _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                       &fh->mfooter.vars_count, 2); //vars_count 
+        _buffer_write (&buffer, &buffer_size, &buffer_offset,
+                       &fh->mfooter.attrs_count, 2); //attrs_count 
+
+        for (i = 0; i < fh->gvar_h->group_count; i++)
+        {
+            len = strlen (fh->gvar_h->namelist[i]);
+            _buffer_write (&buffer, &buffer_size, &buffer_offset,
+                           &len, 2); // namelist
+            _buffer_write (&buffer, &buffer_size, &buffer_offset,
+                           fh->gvar_h->namelist[i], len); // namelist
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &fh->gvar_h->var_counts_per_group[i], 2); // var_counts_per_group
+        }
+
+        _buffer_write (&buffer, &buffer_size, &buffer_offset,
+                       &fh->gattr_h->group_count, 2); //group_count 
+        for (i = 0; i < fh->gattr_h->group_count; i++)
+        {
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &fh->gattr_h->attr_counts_per_group[i], 2); // attr_counts_per_group
+        }
+
+        for (i = 0; i < fh->mfooter.vars_count; i++)
+        {
+            len = strlen (fh->gvar_h->var_namelist[i]);
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &len, 2); // namelist
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           fh->gvar_h->var_namelist[i], len); // namelist
+        }
+
+        for (i = 0; i < fh->mfooter.attrs_count; i++)
+        {
+            len = strlen (fh->gattr_h->attr_namelist[i]);
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &len, 2); // namelist
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           fh->gattr_h->attr_namelist[i], len); // namelist
+        }
+
+        _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                       &fh->tidx_start, 4); // tidx_start
+        _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                       &fh->tidx_stop, 4); // tidx_start
+
+        pgs_root = fh->pgs_root;
+        while (pgs_root)
+        {
+            len = strlen (pgs_root->group_name);
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &len, 2); // group_name len
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           pgs_root->group_name, len); // group_name
+
+            flag = (pgs_root->adios_host_language_fortran == adios_flag_yes) ? 'y' : 'n';
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &flag, 1);
+
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &pgs_root->process_id, 4);
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &pgs_root->time_index, 4);
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &pgs_root->offset_in_file, 8);
+
+            pgs_root = pgs_root->next;
+        }
+
+        vars_root = fh->vars_root;
+        while (vars_root)
+        {
+uint64_t bo = buffer_offset;
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &vars_root->id, 2); // id
+
+            len = strlen (vars_root->group_name);
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &len, 2); // group_name len
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           vars_root->group_name, len); // group_name
+
+            len = strlen (vars_root->var_name);
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &len, 2); // var_name len
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           vars_root->var_name, len); // var_name
+
+            len = strlen (vars_root->var_path);
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &len, 2); // var_path len
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           vars_root->var_path, len); // var_path
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &vars_root->type, 4); // type
+
+            ADIOS_VARINFO * vi = bp_inq_var_byid (fp, vars_root->id - 1);
+            assert (vi);
+
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &vi->ndim, 4); // ndim
+            if (vi->ndim)
+            {
+                _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                               vi->dims, vi->ndim * 8); // dims
+            }
+
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &vi->nsteps, 4); // ndim
+            len = (vars_root->characteristics[0].value == 0) ?
+                  0 : bp_get_type_size (vars_root->type, vars_root->characteristics[0].value);
+            if (vars_root->type == adios_string)
+            {
+                len--;
+            }
+/*
+int rank;
+MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+if (rank == 0)
+fprintf (stderr, "bc %s bo 1 = %llu, bo 2 = %llu, len = %d\n", vars_root->var_name, bo, buffer_offset, len);
+*/
+            _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                           &len, 2);
+
+            if (len)
+            {
+                _buffer_write (&buffer, &buffer_size, &buffer_offset, 
+                               vars_root->characteristics[0].value, len); // ndim
+
+            }
+
+            common_read_free_varinfo (vi);
+
+            vars_root = vars_root->next;
+        }
+    }
+
+    MPI_Bcast (&buffer_offset, 8, MPI_BYTE, 0, pvt->new_comm);
+    if (!isAggregator (p))
+    {
+/*
+        bp_realloc_aligned (fh->b, buffer_offset);
+        assert (fh->b->buff);
+
+        buffer = fh->b->buff;
+*/
+        buffer = malloc (buffer_offset);
+        assert (buffer);
+    }
+
+    MPI_Bcast (buffer, buffer_offset, MPI_BYTE, 0, pvt->new_comm);
+
+    if (!isAggregator (p))
+    {
+        uint16_t len, group_count, var_counts_per_group;
+
+        buffer_offset = 0;
+
+        _buffer_read (buffer, &buffer_offset, &pvt->num_aggregators, 4);
+
+        fh->gvar_h = (struct BP_GROUP_VAR *) malloc (sizeof (struct BP_GROUP_VAR));
+        assert (fh->gvar_h);
+        fh->gvar_h->time_index = 0;
+        fh->gvar_h->var_offsets = 0;
+        fh->gvar_h->pg_offsets = 0;
+
+        _buffer_read (buffer, &buffer_offset, &fh->gvar_h->group_count, 2); //group_count 
+        _buffer_read (buffer, &buffer_offset, &fh->mfooter.pgs_count, 8); //pgs_count 
+        _buffer_read (buffer, &buffer_offset, &fh->mfooter.vars_count, 2); //vars_count 
+        _buffer_read (buffer, &buffer_offset, &fh->mfooter.attrs_count, 2); //attrs_count 
+
+        fh->gvar_h->namelist = (char **) malloc (fh->gvar_h->group_count * sizeof (char *));
+        fh->gvar_h->var_counts_per_group = (uint16_t *) malloc (fh->gvar_h->group_count * 2);
+
+        for (i = 0; i < fh->gvar_h->group_count; i++)
+        {
+            _buffer_read (buffer, &buffer_offset, &len, 2); // len
+            fh->gvar_h->namelist[i] = (char *) malloc (len + 1);
+            _buffer_read (buffer, &buffer_offset, fh->gvar_h->namelist[i], len); // namelist
+            fh->gvar_h->namelist[i][len] = '\0';
+
+            _buffer_read (buffer, &buffer_offset, &fh->gvar_h->var_counts_per_group[i], 2); // var_counts_per_group
+        }
+
+        fh->gattr_h = (struct BP_GROUP_ATTR *) malloc (sizeof (struct BP_GROUP_ATTR));
+        assert (fh->gattr_h);
+        fh->gattr_h->attr_offsets = 0;
+
+        _buffer_read (buffer, &buffer_offset, &fh->gattr_h->group_count, 2); //group_count 
+
+        fh->gattr_h->attr_counts_per_group = (uint16_t *) malloc (fh->gattr_h->group_count * 2);
+        fh->gattr_h->namelist = fh->gvar_h->namelist;
+
+        for (i = 0; i < fh->gattr_h->group_count; i++)
+        {
+            _buffer_read (buffer, &buffer_offset, &fh->gattr_h->attr_counts_per_group[i], 2); // attr_counts_per_group
+        }
+
+        fh->gvar_h->var_namelist = (char **) malloc (fh->mfooter.vars_count * sizeof (char *));
+        for (i = 0; i < fh->mfooter.vars_count; i++)
+        {
+            _buffer_read (buffer, &buffer_offset, &len, 2); // len
+            fh->gvar_h->var_namelist[i] = (char *) malloc (len + 1);
+            _buffer_read (buffer, &buffer_offset, fh->gvar_h->var_namelist[i], len); // namelist
+            fh->gvar_h->var_namelist[i][len] = '\0';
+        }
+
+        fh->gattr_h->attr_namelist = (char **) malloc (fh->mfooter.attrs_count * sizeof (char *));
+        for (i = 0; i < fh->mfooter.attrs_count; i++)
+        {
+            _buffer_read (buffer, &buffer_offset, &len, 2); // len
+            fh->gattr_h->attr_namelist[i] = (char *) malloc (len + 1);
+            _buffer_read (buffer, &buffer_offset, fh->gattr_h->attr_namelist[i], len); // namelist
+            fh->gattr_h->attr_namelist[i][len] = '\0';
+        }
+
+        _buffer_read (buffer, &buffer_offset, &fh->tidx_start, 4);
+        _buffer_read (buffer, &buffer_offset, &fh->tidx_stop, 4);
+
+        pgs_root = 0;
+        int pgs_count = fh->mfooter.pgs_count;
+
+        for (i = 0; i < pgs_count; i++)
+        {
+            pg = (struct bp_index_pg_struct_v1 *) malloc (sizeof (struct bp_index_pg_struct_v1));
+            assert (pg);
+
+            _buffer_read (buffer, &buffer_offset, &len, 2);
+
+            pg->group_name = (char *) malloc (len + 1);
+            _buffer_read (buffer, &buffer_offset, pg->group_name, len);
+            pg->group_name[len] = '\0';
+
+            _buffer_read (buffer, &buffer_offset, &flag, 1);
+            pg->adios_host_language_fortran = (flag == 'y') ? adios_flag_yes : adios_flag_no;
+
+            _buffer_read (buffer, &buffer_offset, &pg->process_id, 4);
+            _buffer_read (buffer, &buffer_offset, &pg->time_index, 4);
+            _buffer_read (buffer, &buffer_offset, &pg->offset_in_file, 8);
+
+            pg->time_index_name = 0;
+            pg->next = 0;
+
+            if (!pgs_root)
+            {
+                pgs_root = pg;
+                fh->pgs_root = pg;
+            }
+            else
+            {
+                pgs_root->next = pg;
+                pgs_root = pg;
+            }
+        }
+
+        vars_root = 0;
+        for (i = 0; i < fh->mfooter.vars_count; i++)
+        {
+            v = (struct adios_index_var_struct_v1 *) malloc (sizeof (struct adios_index_var_struct_v1));
+            assert (v);
+uint64_t bo = buffer_offset;
+            _buffer_read (buffer, &buffer_offset, &v->id, 2);
+
+            _buffer_read (buffer, &buffer_offset, &len, 2);
+            v->group_name = (char *) malloc (len + 1);
+            _buffer_read (buffer, &buffer_offset, v->group_name, len);
+            v->group_name[len] = '\0';
+
+            _buffer_read (buffer, &buffer_offset, &len, 2);
+            v->var_name = (char *) malloc (len + 1);
+            _buffer_read (buffer, &buffer_offset, v->var_name, len);
+            v->var_name[len] = '\0';
+
+            _buffer_read (buffer, &buffer_offset, &len, 2);
+            v->var_path = (char *) malloc (len + 1);
+            _buffer_read (buffer, &buffer_offset, v->var_path, len);
+            v->var_path[len] = '\0';
+
+            _buffer_read (buffer, &buffer_offset, &v->type, 4);
+
+            v->characteristics_count = 1;
+            v->characteristics = (struct adios_index_characteristic_struct_v1 *)
+                                     malloc (sizeof (struct adios_index_characteristic_struct_v1));
+            assert (v->characteristics);
+
+            v->characteristics->stats = 0;
+            _buffer_read (buffer, &buffer_offset, &(v->characteristics->dims.count), 4);
+
+            v->characteristics->dims.dims = 0;
+            if (v->characteristics->dims.count)
+            {
+                v->characteristics->dims.dims = (uint64_t *) malloc (v->characteristics->dims.count * 3 * 8);
+                assert (v->characteristics->dims.dims);
+
+                uint64_t * gdims = (uint64_t *) malloc (v->characteristics->dims.count * 8);
+                assert (gdims);
+
+                _buffer_read (buffer, &buffer_offset, gdims, v->characteristics->dims.count * 8);
+                for (j = 0; j < v->characteristics->dims.count; j++)
+                {
+                    v->characteristics->dims.dims[j * 3] = gdims[j];
+                    v->characteristics->dims.dims[j * 3 + 1] = gdims[j];
+                    v->characteristics->dims.dims[j * 3 + 2] = 0;
+                }
+                free (gdims);
+            }
+            _buffer_read (buffer, &buffer_offset, &nsteps, 4);
+            _buffer_read (buffer, &buffer_offset, &len, 2);
+
+            if (len)
+            {
+                if (v->type == adios_string)
+                {
+                    v->characteristics->value = malloc (len + 1);
+                }
+                else
+                {
+                    v->characteristics->value = malloc (len);
+                }
+
+                _buffer_read (buffer, &buffer_offset, v->characteristics->value, len);
+
+                if (v->type == adios_string)
+                {
+                    ((char * )(v->characteristics->value))[len] = '\0';
+                }
+            }
+            else
+            {
+                v->characteristics->value = 0;
+            }
+            v->next = 0;
+
+            if (!vars_root)
+            {
+                vars_root = v;
+                fh->vars_root = v;
+            }
+            else
+            {
+                vars_root->next = v;
+                vars_root = v;
+            }
+        }
+    }
+
+    if (buffer)
+    {
+        free (buffer);
+    }
+}
+
+int adios_read_bp_staged_init_method (MPI_Comm comm, PairStruct * params)
+{
+    int global_rank;
+    PairStruct * p = params;
+    char * env_str;
+
+    while (p)
+    {
+        if (!strcasecmp (p->name, "max_chunk_size"))
+        {
+            chunk_buffer_size = strtol(p->value, NULL, 10);
+            if (chunk_buffer_size > 0)
+            {
+                log_debug ("max_chunk_size set to %dMB for the read method\n", chunk_buffer_size);
+                chunk_buffer_size = chunk_buffer_size * 1024 * 1024;
+            }
+        }
+        else if (!strcasecmp (p->name, "poll_interval"))
+        {
+            errno = 0;
+            poll_interval = strtol(p->value, NULL, 10);
+            if (poll_interval > 0 && !errno)
+            {
+                log_debug ("poll_interval set to %d secs for READ_BP read method\n",
+                            poll_interval);
+            }
+            else
+            {
+                log_error ("Invalid 'poll_interval' parameter given to the READ_BP "
+                            "read method: '%s'\n", p->value);
+            }
+        }
+        else if (!strcasecmp (p->name, "show_hidden_attrs"))
+        {
+            show_hidden_attrs = 1;
+
+            log_debug ("show_hidden_attrs is set\n");
+        }
+        else if (!strcasecmp (p->name, "num_aggregators"))
+        {
+            errno = 0;
+            num_aggregators = strtol (p->value, NULL, 10);
+            if (num_aggregators > 0 && !errno)
+            {
+                log_debug ("num_aggregators set to %d for STAGED_READ_BP read method",
+                           num_aggregators);
+            }
+        }
+
+        p = p->next;
+    }
+
+    /* if v1 read api is being used, the aggregation parameters can only
+     * be set through environment variables and the follow
+     * code deals with this.
+     */
+    MPI_Comm_rank (MPI_COMM_WORLD, &global_rank);
+    if (num_aggregators <= 0)
+    {
+        env_str = getenv ("num_aggregators");
+        if (!env_str)
+        {
+            adios_error (err_unspecified, 
+                         "Environment variable \"num_aggregators\" hasn't been set.\n");
+            exit(0);
+        }
+
+        num_aggregators = atoi (env_str);
+
+        if (global_rank == 0)
+        {
+            printf ("%d aggregators are used.\n", num_aggregators);
+        }
+    }
+
+    if (chunk_buffer_size <= 0)
+    {
+        env_str = getenv ("chunk_size");
+        if (!env_str)
+        {
+            adios_error (err_unspecified,
+                         "Environment variable \"chunk_size\" (in MB) hasn't been set.\n");
+            exit(0);
+        }
+
+        chunk_buffer_size = 1024 * 1024 * atoi (env_str);
+    }
+
+    return 0;
+}
+
+int adios_read_bp_staged_finalize_method ()
+{
+    /* Set these back to default */
+    chunk_buffer_size = -1;
+    poll_interval = 10;
+    show_hidden_attrs = 0;
+    num_aggregators = -1;
+
+    return 0;
+}
+
+ADIOS_FILE * adios_read_bp_staged_open_stream (const char * fname, MPI_Comm comm, enum ADIOS_LOCKMODE lock_mode, float timeout_sec)
+{
+    log_error (" adios_read_open_stream() is not supported in this method.\n");
+    return 0;
+}
+
+static void free_proc_struct (BP_PROC * p)
+{
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+    read_request * h = p->local_read_request_list, * n;
+
+    /* We need to free split_read_request_list cause
+     * people might do two back-to-back sets of
+     * schedule_read, schedule_read, perform_read
+     */
+    list_free_read_request (pvt->split_read_request_list);
+    pvt->split_read_request_list = 0;
+
+    list_free_read_request (p->local_read_request_list);
+    p->local_read_request_list = 0;
+}
+
+static void init_read (BP_PROC * p)
+{
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    int i, remain, global_rank;
+    int color1, color2;
+    char * env_str;
+
+    /* if v1 read api is being used, the aggregation parameters can only
+     * be set through environment variables and the follow
+     * code deals with this.
+     */
+    MPI_Comm_rank (MPI_COMM_WORLD, &global_rank);
+    if (num_aggregators <= 0)
+    {
+        env_str = getenv ("num_aggregators");
+        if (!env_str)
+        {
+            adios_error (err_unspecified,
+                         "Environment variable \"num_aggregators\" hasn't been set.\n");
+            exit(0);
+        }
+
+        num_aggregators = atoi (env_str);
+
+        if (global_rank == 0)
+        {
+            printf ("%d aggregators are used.\n", num_aggregators);
+        }
+    }
+
+    if (chunk_buffer_size <= 0)
+    {
+        env_str = getenv ("chunk_size");
+        if (!env_str)
+        {
+            adios_error (err_unspecified,
+                         "Environment variable \"chunk_size\" (in MB) hasn't been set.\n");
+            exit(0);
+        }
+
+        chunk_buffer_size = 1024 * 1024 * atoi (env_str);
+    }
+
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) malloc (sizeof (bp_proc_pvt_struct));
+    assert (pvt);
+
+    p->priv = pvt;
+    MPI_Comm_rank (fh->comm, &pvt->rank);
+    MPI_Comm_size (fh->comm, &pvt->size);
+
+    pvt->num_aggregators = num_aggregators;
+    pvt->groups = (pvt->num_aggregators > pvt->size || pvt->num_aggregators <= 0) ? pvt->size : pvt->num_aggregators;
+    pvt->group_size = pvt->size / pvt->groups;
+    remain = pvt->size - pvt->group_size * pvt->groups;
+
+    pvt->aggregator_rank_array = (int *) malloc (pvt->groups * sizeof (int));
+    for (i = 0; i < pvt->groups; i++)
+    {
+        if (remain == 0)
+        {
+            pvt->aggregator_rank_array[i] = pvt->group_size * i;
+        }
+        else
+        {
+            if (i < remain)
+            {
+                pvt->aggregator_rank_array[i] = (pvt->group_size + 1) * i;
+            }
+            else
+            {
+                pvt->aggregator_rank_array[i] = remain * (pvt->group_size + 1) + (i - remain) * pvt->group_size;
+            }
+        }
+    }
+
+    if (remain == 0)
+    {
+        color1 = pvt->rank / pvt->group_size;
+        color2 = pvt->rank % pvt->group_size;
+
+        pvt->aggregator_rank = color1 * pvt->group_size;
+    }
+    else
+    {
+        if (pvt->rank < (pvt->group_size + 1) * remain)
+        {
+            color1 = pvt->rank / (pvt->group_size + 1);
+            color2 = pvt->rank % (pvt->group_size + 1);
+
+            pvt->aggregator_rank = color1 * (pvt->group_size + 1);
+            pvt->group_size++;
+        }
+        else
+        {
+            color1 = remain + (pvt->rank - (pvt->group_size + 1) * remain) / pvt->group_size;
+            color2 = (pvt->rank - (pvt->group_size + 1) * remain) % pvt->group_size;
+
+            pvt->aggregator_rank = remain * (pvt->group_size + 1) + (color1 - remain) * pvt->group_size;
+        }
+    }
+
+    pvt->group = color1;
+
+    MPI_Comm_split (fh->comm, color1, pvt->rank, &pvt->new_comm);
+    MPI_Comm_split (fh->comm, color2, pvt->rank, &pvt->new_comm2);
+    MPI_Comm_rank (pvt->new_comm, &pvt->new_rank);
+
+    pvt->aggregator_new_rank = 0;
+    pvt->group_comm = fh->comm;
+    pvt->split_read_request_list = 0;
+    p->b = 0;
+
+    return;
+}
+
+ADIOS_FILE * adios_read_bp_staged_open_file (const char * fname, MPI_Comm comm)
+{
+    int i, rank;
+    struct BP_PROC * p;
+    BP_FILE * fh;
+    ADIOS_FILE * fp;
+    bp_proc_pvt_struct * pvt;
+
+    log_debug ("adios_read_bp_staged_open_file\n");
+
+    MPI_Comm_rank (comm, &rank);
+
+    fh = (BP_FILE *) malloc (sizeof (BP_FILE));
+    assert (fh);
+    fh->fname = (fname ? strdup (fname) : 0L);
+    fh->mpi_fh = 0;
+    fh->sfh = 0;
+    fh->comm = comm;
+    fh->gvar_h = 0;
+    fh->pgs_root = 0;
+    fh->vars_root = 0;
+    fh->attrs_root = 0;
+    fh->b = malloc (sizeof (struct adios_bp_buffer_struct_v1));
+    assert (fh->b);
+    adios_buffer_struct_init (fh->b);
+
+    p = (struct BP_PROC *) malloc (sizeof (struct BP_PROC));
+    assert (p);
+    p->fh = fh;
+    p->streaming = 0;
+    p->varid_mapping = 0; // maps perceived id to real id
+    p->local_read_request_list = 0;
+    p->b = 0;
+    p->priv = 0;
+    init_read (p);
+
+    fp = (ADIOS_FILE *) malloc (sizeof (ADIOS_FILE));
+    assert (fp);
+    fp->fh = (uint64_t) p;
+
+    pvt = (bp_proc_pvt_struct *) p->priv;
+    if (isAggregator (p))
+    {
+        if (bp_open (fname, pvt->new_comm2, fh) < 0)
+        {
+            adios_error (err_file_open_error, "File open failed: %s", fname);
+            return 0;
+        }
+    }
+
+    broadcast_fh_buffer (fp);
+
+    /* '-1' means that we want all steps. 
+     * This will seek to the last step. So we need to set current_step back properly.
+     * Usually bp_seek_to_step comes after release_step call, to first free up some
+     * memory allocated by the previous step. This is the first seek call and, therefore,
+     * no release_step.
+     */
+    bp_seek_to_step (fp, -1, show_hidden_attrs);
+    /* It was agreed that, for file open the current step should be set to 0,
+     * instead of the start time. The var_namelist and attr_namel
+ist should
+     * consist of all steps. For stream open, this is done differ
+ently.
+     * 07/2012 - Q.Liu
+     */
+    fp->current_step = 0;
+    fp->last_step = fh->tidx_stop - fh->tidx_start;
+
+    fp->path = strdup (fh->fname);
+    fp->endianness = bp_get_endianness (fh->mfooter.change_endianness);
+    fp->version = fh->mfooter.version;
+    fp->file_size = fh->mfooter.file_size;
+
+    return fp;
+}
+
+int adios_read_bp_staged_close (ADIOS_FILE *fp)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+
+    if (pvt->aggregator_rank_array)
+    {
+        free (pvt->aggregator_rank_array);
+        pvt->aggregator_rank_array = 0;
+    }
+
+    free (pvt);
+    p->priv = 0;
+
+    if (p->fh)
+    {
+        bp_close (fh);
+        p->fh = 0;
+    }
+
+    if (p->varid_mapping)
+    {
+        free (p->varid_mapping);
+        p->varid_mapping = 0;
+    }
+
+    if (p->local_read_request_list)
+    {
+        list_free_read_request (p->local_read_request_list);
+        p->local_read_request_list = 0;
+    }
+
+    free (p);
+
+    if (fp->var_namelist)
+    {
+        free_namelist (fp->var_namelist, fp->nvars);
+        fp->var_namelist = 0;
+    }
+
+    if (fp->attr_namelist)
+    {
+        free_namelist (fp->attr_namelist, fp->nattrs);
+        fp->attr_namelist = 0;
+    }
+
+    if (fp->path)
+    {
+        free (fp->path);
+        fp->path = 0;
+    }
+    // internal_data field is taken care of by common reader layer
+    free (fp);
+
+    return 0;
+}
+
+/* Staged read method doesn't support streaming read yet
+ */
+int adios_read_bp_staged_advance_step (ADIOS_FILE *fp, int last, float timeout_sec)
+{
+    log_error ("adios_advance_step() is not supported in this method.\n");
+    return 0;
+}
+
+/* Staged read method doesn't support streaming read yet
+ */
+void adios_read_bp_staged_release_step (ADIOS_FILE *fp)
+{
+    log_error ("adios_release_step() is not supported in this method.\n");
+}
+
+ADIOS_VARINFO * adios_read_bp_staged_inq_var_byid (const ADIOS_FILE * fp, int varid)
+{
+    return adios_read_bp_inq_var_byid (fp, varid);
+}
+
+int adios_read_bp_staged_inq_var_stat (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo, int per_step_stat, int per_block_stat)
+{
+    return 0;
+}
+
+int adios_read_bp_staged_inq_var_blockinfo (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo)
+{
+    return 0;
+}
+
+int adios_read_bp_staged_schedule_read_byid (const ADIOS_FILE * fp,
+                                             const ADIOS_SELECTION * sel,
+                                             int varid,
+                                             int from_steps,
+                                             int nsteps,
+                                             void * data
+                                            )
+{
+    // simply call the 'simple reader' scheudle read routine. 
+    return adios_read_bp_schedule_read_byid (fp, sel, varid, from_steps, nsteps, data);
+}
+
+int adios_read_bp_staged_perform_reads (const ADIOS_FILE *fp, int blocking)
+{
+    BP_PROC * p = (BP_PROC *) fp->fh;
+    BP_FILE * fh = (BP_FILE *) p->fh;
+    bp_proc_pvt_struct * pvt = (bp_proc_pvt_struct *) p->priv;
+    read_request * r, * h;
+    int i, count, varid, ndims, total_size, size;
+    rr_pvt_struct * rrs;
+    void * buf;
+
+    // First populate the read request private struct for
+    // each local read request. Have to do it here since the
+    // schedule_read_byid is simply calling what is in simple bp reader.
+    h = p->local_read_request_list;
+    while (h)
+    {
+        h->priv = malloc (sizeof (rr_pvt_struct));
+        assert (h->priv);
+        ((rr_pvt_struct *) h->priv)->rank = pvt->rank;
+        h = h->next;
+    }
+
+    size = calc_data_size (p);
+    p->b = malloc (size);
+    assert (p->b);
+    buf = p->b;
+
+    // count
+    count = list_get_length (p->local_read_request_list);
+    buffer_write (&buf, &count, 4);
+
+    h = p->local_read_request_list;
+    while (h)
+    {
+        varid = h->varid;
+        ndims = h->sel->u.bb.ndim;
+
+        buffer_write (&buf, &varid, 4);
+        buffer_write (&buf, &h->from_steps, 4);
+        buffer_write (&buf, &h->nsteps, 4);
+        buffer_write (&buf, &ndims, 4);
+        //TODO: bb only for now
+        buffer_write (&buf, h->sel->u.bb.start, ndims * 8);
+        buffer_write (&buf, h->sel->u.bb.count, ndims * 8);
+        buffer_write (&buf, &h->datasize, 8);
+
+        h = h->next;
+    }
+
+    int * sizes = malloc (pvt->group_size * 4);
+    int * offsets = malloc (pvt->group_size * 4);
+    void * recv_buffer;
+
+    MPI_Gather (&size, 1, MPI_INT
+               ,sizes, 1, MPI_INT
+               ,pvt->aggregator_new_rank, pvt->new_comm
+               );
+
+    if (isAggregator (p))
+    {
+        total_size = 0;
+        offsets[0] = 0;
+
+        for (i = 0; i < pvt->group_size; i++)
+        {
+            total_size += sizes[i];
+            if (i > 0)
+            {
+                offsets[i] = offsets[i - 1] + sizes[i - 1];
+            }
+        }
+
+        recv_buffer = malloc (total_size);
+        assert (recv_buffer);
+    }
+
+    MPI_Gatherv (p->b, size, MPI_BYTE
+                ,recv_buffer, sizes, offsets
+                ,MPI_BYTE, pvt->aggregator_new_rank, pvt->new_comm
+                );
+
+    if (isAggregator (p))
+    {
+        for (i = 1; i < pvt->group_size; i++)
+        {
+            parse_buffer (p, (char *)recv_buffer + offsets[i], pvt->aggregator_rank + i);
+        }
+        free (recv_buffer);
+
+        process_read_requests (fp);
+    }
+
+    free (p->b);
+    p->b = 0;
+    free (sizes);
+    free (offsets);
+
+    if (isAggregator (p))
+    {
+        sort_read_requests (p);
+
+        do_read (fp);
+
+        send_read_data (p);
+    }
+    else
+    {
+        get_read_data (p);
+    }
+
+    free_proc_struct (p);
+
+    /* 1. prepare all reads */
+    // check if all user memory is provided for blocking read
+    if (blocking)
+    {
+        r = p->local_read_request_list;
+        while (r)
+        {
+            rr_pvt_struct * rr_pvt = (rr_pvt_struct *) r->priv;
+            if (rr_pvt->rank == pvt->rank && !r->data)
+            {
+                adios_error (err_operation_not_supported,
+                    "[%d] Blocking mode at adios_perform_reads() requires that user "
+                    "provides the memory for each read request. Request for "
+                    "variable %d was scheduled without user-allocated me mory\n",
+                    pvt->rank, r->varid);
+                return err_operation_not_supported;
+            }
+
+            r = r->next;
+        }
+    }
+    else
+    {
+        return 0;
+    }
+
+    return 0;
+}
+
+/* Note: staged read method doesn't support check_reads so far.
+ * It only supports the sceanario that user allocates all memory and subsequently 
+ * does perform_reads with blocking flagged.
+ */
+int adios_read_bp_staged_check_reads (const ADIOS_FILE * fp, ADIOS_VARCHUNK ** chunk)
+{
+    log_error ("adios_check_reads() is not supported in this method.\n");
+
+    return 0;
+}
+
+int adios_read_bp_staged_get_attr_byid (const ADIOS_FILE * fp, int attrid, enum ADIOS_DATATYPES * type, int * size, void ** data)
+{
+    return 0;
+}
+
+void adios_read_bp_staged_reset_dimension_order (const ADIOS_FILE *fp, int is_fortran)
+{
+    adios_read_bp_reset_dimension_order (fp, is_fortran);
+}
+
+void adios_read_bp_staged_get_groupinfo (const ADIOS_FILE *fp, int *ngroups, char ***group_namelist, int **nvars_per_group, int **nattrs_per_group)
+{
+    BP_PROC * p;
+    BP_FILE * fh;
+    int i, j, k, offset;
+
+    p = (BP_PROC *) fp->fh;
+    fh = (BP_FILE *) p->fh;
+
+    * ngroups = fh->gvar_h->group_count;
+
+    alloc_namelist (group_namelist, fh->gvar_h->group_count);
+    for (i = 0; i < fh->gvar_h->group_count; i++)
+    {
+        (*group_namelist)[i] = malloc (strlen (fh->gvar_h->namelist[i]) + 1);
+        assert ((*group_namelist)[i]);
+
+        memcpy ((*group_namelist)[i], fh->gvar_h->namelist[i], strlen (fh->gvar_h->
+namelist[i]) + 1);
+    }
+
+    * nvars_per_group = (int *) malloc (fh->gvar_h->group_count * sizeof (int));
+    assert (* nvars_per_group);
+
+    for (i = 0; i < fh->gvar_h->group_count; i++)
+    {
+        (* nvars_per_group)[i] = fh->gvar_h->var_counts_per_group[i];
+    }
+
+    * nattrs_per_group = (int *) malloc (fh->gattr_h->group_count * sizeof (int));
+    assert (* nattrs_per_group);
+
+    for (i = 0; i < fh->gvar_h->group_count; i++)
+    {
+        offset = 0;
+        for (j = 0; j < i; j++)
+        {
+            offset += fh->gattr_h->attr_counts_per_group[j];
+        }
+
+        (* nattrs_per_group)[i] = 0;
+        for (j = 0; j < fh->gattr_h->attr_counts_per_group[i]; j++)
+        {
+            if (!show_hidden_attrs && strstr (fh->gattr_h->attr_namelist[offset + j], "__adios__"))
+            {
+            }
+            else
+            {
+                (* nattrs_per_group)[i] ++;
+            }
+        }
+    }
+
+    return;
+}
+
+/* This is simply a copy of simle bp reader */
+int adios_read_bp_staged_is_var_timed (const ADIOS_FILE *fp, int varid)
+{
+    BP_PROC * p;
+    BP_FILE * fh;
+    struct adios_index_var_struct_v1 * v;
+    struct adios_index_characteristic_struct_v1 ch;
+    int retval = 0, ndim, k, dummy, file_is_fortran;
+    uint64_t gdims[32];
+
+    p = (BP_PROC *) fp->fh;
+    fh = (BP_FILE *) p->fh;
+
+    v = bp_find_var_byid (fh, varid);
+    ch = v->characteristics[0];
+    ndim = ch.dims.count; //ndim possibly has 'time' dimension
+
+    log_debug ("adios_read_bp_is_var_timed: varid = %d, ndim = %d\n", varid, ndim);
+
+    if (ndim == 0)
+    {
+        return 0;
+    }
+
+    for (k = 0; k < ndim; k++)
+    {
+        gdims[k] = ch.dims.dims[k * 3 + 1];
+    }
+/*
+    if (is_fortran_file (fh))
+    {
+        swap_order (ndim, gdims, &dummy);
+    }
+*/
+
+    if (gdims[ndim - 1] == 0) // with time
+    {
+        if (v->characteristics_count <= 1) {
+            // a local array written once
+            retval = 0;
+        } else {
+            retval = 1;
+        }
+        /* FIXME: This last test tests if the last l:g:o is only an 'l'.
+           This is true for a variable over time but also 
+           true for a 1D local array (which has no global dimension)
+           The characteristics_count is 1 only if the local array is written
+           from one process and only at one timestep.
+           How do we identify local arrays written from many processes?
+           And local arrays written several times?
+        */
+    }
+
+    log_debug ("%s is_var_timed: = %d\n", v->var_name, retval);
+
+    return retval;
+}
diff --git a/src/read_bp_staged.c b/src/read/read_bp_staged1.c
similarity index 72%
rename from src/read_bp_staged.c
rename to src/read/read_bp_staged1.c
index e6080b8..e007295 100644
--- a/src/read_bp_staged.c
+++ b/src/read/read_bp_staged1.c
@@ -17,21 +17,114 @@
 #include <math.h>
 #include <pthread.h>
 #include <assert.h>
-#include "adios.h"
-#include "bp_utils.h"
-#include "bp_types.h"
-#include "adios_types.h"
-#include "adios_read.h"
-#include "adios_read_hooks.h"
-#include "adios_error.h"
-#include "futils.h"
+#include "public/adios_types.h"
+#include "public/adios_read.h"
+#include "public/adios_error.h"
+#include "core/bp_utils.h"
+#include "core/bp_types.h"
+#include "core/adios_read_hooks.h"
+#include "core/futils.h"
 
 #ifdef DMALLOC
 #include "dmalloc.h"
 #endif
 
 #define READ_CLOSE 0
+#define MAX_DIMS 32
+#define DEBUG 0
+#define INVALID_VALUE -1
+#define HT_SIZE 100
+
+int adios_read_bp_staged1_init_method (MPI_Comm comm, PairStruct * param)
+{
+    return 0;
+}
+
+int adios_read_bp_staged1_finalize_method ()
+{
+    return 0;
+}
+
+ADIOS_FILE * adios_read_bp_staged1_open_stream (const char * fname, MPI_Comm comm, enum ADIOS_LOCKMODE lock_mode, float timeout_sec)
+{
+    return 0;
+}
+
+ADIOS_FILE * adios_read_bp_staged1_open_file (const char * fname, MPI_Comm comm)
+{
+    return 0;
+}
+
+int adios_read_bp_staged1_close (ADIOS_FILE *fp)
+{
+    return 0;
+}
+
+int adios_read_bp_staged1_advance_step (ADIOS_FILE *fp, int last, float timeout_sec)
+{
+    return 0;
+}
+
+void adios_read_bp_staged1_release_step (ADIOS_FILE *fp)
+{
+
+}
+
+ADIOS_VARINFO * adios_read_bp_staged1_inq_var_byid (const ADIOS_FILE *gp, int varid)
+{
+    return 0;
+}
+
+int adios_read_bp_staged1_inq_var_stat (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo, int per_step_stat, int per_block_stat)
+{
+    return 0;
+}
+
+int adios_read_bp_staged1_inq_var_blockinfo (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo)
+{
+    return 0;
+}
+
+int adios_read_bp_staged1_schedule_read_byid (const ADIOS_FILE * fp, const ADIOS_SELECTION * sel, int varid, int from_steps, int nsteps, void * data)
+{
+    return 0;
+}
+
+int adios_read_bp_staged1_perform_reads (const ADIOS_FILE *fp, int blocking)
+{
+    return 0;
+}
+
+int adios_read_bp_staged1_check_reads (const ADIOS_FILE * fp, ADIOS_VARCHUNK ** chunk)
+{
+    return 0;
+}
+
+int adios_read_bp_staged1_get_attr_byid (const ADIOS_FILE * fp, int attrid, enum ADIOS_DATATYPES * type, int * size, void ** data)
+{
+    return 0;
+}
+
+void adios_read_bp_staged1_reset_dimension_order (const ADIOS_FILE *fp, int is_fortran)
+{
+
+}
+
+void adios_read_bp_staged1_get_groupinfo (const ADIOS_FILE *fp, int *ngroups, char ***group_namelist, int **nvars_per_group, int **nattrs_per_group)
+{
+
+}
+
+int adios_read_bp_staged1_is_var_timed (const ADIOS_FILE *fp, int varid)
+{
+    int retval = 0;
+    /*
+        retval = this variable had time dimension at write
+    */
+    return retval;
+}
 
+#if 0
 typedef struct read_info
 {
     int ndim;
@@ -44,56 +137,8 @@ typedef struct read_info
     uint64_t * dims;
 } read_info;
 
-static void swap_order (int n, uint64_t * array, int * tdim);
-static void _swap_order (int n, uint64_t * array);
-static int isTimeless (int tdim);
-void getReadInfo (ADIOS_GROUP * gp
-                 ,struct adios_index_var_struct_v1 * v
-                 ,uint64_t * start
-                 ,uint64_t * count
-                 ,read_info * ri
-                 );
-static int adios_read_bp_staged_get_dimensioncharacteristics (
-                           struct adios_index_characteristic_struct_v1 * c
-                          ,uint64_t * ldims
-                          ,uint64_t * gdims
-                          ,uint64_t * offsets
-                          );
-static void adios_read_bp_staged_get_dimensions (struct adios_index_var_struct_v1 * v
-                                                 ,int ntsteps, int file_is_fortran
-                                                 ,int * ndim, uint64_t ** dims
-                                                 ,int * tdim
-                                                 );
-struct adios_index_var_struct_v1 * adios_find_var_byid (ADIOS_GROUP * gp, int varid);
-static int get_var_start_index (struct adios_index_var_struct_v1 * v, int t);
-static int get_var_stop_index (struct adios_index_var_struct_v1 * v, int t);
-void getDataAddress (ADIOS_GROUP * gp, int varid
-                    ,const uint64_t * start
-                    ,const uint64_t * count
-                    ,int * file_idx
-                    ,uint64_t * offset
-                    ,uint64_t * payload_size
-                    );
-static MPI_File * get_BP_file_handle(struct BP_file_handle * l, uint32_t file_index);
-static void add_BP_file_handle (struct BP_file_handle ** l, struct BP_file_handle * n);
-
-int64_t adios_read_bp_staged_read_var_byid2 (ADIOS_GROUP    * gp, 
-                                      int            varid,
-                                      const uint64_t * start,
-                                      const uint64_t * count,
-                                      void           * data);
-static ADIOS_VARINFO * _inq_var_byid (struct BP_FILE * fh, int varid);
-void adios_read_bp_staged_free_varinfo (ADIOS_VARINFO *vp);
-
-// used to specify which thread is the target for the MPI messages
-enum MPI_TAG
-{
-     TAG_CONTROL = 0
-    ,TAG_DATA = 1
-};
-
 typedef struct read_args
-{   
+{
     int varid;
     int ndims;
     uint64_t * start;
@@ -112,6 +157,13 @@ typedef struct candidate_reader
     struct candidate_reader * next;
 } candidate_reader;
 
+typedef struct bucket
+{
+    candidate_reader ** h;
+    int size;
+    int offset;
+} bucket;
+
 struct proc_struct
 {
     ADIOS_GROUP * gp;
@@ -121,13 +173,19 @@ struct proc_struct
     int groups;
     int group_size;
     int group;
+    int n_total_sf;
+    int n_my_sf;
+    int f1;
+    int f2;
     MPI_Comm group_comm;
-    MPI_Comm new_comm;
-    MPI_Comm new_comm2;
+    MPI_Comm new_comm;  /* MPI communicator for a group */
+    MPI_Comm new_comm2; /* MPI communicator for all the aggregators */
     int aggregator_rank;
     int aggregator_new_rank;
     candidate_reader * local_read_request_list;
-    candidate_reader * split_read_request_list;
+    candidate_reader * split_read_request_list1;
+    candidate_reader * split_read_request_list2;
+    bucket * ht;
     void * b;
     uint32_t num_aggregators;
     uint64_t chunk_size;
@@ -136,27 +194,109 @@ struct proc_struct
     int group_close_received;
 };
 
-int isAggregator (struct proc_struct * p)
+// used to specify which thread is the target for the MPI messages
+enum MPI_TAG
+{
+     TAG_CONTROL = 0
+    ,TAG_DATA = 1
+};
+
+static void swap_order (int n, uint64_t * array, int * tdim);
+static void _swap_order (int n, uint64_t * array);
+static int isTimeless (int tdim);
+static void getReadInfo (ADIOS_GROUP * gp
+                        ,int varid
+                        ,uint64_t * start
+                        ,uint64_t * count
+                        ,read_info * ri
+                        );
+static void freeReadInfo (read_info * ri);
+static int adios_read_bp_staged1_get_dimensioncharacteristics (
+                           struct adios_index_characteristic_struct_v1 * c
+                          ,uint64_t * ldims
+                          ,uint64_t * gdims
+                          ,uint64_t * offsets
+                          );
+static void adios_read_bp_staged1_get_dimensions (struct adios_index_var_struct_v1 * v
+                                                 ,int ntsteps, int file_is_fortran
+                                                 ,int * ndim, uint64_t ** dims
+                                                 ,int * tdim
+                                                 );
+static struct adios_index_var_struct_v1 * adios_find_var_byid (ADIOS_GROUP * gp, int varid);
+static int get_var_start_index (struct adios_index_var_struct_v1 * v, int t);
+static int get_var_stop_index (struct adios_index_var_struct_v1 * v, int t);
+static void getDataAddress (ADIOS_GROUP * gp, int varid
+                    ,const uint64_t * start
+                    ,const uint64_t * count
+                    ,int * file_idx
+                    ,uint64_t * offset
+                    ,uint64_t * payload_size
+                    );
+static MPI_File * get_BP_file_handle(struct BP_file_handle * l, uint32_t file_index);
+static void add_BP_file_handle (struct BP_file_handle ** l, struct BP_file_handle * n);
+int64_t adios_read_bp_staged1_read_var_byid2 (ADIOS_GROUP * gp
+                                            ,int varid
+                                            ,const uint64_t * start
+                                            ,const uint64_t * count
+                                            ,void * data
+                                            );
+static void copy_buffer (ADIOS_GROUP * gp
+                        ,candidate_reader * parent
+                        ,candidate_reader * child
+                        );
+static ADIOS_VARINFO * _inq_var_byid (struct BP_FILE * fh, int varid);
+void adios_read_bp_staged1_free_varinfo (ADIOS_VARINFO *vp);
+static int get_num_subfiles (struct BP_FILE * fh);
+static candidate_reader * parse_buffer (struct proc_struct * p, void * b, int len);
+
+static void split_read_request (ADIOS_GROUP * gp
+                               ,candidate_reader * r
+                               ,candidate_reader ** h1
+                               ,candidate_reader ** h2
+                               );
+
+static void build_hash (struct proc_struct * p);
+static void free_hash (struct proc_struct * p);
+int is_fortran_file (ADIOS_GROUP * gp);
+int has_subfiles (ADIOS_GROUP * gp);
+static void free_candidate_reader_list (candidate_reader * h);
+
+static int isAggregator (struct proc_struct * p)
 {
     return (p->rank == p->aggregator_rank);
 }
 
-void list_print_readers (struct proc_struct * p, candidate_reader * h)
+static void list_print_readers (struct proc_struct * p, candidate_reader * h)
 {
     read_args * ra;
-    //printf ("%d: Candidate reader:\n", p->rank);
-    //candidate_reader * h = p->split_read_request_list;
 
     while (h)
     {
         ra = h->ra;
-        printf ("%d [varid: %d, ndims = %d, start[0]: %llu, start[1]: %llu, count[0]: %llu, count[1]: %llu, file_index: %d, offset = %llu]\n", p->rank, ra->varid, ra->ndims, ra->start[0], ra->start[1], ra->count[0], ra->count[1], ra->file_idx, ra->offset);
+        printf ("%d:%d [varid: %d, ndims = %d, start[0]: %llu, start[1]: %llu, count[0]: %llu, count[1]: %llu, file_index: %d, offset = %llu]\n", p->rank, h->rank, ra->varid, ra->ndims, ra->start[0], ra->start[1], ra->count[0], ra->count[1], ra->file_idx, ra->offset);
+        h = h->next;
+    }
+    printf ("\n");
+}
+
+static void list_print_my_readers (struct proc_struct * p, candidate_reader * h)
+{
+    read_args * ra;
+
+    while (h)
+    {   
+        ra = h->ra;
+        if (p->f1 <= ra->file_idx && ra->file_idx <= p->f2)
+        {
+            printf ("%d [varid: %d, ndims = %d, start[0]: %llu, start[1]: %llu, count[0]: %llu, count[1]: %llu, file_index: %d, offset = %llu]\n", p->rank, ra->varid, ra->ndims, ra->start[0], ra->start[1], ra->count[0], ra->count[1], ra->file_idx, ra->offset);
+            printf ("%d [varid: %d, ndims = %d, start[0]: %llu, count[0]: %llu, file_index: %d, offset = %llu]\n", p->rank, ra->varid, ra->ndims, ra->start[0], ra->count[0], ra->file_idx, ra->offset);
+        }
         h = h->next;
     }
     printf ("\n");
 }
 
-void list_insert_reader (candidate_reader ** h, candidate_reader * q)
+static void list_insert_reader (candidate_reader ** h, candidate_reader * q)
 {
     candidate_reader * head;
     if (!h || !q)
@@ -173,7 +313,7 @@ void list_insert_reader (candidate_reader ** h, candidate_reader * q)
 
         return;
     }
-
+#if 0
     while (head->next)
     {
         head = head->next;
@@ -181,37 +321,47 @@ void list_insert_reader (candidate_reader ** h, candidate_reader * q)
 
     head->next = q;
     q->next = NULL;
-
+#else
+    q->next = head;
+    * h = q;
+#endif
     return;
 }
 
-void list_append_reader_list (candidate_reader ** h, candidate_reader * q)
+/* This routine append q to list h. We pass t, which points to the tail of h
+   to speed up list insertion.
+*/
+static void list_append_reader_list (candidate_reader ** h, candidate_reader ** t, candidate_reader * q)
 {
-    candidate_reader * head;
-    if (!h || !q)
+    candidate_reader * tail;
+    if (!h || !t || !q)
     {
         printf ("Error: list_append_reader_list: h: %d, q: %d\n", h == 0, q == 0);
         return;
     }
 
-    head = * h;
-    if (!head)
+    tail = * t;
+    // tail is null also means head is null.
+    if (!tail)
     {
         * h = q;
-        return;
+    }
+    else
+    {
+        tail->next = q;
     }
 
-    while (head->next)
+    while (q->next)
     {
-        head = head->next;
+        q = q->next;
     }
 
-    head->next = q;
+    * t = q;
 
     return;
 }
 
-candidate_reader * list_remove_reader (candidate_reader ** h)
+static candidate_reader * list_remove_reader (candidate_reader ** h)
 {
     candidate_reader * t = NULL;
     if (h && * h)
@@ -223,7 +373,7 @@ candidate_reader * list_remove_reader (candidate_reader ** h)
     return t;
 }
 
-int list_get_length (candidate_reader * h)
+static int list_get_length (candidate_reader * h)
 {
     int l = 0;
 
@@ -242,15 +392,15 @@ static int calc_data_size (struct proc_struct * p)
     candidate_reader * h = p->local_read_request_list;
 
     // message type
-    size += 4;
+//    size += 4;
 
     // count
-    size += 4;
+//    size += 4;
 
     while (h)
     {
-        // varid + ndim + start + count
-        size += 4 + 4 + h->ra->ndims * (8 + 8) + 8 + 4 + 8;
+        // rank + varid + ndim + start + count
+        size += 4 + 4 + 4 + h->ra->ndims * (8 + 8) + 8 + 4 + 8;
         h = h->next;
     }
 
@@ -291,6 +441,33 @@ static void _buffer_write (char ** buffer, uint64_t * buffer_size
 }
 
 // *****************************************************************************
+static void _buffer_write32 (char ** buffer, uint32_t * buffer_size
+                            ,uint32_t * buffer_offset
+                            ,const void * data, uint32_t size
+                            )
+{
+    if (*buffer_offset + size > *buffer_size || *buffer == 0)
+    {
+        char * b = realloc (*buffer, *buffer_offset + size + 1000);
+        if (b)
+        {
+            *buffer = b;
+            *buffer_size = (*buffer_offset + size + 1000);
+        }
+        else
+        {
+            fprintf (stderr, "Cannot allocate memory in buffer_write.  "
+                             "Requested: %u\n", *buffer_offset + size + 1000);
+
+            return;
+        }
+    }
+
+    memcpy (*buffer + *buffer_offset, data, size);
+    *buffer_offset += size;
+}
+
+// *****************************************************************************
 static void _buffer_read (char * buffer, uint64_t * buffer_offset
                          ,void * data, uint64_t size
                          )
@@ -299,11 +476,11 @@ static void _buffer_read (char * buffer, uint64_t * buffer_offset
     *buffer_offset += size;
 }
 
-void sort_read_requests (struct proc_struct * p)
+static void sort_read_requests (struct proc_struct * p, candidate_reader ** h)
 {
     int file_idx;
     uint64_t offset;
-    candidate_reader * r = p->split_read_request_list;
+    candidate_reader * r = * h;
     candidate_reader * n = 0, * t, * t_prev, * next;
     while (r)
     {
@@ -340,79 +517,1327 @@ void sort_read_requests (struct proc_struct * p)
         r = next;
     }
 
-    p->split_read_request_list = n;
+    * h = n;
 }
 
-static void send_read_data (struct proc_struct * p)
+static int is_short_list (candidate_reader * r)
 {
-    void * data = 0;
-    uint64_t ds;
-    int i, counter = 0;
-
-    candidate_reader * r = p->local_read_request_list;
+    /* 0 element */
+    if (!r)
+    {
+        return 1;
+    }
 
-    while (r)
+    /* 1 element */
+    if (!r->next)
     {
-        if (p->rank != r->rank)
-        {
-            MPI_Send (r->ra->data, r->ra->size, MPI_BYTE
-                     ,r->rank - p->aggregator_rank, TAG_DATA, p->new_comm
-                     );  
-        }
+       return 1;
+    }
 
-        r = r->next;
+    /* 2 elements */
+    if (!r->next->next)
+    {
+        return 1;
     }
+
+    return 0;
 }
 
-static void get_read_data (struct proc_struct * p)
+/* Divide the list into sub-lists */
+static void divide_list (struct proc_struct * p, candidate_reader * h
+                        ,candidate_reader ** l1
+                        ,candidate_reader ** l2)
 {
-    MPI_Status status;
-    candidate_reader * r = p->local_read_request_list;
+    candidate_reader * r1 = 0, * r2 = 0, * r, * hn, * rn;
+    int i = 0;
 
-    if (p->rank != p->aggregator_rank)
+    /* split into l1 and l2 in turns. */
+    while (h)
     {
-        while (r) 
-        {
-            MPI_Recv (r->ra->data, r->ra->size, MPI_BYTE
-                     ,MPI_ANY_SOURCE, MPI_ANY_TAG, p->new_comm
-                     ,&status
-                     );
+        hn = h->next;
 
-            r = r->next;
-        }
+        r = (i % 2 == 0) ? r1 : r2;
+  
+        h->next = r;
+        (i % 2 == 0) ? (r1 = h) : (r2 = h);
+
+        h = hn;
+
+        i++;
     }
+
+    * l1 = r1;
+    * l2 = r2;
 }
 
-static void parse_buffer (struct proc_struct * p, void * b, int src)
+static void combine_list (struct proc_struct * p, candidate_reader **h
+                         ,candidate_reader * l1, candidate_reader * l2)
 {
-    candidate_reader * h = p->local_read_request_list;
-    int i, j, type, count, varid, ndims, size = calc_data_size (p);
-    void * buf;
-    candidate_reader * r;
+    candidate_reader * head = 0, * tail = 0, * l1n, * l2n;
 
-    // message type
-    type = * (uint32_t *) b;
-    b += 4;
+    while (l1 && l2)
+    {
+        if (l1->ra->file_idx < l2->ra->file_idx
+        || (l1->ra->file_idx == l2->ra->file_idx && l1->ra->offset <= l2->ra->offset))
+        {
+            l1n = l1->next; 
+            if (!tail)
+            {
+                head = tail = l1;
+            }
+            else
+            {
+                tail->next = l1;
+                tail = tail->next;
+            }
+ 
+            tail->next = 0;
 
-    // count
-    count = * (uint32_t *) b;
-    b += 4;
+            l1 = l1n;
+        }
+        else
+        {
+            l2n = l2->next;
+            if (!tail)
+            {
+                head = tail = l2;
+            }
+            else
+            {
+                tail->next = l2;
+                tail = tail->next;
+            }
 
-    for (i = 0; i < count; i++)
-    {
-        r = (candidate_reader *) malloc (sizeof (candidate_reader));
-        assert (r);
+            tail->next = 0;
 
-        r->rank = src;
+            l2 = l2n;
+        }
+    }
 
-        r->ra = (read_args *) malloc (sizeof (read_args));
-        assert (r->ra);
+    tail->next = l1 ? l1 : l2; 
+
+    * h = head;
+}
+
+static void combine_list_by_rank (struct proc_struct * p, candidate_reader **h
+                                 ,candidate_reader * l1, candidate_reader * l2)
+{
+    candidate_reader * head = 0, * tail = 0, * l1n, * l2n;
+
+    while (l1 && l2)
+    {
+        if (l1->rank <= l2->rank)
+        {
+            l1n = l1->next;
+            if (!tail)
+            {
+                head = tail = l1;
+            }
+            else
+            {
+                tail->next = l1;
+                tail = tail->next;
+            }
+
+            tail->next = 0;
+
+            l1 = l1n;
+        }
+        else
+        {
+            l2n = l2->next;
+            if (!tail)
+            {
+                head = tail = l2;
+            }
+            else
+            {
+                tail->next = l2;
+                tail = tail->next;
+            }
+
+            tail->next = 0;
+
+            l2 = l2n;
+        }
+    }
+
+    tail->next = l1 ? l1 : l2;
+
+    * h = head;
+}
+
+static void merge_sort_read_requests (struct proc_struct * p, candidate_reader **h)
+{
+    candidate_reader * r, * r0 = 0, * r1 = 0;
+
+    divide_list (p, * h, &r0, &r1);
+
+    if (is_short_list (r0) || is_short_list (r1))
+    {
+        sort_read_requests (p, &r0);
+        sort_read_requests (p, &r1);
+    }
+    else
+    {
+        merge_sort_read_requests (p, &r0);
+        merge_sort_read_requests (p, &r1);
+    }
+
+    combine_list (p, h, r0, r1);
+}
+
+/*************************************************
+ This routine sorts split_read_request_list1 by
+ the r->rank of each entry. This is to make the
+ subsequent data shuffling easy.
+**************************************************/
+static void sort_list_by_rank (struct proc_struct * p, candidate_reader ** list)
+{
+    candidate_reader * r = * list;
+    candidate_reader * next = 0, * h = 0, * l = 0, * m = 0;
+
+    while (r)
+    {
+        next = r->next;
+
+        if (!h)
+        {
+            h = r;
+            h->next = 0;
+        }
+        else
+        {
+            l = h;
+            m = 0;
+
+            while (l && l->rank < r->rank)
+            {
+                m = l;
+                l = l->next;
+            }
+
+            if (!m)
+            {
+                r->next = h;
+                h = r;
+            }
+            else
+            {
+                m->next = r;
+                r->next = l;
+            }
+        }
+
+        r = next;
+    }
+
+    * list = h;
+}
+
+static void merge_sort_list_by_rank (struct proc_struct * p, candidate_reader ** h)
+{
+    candidate_reader * r, * r0 = 0, * r1 = 0;
+
+    divide_list (p, * h, &r0, &r1);
+
+    if (is_short_list (r0) || is_short_list (r0)) 
+    {
+        sort_list_by_rank (p, &r0);
+        sort_list_by_rank (p, &r1);
+    }
+    else
+    {
+        merge_sort_list_by_rank (p, &r0);
+        merge_sort_list_by_rank (p, &r1);
+    }
+
+    combine_list_by_rank (p, h, r0, r1);
+}
+
+/***************************************************
+ This routine sorts list by varid. If there is a tie,
+ we break it by start then count. This is to make the
+ subsequent data shuffling easy.
+**************************************************/
+static void sort_list_by_varid (candidate_reader ** list)
+{
+    candidate_reader * r = * list;
+    candidate_reader * next = 0, * h = 0, * l = 0, * m = 0;
+
+    while (r)
+    {
+        next = r->next;
+
+        if (!h)
+        {
+            h = r;
+            h->next = 0;
+        }
+        else
+        {
+            l = h;
+            m = 0;
+
+            while (l && l->ra->varid < r->ra->varid)
+            {
+                m = l;
+                l = l->next;
+            }
+
+            if (!m)
+            {
+                r->next = h;
+                h = r;
+            }
+            else
+            {
+                m->next = r;
+                r->next = l;
+            }
+        }
+
+        r = next;
+    }
+
+    * list = h;
+}
+
+/* Helper routine that maps reader rank to a group */
+static int rank_to_group_mapping (struct proc_struct * p, int rank)
+{
+    int grp_size = p->size / p->groups;
+    int remain = p->size - grp_size * p->groups;
+    int g;
+
+    if (remain == 0)
+    {
+        g = rank / grp_size;
+    }
+    else
+    {
+        if (rank < (grp_size + 1) * remain)
+        {
+            g = rank / (grp_size + 1);
+        }
+        else
+        {
+            g = remain + (rank - (grp_size + 1) * remain) / grp_size;
+        }
+    }
+
+    return g;
+}
+
+/* Helper routine that maps file to a group */
+static int fidx_to_group_mapping (struct proc_struct * p, int fidx)
+{
+    int grp_size = p->n_total_sf / p->groups;
+    int remain = p->n_total_sf - grp_size * p->groups;;
+    int g;
+
+    if (remain == 0)
+    {
+        g = fidx / grp_size;
+    }
+    else
+    {
+        if (fidx < (grp_size + 1) * remain)
+        {
+            g = fidx / (grp_size + 1);
+        }
+        else
+        {
+            g = remain + (fidx - (grp_size + 1) * remain) / grp_size;
+        }
+    }
+
+    return g;
+}
+/* Check whether r's read parameters are the same as (varid, ndims, start, count). */
+static int is_same_read_request (candidate_reader * r, int varid, int ndims
+                                ,uint64_t * start, uint64_t * count)
+{
+    int i;
+
+    if (r->ra->varid == varid && r->ra->ndims == ndims)
+    {
+        for (i = 0; i < ndims; i++)
+        {
+            if (start[i] != r->ra->start[i] || count[i] != r->ra->count[i])
+            {
+                return 0;
+            }
+        }
+        
+        return 1;
+    }
+
+    return 0;
+}
+
+
+/* Check whether r's read parameters are the same as (varid, ndims, start, count). */
+static candidate_reader * find_local_read_request (struct proc_struct * p, int varid, int ndims
+                                                  , uint64_t * start, uint64_t * count)
+{
+    int i, j, idx;
+    candidate_reader * r;
+
+    idx = start[0] % HT_SIZE;
+
+    for (i = 0; i < p->ht[idx].size; i++)
+    {
+        r = p->ht[idx].h[i];
+        if (r->ra->varid == varid && r->ra->ndims == ndims)
+        {
+            for (j = 0; j < ndims; j++)
+            {
+                if (start[j] != r->ra->start[j] || count[j] != r->ra->count[j])
+                {
+                    break;
+                }
+             }
+  
+             if (j == ndims)
+             { 
+                 return r;
+             }
+        }
+    }
+
+    return 0;
+}
+
+/* This routine returns a vector that contains the file index
+   that a read request will access.
+*/
+static int * get_subfile_idx_vector (struct proc_struct * p
+                                    ,candidate_reader * r
+                                    ,int * len
+                                    )
+{
+    candidate_reader * n1 = 0, * n2 = 0, * t;
+    int c, * idx_vector, prev;
+
+    split_read_request (p->gp, r, &n1, &n2);
+
+    sort_read_requests (p, &n1);
+    sort_read_requests (p, &n2);
+
+    /* First pass to calculate the size of vector */
+    c = 0;
+    t = n1;
+    prev = -1;
+    while (t)
+    {
+        if (prev != t->ra->file_idx)
+        {
+            c++;
+        }
+
+        prev = t->ra->file_idx;
+        t = t->next;
+    }
+
+    t = n2;
+    prev = -1;
+    while (t)
+    {
+        if (prev != t->ra->file_idx)
+        {
+            c++;
+        }
+
+        prev = t->ra->file_idx;
+        t = t->next;
+    }
+
+    * len = c;
+    idx_vector = (int *) malloc (4 * c);
+
+    t = n1;
+    prev = -1;
+    c = 0;
+    while (t)
+    {
+        if (prev != t->ra->file_idx)
+        {
+            idx_vector[c] = t->ra->file_idx;
+            c++;
+        }
+
+        prev = t->ra->file_idx;
+        t = t->next;
+    }
+
+    t = n2;
+    prev = -1;
+    while (t)
+    {
+        if (prev != t->ra->file_idx)
+        {
+            idx_vector[c] = t->ra->file_idx;
+            c++;
+        }
+
+        prev = t->ra->file_idx;
+        t = t->next;
+    }
+
+    return idx_vector;
+}
+
+static void free_subfile_idx_vector (int * idx_vector)
+{
+    free (idx_vector);
+}
+
+/* This routine copies a new request with file_idx
+   field set to file_idx. It ignores data field and 
+   set it to 0.
+*/
+candidate_reader * copy_request (candidate_reader * r, int file_idx)
+{
+    candidate_reader * n =  (candidate_reader *) malloc (sizeof (candidate_reader));
+    assert (n);
+
+    n->rank = r->rank;
+
+    n->ra = (read_args *) malloc (sizeof (read_args));
+    assert (n->ra);
+
+    n->ra->varid = r->ra->varid;
+    n->ra->ndims = r->ra->ndims;
+
+    n->ra->start = (uint64_t *) malloc (8 * n->ra->ndims);
+    assert (n->ra->start);
+    memcpy (n->ra->start, r->ra->start, 8 * n->ra->ndims);
+
+    n->ra->count = (uint64_t *) malloc (8 * n->ra->ndims);
+    assert (n->ra->count);
+    memcpy (n->ra->count, r->ra->count, 8 * n->ra->ndims);
+
+    n->ra->data = 0;
+    n->ra->size = r->ra->size;
+    n->ra->file_idx = file_idx;
+    n->ra->offset = r->ra->offset;
+    n->ra->parent = 0;
+    n->next = 0;
+ 
+    return n;
+}
+
+/* This routine shuffles read requests by the file id they access.
+*/
+static void shuffle_request (struct proc_struct * p)
+{
+    candidate_reader * h1, * h2 = 0, * r, * n, * next, * prev;
+    int len, i, n_grps, * fidx_vector, size;
+    char * b = 0, * recv_buffer2 = 0;
+    uint32_t * recv_sizes = 0;
+    uint32_t offset, total_size = 0, buffer_size = 0;
+    int * offsets = 0, * sizes = 0, * offsets2 = 0, * sizes2 = 0;
+    int g, g_prev, offset_prev, varid, ndims;
+
+    // h1 is local read request list
+    // h2 is constructed based upon h1 to make request shuffle easier.
+    // Note: if a request needs to be served by two aggregators, we will
+    // make two copies of it in h2.
+    h1 = p->local_read_request_list;
+    while (h1)
+    {
+        next = h1->next;
+
+        fidx_vector = get_subfile_idx_vector (p, h1, &len);
+
+/*
+if (p->rank == 0)
+{
+    for (i = 0; i < len; i++)
+    {
+        printf ("fidx_vector[%d] = %d", i, fidx_vector[i]);
+    }
+}
+printf ("\n");
+*/
+        for (i = 0; i < len; i++)
+        {
+            g = fidx_to_group_mapping (p, fidx_vector[i]);
+            g_prev = (i == 0 ? -1 : fidx_to_group_mapping (p, fidx_vector[i - 1]));
+
+	    if (i != 0 && g == g_prev)
+            {
+                continue;
+            }
+
+            n = copy_request (h1, fidx_vector[i]);
+
+            r = h2;
+            prev = 0;
+
+            if (!r)
+            {
+                h2 = n;
+            }
+            else
+            {
+                while (r)
+                {
+//printf ("loop 2: %d\n", r->ra->file_idx);
+                    if (fidx_vector[i] < r->ra->file_idx)
+                    {
+                        if (!prev)
+                        {
+                            n->next = h2;
+                            h2 = n;
+                            prev = 0;
+                        }
+                        else
+                        {
+                            prev->next = n;
+                            n->next = r;
+                        }
+
+                        break;
+                    }
+
+                    if (!r->next)
+                    {
+                        r->next = n;
+                        break;
+                    }
+
+                    prev = r;
+                    r = r->next;
+                }
+            }
+        }
+
+        free_subfile_idx_vector (fidx_vector);
+
+        h1 = next;
+    }
+/*
+if (p->rank == 0)
+{
+printf ("****************\n");
+        list_print_readers (p, h2);
+printf ("****************\n");
+}
+*/
+    MPI_Comm_size (p->new_comm2, &size);
+
+    offsets = malloc (size * 4);
+    sizes = malloc (size * 4);
+    assert (offsets);
+    assert (sizes);
+
+    /* Init offsets and sizes */
+    for (i = 0; i < size; i++)
+    {
+        offsets[i] = INVALID_VALUE;
+        sizes[i] = 0;
+    }
+
+    // write h2 to buffer
+    g_prev = -1;
+    offset_prev = 0;
+    offset = 0;
+
+    r = h2;
+    while (r)
+    {
+        next = r->next;
+
+        g = fidx_to_group_mapping (p, r->ra->file_idx);
+
+        /* if a request will access files that are under control
+           of other groups/aggregators. 
+         */
+        if (g != p->group)
+        {
+            if (offsets[g] == INVALID_VALUE)
+            {
+                offsets[g] = offset;
+
+                if (g_prev != -1)
+                {
+                    sizes[g_prev] = offset - offset_prev;
+                }
+
+                g_prev = g;
+                offset_prev = offset;
+            }
+
+            sizes[g] += 4 + 4 + 4 + r->ra->ndims * 8 + r->ra->ndims * 8 + 4 + 4;
+
+            _buffer_write32 (&b, &buffer_size, &offset, &r->rank, 4);
+            _buffer_write32 (&b, &buffer_size, &offset, &r->ra->varid, 4);
+            _buffer_write32 (&b, &buffer_size, &offset, &r->ra->ndims, 4);
+            _buffer_write32 (&b, &buffer_size, &offset, r->ra->start, r->ra->ndims * 8);
+            _buffer_write32 (&b, &buffer_size, &offset, r->ra->count, r->ra->ndims * 8);
+            _buffer_write32 (&b, &buffer_size, &offset, &r->ra->size, 4);
+            _buffer_write32 (&b, &buffer_size, &offset, &r->ra->file_idx, 4);
+
+        }
+
+        free (r->ra->start);
+        free (r->ra->count);
+        free (r->ra);
+        free (r);
+
+        r = next;
+    }
+
+    recv_sizes = malloc (size * size * 4);
+    assert (recv_sizes);
+
+    MPI_Allgather (sizes, size, MPI_INT
+                  ,recv_sizes, size, MPI_INT
+                  ,p->new_comm2
+                  );
+
+    offsets2 = malloc (size * 4);
+    sizes2 = malloc (size * 4);
+
+    assert (offsets2);
+    assert (sizes2);
+
+    len = 0;
+    offsets2[0] = 0;
+
+    for (i = 0; i < size; i++)
+    {
+        len += recv_sizes[i * size + p->group];
+        sizes2[i] = recv_sizes[i * size + p->group];
+        if (i > 0)
+        {
+            offsets2[i] = offsets2[i - 1] + sizes2[i - 1];
+        }
+    }
+
+    recv_buffer2 = malloc (len);
+    assert (recv_buffer2);
+
+    MPI_Alltoallv (b, sizes, offsets, MPI_BYTE
+                  ,recv_buffer2, sizes2, offsets2, MPI_BYTE
+                  ,p->new_comm2
+                  );
+
+    /* Free sender buffer and let 'be' point to receiver buffer */
+    free (b);
+    b = recv_buffer2;
+    offset = 0;
+
+    while (offset < len)
+    {
+        n = (candidate_reader *) malloc (sizeof (candidate_reader));
+        assert (n);
+   
+        n->rank = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        n->ra = (read_args *) malloc (sizeof (read_args));
+        assert (n->ra);
+
+        n->ra->varid = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        n->ra->ndims = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        n->ra->start = malloc (n->ra->ndims * 8);
+        n->ra->count = malloc (n->ra->ndims * 8);
+        assert (n->ra->start);
+        assert (n->ra->count);
+
+        memcpy (n->ra->start, b + offset, n->ra->ndims * 8);
+        offset += n->ra->ndims * 8;
+
+        memcpy (n->ra->count, b + offset, n->ra->ndims * 8);
+        offset += n->ra->ndims * 8;
+
+        n->ra->size = * (uint32_t *) (b + offset);
+        offset += 4;
+        
+        n->ra->file_idx = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        n->ra->data = 0;
+        n->ra->offset = 0;
+
+        if (n->rank != p->rank)
+        {
+            list_insert_reader (&p->local_read_request_list, n);
+        }
+        else
+        {
+            free (n->ra->start);
+            free (n->ra->count);
+            free (n->ra);
+            free (n);
+        }
+
+    }
+
+    free (sizes);
+    free (sizes2);
+    free (offsets);
+    free (offsets2);
+    free (recv_sizes);
+    free (recv_buffer2);
+}
+ 
+/* This routine shuffles data among aggregators.
+   It is called after do_read(), which populates
+   split_read_request_list1, which contains data
+   for both the local group and other remotes groups.
+   In the end of the routine, it copies read data from
+   split_read_request_list1 and split_read_request_list2
+   to local_read_request_list.
+*/
+static void shuffle_data (struct proc_struct * p)
+{
+    candidate_reader * r, * parent, * recv_list, * n;
+    char * b = 0, * recv_buffer2 = 0;
+    uint32_t * recv_sizes = 0;
+    uint32_t offset, total_size = 0, len, buffer_size = 0;
+    int * offsets = 0, * sizes = 0, * offsets2 = 0, * sizes2 = 0;
+    int i, size, g, g_prev, offset_prev, varid, ndims;
+    uint64_t * start, * count;
+
+    MPI_Comm_size (p->new_comm2, &size);
+
+    offsets = malloc (size * 4);
+    sizes = malloc (size * 4);
+    assert (offsets);
+    assert (sizes);
+
+    /* Init offsets and sizes */
+    for (i = 0; i < size; i++)
+    {
+        offsets[i] = INVALID_VALUE;
+        sizes[i] = 0;
+    }
+    
+    /* Sort the split_read_request_list1 by the r->rank.
+       This makes the subsequent buffer construction (for the alltoallv call) easier,
+       since the data that fall under an aggregator will be consecutive list entries.
+     */
+    //sort_list_by_rank (p, &p->split_read_request_list1);
+    merge_sort_list_by_rank (p, &p->split_read_request_list1);
+
+    g_prev = -1;
+    offset_prev = 0;
+    offset = 0;
+
+    /* Reminder: any read request in split_read_request_list1 is the one
+       that needs to be read from disk. The list can contain
+         1. requests from the local group.
+         2. requests from other groups.
+       These requests are constructed via shuffle_requests call.
+       After the list is sorted by rank (sort_list_by_rank), requests that
+       are from the same group will be grouped together. The buffer constructed looks like
+
+       -----------------------------------------------------------------------------------------------------------------
+       | all the data aggregator 0 needs | all the data aggregator 1 needs | ......| all the data aggregator n-1 needs |
+       -----------------------------------------------------------------------------------------------------------------
+
+       sizes[g]  -  the size of each segment above
+       offsets[g]-  the offset of each segment above
+    */
+    r = p->split_read_request_list1;
+    while (r)
+    {
+        /* r->rank - the rank that waits for the data.
+           g - the group that we need to send the data to
+         */
+        g = rank_to_group_mapping (p, r->rank);
+
+        /* To make sure we handle a request that belongs to other aggregators.
+           p->group is the calling aggregator's group id.
+         */
+        if (g != p->group)
+        {
+            if (offsets[g] == INVALID_VALUE)
+            {
+                offsets[g] = offset;
+
+                if (g_prev != -1)
+                {
+                    sizes[g_prev] = offset - offset_prev;
+                }
+
+                g_prev = g;
+                offset_prev = offset;
+            }
+
+            sizes[g] += 4 + 4 + r->ra->ndims * 8 + r->ra->ndims * 8 + 4 + r->ra->size;
+
+            _buffer_write32 (&b, &buffer_size, &offset, &r->ra->varid, 4);
+            _buffer_write32 (&b, &buffer_size, &offset, &r->ra->ndims, 4);
+            _buffer_write32 (&b, &buffer_size, &offset, r->ra->start, r->ra->ndims * 8);
+            _buffer_write32 (&b, &buffer_size, &offset, r->ra->count, r->ra->ndims * 8);
+            _buffer_write32 (&b, &buffer_size, &offset, &r->ra->size, 4);
+            _buffer_write32 (&b, &buffer_size, &offset, r->ra->data, r->ra->size);
+
+            /* NOTE: r-ra->data in child is not needed anymore.
+               Release it right away so that the overall memory consumption 
+               is minimized.
+            */
+            free (r->ra->data);
+            r->ra->data = 0;
+        }
+
+        r = r->next;
+    }
+#if 0
+if (p->rank = 2)
+    for (i = 0; i < size; i++)
+    {
+        if (sizes[i] != 0)
+        {
+            printf ("aggregator: %d offsets[%d] = %d, sizes[%d] = %d  ", p->rank, i, offsets[i], i, sizes[i]);
+        }
+    }
+    printf ("\n");
+#endif
+
+    recv_sizes = malloc (size * size * 4);
+    assert (recv_sizes);
+
+    /* Since each aggregator maintains the 'sizes' array, the entire thing is of size * size */
+    MPI_Allgather (sizes, size, MPI_INT
+                  ,recv_sizes, size, MPI_INT
+                  ,p->new_comm2
+                  );
+
+    offsets2 = malloc (size * 4);
+    sizes2 = malloc (size * 4);
+
+    assert (offsets2);
+    assert (sizes2);
+
+    len = 0;
+    offsets2[0] = 0;
+
+    /* len - the size of buffer that contains all segments that is targeted at this group
+       sizes2 - the size of each segment that is targeted at this group
+       offsets2 - the offset of each segment that is targeted at this group
+     */
+      
+    for (i = 0; i < size; i++)
+    {
+        len += recv_sizes[i * size + p->group];
+        sizes2[i] = recv_sizes[i * size + p->group];
+        if (i > 0)
+        {
+            offsets2[i] = offsets2[i - 1] + sizes2[i - 1];
+        }
+    }
+
+    recv_buffer2 = malloc (len);
+    assert (recv_buffer2);
+
+#if DEBUG
+    for (i = 0; i < size; i++)
+    {
+        printf ("aggregator : %d, offsets2[%d] = %d, sizes2[%d] = %d\n", p->rank, i, offsets2[i], i, sizes2[i]);
+    }
+#endif
+
+#if DEBUG
+    struct timeval t0, t1, t2;
+    gettimeofday (&t0, NULL);
+#endif
+
+    MPI_Alltoallv (b, sizes, offsets, MPI_BYTE
+                  ,recv_buffer2, sizes2, offsets2, MPI_BYTE
+                  ,p->new_comm2
+                  );
+#if DEBUG
+    gettimeofday (&t1, NULL);
+    printf ("alltoall = %7.5g\n", t1.tv_sec - t0.tv_sec + (double)(t1.tv_usec - t0.tv_usec)/1000000);
+#endif
+    /* Free sender buffer and let 'be' point to receiver buffer */
+    free (b);
+    b = recv_buffer2;
+    offset = 0;
+
+#if 1
+    build_hash (p);
+
+    while (offset < len)
+    {
+        varid = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        ndims = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        start = malloc (ndims * 8);
+        count = malloc (ndims * 8);
+        assert (start);
+        assert (count);
+
+        memcpy (start, b + offset, ndims * 8);
+        offset += ndims * 8;
+
+        memcpy (count, b + offset, ndims * 8);
+        offset += ndims * 8;
+/*
+        r = p->split_read_request_list2;
+        while (r)
+        {
+            if (!r->ra->data && is_same_read_request (r, varid, ndims, start, count))
+            {
+                uint32_t l = * (uint32_t *) (b + offset);
+                offset += 4;
+
+                r->ra->data = malloc (l);
+                memcpy (r->ra->data, b + offset, l);
+
+                offset += l;
+                break;
+
+            }
+
+            r = r->next;
+        }
+
+        assert (r);
+*/
+
+        r = find_local_read_request (p, varid, ndims, start, count);
+        assert (r);
+
+        uint32_t l = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        r->ra->data = malloc (l);
+        memcpy (r->ra->data, b + offset, l);
+        offset += l;
+
+        free (start);
+        free (count);
+    }
+
+    free_hash (p);
+#else
+    recv_list = 0;
+    while (offset < len)
+    {
+        n = (candidate_reader *) malloc (sizeof (candidate_reader));
+        assert (n);
+
+        n->ra = (read_args *) malloc (sizeof (read_args));
+        assert (n->ra);
+
+        n->ra->varid = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        n->ra->ndims = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        n->ra->start = malloc (n->ra->ndims * 8);
+        n->ra->count = malloc (n->ra->ndims * 8);
+        assert (n->ra->start);
+        assert (n->ra->count);
+
+        memcpy (n->ra->start, b + offset, n->ra->ndims * 8);
+        offset += n->ra->ndims * 8;
+
+        memcpy (n->ra->count, b + offset, n->ra->ndims * 8);
+        offset += n->ra->ndims * 8;
+
+        n->ra->size = * (uint32_t *) (b + offset);
+        offset += 4;
+
+        /* NOTE: here we simply point to the data in the receive buffer
+           to avoid double memory. So later in freeing the list  
+         */
+        n->ra->data = b + offset; 
+        offset += n->ra->size;
+
+        n->next = 0;
+
+        list_insert_reader (&recv_list, n);
+    }
+
+    /* Sort these lists so that one-to-one matching is established */
+    sort_list_by_varid (&recv_list);
+    sort_list_by_varid (&p->split_read_request_list2);
+
+    r = p->split_read_request_list2;
+    n = recv_list;
+    while (n)
+    {
+        memcpy (r->ra->data, n->ra->data, n->ra->size);
+        n = n->next;
+    }
+
+    /* Note: this following call doesn't free ra->data */
+    free_candidate_reader_list (recv_list);
+#endif
+#if DEBUG
+    gettimeofday (&t2, NULL);
+    printf (" after alltoall = %7.5g\n", t2.tv_sec - t1.tv_sec + (double)(t2.tv_usec - t1.tv_usec)/1000000);
+#endif
+    free (sizes);
+    free (sizes2);
+    free (offsets);
+    free (offsets2);
+    free (recv_sizes);
+    free (recv_buffer2);
+
+    /* Traverse split_read_request_list1 and copy data from child
+       to parent. Check whether r->ra->data is null or not. If it 
+       is null, it is a request from other aggregators.
+    */
+/*
+if (p->rank == 0)
+{
+candidate_reader * tr = p->local_read_request_list;
+
+while (tr)
+{
+    if (tr->ra->data)
+        printf ("[%d]: data = %4.6f %4.6f\n", tr->rank, * (double *) tr->ra->data, * ((double *) tr->ra->data + 1));
+    else
+        printf ("reader : %d\n", tr->rank);
+    tr = tr->next;
+}
+
+//list_print_readers (p, p->local_read_request_list);
+printf ("*********************\n");
+}
+*/
+//while (1);
+    r = p->split_read_request_list1;
+    while (r)
+    {
+        if (r->ra->data)
+        {
+            copy_buffer (p->gp, r->ra->parent, r);
+
+            free (r->ra->data);
+            r->ra->data = 0;
+        }
+
+        r = r->next;
+    }
+
+    /* Traverse split_read_request_list2 and copy data from child
+       to parent.
+    */
+    r = p->split_read_request_list2;
+/*
+if (p->rank == 0)
+{
+candidate_reader * tr = p->split_read_request_list2;
+while (tr)
+{
+    printf ("data = %4.6f %4.6f\n", * (double *) tr->ra->data, * ((double *) tr->ra->data + 1));
+    tr = tr->next;
+}
+}
+*/
+
+    while (r)
+    {
+        copy_buffer (p->gp, r->ra->parent, r);
+
+        free (r->ra->data);
+        r->ra->data = 0;
+     
+        r = r->next;
+    }
+}
+
+/* Send read data from aggregator to member processors */
+static void send_read_data1 (struct proc_struct * p)
+{
+    int g;
+    void * b = 0;
+
+    candidate_reader * r = p->local_read_request_list;
+
+    while (r)
+    {
+        g = rank_to_group_mapping (p, r->rank);
+
+        /*  g == p->group       -> requests are from processors that belong to the group
+            p->rank != r->rank  -> requests are NOT from aggregator itself
+        */
+        if (g == p->group && p->rank != r->rank)
+        {
+            assert (r->ra->data);
+
+            MPI_Send (r->ra->data, r->ra->size, MPI_BYTE
+                     ,r->rank - p->aggregator_rank, TAG_DATA, p->new_comm
+                     );  
+        }
+
+        r = r->next;
+    }
+}
+
+/* Send read data from aggregator to member processors */
+static void send_read_data (struct proc_struct * p)
+{
+    int g, i;
+    char * b = 0, * recv_buff = 0;
+    uint32_t offset = 0, buffer_size = 0;
+    int size, * sizes = 0, * offsets = 0;
+    candidate_reader * r = p->local_read_request_list;
+
+    MPI_Comm_size (p->new_comm, &size);
+
+    sizes = (int *) malloc (size * 4);
+    offsets = (int *) malloc (size * 4);
+    assert (sizes);
+    assert (offsets);
+
+    for (i = 0; i < size; i++)
+    {
+        sizes[i] = 0;
+        offsets[i] = INVALID_VALUE;
+    }
+
+    while (r)
+    {
+        g = rank_to_group_mapping (p, r->rank);
+
+        /*  g == p->group       -> requests are from processors that belong to the group
+            p->rank != r->rank  -> requests are NOT from aggregator itself
+        */
+
+        if (g == p->group && p->rank != r->rank)
+        {
+            assert (r->ra->data);
+
+            if (offsets[r->rank - p->aggregator_rank] == INVALID_VALUE)
+            {
+                offsets[r->rank - p->aggregator_rank] = offset;
+            }
+
+            sizes[r->rank - p->aggregator_rank] += r->ra->size;
+
+            _buffer_write32 (&b, &buffer_size, &offset, r->ra->data, r->ra->size);
+
+            /* Free it immediately to avoid double buffering */
+            free (r->ra->data);
+            r->ra->data = 0;
+        }
+
+        r = r->next;
+    }
+
+    MPI_Scatterv (b, sizes, offsets, MPI_BYTE
+                 ,recv_buff, 0, MPI_BYTE
+                 ,0, p->new_comm
+                 );
+
+    free (b);
+    free (sizes);
+    free (offsets);
+}
+
+/* Receive read data from aggregator */
+static void get_read_data1 (struct proc_struct * p)
+{
+    MPI_Status status;
+    candidate_reader * r = p->local_read_request_list;
+
+    if (p->rank != p->aggregator_rank)
+    {
+        while (r) 
+        {
+            MPI_Recv (r->ra->data, r->ra->size, MPI_BYTE
+                     ,MPI_ANY_SOURCE, MPI_ANY_TAG, p->new_comm
+                     ,&status
+                     );
+
+            r = r->next;
+        }
+    }
+}
+
+/* Receive read data from aggregator */
+static void get_read_data (struct proc_struct * p)
+{
+    void * b = 0, * recv_buff = 0;
+    int * sizes = 0, * offsets = 0;
+    int size = 0;
+    MPI_Status status;
+    candidate_reader * r = p->local_read_request_list;
+
+    if (p->rank == p->aggregator_rank)
+    {
+        return;
+    }
+
+    r = p->local_read_request_list;
+    while (r)
+    {
+        size += r->ra->size;
+        r = r->next;
+    }
+
+    recv_buff = malloc (size);
+    if (recv_buff == 0)
+    {
+        printf ("Warning: the size of data is 0\n");
+        return;
+    }
+
+    MPI_Scatterv (b, sizes, offsets, MPI_BYTE
+                 ,recv_buff, size, MPI_BYTE
+                 ,0, p->new_comm
+                 );
+
+    b = recv_buff;
+    r = p->local_read_request_list;
+    while (r)
+    {
+        memcpy (r->ra->data, b, r->ra->size);
+        b += r->ra->size;
+
+        r = r->next;
+    }
+
+    free (recv_buff);
+}
+
+static candidate_reader * parse_buffer (struct proc_struct * p, void * b, int len)
+{
+    candidate_reader * h = 0;
+    int i, j, type, count, varid, ndims;
+    uint32_t l = 0;
+    void * b1 = b; 
+    void * buf;
+    candidate_reader * r;
+
+    while (l < len)
+    {
+        r = (candidate_reader *) malloc (sizeof (candidate_reader));
+        assert (r);
+
+        r->rank = * (uint32_t *) b;
+        b += 4;
+        l += 4;
+
+        r->ra = (read_args *) malloc (sizeof (read_args));
+        assert (r->ra);
    
         r->ra->varid = * (uint32_t *) b;
         b += 4;
+        l += 4;
 
         r->ra->ndims = * (uint32_t *) b;
         b += 4;
+        l += 4;
 
         r->ra->start = (uint64_t *) malloc (r->ra->ndims * 8);
         r->ra->count = (uint64_t *) malloc (r->ra->ndims * 8);
@@ -421,31 +1846,64 @@ static void parse_buffer (struct proc_struct * p, void * b, int src)
 
         memcpy (r->ra->start, b, r->ra->ndims * 8);
         b += r->ra->ndims * 8;
+        l += r->ra->ndims * 8;
 
         memcpy (r->ra->count, b, r->ra->ndims * 8);
         b += r->ra->ndims * 8;
+        l += r->ra->ndims * 8;
 
         r->ra->size = * (uint64_t *) b;
         b += 8;
+        l += 8;
 
         r->ra->file_idx = * (uint32_t *) b;
         b += 4;
+        l += 4;
 
         r->ra->offset = * (uint64_t *) b;
         b += 8;
+        l += 8;
 
-        r->ra->data = malloc (r->ra->size);
-        assert (r->ra->data);
+        /* DO NOT ALLOCATE PARENT BUFFER AT THIS POINT. Delay it to the point when necessary.
+           Do it when copying child buffer to parent (and after it, child buffer
+           will be released) so that the overall memory consumption won't be tripled.
+        */
+        r->ra->data = 0;
 
         r->ra->parent = 0;
 
         r->next = 0;
 
-        list_insert_reader (&p->local_read_request_list, r);
+        if (r->rank != p->rank)
+        {
+            list_insert_reader (&h, r);
+        }
+        else
+        {
+            free (r->ra->start);
+            free (r->ra->count);
+            free (r->ra);
+            free (r);
+        }
     }
+
+    return h;
 }
 
-candidate_reader * split_read_requests (ADIOS_GROUP * gp, candidate_reader * r)
+/* This routine split a read requests into smaller
+   requests which fits PG boundary. For example, a BP
+   file contains two PG's with one PG contains an array [0,99]
+   and the other contains [100,199]. A read request of [0,199] will
+   be split into two requests, i.e., [0,99] and [100,199].
+   h1 points to those sub-requests that access subfiles [f1,f2].
+   h2 points to those that don't access [f1,f2], which means data
+   will be read by other aggregators and sent over.
+*/
+static void split_read_request (ADIOS_GROUP * gp
+                               ,candidate_reader * r
+                               ,candidate_reader ** h1
+                               ,candidate_reader ** h2
+                               )
 {
     struct BP_GROUP * gh;
     struct BP_FILE * fh;
@@ -457,28 +1915,32 @@ candidate_reader * split_read_requests (ADIOS_GROUP * gp, candidate_reader * r)
     uint64_t ldims[32], gdims[32], offsets[32];
     uint64_t count_notime[32], start_notime[32], * start, * count;
     int file_tdim = -1, read_arg_tdim, is_global = 0, flag;
-    candidate_reader * h = 0;
+    struct proc_struct * p;
+    int f1, f2;
 
+    * h1 = * h2 = 0;
     gh = (struct BP_GROUP *) gp->gh;
     fh = gh->fh;
-
+    p = fh->priv;
+    f1 = p->f1;
+    f2 = p->f2;
     varid = r->ra->varid;
     start = r->ra->start;
     count = r->ra->count;
 
-    file_is_fortran = (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
-    has_subfile = fh->mfooter.version & ADIOS_VERSION_HAVE_SUBFILE;
+    file_is_fortran = is_fortran_file (gp);
+    has_subfile = has_subfiles (gp);
 
     v = adios_find_var_byid (gp, varid);
 
     /* Get dimensions and flip if caller != writer language */
-    adios_read_bp_staged_get_dimensions (v
-                                         ,fh->tidx_stop - fh->tidx_start + 1
-                                         ,file_is_fortran
-                                         ,&ndim
-                                         ,&dims
-                                         ,&file_tdim
-                                         );
+    adios_read_bp_staged1_get_dimensions (v
+                                        ,fh->tidx_stop - fh->tidx_start + 1
+                                        ,file_is_fortran
+                                        ,&ndim
+                                        ,&dims
+                                        ,&file_tdim
+                                        );
 
     if (file_is_fortran)
     {
@@ -535,23 +1997,40 @@ candidate_reader * split_read_requests (ADIOS_GROUP * gp, candidate_reader * r)
             /* THIS IS A SCALAR VARIABLE */
             idx = 0;
 
-            candidate_reader * n = (candidate_reader *) malloc (sizeof (candidate_reader));
-            assert (n);
-
-            n->rank = r->rank;
-            n->ra = (read_args *) malloc (sizeof (read_args));
-            assert (n->ra);
-
-            n->ra->varid = r->ra->varid;
-            n->ra->file_idx = v->characteristics[start_idx + idx].file_index;
-            n->ra->offset = v->characteristics[start_idx + idx].payload_offset;
-            n->ra->parent = r;
-            n->ra->start = 0;
-            n->ra->count = 0;
-            n->next = 0;
-
-            list_insert_reader (&h, n);
-
+            if ( (v->characteristics[start_idx + idx].file_index >= f1
+                 && v->characteristics[start_idx + idx].file_index <= f2)
+               || rank_to_group_mapping (p, r->rank) == p->group
+               )
+            {
+                /* MALLOC CHILD REQUEST */
+                candidate_reader * n = (candidate_reader *) malloc (sizeof (candidate_reader));
+                assert (n);
+
+                n->rank = r->rank;
+                n->ra = (read_args *) malloc (sizeof (read_args));
+                assert (n->ra);
+
+                n->ra->varid = r->ra->varid;
+                n->ra->ndims = r->ra->ndims;
+                n->ra->file_idx = v->characteristics[start_idx + idx].file_index;
+                n->ra->offset = v->characteristics[start_idx + idx].payload_offset;
+                n->ra->parent = r;
+                n->ra->start = 0;
+                n->ra->count = 0;
+                n->ra->data = 0;
+                n->next = 0;
+
+                if (v->characteristics[start_idx + idx].file_index >= f1
+                 && v->characteristics[start_idx + idx].file_index <= f2)
+                {
+                    list_insert_reader (h1, n);
+                }
+                else
+                {
+                    list_insert_reader (h2, n);
+                }
+            }
+    
             if (isTimeless (file_tdim) )
                 break;
             else
@@ -564,9 +2043,19 @@ candidate_reader * split_read_requests (ADIOS_GROUP * gp, candidate_reader * r)
         // loop over the list of pgs to read from one-by-one
         for (idx = 0; idx < stop_idx - start_idx + 1; idx++)
         {
+            if (((  v->characteristics[start_idx + idx].file_index < f1
+                   || v->characteristics[start_idx + idx].file_index > f2
+                   )
+                  && rank_to_group_mapping (p, r->rank) != p->group
+                  )
+               )
+            {
+                continue;
+            }
+
             idx_table[idx] = 1;
             /* Each pg can have a different sized array, so we need the actual dimensions from it */
-            is_global = adios_read_bp_staged_get_dimensioncharacteristics(&(v->characteristics[start_idx + idx])
+            is_global = adios_read_bp_staged1_get_dimensioncharacteristics(&(v->characteristics[start_idx + idx])
                                                                           ,ldims
                                                                           ,gdims
                                                                           ,offsets
@@ -613,7 +2102,7 @@ candidate_reader * split_read_requests (ADIOS_GROUP * gp, candidate_reader * r)
                         "the data in dimension %d to read is %llu elements from index %llu"
                         " but the actual data is [0,%llu]), count_notime[1] = %llu, count_notime[2] = %llu\n",
                         varid, v->var_name, j + 1, count_notime[j], start_notime[j], gdims[j] - 1, count_notime[1], count_notime[2]);
-                    return 0;
+                    return;
                 }
 
                 /* check if there is any data in this pg and this dimension to read in */
@@ -655,6 +2144,7 @@ candidate_reader * split_read_requests (ADIOS_GROUP * gp, candidate_reader * r)
             assert (n->ra);
 
             n->ra->varid = r->ra->varid;
+            n->ra->ndims = r->ra->ndims;
 
             n->ra->start = (uint64_t *) malloc (ndim_notime * 8);
             assert (n->ra->start);
@@ -665,6 +2155,7 @@ candidate_reader * split_read_requests (ADIOS_GROUP * gp, candidate_reader * r)
             n->ra->file_idx = v->characteristics[start_idx + idx].file_index;
             n->ra->offset = v->characteristics[start_idx + idx].payload_offset;
             n->ra->parent = r;
+            n->ra->data = 0;
             n->next = 0;
 
             memcpy (n->ra->start, start_notime, ndim_notime * 8);
@@ -722,13 +2213,13 @@ candidate_reader * split_read_requests (ADIOS_GROUP * gp, candidate_reader * r)
             {
                 uint64_t stride_offset = 0;
                 int isize;
-                uint64_t size_in_dset[10];
-                uint64_t offset_in_dset[10];
-                uint64_t offset_in_var[10];
+                uint64_t size_in_dset[MAX_DIMS];
+                uint64_t offset_in_dset[MAX_DIMS];
+                uint64_t offset_in_var[MAX_DIMS];
 
-                memset(size_in_dset, 0 , 10 * 8);
-                memset(offset_in_dset, 0 , 10 * 8);
-                memset(offset_in_var, 0 , 10 * 8);
+                memset(size_in_dset, 0 , MAX_DIMS * 8);
+                memset(offset_in_dset, 0 , MAX_DIMS * 8);
+                memset(offset_in_var, 0 , MAX_DIMS * 8);
 
                 for (i = 0; i < ndim_notime; i++)
                 {
@@ -781,45 +2272,431 @@ candidate_reader * split_read_requests (ADIOS_GROUP * gp, candidate_reader * r)
             {
                 n->ra->size *= n->ra->count[i];
             }
-         
-            list_insert_reader (&h, n);
+        
+            if (v->characteristics[start_idx + idx].file_index >= f1
+               && v->characteristics[start_idx + idx].file_index <= f2)
+            {
+                list_insert_reader (h1, n);
+            }
+            else
+            {
+                list_insert_reader (h2, n);
+            }
+        }
+
+        free (idx_table);
+
+        if (isTimeless (file_tdim))
+            break;
+    } // end for (timestep ... loop over timesteps
+
+    if (dims)
+    {
+        free (dims);
+    }
+}
+
+#if 1
+/* Get number of vars in the file */
+int get_var_num (ADIOS_GROUP * gp)
+{
+    struct BP_GROUP * gh = (struct BP_GROUP *) gp->gh;
+    struct adios_index_var_struct_v1 * var_root = gh->vars_root;
+    int n = 0;
+
+    while (var_root)
+    {
+        var_root = var_root->next;
+        n++;
+    }
+
+    return n;
+}
+
+/* Get the number of buckets needed for a hash table */
+int get_num_bucket (ADIOS_GROUP * gp, int varid)
+{
+    struct adios_index_var_struct_v1 * v = adios_find_var_byid (gp, varid);
+
+    return v->characteristics_count;
+}
+
+/* To build hashtable for each individual var */
+void build_var_hash (ADIOS_GROUP * gp, int varid, int ** htable)
+{
+    int * ht, nbucket;
+ 
+    if (!htable)
+    {
+        return;
+    }
+
+    nbucket = get_num_bucket (gp, varid);  
+    * htable = (int *) malloc (4 * nbucket);
+    assert (* htable);
+}
+
+/* To build a metadata hash table.
+   The hashtable maps 'key' to 'index'.
+*/
+static void build_hash (struct proc_struct * p)
+{
+    candidate_reader * r;
+    int idx, i, offset;
+
+    p->ht = (bucket *) malloc (HT_SIZE * sizeof (bucket));
+    assert (p->ht);
+
+    for (i = 0; i < HT_SIZE; i++)
+    {
+        p->ht[i].h = 0;
+        p->ht[i].size = 0;
+        p->ht[i].offset = 0;
+    }
+
+    /* First pass to figure out the size of each bucket*/
+    r = p->split_read_request_list2;
+    while (r)
+    {
+        idx = r->ra->start[0] % HT_SIZE;
+        p->ht[idx].size++; 
+
+        r = r->next;
+    }
+
+    /* Second pass to construct HT */
+    r = p->split_read_request_list2;
+    while (r)
+    {
+        idx = r->ra->start[0] % HT_SIZE;
+
+        if (!p->ht[idx].h)
+        {
+            p->ht[idx].h = calloc (p->ht[idx].size, sizeof (candidate_reader *));
+            assert (p->ht[idx].h);
+        }
+
+        p->ht[idx].h[p->ht[idx].offset++] = r;
+
+        r = r->next;
+    }
+    
+
+}
+
+/* To free hashtable */
+void free_hash (struct proc_struct * p)
+{
+    int i;
+
+    for (i = 0; i < HT_SIZE; i++)
+    {
+        if (p->ht[i].h)
+        {
+            free (p->ht[i].h);
+            p->ht[i].h = 0;
+        }
+    }
+
+    if (p->ht)
+    {
+        free (p->ht);
+        p->ht = 0;
+    }
+} 
+#endif
+
+/* Split orginal read requests into split_read_request_list1
+   and split_read_request_list2.
+*/
+static void process_read_requests (struct proc_struct * p)
+{
+    candidate_reader * h = p->local_read_request_list;
+    candidate_reader * n1, * n2, * t1 = 0, * t2 = 0;
+int c = 0;
+struct timeval t3, t4, t5;
+
+    while (h)
+    {
+        n1 = n2 = 0;
+
+gettimeofday (&t3, NULL);
+        split_read_request (p->gp, h, &n1, &n2);
+
+gettimeofday (&t4, NULL);
+        if (n1)
+        {
+            list_append_reader_list (&p->split_read_request_list1, &t1, n1);
+        }
+
+        if (n2)
+        {
+            list_append_reader_list (&p->split_read_request_list2, &t2, n2);
+        }
+gettimeofday (&t5, NULL);
+
+//printf ("[%3d] insdie process_read_request = %f,%f\n", p->rank, t4.tv_sec - t3.tv_sec + (double)(t4.tv_usec - t3.tv_usec)/1000000, t5.tv_sec - t4.tv_sec + (double)(t5.tv_usec - t4.tv_usec)/1000000);
+        h = h->next;
+c++;
+    }
+
+//    printf ("[%3d] count = %d\n", p->rank, c);
+}
+
+int get_num_subfiles (struct BP_FILE * fh)
+{
+    struct adios_bp_buffer_struct_v1 * b = fh->b;
+    struct adios_index_var_struct_v1 ** vars_root = &(fh->vars_root);
+    struct bp_minifooter * mh = &(fh->mfooter);
+    struct adios_index_var_struct_v1 ** root;
+    int i, j, n = 0;
+
+    root = vars_root;
+    for (i = 0; i < mh->vars_count; i++)
+    {
+        for (j = 0; j < (*root)->characteristics_count; j++)
+        {
+            if ((*root)->characteristics [j].file_index > n)
+            {
+                n = (*root)->characteristics [j].file_index;
+            }
+        }
+    }
+
+    return n + 1;
+}
+
+
+int is_fortran_file (ADIOS_GROUP * gp)
+{
+    struct BP_GROUP * gh;
+    struct BP_FILE * fh;
+
+    gh = (struct BP_GROUP *) gp->gh;
+    fh = gh->fh;
+
+    return (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
+}
+
+int has_subfiles (ADIOS_GROUP * gp)
+{
+    struct BP_GROUP * gh;
+    struct BP_FILE * fh;
+
+    gh = (struct BP_GROUP *) gp->gh;
+    fh = gh->fh;
+
+    return (fh->mfooter.version & ADIOS_VERSION_HAVE_SUBFILE);
+}
+
+static enum ADIOS_DATATYPES get_type (ADIOS_GROUP * gp, int varid)
+{
+    struct adios_index_var_struct_v1 * v = adios_find_var_byid (gp, varid);
+
+    return v->type;
+}
+
+static int get_type_size (ADIOS_GROUP * gp, int varid)
+{
+    struct adios_index_var_struct_v1 * v;
+
+    v = adios_find_var_byid (gp, varid);
+
+    return bp_get_type_size (v->type, v->characteristics [0].value);
+}
+
+/* This routine copies data from child request buffer to parent request buffer */
+static void copy_buffer (ADIOS_GROUP * gp, candidate_reader * parent, candidate_reader * child)
+{
+    uint64_t * p_start, * p_count, * c_start, * c_count; 
+    int i, j, k, varid, size_unit, break_dim;
+    uint64_t datasize, dset_stride, var_stride, total_size = 0, items_read, size;
+    uint64_t * count_notime, * start_notime;
+    read_info ri;
+
+    varid = parent->ra->varid;
+
+    // PARENT read request
+    p_start = parent->ra->start;
+    p_count = parent->ra->count;
+
+    // CHILD request after split
+    c_start = child->ra->start;
+    c_count = child->ra->count;
+
+    memset (&ri, 0, sizeof (read_info));
+
+    /* parent requests are the original requests and hence
+       are needed to remove time dimension.
+    */
+    getReadInfo (gp, varid, p_start, p_count, &ri);
+    start_notime = ri.start_notime;
+    count_notime = ri.count_notime;
+
+    /* items_read = how many data elements are we going to read in total (per timestep) */
+    items_read = 1;
+    for (i = 0; i < ri.ndim_notime; i++)
+    {
+        items_read *= count_notime[i];
+    }
+    
+    size_unit = get_type_size (gp, varid);
+
+    if (ri.ndim_notime == 0)
+    {
+        if (get_type (gp, varid) == adios_string)
+        {
+            // strings are stored without \0 in file
+            // get_type_size() return the length that includes \0
+            size_unit--;
+        }
+
+        /* ALLOCATE MEMORY IN PARENT REQUEST */
+        if (parent->ra->data == 0)
+        {
+            parent->ra->data = malloc (parent->ra->size);
+            assert (parent->ra->data);
+        }
+
+        memcpy (parent->ra->data, child->ra->data, size_unit);
+
+        if (get_type (gp, varid) == adios_string)
+        {
+            ((char *)parent->ra->data + total_size)[size_unit] = '\0';
+        }
+
+        total_size += size_unit;
+
+        if (isTimeless (ri.file_tdim))
+        {
+//          break;
+        }
+        else
+        {
+//          continue;
+        }
+    }
+
+    /* READ AN ARRAY VARIABLE */
+    datasize = 1;
+    var_stride = 1;
+    dset_stride = 1;
+    break_dim =  ri.ndim_notime - 1;
+
+    while (break_dim > -1)
+    {
+        if (start_notime[break_dim] == c_start[break_dim] && c_count[break_dim] == count_notime[break_dim])
+        {
+            datasize *= c_count[break_dim];
+        }
+        else
+            break;
+
+        break_dim--;
+    }
+
+    if (break_dim == -1)
+    {
+        if (parent->ra->data == 0)
+        {
+            parent->ra->data = malloc (parent->ra->size);
+            assert (parent->ra->data);
+        }
+   
+        memcpy (parent->ra->data, child->ra->data, child->ra->size);
+    }
+    else if (break_dim == 0) 
+    {
+        uint64_t write_offset = (c_start[0] - start_notime[0]) * size_unit;
+
+        for (i = 1; i < ri.ndim_notime; i++)
+        {
+            write_offset *= count_notime[i];
         }
 
-        free (idx_table);
+        /* ALLOCATE PARENT BUFFER IF HAVEN'T DONE SO */
+        if (parent->ra->data == 0)
+        {
+            parent->ra->data = malloc (parent->ra->size);
+        }
 
-        if (isTimeless (file_tdim))
-            break;
-    } // end for (timestep ... loop over timesteps
+        assert (parent->ra->data);
+        assert (child->ra->data);
 
-    if (dims)
-    {
-        free (dims);
+        memcpy (parent->ra->data + write_offset, child->ra->data, child->ra->size);
     }
+    else 
+    {
+        uint64_t stride_offset = 0, var_offset = 0, dset_offset = 0;
+        uint64_t * size_in_dset, * offset_in_dset, * offset_in_var;
 
-    return h;
-}
+        size_in_dset = malloc (ri.ndim_notime * 8);
+        offset_in_dset = malloc (ri.ndim_notime * 8);
+        offset_in_var = malloc (ri.ndim_notime * 8);
 
-static void process_read_requests (struct proc_struct * p)
-{
-    candidate_reader * h = p->local_read_request_list, * n;
+        assert (size_in_dset);
+        assert (offset_in_dset);
+        assert (offset_in_var);
 
-    while (h)
-    {
-        n = split_read_requests (p->gp, h);
+        datasize = 1;
+        var_stride = 1;
+        var_offset = 0;
+
+        for (i = 0; i < ri.ndim_notime; i++)
+        {
+            offset_in_dset[i] = 0;
+            size_in_dset[i] = c_count[i];
+            offset_in_var[i] = c_start[i] - start_notime[i];
+            var_offset = offset_in_var[i] + var_offset * count_notime[i];
+        }
+  
+        for (i = ri.ndim_notime - 1; i >= break_dim; i--)
+        {
+            datasize *= size_in_dset[i];
+            dset_stride *= c_count[i];
+            var_stride *= count_notime[i];
+        }
+    
+        if (parent->ra->data == 0)
+        {
+            parent->ra->data = malloc (parent->ra->size);
+            assert (parent->ra->data);
+        }
 
-        list_append_reader_list (&p->split_read_request_list, n);
+        copy_data (parent->ra->data
+                  ,child->ra->data
+                  ,0
+                  ,break_dim
+                  ,size_in_dset
+                  ,c_count
+                  ,count_notime
+                  ,var_stride
+                  ,dset_stride
+                  ,var_offset
+                  ,dset_offset
+                  ,datasize
+                  ,size_unit 
+                  );
 
-        h = h->next;
+        free (size_in_dset);
+        free (offset_in_dset);
+        free (offset_in_var);
     }
-}
 
-void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
-                                       ,uint64_t buffer_offset
-                                       ,candidate_reader * r
-                                       ,candidate_reader * s
-                                       )
+/*
+    data = (char *)data + (items_read * size_unit);
+*/
+    if (isTimeless (ri.file_tdim))
+//      break;
+
+    freeReadInfo (&ri);
+}
+void adios_read_bp_staged1_read_buffer (ADIOS_GROUP * gp
+                                      ,uint64_t buffer_offset
+                                      ,candidate_reader * r
+                                      ,candidate_reader * s
+                                      )
 {
-#define MAX_DIMS 32
     struct BP_GROUP * gh;
     struct BP_FILE * fh;
     struct adios_index_var_struct_v1 * v;
@@ -828,7 +2705,7 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
     int varid, start_idx, stop_idx, has_subfile, file_is_fortran;
     uint64_t ldims[MAX_DIMS], gdims[MAX_DIMS], offsets[MAX_DIMS];
     uint64_t datasize, dset_stride, var_stride, total_size = 0, items_read, size;
-    uint64_t count_notime[MAX_DIMS], start_notime[MAX_DIMS];
+    uint64_t * count_notime, * start_notime;
     int is_global = 0, size_unit, break_dim, idx_check1, idx_check2;
     uint64_t slice_offset, slice_size;
     void * data;
@@ -838,9 +2715,6 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
     fh = gh->fh;
     varid = r->ra->varid;
 
-    // data is in "original read request" buffer
-    data = r->ra->data;
-
     // orginal read request
     r_start = r->ra->start;
     r_count = r->ra->count;
@@ -849,16 +2723,18 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
     s_start = s->ra->start;
     s_count = s->ra->count;
 
-    file_is_fortran = (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
-    has_subfile = fh->mfooter.version & ADIOS_VERSION_HAVE_SUBFILE;
+    file_is_fortran = is_fortran_file (gp);
+    has_subfile = has_subfiles (gp);
 
     v = adios_find_var_byid (gp, varid);
 
     memset (&ri, 0, sizeof (read_info));
-    ri.start_notime = start_notime;
-    ri.count_notime = count_notime;
 
-    getReadInfo (gp, v, r_start, r_count, &ri);
+    getReadInfo (gp, varid, r_start, r_count, &ri);
+//    start_notime = ri.start_notime;
+//    count_notime = ri.count_notime;
+    start_notime = s_start;
+    count_notime = s_count;
 
     /* items_read = how many data elements are we going to read in total (per timestep) */
     items_read = 1;
@@ -899,6 +2775,12 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
 
             slice_offset = v->characteristics[start_idx + idx].payload_offset;
 
+            /* ALLOCATE MEMORY IN CHILD REQUEST */
+            s->ra->data = malloc (slice_size);
+            assert (s->ra->data);
+
+            data = s->ra->data;
+
             memcpy (data, fh->b->buff + slice_offset - buffer_offset, size_unit);
             if (fh->mfooter.change_endianness == adios_flag_yes)
             {
@@ -939,7 +2821,7 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
             idx_check2 = 1;
     
             /* Each pg can have a different sized array, so we need the actual dimensions from it */
-            is_global = adios_read_bp_staged_get_dimensioncharacteristics (&(v->characteristics[start_idx + idx])
+            is_global = adios_read_bp_staged1_get_dimensioncharacteristics (&(v->characteristics[start_idx + idx])
                                                                            ,ldims
                                                                            ,gdims
                                                                            ,offsets
@@ -1033,7 +2915,12 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
                 slice_offset = v->characteristics[start_idx + idx].payload_offset;
 
                 if (idx_check2)
-                { 
+                {
+                    s->ra->data = malloc (slice_size);
+                    assert (s->ra->data);
+   
+                    data = s->ra->data;
+ 
                     memcpy (data, fh->b->buff + slice_offset - buffer_offset, slice_size);
                     if (fh->mfooter.change_endianness == adios_flag_yes)
                     {
@@ -1083,20 +2970,33 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
                 slice_size = size_in_dset * datasize * size_unit;
                 slice_offset = v->characteristics[start_idx + idx].payload_offset 
                                  + offset_in_dset * datasize * size_unit;
-        
+/*
                 write_offset = offset_in_var * size_unit;
                 for (i = 1; i < ri.ndim_notime; i++)
                 {
                     write_offset *= count_notime[i];
                 }
-
+*/
                 if (idx_check2)
                 {
+                    s->ra->data = malloc (slice_size);
+                    assert (s->ra->data);
+   
+                    data = s->ra->data;
+/*
                     memcpy (data + write_offset, fh->b->buff + slice_offset - buffer_offset, slice_size);
+*/
+                    memcpy (data, fh->b->buff + slice_offset - buffer_offset, slice_size);
+/*
                     if (fh->mfooter.change_endianness == adios_flag_yes)
                     {
                         change_endianness ((char *) data + write_offset, slice_size, v->type);
                     }
+*/
+                    if (fh->mfooter.change_endianness == adios_flag_yes)
+                    {
+                        change_endianness ((char *) data, slice_size, v->type);
+                    }
                 }
             }
             else 
@@ -1161,17 +3061,20 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
                     var_stride *= count_notime[i];
                 }
     
-                uint64_t start_in_payload = 0, end_in_payload = 0, s = 1;
+                uint64_t start_in_payload = 0, end_in_payload = 0, s_temp = 1;
                 uint64_t var_offset = 0, dset_offset = 0;
 
                 for (i = ri.ndim_notime - 1; i > -1; i--)
                 {
-                    start_in_payload += s * offset_in_dset[i] * size_unit;
-                    end_in_payload += s * (offset_in_dset[i] + size_in_dset[i] - 1) * size_unit;
-                    s *= ldims[i];
+                    start_in_payload += s_temp * offset_in_dset[i] * size_unit;
+                    end_in_payload += s_temp * (offset_in_dset[i] + size_in_dset[i] - 1) * size_unit;
+                    s_temp *= ldims[i];
                 }
-    
+
                 slice_size = end_in_payload - start_in_payload + 1 * size_unit;
+/*
+                slice_size = datasize * size_unit; 
+*/
                 slice_offset =  v->characteristics[start_idx + idx].payload_offset
                                   + start_in_payload;
  
@@ -1188,8 +3091,49 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
 
                 if (idx_check2)
                 {
+/*
+                    s->ra->data = malloc (slice_size);
+*/
+/*
+int rank;
+MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+printf ("[%d: %d] s->ra->size = %llu, datasize = %llu, slice_size = %llu\n", rank, r->rank, s->ra->size, datasize, slice_size);
+*/
+                    s->ra->data = malloc (s->ra->size);
+
+                    assert (s->ra->data);
+
+                    data = s->ra->data;
+/*
+                    memcpy (data, fh->b->buff + slice_offset - buffer_offset, slice_size);
+
+
+                    if (fh->mfooter.change_endianness == adios_flag_yes)
+                    {   
+                        change_endianness ((char *) data, slice_size, v->type);
+                    }
+*/
+
+/*
+printf ("copy_data: %7.5g %7.5g %7.5g %7.5g %7.5g %7.5g %7.5g %7.5g %7.5g %7.5g\n"
+       , * (double *) (fh->b->buff + slice_offset - buffer_offset)
+       , * ((double *) (fh->b->buff + slice_offset - buffer_offset) + 1)
+       , * ((double *) (fh->b->buff + slice_offset - buffer_offset) + 2)
+       , * ((double *) (fh->b->buff + slice_offset - buffer_offset) + 3)
+       , * ((double *) (fh->b->buff + slice_offset - buffer_offset) + 4)
+       , * ((double *) (fh->b->buff + slice_offset - buffer_offset) + 5)
+       , * ((double *) (fh->b->buff + slice_offset - buffer_offset) + 6)
+       , * ((double *) (fh->b->buff + slice_offset - buffer_offset) + 7)
+       , * ((double *) (fh->b->buff + slice_offset - buffer_offset) + 8)
+       , * ((double *) (fh->b->buff + slice_offset - buffer_offset) + 9)
+       );
+*/
+
+/*
+printf ("var_stride = %lu, dset_stride = %lu, var_offset = %lu, dset_offset = %lu, datasize = %lu, size_unit = %d\n", var_stride, dset_stride, var_offset, dset_offset, datasize, size_unit); 
+*/
                     copy_data (data
-                              ,fh->b->buff + fh->b->offset + slice_offset - buffer_offset
+                              ,fh->b->buff + slice_offset - buffer_offset
                               ,0
                               ,break_dim
                               ,size_in_dset
@@ -1203,25 +3147,35 @@ void adios_read_bp_staged_read_buffer (ADIOS_GROUP * gp
                               ,size_unit 
                               );
 
+//printf ("after copy_data = %7.5f %7.5f %7.5f %7.5f\n", * (double *) data, * ((double *) data + 1), * ((double *) data + 2), * ((double *) data + 3));
+/*
+MPI_Comm_rank (MPI_COMM_WORLD, &rank);
+if (rank != 0)
+while (1);
+*/
+/*
+                    if (fh->mfooter.change_endianness == adios_flag_yes)
+                    {   
+                        change_endianness ((char *) data, slice_size, v->type);
+                    }
+*/
+
                 }
             }
         }  // for idx ... loop over pgs
 
+/*
         // shift target pointer for next read in
         data = (char *)data + (items_read * size_unit);
-
+*/
         if (isTimeless (ri.file_tdim))
             break;
     } // for t
 
-    if (ri.dims)
-    {
-        free (ri.dims);
-    }
-#undef MAX_DIMS
+    freeReadInfo (&ri);
 }
 
-void adios_read_bp_staged_read_chunk (ADIOS_GROUP * gp, int file_idx, uint64_t chunk_offset, uint64_t size)
+void adios_read_bp_staged1_read_chunk (ADIOS_GROUP * gp, int file_idx, uint64_t chunk_offset, uint64_t size)
 {
     struct BP_GROUP * gh;
     struct BP_FILE * fh;
@@ -1319,26 +3273,26 @@ gettimeofday (&t0, NULL);
 
 }
 
-/* 
-The read request link list needs to be sorted beforehand
+/* The read request link list needs to be sorted beforehand
 */
-void do_read (struct proc_struct * p)
+static void do_read (struct proc_struct * p)
 {
-// Chunk size is set to 32 MB
     void * data = 0;
     int i, counter = 0;
     int file_idx;
     uint64_t offset, payload_size;
-struct timeval t0;
-struct timeval t1;
-double t2, t3, t4, t5;
-
-    candidate_reader * s = p->split_read_request_list, * f_start = s, * f_end = s;
+#if DEBUG
+    struct timeval t0;
+    struct timeval t1;
+    double t2, t3, t4, t5;
+#endif
+    candidate_reader * s = p->split_read_request_list1, * f_start = s, * f_end = s;
     candidate_reader * o_start = s, * o_end = s, * o_prev_end = 0, * parent = 0;
 
+#if DEBUG
     gettimeofday (&t0, NULL);
-
     t2 = MPI_Wtime();
+#endif
 
     while (f_start)
     {
@@ -1354,52 +3308,60 @@ double t2, t3, t4, t5;
         o_end = f_start;
         o_prev_end = 0;
 
-        while (o_start != f_end)         
+        if (o_start->ra->file_idx >= p->f1 && o_start->ra->file_idx <= p->f2)
         {
-            // Find a set of requests that fall into chunk size, i.e., [o_start, o_end)
-            while (o_end && o_end != f_end && o_end->ra->offset - o_start->ra->offset <= p->chunk_size)
+            while (o_start != f_end)         
             {
-                o_prev_end = o_end;
-                o_end = o_end->next;
-            }
-
-            // Calculate the var payload size of the last request
-            getDataAddress (p->gp, o_prev_end->ra->varid, o_prev_end->ra->start, o_prev_end->ra->count, &file_idx, &offset, &payload_size);;
-//printf ("o_start.offset = %llu\n", o_start->ra->offset);
-//printf ("o_prev_end.offset = %llu\n", o_prev_end->ra->offset);
+                // Find a set of requests that fall into chunk size, i.e., [o_start, o_end)
+                while (o_end && o_end != f_end && o_end->ra->offset - o_start->ra->offset <= p->chunk_size)
+                {
+                    o_prev_end = o_end;
+                    o_end = o_end->next;
+                }
 
-            t4 = MPI_Wtime ();
-            // read a chunk from file into internal buffer
-            adios_read_bp_staged_read_chunk (p->gp, o_start->ra->file_idx, o_start->ra->offset, o_prev_end->ra->offset - o_start->ra->offset + payload_size); 
+                // Calculate the var payload size of the last request
+                getDataAddress (p->gp, o_prev_end->ra->varid, o_prev_end->ra->start, o_prev_end->ra->count, &file_idx, &offset, &payload_size);
+#if DEBUG
+                //printf ("o_start.offset = %llu\n", o_start->ra->offset);
+                //printf ("o_prev_end.offset = %llu\n", o_prev_end->ra->offset);
 
-            t5 = MPI_Wtime ();
-//    printf ("read chunk = %f \n", t5 - t4);
+                t4 = MPI_Wtime ();
+#endif
+                // read a chunk from file into internal buffer
+                adios_read_bp_staged1_read_chunk (p->gp, o_start->ra->file_idx, o_start->ra->offset, o_prev_end->ra->offset - o_start->ra->offset + payload_size); 
 
-            s = o_start;
-            do
-            {
-                parent = s->ra->parent;
-                // copy data from internal buffer to user buffer
-//                adios_read_bp_staged_read_buffer (p->gp, o_start->ra->offset, parent, s);
+#if DEBUG
+                t5 = MPI_Wtime ();
+                //    printf ("read chunk = %f \n", t5 - t4);
+#endif
+                s = o_start;
+                do
+                {
+                    parent = s->ra->parent;
+                    // copy data from internal buffer to user buffer
+                    adios_read_bp_staged1_read_buffer (p->gp, o_start->ra->offset, parent, s);
 
-                s = s->next;
-            } while (s != o_end);
+                    s = s->next;
+                } while (s != o_end);
 
-            o_start = o_end;
-            o_prev_end = 0;
+                o_start = o_end;
+                o_prev_end = 0;
+            }
         }
 
         f_start = f_end;
     }
 
+#if DEBUG
     gettimeofday (&t1, NULL);
     t3 = MPI_Wtime ();
 
 //    printf ("while time = %f \n", t1.tv_sec - t0.tv_sec + (double)(t1.tv_usec - t0.tv_usec)/1000000 );
 //    printf ("while time = %f \n", t3 - t2);
+#endif
 }
 
-void free_candidate_reader_list (candidate_reader * h)
+static void free_candidate_reader_list (candidate_reader * h)
 {
     candidate_reader * n;
     while (h)
@@ -1426,9 +3388,10 @@ void free_candidate_reader_list (candidate_reader * h)
     }
 }
 
-void free_proc_struct (struct proc_struct * p)
+static void free_proc_struct (struct proc_struct * p)
 {
     candidate_reader * h = p->local_read_request_list, * n;
+
     while (h)
     {
         n = h->next;
@@ -1443,6 +3406,7 @@ void free_proc_struct (struct proc_struct * p)
             free (h->ra->count);
         }
 
+        /* DO NOT free if the request is from aggregator itself */
         if (h->ra && h->ra->data && h->rank != p->rank)
         {
             free (h->ra->data);
@@ -1457,7 +3421,8 @@ void free_proc_struct (struct proc_struct * p)
         h = n;
     }
 
-    h = p->split_read_request_list;
+    /* Free both split_read_request_list1 and split_read_request_list2 */
+    h = p->split_read_request_list1;
     while (h)
     {
         n = h->next;
@@ -1472,6 +3437,42 @@ void free_proc_struct (struct proc_struct * p)
             free (h->ra->count); 
         }
 
+        /* h->ra->data should have already been freed after copy_buffer() */
+        if (h->ra && h->ra->data)
+        {
+            free (h->ra->data);
+        }
+
+        if (h->ra)
+        {
+            free (h->ra);
+        }
+
+        free (h);
+        h = n;
+    }
+
+    h = p->split_read_request_list2;
+    while (h)
+    {
+        n = h->next;
+
+        if (h->ra && h->ra->start)
+        {
+            free (h->ra->start);
+        }
+
+        if (h->ra && h->ra->count)
+        {
+            free (h->ra->count);
+        }
+
+        /* h->ra->data should have already been freed after copy_buffer() */
+        if (h->ra && h->ra->data)
+        {
+            free (h->ra->data);
+        }
+
         if (h->ra)
         {
             free (h->ra);
@@ -1492,7 +3493,7 @@ void free_proc_struct (struct proc_struct * p)
     }
 }
 
-void init_read (struct BP_FILE * fh)
+static void init_read (struct BP_FILE * fh)
 {
     int thread_level, i, remain;
     int color1, color2;
@@ -1588,7 +3589,9 @@ void init_read (struct BP_FILE * fh)
     p->group_comm = fh->comm;
 
     p->local_read_request_list = 0;
-    p->split_read_request_list = 0;
+    p->split_read_request_list1 = 0;
+    p->split_read_request_list2 = 0;
+    p->ht = 0;
     p->b = 0;
     p->read_close_received = 0;
     p->group_close_received = 0;
@@ -1641,7 +3644,7 @@ static void close_all_BP_files (struct BP_file_handle * l)
  * We know if it is different from the current system, so here
  * we determine the current endianness and report accordingly.
  */
-static int adios_read_bp_staged_get_endianness( uint32_t change_endianness )
+static int adios_read_bp_staged1_get_endianness( uint32_t change_endianness )
 {
    int LE = 0;
    int BE = !LE;
@@ -1684,15 +3687,15 @@ static int getNumSubfiles (const char * fname)
     return n;
 }
 
-int adios_read_bp_staged_init (MPI_Comm comm) { return 0; }
-int adios_read_bp_staged_finalize () { return 0; }
+int adios_read_bp_staged1_init (MPI_Comm comm) { return 0; }
+int adios_read_bp_staged1_finalize () { return 0; }
 
-void broadcast_fh_buffer (struct BP_FILE * fh)
+static void broadcast_fh_buffer (struct BP_FILE * fh)
 {
     struct bp_index_pg_struct_v1 * pgs_root = fh->pgs_root, * pg;
     struct adios_index_var_struct_v1 * vars_root = fh->vars_root, * v;
     struct adios_index_attribute_struct_v1 * attrs_root = fh->attrs_root;
-    void * buffer;
+    char * buffer;
     uint64_t buffer_size, buffer_offset = 0;
     int i, j, timedim;
     uint16_t len;
@@ -1767,7 +3770,6 @@ void broadcast_fh_buffer (struct BP_FILE * fh)
         vars_root = fh->vars_root;
         while (vars_root)
         {
-uint64_t bo = buffer_offset;
             _buffer_write (&buffer, &buffer_size, &buffer_offset, &vars_root->id, 2); // id
 
             len = strlen (vars_root->group_name);
@@ -1814,7 +3816,7 @@ fprintf (stderr, "bc %s bo 1 = %llu, bo 2 = %llu, len = %d\n", vars_root->var_na
 
             }
 
-            adios_read_bp_staged_free_varinfo (vi);
+            adios_read_bp_staged1_free_varinfo (vi);
 
             vars_root = vars_root->next;
         }
@@ -2043,9 +4045,9 @@ fprintf (stderr, "bc 1 v->id = %d, bo 1 = %llu, bo 2 = %llu, v->var_name = %s\n"
     }
 }
 
-ADIOS_FILE * adios_read_bp_staged_fopen (const char * fname, MPI_Comm comm)
+ADIOS_FILE * adios_read_bp_staged1_fopen (const char * fname, MPI_Comm comm)
 {
-    int i, rank;
+    int i, rank, remain;
     struct BP_FILE * fh;
     ADIOS_FILE * fp;
     uint64_t header_size;
@@ -2114,6 +4116,34 @@ ADIOS_FILE * adios_read_bp_staged_fopen (const char * fname, MPI_Comm comm)
         bp_parse_vars (fh);
         bp_parse_attrs (fh);
 
+        /* find out how many subfiles */
+        p->n_total_sf = get_num_subfiles (fh);
+        p->n_my_sf = p->n_total_sf / p->groups;
+        remain = p->n_total_sf - p->n_my_sf * p->groups;
+
+        if (remain == 0)
+        {   
+            p->f1 = p->group * p->n_my_sf;
+            p->f2 = (p->group + 1) * p->n_my_sf - 1;
+        }  
+        else
+        {
+            if (p->group < remain)
+            {   
+                p->f1 = p->group * (p->n_my_sf + 1);
+                p->f2 = p->f1 + p->n_my_sf;
+
+                p->n_my_sf++;
+            }
+            else
+            {   
+                p->f1 = remain * (p->n_my_sf + 1) + (p->group - remain) * p->n_my_sf;
+                p->f2 = p->f1 + p->n_my_sf - 1;
+            }
+        }
+
+//printf ("rank: %d, f1 = %d, f2 = %d\n", p->rank, p->f1, p->f2);
+
         /* fill out ADIOS_FILE struct */
         fp->vars_count = fh->mfooter.vars_count;
         fp->attrs_count = fh->mfooter.attrs_count;
@@ -2121,7 +4151,7 @@ ADIOS_FILE * adios_read_bp_staged_fopen (const char * fname, MPI_Comm comm)
         fp->ntimesteps = fh->tidx_stop - fh->tidx_start + 1;
         fp->file_size = fh->mfooter.file_size;
         fp->version = fh->mfooter.version;
-        fp->endianness = adios_read_bp_staged_get_endianness (fh->mfooter.change_endianness);
+        fp->endianness = adios_read_bp_staged1_get_endianness (fh->mfooter.change_endianness);
     }
 
     broadcast_fh_buffer (fh);
@@ -2150,7 +4180,7 @@ ADIOS_FILE * adios_read_bp_staged_fopen (const char * fname, MPI_Comm comm)
 /* This function can be called if user places 
    the wrong sequences of dims for a var 
 */   
-void adios_read_bp_staged_reset_dimension_order (ADIOS_FILE *fp, int is_fortran)
+void adios_read_bp_staged1_reset_dimension_order (ADIOS_FILE *fp, int is_fortran)
 {
     struct BP_FILE * fh = (struct BP_FILE *)(fp->fh);
     struct bp_index_pg_struct_v1 ** root = &(fh->pgs_root);
@@ -2164,7 +4194,7 @@ void adios_read_bp_staged_reset_dimension_order (ADIOS_FILE *fp, int is_fortran)
     }
 }
 
-int adios_read_bp_staged_fclose (ADIOS_FILE *fp) 
+int adios_read_bp_staged1_fclose (ADIOS_FILE *fp) 
 {
     struct BP_FILE * fh = (struct BP_FILE *) fp->fh;
     struct BP_GROUP_VAR * gh = fh->gvar_h;
@@ -2294,7 +4324,9 @@ int adios_read_bp_staged_fclose (ADIOS_FILE *fp)
             if (gh->time_index && gh->time_index[j])
                 free(gh->time_index[j]);
         }
-        free (gh->time_index);
+        
+        if (gh->time_index)
+            free (gh->time_index);
     
         for (i=0;i<gh->group_count;i++) { 
             if (gh->namelist[i])
@@ -2356,7 +4388,7 @@ int adios_read_bp_staged_fclose (ADIOS_FILE *fp)
 }
 
 
-ADIOS_GROUP * adios_read_bp_staged_gopen (ADIOS_FILE *fp, const char * grpname)
+ADIOS_GROUP * adios_read_bp_staged1_gopen (ADIOS_FILE *fp, const char * grpname)
 {
     struct BP_FILE * fh = (struct BP_FILE *) fp->fh;
     int grpid, rank, nproc; 
@@ -2374,14 +4406,14 @@ ADIOS_GROUP * adios_read_bp_staged_gopen (ADIOS_FILE *fp, const char * grpname)
         return NULL;
     }
 
-    gp = adios_read_bp_staged_gopen_byid (fp, grpid);
+    gp = adios_read_bp_staged1_gopen_byid (fp, grpid);
 
     p->gp = gp; 
 
     return gp;
 }
 
-ADIOS_GROUP * adios_read_bp_staged_gopen_byid (ADIOS_FILE *fp, int grpid)
+ADIOS_GROUP * adios_read_bp_staged1_gopen_byid (ADIOS_FILE *fp, int grpid)
 {
     struct BP_FILE * fh = (struct BP_FILE *) fp->fh;
     struct BP_GROUP * gh;
@@ -2449,7 +4481,7 @@ ADIOS_GROUP * adios_read_bp_staged_gopen_byid (ADIOS_FILE *fp, int grpid)
     for (i=0;i<gp->vars_count;i++) {
         if (!gp->var_namelist[i]) { 
             adios_error (err_no_memory, "Could not allocate buffer for %d strings in adios_gopen()", gp->vars_count);
-            adios_read_bp_staged_gclose(gp);
+            adios_read_bp_staged1_gclose(gp);
             return NULL;
         }
         else
@@ -2461,7 +4493,7 @@ ADIOS_GROUP * adios_read_bp_staged_gopen_byid (ADIOS_FILE *fp, int grpid)
     for (i=0;i<gp->attrs_count;i++) {
         if (!gp->attr_namelist[i]) {
             adios_error (err_no_memory, "Could not allocate buffer for %d strings in adios_gopen()", gp->vars_count);
-            adios_read_bp_staged_gclose(gp);
+            adios_read_bp_staged1_gclose(gp);
             return NULL;
         }
         else {
@@ -2472,31 +4504,31 @@ ADIOS_GROUP * adios_read_bp_staged_gopen_byid (ADIOS_FILE *fp, int grpid)
     return gp;
 }
                    
-int adios_read_bp_staged_gclose (ADIOS_GROUP * gp)
+int adios_read_bp_staged1_gclose (ADIOS_GROUP * gp)
 {
     struct BP_GROUP * gh = (struct BP_GROUP *) gp->gh;
     struct BP_FILE * fh = gh->fh;
     struct proc_struct * p = (struct proc_struct *) fh->priv;
-    candidate_reader * h = p->local_read_request_list;
+    candidate_reader * h = p->local_read_request_list, * t = 0;
     int i, type, count, varid, ndims, total_size, size = calc_data_size (p);
     void * buf;
 
     p->b = malloc (size);
-
     assert (p->b);
 
     buf = p->b;
 
-    // message type
-    type = READ_CLOSE;
-    buffer_write (&buf, &type, 4);
-
-    // count
-    count = list_get_length (h);
-    buffer_write (&buf, &count, 4);
-
+    /*  1. All rank packs their read requests.
+        2. An aggregator gets packed requests from all the processors in the group
+        3. Subsequently, all aggregators share with each other the requests it
+           received previously.
+        Note: the two-round communication is designed to avoid scalability issue so
+        that MPI_Allgatherv() call is done on a smaller scale.
+     */    
     while (h)
     {
+        buffer_write (&buf, &p->rank, 4);
+
         varid = h->ra->varid;
         ndims = h->ra->ndims;
 
@@ -2543,15 +4575,56 @@ int adios_read_bp_staged_gclose (ADIOS_GROUP * gp)
                 ,MPI_BYTE, p->aggregator_new_rank, p->new_comm
                 );
 
+
     if (isAggregator (p))
     {
-        for (i = 1; i < p->group_size; i++)
+#if 1
+        struct timeval t3, t31, t32, t33, t4;
+        gettimeofday (&t3, NULL);
+#endif
+
+        t = p->local_read_request_list;
+        if (!t)
+        {
+            p->local_read_request_list = parse_buffer (p, recv_buffer, total_size);
+        }
+        else
         {
-            parse_buffer (p, recv_buffer + offsets[i], p->aggregator_rank + i);
+            while (t->next)
+            {
+                t = t->next;
+            }
+
+            t->next = parse_buffer (p, recv_buffer, total_size);
         }
+
+#if 1
+        gettimeofday (&t31, NULL);
+#endif
+        shuffle_request (p);
+
+#if 1
+        gettimeofday (&t32, NULL);
+#endif
+
         free (recv_buffer);
 
+#if DEBUG
+        gettimeofday (&t33, NULL);
+#endif
+
         process_read_requests (p);
+#if DEBUG
+        gettimeofday (&t4, NULL);
+
+        printf ("[%3d] process read request = %f (%f,%f,%f,%f)\n", p->rank, t4.tv_sec - t3.tv_sec + (double)(t4.tv_usec - t3.tv_usec)/1000000
+                                                                    , t31.tv_sec - t3.tv_sec + (double)(t31.tv_usec - t3.tv_usec)/1000000
+                                                                    , t32.tv_sec - t31.tv_sec + (double)(t32.tv_usec - t31.tv_usec)/1000000
+                                                                    , t33.tv_sec - t32.tv_sec + (double)(t33.tv_usec - t32.tv_usec)/1000000
+                                                                    , t4.tv_sec - t33.tv_sec + (double)(t4.tv_usec - t33.tv_usec)/1000000);
+
+#endif
+
     }
 
     free (sizes);
@@ -2559,18 +4632,35 @@ int adios_read_bp_staged_gclose (ADIOS_GROUP * gp)
 
     if (isAggregator (p))
     {
-        sort_read_requests (p);
-        //list_print_readers (p, p->split_read_request_list);
-
-    struct timeval t0, t1;
-    gettimeofday (&t0, NULL);
+#if DEBUG
+        struct timeval t00;
+        gettimeofday (&t00, NULL);
+#endif
 
+        //sort_read_requests (p, &p->split_read_request_list1);
+        merge_sort_read_requests (p, &p->split_read_request_list1);
+#if DEBUG
+        struct timeval t0, t01, t1, t2;
+        gettimeofday (&t0, NULL);
+#endif
         do_read (p);
 
-    gettimeofday (&t1, NULL);
-//    printf ("[%3d] do_read time = %f\n", p->rank, t1.tv_sec - t0.tv_sec + (double)(t1.tv_usec - t0.tv_usec)/1000000);
+#if DEBUG
+        gettimeofday (&t01, NULL);
+#endif
+        shuffle_data (p);
 
+//while (1);
+#if DEBUG
+        gettimeofday (&t1, NULL);
+        printf ("[%3d] do_read time = (%f,%f,%f)\n", p->rank, t0.tv_sec - t00.tv_sec + (double)(t0.tv_usec - t00.tv_usec)/1000000, t01.tv_sec - t0.tv_sec + (double)(t01.tv_usec - t0.tv_usec)/1000000, t1.tv_sec - t01.tv_sec + (double)(t1.tv_usec - t01.tv_usec)/1000000);
+#endif
         send_read_data (p);
+
+#if DEBUG
+        gettimeofday (&t2, NULL);
+        printf ("[%3d] send_read_data time = %f\n", p->rank, t2.tv_sec - t1.tv_sec + (double)(t2.tv_usec - t1.tv_usec)/1000000);
+#endif
     }
     else
     {
@@ -2586,7 +4676,7 @@ int adios_read_bp_staged_gclose (ADIOS_GROUP * gp)
     return 0;
 }
 
-int adios_read_bp_staged_get_attr (ADIOS_GROUP * gp, const char * attrname, enum ADIOS_DATATYPES * type,
+int adios_read_bp_staged1_get_attr (ADIOS_GROUP * gp, const char * attrname, enum ADIOS_DATATYPES * type,
                     int * size, void ** data)
 {
     // Find the attribute: full path is stored with a starting / 
@@ -2624,10 +4714,10 @@ int adios_read_bp_staged_get_attr (ADIOS_GROUP * gp, const char * attrname, enum
         return adios_errno;
     }
 
-    return adios_read_bp_staged_get_attr_byid(gp, attrid, type, size, data);
+    return adios_read_bp_staged1_get_attr_byid(gp, attrid, type, size, data);
 }
 
-int adios_read_bp_staged_get_attr_byid (ADIOS_GROUP * gp, int attrid, 
+int adios_read_bp_staged1_get_attr_byid (ADIOS_GROUP * gp, int attrid, 
                     enum ADIOS_DATATYPES * type, int * size, void ** data)
 {
     int    i, offset, count;
@@ -2665,7 +4755,7 @@ int adios_read_bp_staged_get_attr_byid (ADIOS_GROUP * gp, int attrid,
         return adios_errno; 
     }
 
-    file_is_fortran = (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
+    file_is_fortran = is_fortran_file (gp);
 
     if (attr_root->characteristics[0].value) {
         /* Attribute has its own value */
@@ -2756,7 +4846,7 @@ int adios_read_bp_staged_get_attr_byid (ADIOS_GROUP * gp, int attrid,
                 return adios_errno;
             }
 
-            status = adios_read_bp_staged_read_var (gp, varname, &start, &count, tmpdata);
+            status = adios_read_bp_staged1_read_var (gp, varname, &start, &count, tmpdata);
             
             if (status < 0) {
                 char *msg = strdup(adios_get_last_errmsg());
@@ -2827,7 +4917,7 @@ static void swap_order (int n, uint64_t * array, int * tdim)
 /* Look up variable id based on variable name.
    Return index 0..gp->vars_count-1 if found, -1 otherwise
 */
-static int adios_read_bp_staged_find_var(ADIOS_GROUP *gp, const char *varname)
+static int adios_read_bp_staged1_find_var(ADIOS_GROUP *gp, const char *varname)
 {
     // Find the variable: full path is stored with a starting / 
     // Like in HDF5, we need to match names given with or without the starting /
@@ -2893,7 +4983,7 @@ static int adios_read_bp_staged_find_var(ADIOS_GROUP *gp, const char *varname)
 
 // NCSU - Reading the statistics
 /** Get value and statistics, allocate space for them too */
-static void adios_read_bp_staged_get_characteristics (struct adios_index_var_struct_v1 * var_root, ADIOS_VARINFO *vi)
+static void adios_read_bp_staged1_get_characteristics (struct adios_index_var_struct_v1 * var_root, ADIOS_VARINFO *vi)
 {
     int i, j, c, count = 1;
     int size, sum_size, sum_type;
@@ -3373,13 +5463,13 @@ static void adios_read_bp_staged_get_characteristics (struct adios_index_var_str
         free (sum_squares);
         free (gsum_square);
     } 
-*/   
+*/
 }
 
 /* get local and global dimensions and offsets from a variable characteristics 
    return: 1 = it is a global array, 0 = local array
 */
-static int adios_read_bp_staged_get_dimensioncharacteristics (
+static int adios_read_bp_staged1_get_dimensioncharacteristics (
                            struct adios_index_characteristic_struct_v1 * c
                           ,uint64_t * ldims
                           ,uint64_t * gdims
@@ -3405,7 +5495,7 @@ static int adios_read_bp_staged_get_dimensioncharacteristics (
     return is_global;
 }
 
-static void adios_read_bp_staged_get_dimensions (struct adios_index_var_struct_v1 * v
+static void adios_read_bp_staged1_get_dimensions (struct adios_index_var_struct_v1 * v
                                                  ,int ntsteps, int file_is_fortran
                                                  ,int * ndim, uint64_t ** dims
                                                  ,int * tdim
@@ -3433,7 +5523,7 @@ fprintf (stderr, "[%3d] ndim 2 = %d\n", rank, * ndim);
     * dims = (uint64_t *) malloc (sizeof (uint64_t) * (* ndim));
     memset (* dims, 0, sizeof (uint64_t) * (* ndim));
 
-    is_global = adios_read_bp_staged_get_dimensioncharacteristics (&(v->characteristics[0])
+    is_global = adios_read_bp_staged1_get_dimensioncharacteristics (&(v->characteristics[0])
                                                                    ,ldims
                                                                    ,gdims
                                                                    ,offsets
@@ -3502,12 +5592,12 @@ fprintf (stderr, "[%3d] ndim 2 = %d\n", rank, * ndim);
     }
 }
 
-ADIOS_VARINFO * adios_read_bp_staged_inq_var (ADIOS_GROUP *gp, const char * varname) 
+ADIOS_VARINFO * adios_read_bp_staged1_inq_var (ADIOS_GROUP *gp, const char * varname) 
 {
-    int varid = adios_read_bp_staged_find_var(gp, varname);
+    int varid = adios_read_bp_staged1_find_var(gp, varname);
     if (varid < 0)
         return NULL;
-    return adios_read_bp_staged_inq_var_byid(gp, varid);
+    return adios_read_bp_staged1_inq_var_byid(gp, varid);
 }
 
 static ADIOS_VARINFO * _inq_var_byid (struct BP_FILE * fh, int varid)
@@ -3548,9 +5638,9 @@ static ADIOS_VARINFO * _inq_var_byid (struct BP_FILE * fh, int varid)
     vi->characteristics_count = var_root->characteristics_count;
 
     /* Get value or min/max */
-    adios_read_bp_staged_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
+    adios_read_bp_staged1_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
                           &(vi->ndim), &(vi->dims), &(vi->timedim));
-    
+#if 0
     if (file_is_fortran != futils_is_called_from_fortran()) {
         /* If this is a Fortran written file and this is called from C code,  
            or this is a C written file and this is called from Fortran code ==>
@@ -3559,13 +5649,13 @@ static ADIOS_VARINFO * _inq_var_byid (struct BP_FILE * fh, int varid)
         /*printf("File was written from %s and read now from %s, so we swap order of dimensions\n",
                 (file_is_fortran ? "Fortran" : "C"), (futils_is_called_from_fortran() ? "Fortran" : "C"));*/
     }
-    
-    adios_read_bp_staged_get_characteristics (var_root, vi);
+#endif
+    adios_read_bp_staged1_get_characteristics (var_root, vi);
 
     return vi;
 }
 
-ADIOS_VARINFO * adios_read_bp_staged_inq_var_byid (ADIOS_GROUP *gp, int varid)
+ADIOS_VARINFO * adios_read_bp_staged1_inq_var_byid (ADIOS_GROUP *gp, int varid)
 {
     struct BP_GROUP      * gh;
     struct BP_FILE       * fh;
@@ -3618,7 +5708,7 @@ ADIOS_VARINFO * adios_read_bp_staged_inq_var_byid (ADIOS_GROUP *gp, int varid)
 
     /* Get value or min/max */
 
-    adios_read_bp_staged_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
+    adios_read_bp_staged1_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
                           &(vi->ndim), &(vi->dims), &(vi->timedim));
 
     if (file_is_fortran != futils_is_called_from_fortran()) {
@@ -3630,12 +5720,12 @@ ADIOS_VARINFO * adios_read_bp_staged_inq_var_byid (ADIOS_GROUP *gp, int varid)
                 (file_is_fortran ? "Fortran" : "C"), (futils_is_called_from_fortran() ? "Fortran" : "C"));*/
     }
 
-    adios_read_bp_staged_get_characteristics (var_root, vi);
+    adios_read_bp_staged1_get_characteristics (var_root, vi);
 
     return vi;
 }
 
-void adios_read_bp_staged_free_varinfo (ADIOS_VARINFO *vp)
+void adios_read_bp_staged1_free_varinfo (ADIOS_VARINFO *vp)
 {
     if (vp) {
         if (vp->dims)   free(vp->dims);
@@ -3783,7 +5873,7 @@ static int get_var_stop_index (struct adios_index_var_struct_v1 * v, int t)
 /****************************************************
   Find the var associated with the given variable id 
 *****************************************************/
-struct adios_index_var_struct_v1 * adios_find_var_byid (ADIOS_GROUP * gp, int varid)
+static struct adios_index_var_struct_v1 * adios_find_var_byid (ADIOS_GROUP * gp, int varid)
 {
     struct BP_GROUP * gh;
     struct adios_index_var_struct_v1 * var_root;
@@ -3814,37 +5904,38 @@ static int isTimeless (int tdim)
     return tdim <= -1;
 }
 
-/* Populate read_info data structure  */
-void getReadInfo (ADIOS_GROUP * gp
-                 ,struct adios_index_var_struct_v1 * v
-                 ,uint64_t * start
-                 ,uint64_t * count
-                 ,read_info * ri
-                 )
+/* This routine is used to Populate read_info data structure  */
+static void getReadInfo (ADIOS_GROUP * gp
+                        ,int varid
+                        ,uint64_t * start
+                        ,uint64_t * count
+                        ,read_info * ri
+                        )
 {
     struct BP_GROUP * gh;
     struct BP_FILE * fh;
+    struct adios_index_var_struct_v1 * v;
     int i, j, k, idx, t;
     int start_idx, stop_idx, f_idx;
     int has_subfile, file_is_fortran;
     uint64_t size, * dims;
-    uint64_t ldims[32], gdims[32], offsets[32];
     int file_tdim = -1, read_arg_tdim, is_global = 0, flag;
 
     gh = (struct BP_GROUP *) gp->gh;
     fh = gh->fh;
+    v = adios_find_var_byid (gp, varid);
 
-    file_is_fortran = (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
-    has_subfile = fh->mfooter.version & ADIOS_VERSION_HAVE_SUBFILE;
+    file_is_fortran = is_fortran_file (gp);
+    has_subfile = has_subfiles (gp);
 
     /* Get dimensions and flip if caller != writer language */
-    adios_read_bp_staged_get_dimensions (v
-                                         ,fh->tidx_stop - fh->tidx_start + 1
-                                         ,file_is_fortran
-                                         ,&ri->ndim
-                                         ,&ri->dims
-                                         ,&ri->file_tdim
-                                         );
+    adios_read_bp_staged1_get_dimensions (v
+                                        ,fh->tidx_stop - fh->tidx_start + 1
+                                        ,file_is_fortran
+                                        ,&ri->ndim
+                                        ,&ri->dims
+                                        ,&ri->file_tdim
+                                        );
 
     if (file_is_fortran)
     {
@@ -3857,6 +5948,11 @@ void getReadInfo (ADIOS_GROUP * gp
         ri->stop_time = fh->tidx_stop;
         ri->ndim_notime = ri->ndim;
 
+        ri->start_notime = malloc (ri->ndim * 8);
+        ri->count_notime = malloc (ri->ndim * 8);
+        assert (ri->start_notime);
+        assert (ri->count_notime);
+
         memcpy (ri->start_notime, start, ri->ndim * 8);
         memcpy (ri->count_notime, count, ri->ndim * 8);
     }
@@ -3868,6 +5964,11 @@ void getReadInfo (ADIOS_GROUP * gp
         ri->stop_time = ri->start_time + count[read_arg_tdim] - 1;
         ri->ndim_notime = ri->ndim - 1;
 
+        ri->start_notime = malloc (ri->ndim_notime * 8);
+        ri->count_notime = malloc (ri->ndim_notime * 8);
+        assert (ri->start_notime);
+        assert (ri->count_notime);
+
         memcpy (ri->start_notime
                ,futils_is_called_from_fortran () ? start : start + 1
                , ri->ndim_notime * 8
@@ -3887,16 +5988,34 @@ void getReadInfo (ADIOS_GROUP * gp
 
 }
 
+static void freeReadInfo (read_info * ri)
+{
+    if (ri->start_notime)
+    {
+        free (ri->start_notime);
+    }
+
+    if (ri->count_notime)
+    {
+        free (ri->count_notime);
+    }
+
+    if (ri->dims)
+    {
+        free (ri->dims);
+    }
+}
+
 /**************************************************
 * Get the subfile index and associate data offset *
 ***************************************************/
-void getDataAddress (ADIOS_GROUP * gp, int varid
-                    ,const uint64_t * start
-                    ,const uint64_t * count
-                    ,int * file_idx
-                    ,uint64_t * offset
-                    ,uint64_t * payload_size
-                    )
+static void getDataAddress (ADIOS_GROUP * gp, int varid
+                           ,const uint64_t * start
+                           ,const uint64_t * count
+                           ,int * file_idx
+                           ,uint64_t * offset
+                           ,uint64_t * payload_size
+                           )
 {
     struct BP_GROUP * gh;
     struct BP_FILE * fh;
@@ -3918,7 +6037,7 @@ void getDataAddress (ADIOS_GROUP * gp, int varid
     v = adios_find_var_byid (gp, varid);
 
     /* Get dimensions and flip if caller != writer language */
-    adios_read_bp_staged_get_dimensions (v
+    adios_read_bp_staged1_get_dimensions (v
                                          ,fh->tidx_stop - fh->tidx_start + 1
                                          ,file_is_fortran
                                          ,&ndim
@@ -3958,12 +6077,6 @@ void getDataAddress (ADIOS_GROUP * gp, int varid
                );
     }
 
-    if (futils_is_called_from_fortran ())
-    {
-        _swap_order (ndim_notime, count_notime);
-        _swap_order (ndim_notime, start_notime);
-    }
-
     for (t = start_time; t <= stop_time; t++)
     {
         start_idx = get_var_start_index (v, t);
@@ -3995,7 +6108,7 @@ void getDataAddress (ADIOS_GROUP * gp, int varid
         {
             idx_table[idx] = 1;
             /* Each pg can have a different sized array, so we need the actual dimensions from it */
-            is_global = adios_read_bp_staged_get_dimensioncharacteristics(&(v->characteristics[start_idx + idx])
+            is_global = adios_read_bp_staged1_get_dimensioncharacteristics(&(v->characteristics[start_idx + idx])
                                                                           ,ldims
                                                                           ,gdims
                                                                           ,offsets
@@ -4088,7 +6201,7 @@ void getDataAddress (ADIOS_GROUP * gp, int varid
     }
 }
 
-int64_t adios_read_bp_staged_read_var (ADIOS_GROUP * gp
+int64_t adios_read_bp_staged1_read_var (ADIOS_GROUP * gp
                                        ,const char * varname
                                        ,const uint64_t * start
                                        ,const uint64_t * count
@@ -4112,7 +6225,7 @@ int64_t adios_read_bp_staged_read_var (ADIOS_GROUP * gp
     fh = gh->fh;
     assert (fh);
 
-    varid = adios_read_bp_staged_find_var (gp, varname);
+    varid = adios_read_bp_staged1_find_var (gp, varname);
     if (varid < 0 || varid >= gh->vars_count)
     {
         adios_error (err_invalid_varid, "Invalid variable id %d (allowed 0..%d)", varid, gh->vars_count);
@@ -4125,7 +6238,7 @@ int64_t adios_read_bp_staged_read_var (ADIOS_GROUP * gp
     read_args * ra = (read_args *) malloc (sizeof (read_args));
     assert (ra);
 
-    ADIOS_VARINFO * vi = adios_read_bp_staged_inq_var_byid (gp, varid);
+    ADIOS_VARINFO * vi = adios_read_bp_staged1_inq_var_byid (gp, varid);
     ra->varid = varid;
     ra->ndims = vi->ndim;
 
@@ -4145,10 +6258,11 @@ int64_t adios_read_bp_staged_read_var (ADIOS_GROUP * gp
     }
 
     ra->parent = 0;
+    ra->file_idx = -1;
+    ra->offset = 0;
+//    getDataAddress (gp, varid, start, count, &ra->file_idx, &ra->offset, &payload_size);
 
-    getDataAddress (gp, varid, start, count, &ra->file_idx, &ra->offset, &payload_size);
-
-    adios_read_bp_staged_free_varinfo (vi);
+    adios_read_bp_staged1_free_varinfo (vi);
 
     r = (candidate_reader *) malloc (sizeof (candidate_reader));
     assert (r);
@@ -4167,7 +6281,7 @@ int64_t adios_read_bp_staged_read_var (ADIOS_GROUP * gp
  * array fashion (as opposed to global array)  *
  *     Q. Liu, 11/2010                         *
  ***********************************************/
-int64_t adios_read_bp_staged_read_local_var (ADIOS_GROUP * gp, const char * varname,
+int64_t adios_read_bp_staged1_read_local_var (ADIOS_GROUP * gp, const char * varname,
                                       int vidx, const uint64_t * start,
                                       const uint64_t * count, void * data)
 {
@@ -4208,7 +6322,7 @@ int64_t adios_read_bp_staged_read_local_var (ADIOS_GROUP * gp, const char * varn
         return -adios_errno;
     }
 
-    varid = adios_read_bp_staged_find_var(gp, varname);
+    varid = adios_read_bp_staged1_find_var(gp, varname);
     if (varid < 0 || varid >= gh->vars_count)
     {
         adios_error (err_invalid_varid, "Invalid variable id %d (allowed 0..%d)", varid, gh->vars_count);
@@ -4334,7 +6448,7 @@ int64_t adios_read_bp_staged_read_local_var (ADIOS_GROUP * gp, const char * varn
     uint64_t payload_size = size_of_type;
 
     /* To get ldims for the index vidx */
-    adios_read_bp_staged_get_dimensioncharacteristics( &(var_root->characteristics[vidx]),
+    adios_read_bp_staged1_get_dimensioncharacteristics( &(var_root->characteristics[vidx]),
                                                 ldims, gdims, offsets);
 
     /* Again, a Fortran written file has the dimensions in Fortran order we need to swap here */
@@ -4536,7 +6650,7 @@ int64_t adios_read_bp_staged_read_local_var (ADIOS_GROUP * gp, const char * varn
 
 // The purpose of keeping this function is to be able
 // to read in old BP files. Can be deleted later on.
-int64_t adios_read_bp_staged_read_var_byid1 (ADIOS_GROUP    * gp,
+int64_t adios_read_bp_staged1_read_var_byid1 (ADIOS_GROUP    * gp,
                              int              varid,
                              const uint64_t  * start,
                              const uint64_t  * count,
@@ -4602,7 +6716,7 @@ int64_t adios_read_bp_staged_read_var_byid1 (ADIOS_GROUP    * gp,
     }
 
     /* Get dimensions and flip if caller != writer language */
-    adios_read_bp_staged_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
+    adios_read_bp_staged1_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
                           &ndim, &dims, &timedim);
 
     /* Here the cases in which .bp written from Fortran and C are considered separately.
@@ -4887,7 +7001,7 @@ printf ("pgcount = %lld\n", pgcount);
             uint64_t payload_size = size_of_type;
     
             /* Each pg can have a different sized array, so we need the actual dimensions from it */
-            is_global = adios_read_bp_staged_get_dimensioncharacteristics( &(var_root->characteristics[start_idx + idx]),
+            is_global = adios_read_bp_staged1_get_dimensioncharacteristics( &(var_root->characteristics[start_idx + idx]),
                                                             ldims, gdims, offsets);
             if (!is_global) {
                 // we use gdims below, which is 0 for a local array; set to ldims here
@@ -5155,7 +7269,7 @@ printf ("pgcount = %lld\n", pgcount);
     return total_size;
 }
 
-int64_t adios_read_bp_staged_read_var_byid2 (ADIOS_GROUP    * gp,
+int64_t adios_read_bp_staged1_read_var_byid2 (ADIOS_GROUP    * gp,
                                       int            varid,
                                       const uint64_t * start,
                                       const uint64_t * count,
@@ -5198,7 +7312,7 @@ int64_t adios_read_bp_staged_read_var_byid2 (ADIOS_GROUP    * gp,
     }
 
     /* Get dimensions and flip if caller != writer language */
-    adios_read_bp_staged_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
+    adios_read_bp_staged1_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
                           &ndim, &dims, &timedim);
 
     /* In a Fortran written files, dimensions are in reversed order for C */
@@ -5331,7 +7445,7 @@ int64_t adios_read_bp_staged_read_var_byid2 (ADIOS_GROUP    * gp,
             uint64_t payload_size = size_of_type;
     
             /* Each pg can have a different sized array, so we need the actual dimensions from it */
-            is_global = adios_read_bp_staged_get_dimensioncharacteristics( &(var_root->characteristics[start_idx + idx]),
+            is_global = adios_read_bp_staged1_get_dimensioncharacteristics( &(var_root->characteristics[start_idx + idx]),
                                                             ldims, gdims, offsets);
             if (!is_global) {
                 // we use gdims below, which is 0 for a local array; set to ldims here
@@ -5611,7 +7725,7 @@ int64_t adios_read_bp_staged_read_var_byid2 (ADIOS_GROUP    * gp,
     return total_size;
 }
 
-int64_t adios_read_bp_staged_read_var_byid (ADIOS_GROUP    * gp,
+int64_t adios_read_bp_staged1_read_var_byid (ADIOS_GROUP    * gp,
                                      int            varid,
                                      const uint64_t  * start,
                                      const uint64_t  * count,
@@ -5642,8 +7756,9 @@ int64_t adios_read_bp_staged_read_var_byid (ADIOS_GROUP    * gp,
     has_time_index_characteristic = fh->mfooter.version & ADIOS_VERSION_HAVE_TIME_INDEX_CHARACTERISTIC;
     if (!has_time_index_characteristic) {
         // read older file format. Can be deleted later on.
-        return adios_read_bp_staged_read_var_byid1(gp, varid, start, count, data);
+        return adios_read_bp_staged1_read_var_byid1(gp, varid, start, count, data);
     } else {
-        return adios_read_bp_staged_read_var_byid2(gp, varid, start, count, data);
+        return adios_read_bp_staged1_read_var_byid2(gp, varid, start, count, data);
     }
 }
+#endif
diff --git a/src/read/read_dataspaces.c b/src/read/read_dataspaces.c
new file mode 100644
index 0000000..23ee82a
--- /dev/null
+++ b/src/read/read_dataspaces.c
@@ -0,0 +1,1520 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+
+/**************************************************/
+/* Read method for DATASPACES memory-to-memory coupling */
+/**************************************************/
+
+#include "../config.h"
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>  /* errno */
+#include "public/adios_types.h"
+#include "public/adios_read.h"
+#include "public/adios_error.h"
+#include "core/globals.h"
+#include "core/util.h"
+#include "core/adios_logger.h"
+//#include "core/bp_types.h"
+#include "core/adios_read_hooks.h"
+#include "core/futils.h"
+#include "core/ds_metadata.h"
+#include "core/common_read.h" // common_read_selection_* functions
+
+#include "dataspaces.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+#define MYFREE(p) {free(p); p=NULL;}
+
+/*
+#include <time.h> // nanosleep
+static void adios_nanosleep (int sec, int nanosec) 
+{
+#if HAVE_NANOSLEEP
+    struct timespec treq = {.tv_sec=sec, .tv_nsec=nanosec}; 
+    struct timespec trem;
+    int r;
+    r = nanosleep(&treq, &trem);
+    while (r == -1 && errno == EINTR) {
+        treq.tv_sec = trem.tv_sec;
+        treq.tv_nsec = trem.tv_nsec;
+        r = nanosleep (&trem, &treq);
+    }
+#else
+    if (sec>0)
+        sleep(sec);
+    else 
+        sleep(1);
+
+#endif
+}
+
+#include <sys/time.h>
+struct timeval adios_timer_tp;
+static inline double time_get() 
+{ 
+    gettimeofday(&adios_timer_tp, NULL); \
+    return  ((double)adios_timer_tp.tv_sec + ((double)adios_timer_tp.tv_usec)/1000000.0); 
+}
+
+#define time_current(timer) { gettimeofday(&adios_timer_tp, NULL); \
+    timer =  ((double)adios_timer_tp.tv_sec + ((double)adios_timer_tp.tv_usec)/1000000.0); }
+
+#define timer_start(timer) { gettimeofday(&adios_timer_tp, NULL); \
+    timer -= ((double)adios_timer_tp.tv_sec + ((double)adios_timer_tp.tv_usec)/1000000.0); }
+
+#define timer_end(timer) { gettimeofday(&adios_timer_tp, NULL); \
+    timer += ((double)adios_timer_tp.tv_sec + ((double)adios_timer_tp.tv_usec)/1000000.0); }
+*/
+
+#define MAX_DS_NAMELEN 128
+/* Maximum number of different filenames allowed per process during the whole run */
+#define MAXNFILE 10 
+/*#define DATASPACES_NO_VERSIONING   define it at configure as -DDATASPACES_NO_VERSIONING in CFLAGS */
+/* Length of the 1D array representing the file in DataSpaces (contains metadata) */
+#define FILEINFO_BUFLEN 128
+
+static int chunk_buffer_size = 1024*1024*16; // 16MB default size for reading in data in chunking mode
+static char *chunk_buffer = 0;
+
+static int poll_interval_msec = 10; // how much to wait between polls when timeout is used
+
+struct dataspaces_fileversions_struct { // current opened version of each stream/file
+    char      * filename[MAXNFILE];
+    int         version[MAXNFILE];  /* for versioning of one given filename */
+};
+static struct dataspaces_fileversions_struct file_versions;
+static int n_filenames; /* number of filenames appeared during the run */
+
+
+struct dataspaces_var_struct { // describes one variable (of one group)
+    char                 * name;
+    enum ADIOS_DATATYPES   type;
+    int                    hastime; // 0: no, 1:yes (time dimension is not stored in dataspaces)
+    int                    ndims;
+    uint64_t               dims[3]; // we have max 3 dims in DataSpaces
+    void                 * value;
+};
+
+struct dataspaces_attr_struct { // describes one attribute (of one group)
+    char                 * name;
+    enum ADIOS_DATATYPES   type;
+    void                 * value;
+};
+
+/*struct dataspaces_group_struct { // accessible as fp->fh->groups[grpid]
+    int nvars;                   // number of vars in this group
+    int nattrs;                  // number of attrs in this group
+};*/
+
+struct dataspaces_data_struct { // accessible as fp->fh
+    int current_step;           // counting the access
+    int disconnect_at_close;    // disconnect from DATASPACES in fclose()
+    MPI_Comm comm;              // communicator saved for lock/unlock operations
+    int mpi_rank;               // rank of this process
+    int nproc;                  // number of processes opening this stream
+    int locked_fname;           // 1: locked 'fname' in DATASPACES, 0: unlocked
+    int freed_mem;              // 1: freed all memory used for internal data
+    int file_index;             // index to file_versions[] array
+    enum ADIOS_LOCKMODE lock_mode; // locking mode requested by user
+    struct dataspaces_var_struct  * vars;  // number of vars is ADIOS_FILE->nvars
+    struct dataspaces_attr_struct * attrs; // number of attrs is ADIOS_FILE->nattrs
+    /* Group info */
+    int group_index_len;         // length of group index in GROUP at fn/gn variable 
+    char *group_name;            // name of the group
+    /* Read requests */
+    read_request * req_list;     // list of scheduled requests
+    read_request * req_list_tail; // tail of list of scheduled requests (to speed up insert)
+    int nreq;                    // number of scheduled requests
+    /* single chunk */
+    ADIOS_VARCHUNK *chunk;       // the single chunk to store the last read and serve the user
+};
+
+// Declarations
+static int adios_read_dataspaces_get (const char * varname, enum ADIOS_DATATYPES vartype, 
+                                int version, int rank, 
+                                int ndims, int is_fortran_ordering, 
+                                int * offset, int * readsize, void * data);
+
+static char* get_chunk_buffer()
+{
+    if (!chunk_buffer) {
+        chunk_buffer = (char *) malloc (chunk_buffer_size);
+        if (!chunk_buffer) {
+            adios_error (err_no_memory, 
+                    "Could not allocate chunk buffer of size %dMB\n", chunk_buffer_size/1024/1024);
+        }
+    }
+    return chunk_buffer;
+}
+
+
+/* If init is used, we connect to DATASPACES here, otherwise we connect in fopen.
+   If multiple fopen..fclose cycles are used, init/finalize must be used too to
+   avoid multiple connection/disconnection in fopen/fclose.
+*/
+int adios_read_dataspaces_init_method (MPI_Comm comm, PairStruct * params) 
+{ 
+    int  nproc, drank, dpeers;
+    int  rank, err;
+    int  appid, max_chunk_size, pollinterval, was_set;
+    MPI_Comm_rank(comm, &rank);
+    MPI_Comm_size(comm, &nproc);
+
+    PairStruct *p = params;
+    while (p) {
+        if (!strcasecmp (p->name, "app_id")) {
+            errno = 0;
+            appid = strtol(p->value, NULL, 10);
+            if (appid > 0 && !errno) {
+                log_debug ("App ID parameter set to %d for DATASPACES read method\n", 
+                            appid);
+                globals_adios_set_application_id (appid);
+            } else {
+                log_error ("Invalid 'app_id' parameter given to the DATASPACES read "
+                           "method: '%s'\n", p->value);
+            }
+        } else if (!strcasecmp (p->name, "max_chunk_size")) {
+            errno = 0;
+            max_chunk_size = strtol(p->value, NULL, 10);
+            if (max_chunk_size > 0 && !errno) {
+                log_debug ("max_chunk_size set to %dMB for DATASPACES read method\n", 
+                            max_chunk_size);
+                chunk_buffer_size = max_chunk_size * 1024 * 1024;
+            } else {
+                log_error ("Invalid 'max_chunk_size' parameter given to the DATASPACES "
+                            "read method: '%s'\n", p->value);
+            }
+        } else if (!strcasecmp (p->name, "poll_interval")) {
+            errno = 0;
+            pollinterval = strtol(p->value, NULL, 10);
+            if (pollinterval > 0 && !errno) {
+                log_debug ("poll_interval set to %d millisecs for DATASPACES read method\n", 
+                            pollinterval);
+                poll_interval_msec = pollinterval;
+            } else {
+                log_error ("Invalid 'poll_interval' parameter given to the DATASPACES "
+                            "read method: '%s'\n", p->value);
+            }
+        } else {
+            log_error ("Parameter name %s is not recognized by the DATASPACES read "
+                        "method\n", p->name);
+        }
+        p = p->next;
+    }
+
+
+    /* Connect to DATASPACES, but only if we are not yet connected (from Write API) */
+    if (!globals_adios_is_dataspaces_connected()) {
+        appid = globals_adios_get_application_id (&was_set);
+        if (!was_set) 
+            appid = 2;
+        log_debug("-- %s, rank %d: connect to dataspaces with nproc=%d and appid=%d\n", 
+                    __func__, rank, nproc, appid);
+        err = dspaces_init(nproc, appid);
+        if (err < 0) {
+            adios_error (err_connection_failed, "Failed to connect with DATASPACES\n");
+            return err_connection_failed;
+        }
+
+        //drank = dspaces_rank(dcg);
+        //dpeers = dspaces_peers(dcg);
+    }
+    globals_adios_set_dataspaces_connected_from_reader();
+    n_filenames = 0;
+    log_info("Connected to DATASPACES\n");
+    return 0; 
+}
+
+int adios_read_dataspaces_finalize_method () 
+{ 
+    // disconnect from DATASPACES only if we the reader is connected (the writer not anymore)
+    if (globals_adios_is_dataspaces_connected_from_reader() && 
+        !globals_adios_is_dataspaces_connected_from_both()) 
+    {
+        dspaces_finalize();
+        log_info("Disconnected from DATASPACES\n");
+    }
+    globals_adios_set_dataspaces_disconnected_from_reader();
+    if (chunk_buffer) {
+        free (chunk_buffer); 
+        chunk_buffer = NULL;
+    }
+}
+
+static int ds_unpack_file_info (ADIOS_FILE *fp, char * buf, int buf_len)
+{
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    char * b = buf;
+    int blen, glen, i;
+
+    if (!buf || buf_len < 21)
+        return 1;
+
+    blen = *(int*)b;  // buf len again from buffer itself
+    if (blen != buf_len) {
+        log_debug("WARNING: %s(): expected file info  buffer length is %d but buffer head says %d\n", 
+                    __func__, buf_len, blen);
+    }
+    b += sizeof(int); // skip buf len
+    fp->current_step = *(int*)b; // time index
+    fp->last_step = fp->current_step;
+    b += sizeof(int);
+    fp->nvars = *(int*)b; // number of variables
+    b += sizeof(int);
+    fp->nattrs = *(int*)b; // number of attributes
+    b += sizeof(int);
+    ds->group_index_len = *(int*)b; // length of group index
+    b += sizeof(int);
+    glen = *(int*)b; // length of (only) group name
+    b += sizeof(int);
+
+    fp->file_size = 0;
+    fp->version = 1;
+    fp->endianness = 0; // FIXME: not always Little Endian. Does it matter? 
+    ds->group_name = (char *) malloc (strlen(b)+1);
+    if (!ds->group_name) {
+        adios_error (err_no_memory, 
+                "Could not allocate buffer for group name in adios_read_open_stream()\n");
+        free(fp);
+        return 1;
+    }
+    else  {
+        strcpy(ds->group_name,b);
+    }
+
+    return 0;
+}
+
+
+static int ds_unpack_group_info (ADIOS_FILE *fp, char * buf)
+        
+{
+    char * b = buf;
+    int i, j, k, blen, namelen, extrabyte;
+    int datasize;
+    struct dataspaces_var_struct * vars;
+    struct dataspaces_attr_struct * attrs;
+    uint64_t dims[3]; // all variables has 3 dimension values in the index 
+    int didx[3]; // dimension reordering 
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    int buf_len = ds->group_index_len;
+    
+
+    if (!buf || buf_len < 12)
+        return 1;
+
+    
+    log_debug("   %s: buffer length = %d, content:\n", __func__, buf_len);
+    for (i=0; i<buf_len; i+=16) {
+        for (j=0; j<4; j++) {
+            log_debug_cont("%3.3hhu %3.3hhu %3.3hhu %3.3hhu    ", 
+                    b[i+4*j], b[i+4*j+1], b[i+4*j+2], b[i+4*j+3]);
+        }
+        log_debug_cont("\n");
+    }
+    
+
+    blen = *(int*)b;  // buf len again from buffer itself
+    if (blen != buf_len) {
+        log_debug("WARNING: %s(): expected group info buffer length is %d but buffer head says %d\n", 
+                    __func__, buf_len, blen);
+    }
+    b += sizeof(int); 
+    int vars_count = *(int*)b; // number of variables (should be = fp->nvars)
+    b += sizeof(int);
+    if (vars_count != fp->nvars) {
+        log_debug("WARNING: %s(): expected number of variables in group %s is %d "
+                  "but group metadata says %d\n", 
+                  __func__, ds->group_name, fp->nvars, vars_count);
+    }
+    int attrs_count = *(int*)b; // number of attributes (= fp->nattrs)
+    b += sizeof(int);
+    if (attrs_count != fp->nattrs) {
+        log_debug("WARNING: %s(): expected number of attributes in group %s is %d "
+                  "but group metadata says %d\n", 
+                  __func__, ds->group_name, fp->nattrs, attrs_count);
+    }
+
+    log_debug("   %s(): vars count = %d, attrs count = %d\n", __func__, vars_count, attrs_count);
+    fp->var_namelist = (char **) calloc (sizeof(char*), vars_count);
+    fp->attr_namelist = (char **) calloc (sizeof(char*),  attrs_count);
+    if (!fp->var_namelist || !fp->attr_namelist) {
+        adios_error (err_no_memory, "Could not allocate space for variable/attribute names when opening a group\n");
+        if (fp->var_namelist) free(fp->var_namelist);
+        return 1;
+    }
+
+    vars = (struct dataspaces_var_struct *) 
+              malloc (vars_count * sizeof(struct dataspaces_var_struct));
+    attrs = (struct dataspaces_attr_struct *) 
+              malloc (attrs_count * sizeof(struct dataspaces_attr_struct));
+
+    if (!vars || !attrs) {
+        adios_error (err_no_memory, "Could not allocate space for variable/attribute metadata\n");
+        free(fp->var_namelist);
+        free(fp->attr_namelist);
+        if (vars) free(vars);
+        return 1;
+    }
+
+    ds->vars = vars;
+    ds->attrs = attrs;
+
+    // extract each variable
+    log_debug("    Extract variables\n");
+    for (i=0;i<vars_count;i++) {
+        log_debug("      var %d, b = %d\n", i, b);
+        namelen = *(int*)b; // lenght of name
+        b += sizeof(int);
+        log_debug("        namelen = %d, b = %d\n", namelen, b);
+        fp->var_namelist[i] = (char *) malloc (namelen+1);
+        if (!fp->var_namelist[i]) {
+            adios_error (err_no_memory, "Could not allocate space for variable name when opening a group\n"); 
+            if (i>0) free_namelist ((fp->var_namelist),i);
+            return 1;
+        }
+        else  {
+            memcpy(fp->var_namelist[i], b, namelen);
+            fp->var_namelist[i][namelen] = '\0';
+        }
+        b += namelen;
+        vars[i].name = strdup(fp->var_namelist[i]);  
+        log_debug("        name = %s, b = %d\n", vars[i].name, b);
+        // type
+        vars[i].type = *(enum ADIOS_DATATYPES*)b; 
+        b += sizeof(int);
+        log_debug("        type = %d, b = %d\n", (int)vars[i].type, b);
+        // hastime
+        vars[i].hastime = *(int*)b; 
+        b += sizeof(int);
+        log_debug("        hastime = %d, b = %d\n", vars[i].hastime, b);
+        // dimensions
+        vars[i].ndims = *(int*)b; 
+        b += sizeof(int);
+        log_debug("        ndims w/o time = %d, b = %d\n", vars[i].ndims, b);
+        for (j=0; j < 3; j++) {
+            dims[j] = *(uint64_t*)b; 
+            b += 8;
+            log_debug("          unordered dim[%d] = %lld, b = %d\n", j, dims[j], b);
+        }
+        // reorder DS dimensions to Fortran/C dimensions
+        ds_dimension_ordering (vars[i].ndims, futils_is_called_from_fortran(), 
+                               1 /*unpack*/, didx);
+        for (j=0; j < vars[i].ndims; j++) {
+            vars[i].dims[j] = dims[didx[j]];
+            log_debug("          dim[%d] = %lld, b = %d\n", j, vars[i].dims[j], b);
+        }
+
+        if (vars[i].ndims == 0 && !vars[i].hastime) {
+            // need to get scalar value too
+            if (vars[i].type != adios_string) {
+                datasize = common_read_type_size(vars[i].type, NULL);
+                extrabyte=0;
+            } else {
+                memcpy (&datasize, b, sizeof(int));
+                b += sizeof(int);
+                extrabyte=1;
+            }
+            vars[i].value = (void *) malloc (datasize+extrabyte);
+            if (vars[i].value) {
+                memcpy (vars[i].value, b, datasize);
+                if (vars[i].type == adios_string) 
+                    ((char *)vars[i].value)[datasize] = '\0';
+            } else {
+                log_error("Cannot allocate %d bytes to store the value of variable %s\n",
+                        datasize, vars[i].name);
+                return 1;
+            }
+            
+            b += datasize;
+            log_debug("        value read, b = %d\n", b);
+        } else {
+            vars[i].value = NULL;
+        }
+    }
+
+    // extract each attribute
+    for (i=0;i<attrs_count;i++) {
+        namelen = *(int*)b; // lenght of name
+        b += sizeof(int);
+        fp->attr_namelist[i] = (char *) malloc (namelen+1);
+        if (!fp->attr_namelist[i]) {
+            adios_error (err_no_memory, "Could not allocate space for attribute name when opening a group\n"); 
+            if (i>0) free_namelist ((fp->attr_namelist),i);
+            return 1;
+        }
+        else  {
+            memcpy(fp->attr_namelist[i], b, namelen);
+            fp->attr_namelist[i][namelen] = '\0';
+        }
+        b += namelen;
+        attrs[i].name = strdup(fp->attr_namelist[i]);  
+        // type
+        attrs[i].type = *(enum ADIOS_DATATYPES*)b; 
+        b += sizeof(int);
+        // get attribute value 
+        if (attrs[i].type != adios_string) {
+            datasize = common_read_type_size(attrs[i].type, NULL);
+            extrabyte=0;
+        } else {
+            memcpy (&datasize, b, sizeof(int));
+            b += sizeof(int);
+            extrabyte=1;
+        }
+        
+        attrs[i].value = (void *) malloc (datasize+extrabyte);
+        if (attrs[i].value) {
+            memcpy (attrs[i].value, b, datasize);
+            if (attrs[i].type == adios_string) 
+                ((char*)attrs[i].value)[datasize] = '\0';
+            log_debug("        value read, b = %d\n", b);
+        } else {
+            log_error("Cannot allocate %d bytes to store the value of attribute %s\n",
+                    datasize, attrs[i].name);
+            return 1;
+        }
+        
+        b += datasize;
+    }
+    return 0;
+}
+
+static int get_groupdata (ADIOS_FILE *fp)
+{
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+
+    /* Try to get group metadata from DataSpaces. If it does not exists, we get an error, which means
+       the data does not exist. */
+    int offset[] = {0,0,0}, readsize[3] = {ds->group_index_len,1,1};
+    char * group_info_buf = malloc (ds->group_index_len);
+    if (!group_info_buf) {
+            adios_error (err_no_memory, 
+                    "%s: Could not allocate buffer for group info buffer of %d bytes\n", 
+                    __func__, ds->group_index_len);
+        return 1;
+    }
+    int err;
+    char ds_name[MAX_DS_NAMELEN];
+    snprintf (ds_name, MAX_DS_NAMELEN, "GROUP@%s/%s",fp->path, ds->group_name);
+    log_debug("-- %s, rank %d: Get variable %s with size %d\n", __func__, 
+              ds->mpi_rank, ds_name, readsize[0]);
+    err = adios_read_dataspaces_get (ds_name, adios_byte, ds->current_step, ds->mpi_rank, 
+                                     1, 0, offset, readsize, group_info_buf);
+    if (err) {
+        adios_error (err_invalid_group, "Invalid group name %s for file %s. "
+                     "Entity %s could not be retrieved from DataSpaces\n",
+                     ds->group_name, fp->path, ds_name);
+        return 1;
+    } else {
+        log_debug("-- %s, rank %d: data of '%s' exists\n", __func__, ds->mpi_rank, ds_name);
+    }
+
+
+    err = ds_unpack_group_info (fp, group_info_buf);
+    if (err) {
+        log_debug("-- %s, rank %d: unpacking group index failed\n", __func__, ds->mpi_rank);
+        return 1;
+    }
+
+    free (group_info_buf);
+    return 0;
+}
+
+static void lock_file (ADIOS_FILE *fp, struct dataspaces_data_struct *ds)
+{
+    if (!ds->locked_fname) {
+        log_debug("   rank %d: call dspaces_lock_on_read(%s)\n", ds->mpi_rank, fp->path);
+        dspaces_lock_on_read(fp->path, &ds->comm);
+        ds->locked_fname = 1;
+    //} else {
+    //    log_error("   rank %d: lock_file called with the lock already in place\n", ds->mpi_rank);
+    }
+}
+
+static void unlock_file (ADIOS_FILE *fp, struct dataspaces_data_struct *ds)
+{
+    if (ds->locked_fname) {
+        log_debug("   rank %d: call dspaces_unlock_on_read(%s)\n", ds->mpi_rank, fp->path);
+        dspaces_unlock_on_read(fp->path, &ds->comm);
+        ds->locked_fname = 0;
+    //} else {
+    //    log_error("   rank %d: unlock_file called with the lock already released\n", ds->mpi_rank);
+    }
+}
+
+
+enum WHICH_VERSION {NEXT_VERSION, NEXT_AVAILABLE_VERSION, LAST_VERSION};
+static const char * which_version_str[3] = {"current", "next available", "last"};
+enum STEP_STATUS {STEP_OK, STEP_STREAMNOTFOUND, STEP_STEPNOTREADY, STEP_STEPDISAPPEARED, STEP_STREAMTERMINATED, STEP_OTHERERROR};
+
+static int get_step (ADIOS_FILE *fp, int step, enum WHICH_VERSION which_version, float timeout_sec)
+{
+    /* Try to get variable with fname. If it does not exists, we get an error, which means
+       the data does not exist. So we return an error just like with real files */
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    int offset[] = {0,0,0}, readsize[3] = {1,1,1};
+    char file_info_buf[FILEINFO_BUFLEN];
+    int version_info_buf[2]; // 0: last version, 1: terminated?
+    int err, i;
+    char ds_vname[MAX_DS_NAMELEN];
+    char ds_fname[MAX_DS_NAMELEN];
+    double t1 = adios_gettime();
+    enum STEP_STATUS step_status = STEP_OK;
+
+    snprintf(ds_vname, MAX_DS_NAMELEN, "VERSION@%s",fp->path);
+    snprintf(ds_fname, MAX_DS_NAMELEN, "FILE@%s",fp->path);
+    //log_debug("-- %s, rank %d: Get variable %s\n", __func__, ds->mpi_rank, ds_fname);
+    ds->freed_mem = 0;
+
+    /* While loop for handling timeout
+       timeout >= 0: wait up to this long to open the stream
+       timeout <  0: wait forever
+    */
+    int stay_in_poll_loop = 1;
+    int found_stream = 0;
+    int nversions, *versions;
+    while (stay_in_poll_loop) {
+        lock_file (fp, ds);
+        step_status = STEP_OK;
+
+        log_debug("   rank %d: dspaces_get %s\n", ds->mpi_rank, ds_vname);
+        readsize[0] = 2; //*sizeof(int); // VERSION%name is 2 integers only
+        err = adios_read_dataspaces_get (ds_vname, adios_integer, 0, ds->mpi_rank, 1, 0, 
+                                         offset, readsize, version_info_buf);
+
+        if (!err) {
+            int last_version = version_info_buf[0];
+            int terminated = version_info_buf[1];
+            log_debug("   rank %d: version info: last=%d, terminated=%d\n", 
+                      ds->mpi_rank, last_version, terminated);
+
+            if (last_version < step) {
+                // we have no more new steps
+                if (terminated) {
+                    // stream is gone, we read everything 
+                    step_status = STEP_STREAMTERMINATED;
+                    stay_in_poll_loop = 0;
+                } else {
+                    // a next step may come 
+                    step_status = STEP_STEPNOTREADY;
+                    // we may stay in poll loop
+                }
+            } else {
+                // Try to get the version the user wants
+                if (which_version == LAST_VERSION)
+                    step = last_version;
+                readsize[0] = FILEINFO_BUFLEN; // FILE%name is FILEINFO_BUFLEN bytes long
+
+                int max_check_version = last_version;
+                if (which_version == NEXT_VERSION) 
+                    max_check_version = step;
+
+                // Loop until we find what we need or go past the last version
+                do {
+                    log_debug("   rank %d: dspaces_get %s\n", ds->mpi_rank, ds_fname);
+                    err = adios_read_dataspaces_get (ds_fname, adios_byte, step, ds->mpi_rank, 
+                                                     1, 0, offset, readsize, file_info_buf);
+                    step++; // value will go over the target with 1
+                } while (err && step <= max_check_version);
+
+                if (!err) {
+                    /* Found object with this access version */
+                    step--; // undo the last increment above
+                    ds->current_step = step;
+                    stay_in_poll_loop = 0;
+                    log_debug("   rank %d: step %d of '%s' exists\n", 
+                            ds->mpi_rank, ds->current_step, ds_fname);
+
+                    err = ds_unpack_file_info (fp, file_info_buf, FILEINFO_BUFLEN);
+                    if (!err) {
+                        found_stream = 1;
+                        fp->current_step = ds->current_step;
+                        fp->last_step = last_version;
+
+                        /* Get the variables and attributes the (only) group separately */
+                        err = get_groupdata (fp);
+                        if (err) {
+                            // something went wrong with the group(s)
+                            step_status = STEP_OTHERERROR;
+                        }
+                    } else {
+                        // something went wrong with the file metadata
+                        step_status = STEP_OTHERERROR;
+                    }
+
+                } else {
+                    if (which_version == NEXT_VERSION) 
+                    {
+                        if (step < last_version) {
+                            step_status = STEP_STEPDISAPPEARED;
+                            stay_in_poll_loop = 0;
+                        } else {
+                            step_status = STEP_STEPNOTREADY;
+                            // we may stay in poll loop
+                        }
+                    } 
+                    else if (which_version == LAST_VERSION || 
+                             which_version == NEXT_AVAILABLE_VERSION) 
+                    {
+                        step_status = STEP_OTHERERROR;
+                        stay_in_poll_loop = 0;
+                        log_warn ("DATASPACES method: Unexpected state: found last version %d"
+                                "of dataset but then could not read it.\n", step);
+                    }
+                }
+            }
+
+        } else {
+            // This stream does not exist yet
+            log_info ("Data of '%s' does not exist (yet) in DataSpaces\n", fp->path);
+            step_status = STEP_STREAMNOTFOUND;
+        }
+
+        if (step_status != STEP_OK)
+            unlock_file (fp, ds);
+        
+
+        // check if we need to stay in loop 
+        if (stay_in_poll_loop) {
+            if (timeout_sec >= 0.0 && (adios_gettime()-t1 > timeout_sec))
+                stay_in_poll_loop = 0;
+            else
+                adios_nanosleep (poll_interval_msec/1000, 
+                     (int)(((uint64_t)poll_interval_msec * 1000000L)%1000000000L)); 
+        }
+
+    } // while (stay_in_poll_loop)
+
+    // generate the appropriate error if needed
+    switch (step_status) {
+    case STEP_STREAMNOTFOUND:
+            adios_error (err_file_not_found, 
+                    "Data of '%s' does not exist in DataSpaces\n", fp->path);
+            break;
+    case STEP_STREAMTERMINATED:
+            adios_error (err_end_of_stream, 
+                    "Stream '%s' has been terminated. No more steps available\n", fp->path);
+            break;
+    case STEP_STEPNOTREADY:
+            adios_error (err_step_notready, 
+                    "Step %d in stream '%s' is not yet available\n", step, fp->path);
+            break;
+    case STEP_STEPDISAPPEARED:
+            adios_error (err_step_disappeared, 
+                    "Step %d in stream '%s' is not available anymore\n", step, fp->path);
+            break;
+    default:
+            adios_errno = err_no_error; // clear temporary error during polling
+            break;
+
+    }
+
+    return (step_status != STEP_OK); // 0 on success
+}
+
+
+ADIOS_FILE * adios_read_dataspaces_open_file (const char * fname, MPI_Comm comm)
+{
+    adios_error (err_operation_not_supported, 
+                 "DATASPACES staging method does not support file mode for reading. "
+                 "Use adios_read_open_stream() to open a dataset.\n");
+    return NULL;
+}
+
+
+ADIOS_FILE * adios_read_dataspaces_open_stream (const char * fname, 
+                                                MPI_Comm comm, 
+                                                enum ADIOS_LOCKMODE lock_mode, 
+                                                float timeout_sec)
+{
+    ADIOS_FILE * fp;
+    struct dataspaces_data_struct * ds;
+    int i;    
+
+    ds = (struct dataspaces_data_struct *) malloc (sizeof(struct dataspaces_data_struct));
+    if (!ds) {
+        adios_error (err_no_memory, "Cannot allocate memory for file info.\n");
+        return NULL;
+    }
+
+    fp = (ADIOS_FILE *) malloc (sizeof (ADIOS_FILE));
+    if (!fp) {
+        adios_error (err_no_memory, "Cannot allocate memory for file info.\n");
+        free(ds);
+        return NULL;
+    }
+
+    fp->fh = (uint64_t) ds;
+    fp->path = strdup(fname);
+    ds->comm = comm;
+    MPI_Comm_rank(comm, &ds->mpi_rank);
+    MPI_Comm_size(comm, &ds->nproc);
+    ds->current_step = -1;
+    ds->lock_mode = lock_mode;
+    ds->locked_fname = 0;
+    ds->req_list = NULL;
+    ds->req_list_tail = NULL;
+    ds->nreq = 0;
+    ds->chunk = NULL;
+
+    /* if not connected to DATASPACES, connect now (and disconnect in adios_read_close) */
+    if (!globals_adios_is_dataspaces_connected_from_reader()) {
+        log_debug("-- %s, rank %d: call init first\n", __func__, ds->mpi_rank);
+        if (!adios_read_dataspaces_init_method(comm, NULL)) {
+            free(ds);
+            free(fp->path);
+            free(fp);
+            return NULL;
+        }
+        ds->disconnect_at_close = 1;
+    } else {
+        ds->disconnect_at_close = 0;
+    }
+
+    /* fill out dataspaces method specific struct */
+#ifndef DATASPACES_NO_VERSIONING
+   // check this filename's version number
+    int fidx;
+    for (fidx=0; fidx<n_filenames; fidx++) {
+        if (!strcmp(fname, file_versions.filename[fidx]))
+            break;
+    }
+    if (fidx == n_filenames) {
+        if (n_filenames < MAXNFILE) {
+            file_versions.filename[ n_filenames ] = strdup(fname);
+            file_versions.version [ n_filenames ] = 0;
+            n_filenames++;
+        } else {
+            adios_error (err_too_many_files, "Too many different filenames has been used for adios_fopen().\n\tDATASPACES method allows max %d files\n", MAXNFILE);
+            if (ds->disconnect_at_close) 
+                adios_read_dataspaces_finalize_method();
+            free(ds);
+            free(fp->path);
+            free(fp);
+            return NULL;
+        }
+    }
+    ds->file_index = fidx;
+#endif
+    log_debug("open stream filename=%s fidx=%d\n", fname, fidx);
+
+    int err = get_step (fp, 0, NEXT_AVAILABLE_VERSION, timeout_sec);
+    if (err) {
+        free(ds);
+        free(fp);
+        fp = NULL;
+    } else {
+        log_debug("opened version %d of filename=%s\n", ds->current_step, fname);
+    }
+
+    return fp;
+}
+
+static void free_step_data (ADIOS_FILE *fp) 
+{
+    struct dataspaces_data_struct * ds = 
+                (struct dataspaces_data_struct *) fp->fh;
+    struct dataspaces_var_struct * vars = 
+                (struct dataspaces_var_struct *) ds->vars;
+    struct dataspaces_attr_struct * attrs = 
+                (struct dataspaces_attr_struct *) ds->attrs;
+
+    int i;
+
+    if (fp->nvars) {
+        for (i=0; i<fp->nvars; i++) {
+            free (vars[i].name);
+            free (vars[i].value);
+        }
+        MYFREE(ds->vars);
+        free_namelist ((fp->var_namelist),fp->nvars);
+        fp->nvars = 0;
+    }
+    if (fp->nattrs) {
+        for (i=0; i<fp->nattrs; i++) {
+            free (attrs[i].name);
+            free (attrs[i].value);
+        }
+        MYFREE (ds->attrs);
+        free_namelist ((fp->attr_namelist),fp->nattrs);
+        fp->nattrs = 0;
+    }
+    MYFREE (ds->group_name);
+}
+
+
+int adios_read_dataspaces_close (ADIOS_FILE *fp) 
+{
+    struct dataspaces_data_struct * ds = 
+                (struct dataspaces_data_struct *) fp->fh;
+
+    log_debug("-- %s, rank %d: fp=%x\n", __func__, ds->mpi_rank, fp);
+
+    /* Release read lock locked in fopen */
+    unlock_file (fp, ds);
+
+    /* Disconnect from DATASPACES if we connected at open() */
+    if (ds && ds->disconnect_at_close) {
+        adios_read_dataspaces_finalize_method();
+    }
+
+    free_step_data (fp);
+
+    if (ds->chunk) MYFREE(ds->chunk);
+    free (ds);
+    if (fp->path) MYFREE(fp->path);
+    free (fp);
+    return 0;
+}
+
+int adios_read_dataspaces_peek_ahead (ADIOS_FILE *fp)
+{
+    struct dataspaces_data_struct * ds = 
+                (struct dataspaces_data_struct *) fp->fh;
+
+    log_debug("peek ahead from version %d of filename=%s, last available step %d\n", 
+              ds->current_step, fp->path, fp->last_step);
+
+    int offset[] = {0,0,0}, readsize[3] = {1,1,1};
+    int version_info_buf[2]; // 0: last version, 1: terminated?
+    int err;
+    char ds_vname[MAX_DS_NAMELEN];
+    enum STEP_STATUS step_status = STEP_OK;
+    snprintf(ds_vname, MAX_DS_NAMELEN, "VERSION@%s",fp->path);
+
+    log_debug("   rank %d: dspaces_get %s\n", ds->mpi_rank, ds_vname);
+    readsize[0] = 2; //*sizeof(int); // VERSION%name is 2 integers only
+    err = adios_read_dataspaces_get (ds_vname, adios_integer, 0, ds->mpi_rank, 1, 0, 
+            offset, readsize, version_info_buf);
+
+    if (!err) {
+        int last_version = version_info_buf[0];
+        int terminated = version_info_buf[1];
+        log_debug("   rank %d: version info: last=%d, terminated=%d\n", 
+                ds->mpi_rank, last_version, terminated);
+
+        fp->last_step = last_version; // update to new last_step
+        if (last_version <= fp->current_step) {
+            // we have no more new steps
+            if (terminated) {
+                // stream is gone, we read everything 
+                adios_error (err_end_of_stream, 
+                        "Stream '%s' has been terminated. No more steps available\n", fp->path);
+            } else {
+                // a next step may come 
+                adios_error (err_step_notready, 
+                        "No new step in stream '%s' is not yet available\n", fp->path);
+            }
+        }
+    }
+
+    return adios_errno;
+}
+
+int adios_read_dataspaces_advance_step (ADIOS_FILE *fp, int last, float timeout_sec)
+{
+    struct dataspaces_data_struct * ds = 
+                (struct dataspaces_data_struct *) fp->fh;
+
+    enum WHICH_VERSION which_version;
+
+#ifdef DATASPACES_NO_VERSIONING
+    ds->current_step = -1;    /* Data in DataSpaces is always overwritten (read same version) */
+    which_version = NEXT_VERSION;
+#else
+    if (last)
+        which_version = LAST_VERSION; 
+    else if (ds->lock_mode == ADIOS_LOCKMODE_ALL)
+        which_version = NEXT_VERSION; 
+    else
+        which_version = NEXT_AVAILABLE_VERSION; 
+    log_debug("advance from version %d of filename=%s which_version=%s\n", 
+              ds->current_step, fp->path,
+              which_version_str[which_version]);
+#endif
+
+    if (ds->locked_fname) {
+        /* Release previous step (app did not call release_step() */
+        adios_read_dataspaces_release_step (fp);
+    }
+
+    int err = get_step (fp, ds->current_step+1, which_version, timeout_sec); // content of fp and ds changes!
+
+    if (!err) {
+        file_versions.version [ ds->file_index ] = ds->current_step; // why do we store this?
+        log_debug("advanced to version %d of filename=%s\n", ds->current_step, fp->path);
+    } else {
+        if (!adios_errno) {
+            adios_error (err_unspecified, "Unspecified error during adios_advance_step()\n");
+        }
+    }
+
+    return adios_errno;
+}
+
+
+void adios_read_dataspaces_release_step (ADIOS_FILE *fp)
+{
+    struct dataspaces_data_struct * ds = 
+                (struct dataspaces_data_struct *) fp->fh;
+    struct dataspaces_var_struct * vars = 
+                (struct dataspaces_var_struct *) ds->vars;
+    struct dataspaces_attr_struct * attrs = 
+                (struct dataspaces_attr_struct *) ds->attrs;
+
+    /* Release read lock locked in fopen */
+    unlock_file (fp, ds);
+
+    free_step_data (fp);
+}
+
+
+ADIOS_VARINFO * adios_read_dataspaces_inq_var_byid (const ADIOS_FILE *fp, int varid)
+{
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    struct dataspaces_var_struct * vars = ds->vars;
+    ADIOS_VARINFO * vi;
+
+    if (varid < 0 || varid > fp->nvars) {
+        adios_error (err_invalid_varid, "Stream %s has %d variables. Invalid variable id %d\n",
+                    fp->path, fp->nvars, varid);
+        return NULL;
+    }
+
+    vi = (ADIOS_VARINFO *) malloc(sizeof(ADIOS_VARINFO));
+    if (!vi) {
+        adios_error (err_no_memory, "Could not allocate memory for variable info.\n");
+        return NULL;
+    }
+
+    vi->varid = varid;
+    vi->type = vars[varid].type;
+    vi->ndim = vars[varid].ndims;
+    vi->dims = vars[varid].dims;
+    vi->nsteps = 1;
+    vi->value = vars[varid].value;
+    vi->global = 1;
+    vi->nblocks = (int *) malloc (sizeof(int));
+    vi->nblocks[0] = 1;
+    vi->sum_nblocks = vi->nblocks[0];
+    
+    return vi;
+}
+
+int adios_read_dataspaces_inq_var_stat (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo, int per_step_stat, int per_block_stat)
+{
+    /* FIXME: store and retrieve statistics from DataSpaces */
+    varinfo->statistics = NULL;
+    /*
+    varinfo->statistics->min = NULL;
+    varinfo->statistics->max = NULL;
+    varinfo->statistics->avg = NULL;
+    varinfo->statistics->std_dev = NULL;
+    varinfo->statistics->steps = NULL;
+    varinfo->statistics->blocks = NULL;
+    varinfo->statistics->histogram = NULL;
+    */
+    return 0;
+}
+
+int adios_read_dataspaces_inq_var_blockinfo (const ADIOS_FILE *fp, ADIOS_VARINFO * varinfo)
+{
+    /* FIXME: return the actual block decomposition by the writers
+              but we need to store that in DataSpaces in the first place 
+    */
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    int i;
+    varinfo->blockinfo = (ADIOS_VARBLOCK *) malloc (sizeof(ADIOS_VARBLOCK)); // just one block
+    varinfo->blockinfo->start = (uint64_t *) malloc (ds->vars[varinfo->varid].ndims * sizeof(uint64_t));
+    varinfo->blockinfo->count = (uint64_t *) malloc (ds->vars[varinfo->varid].ndims * sizeof(uint64_t));
+    for (i = 0; i<ds->vars[varinfo->varid].ndims; i++) {
+        varinfo->blockinfo->start[i] = 0;
+        varinfo->blockinfo->count[i] = ds->vars[varinfo->varid].dims[i];
+    }
+    return 0;
+}
+
+
+static int adios_read_dataspaces_get (const char * varname, enum ADIOS_DATATYPES vartype, 
+                                int version, int rank,
+                                int ndims, int is_fortran_ordering, 
+                                int * offset, int * readsize, void * data)
+{
+
+    struct obj_data *od;
+    int elemsize = common_read_type_size(vartype, NULL);
+    int i, err;
+    int didx[3];
+    int lb[3] = {0,0,0};
+    int ub[3] = {0,0,0};
+
+    // reorder DS dimensions to Fortran/C dimensions
+    ds_dimension_ordering (ndims, is_fortran_ordering, 0 /*pack*/, didx);
+    for (i=0; i<3; i++) {
+        lb[i] = offset[didx[i]];
+        ub[i] = offset[didx[i]]+readsize[didx[i]]-1;
+    }
+
+    log_debug("-- %s, rank %d: get data: varname=%s version=%d, lb=(%d,%d,%d) ub=(%d,%d,%d)}\n",
+        __func__, rank, varname, version, lb[0], lb[1], lb[2], 
+        ub[0], ub[1], ub[2]);
+
+    err =  dspaces_get (varname, version, elemsize, 
+                     lb[0], lb[1], lb[2],
+                     ub[0], ub[1], ub[2],
+                     data
+                    );
+    /*if (err == -ENOMEM) {
+        adios_error (err_no_memory, "Not enough memory for DATASPACES to perform dspaces_get()");  
+        return err_no_memory;
+    } 
+    else*/ if (err) {
+        adios_error (err_corrupted_variable, "DATASPACES failed to read variable %s.\n", varname);  
+        return err_corrupted_variable;
+    }
+
+    return 0;
+}
+
+
+int adios_read_dataspaces_schedule_read_byid (const ADIOS_FILE * fp, 
+                                              const ADIOS_SELECTION * sel, 
+                                              int varid, 
+                                              int from_steps, 
+                                              int nsteps, 
+                                              void * data) 
+{
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    struct dataspaces_var_struct * var = &ds->vars[varid];
+    read_request * r;
+    uint64_t s[10], c[10], ld0, off0;
+    uint64_t reqsize;
+    int i;
+
+    if (nsteps != 1) {
+        adios_error (err_invalid_timestep, 
+                     "Only one step can be read from a stream at a time. "
+                     "You requested %d steps in adios_schedule_read()\n", nsteps);
+        return err_invalid_timestep;
+    }
+
+    r = (read_request *) malloc (sizeof (read_request));
+    if (!r) {
+        adios_error (err_no_memory, "Could not allocate memory when scheduling a read request.\n");
+        return err_no_memory;
+    }
+    r->sel = NULL;
+
+    reqsize = common_read_type_size (var->type, NULL);
+    // process, check selection and create target selection for read
+    if (sel) {
+        switch (sel->type) {
+
+            case ADIOS_SELECTION_BOUNDINGBOX:
+
+                if (var->ndims != sel->u.bb.ndim) {
+                    adios_error (err_out_of_bound, 
+                        "Number of dimensions in ADIOS_SELECTION = %d should be equal "
+                        "to the number of dimensions of the variable %s = %d\n",
+                        var->ndims, fp->var_namelist[varid], sel->u.bb.ndim);
+                    return err_out_of_bound;
+                }
+                for (i=0; i<sel->u.bb.ndim; i++) {
+                    if (sel->u.bb.start[i] + sel->u.bb.count[i] > var->dims[i]) {
+                        adios_error (err_out_of_bound, 
+                                "offset/readsize is out of bound in dimension %d for variable %s\n"
+                                "size of dimension = %lld; you provided start=%lld, count=%lld\n",
+                                i, fp->var_namelist[varid], var->dims[i], 
+                                sel->u.bb.start[i], sel->u.bb.count[i]
+                                );
+                    }
+                    reqsize *= sel->u.bb.count[i];
+                }
+                r->sel = copy_selection (sel);
+                break;
+
+            case ADIOS_SELECTION_POINTS:
+
+                if (var->ndims != sel->u.bb.ndim) {
+                    adios_error (err_out_of_bound, 
+                        "Number of dimensions in ADIOS_SELECTION = %d should be equal "
+                        "to the number of dimensions of the variable %s = %d\n",
+                        var->ndims, fp->var_namelist[varid], sel->u.bb.ndim);
+                    return err_out_of_bound;
+                }
+                reqsize *= sel->u.points.npoints;
+                r->sel = copy_selection (sel);
+                break;
+
+            case ADIOS_SELECTION_WRITEBLOCK:
+
+                /* We cannot do this with DataSpaces yet (fp->nwriter == 1) */
+                /* Read the whole variable */
+                memcpy (s, 0, 10*sizeof(uint64_t));
+                r->sel = common_read_selection_boundingbox(var->ndims, s, var->dims);
+                for (i=0; i<var->ndims; i++) 
+                    reqsize *= var->dims[i];
+                break;
+
+            case ADIOS_SELECTION_AUTO:
+
+                /* We determine here what to read for this process.
+                   Let's do a simple 1D domain decomposition
+                   FIXME: should be smarter and do multi-dim decomp if needed
+                */
+                memcpy (s, 0, 10*sizeof(uint64_t));
+                memcpy (c, var->dims, 10*sizeof(uint64_t));
+                if (var->ndims) {
+                    ld0 = var->dims[0]/ds->nproc;
+                    if (ld0 != 0) {
+                        off0 = ds->mpi_rank*ld0;
+                        if (ds->mpi_rank == ds->nproc-1) {
+                            /* last reader reads the rest */
+                            ld0 = var->dims[0] - (int)(ld0*(ds->nproc-1));
+                        }
+                    } else {
+                        /* Only first dims[0] processes read one piece, the rest does nothing */
+                        if (ds->mpi_rank < var->dims[0]) {
+                            ld0 = 1;
+                            off0 = ds->mpi_rank;
+                        }
+                    }
+                    if (ld0 > 0) {
+                        s[0] = off0;
+                        c[0] = ld0;
+                        r->sel = common_read_selection_boundingbox(
+                                var->ndims, s, c);
+                    }
+                    for (i=0; i<var->ndims; i++) 
+                        reqsize *= c[i];
+                } else {
+                    /* Scalar: just read it for each process */
+                    r->sel = common_read_selection_boundingbox(0, 0, 0);
+                }
+
+                break;
+        } // switch
+    } else {
+        // NULL selection means the whole variable
+        memcpy (s, 0, 10*sizeof(uint64_t));
+        r->sel = common_read_selection_boundingbox(var->ndims, s, var->dims);
+        for (i=0; i<var->ndims; i++) 
+            reqsize *= var->dims[i];
+    }
+
+    if (r->sel) {
+        r->varid = varid;
+        r->from_steps = 0; // we read the current step anyway
+        r->nsteps = 1;
+        r->data = data;
+        r->datasize = reqsize;
+        r->priv = 0;
+        r->next = 0;
+        if (ds->req_list == NULL) {
+            list_insert_read_request_tail (&ds->req_list, r);
+            ds->req_list_tail = ds->req_list;
+        } else {
+            // just speed up insert directly after the tail
+            list_insert_read_request_next (&ds->req_list_tail, r);
+        }
+    } else {
+        free(r);
+    }
+
+    return 0;
+}
+
+static ADIOS_VARCHUNK * read_var (const ADIOS_FILE *fp, read_request * r)
+{
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    struct dataspaces_var_struct * var = &ds->vars[r->varid];
+    //int64_t total_size;
+    int offset[3] = {0,0,0};
+    int readsize[3] = {1,1,1};
+    int elemsize;
+    int err;
+    int i,k,ndims,tidx;
+    char ds_name[MAX_DS_NAMELEN];
+
+    if (!ds->chunk)
+        ds->chunk = (ADIOS_VARCHUNK *) malloc (sizeof (ADIOS_VARCHUNK));
+    if (!ds->chunk) {
+        adios_error (err_no_memory, 
+                "Could not allocate buffer for group name in adios_read_open_stream()\n");
+        return NULL;
+    }
+    ds->chunk->varid = r->varid;
+    ds->chunk->type = var->type;
+    ds->chunk->sel = NULL;
+    elemsize = common_read_type_size (var->type, var->value);
+
+    // handle scalars first (no need to read from space again)
+    if (var->ndims == 0 && !var->hastime) { 
+        if (r->data) {
+            memcpy (r->data, var->value, elemsize);
+            ds->chunk->data = r->data;
+        } else {
+            ds->chunk->data = var->value;
+        }
+        return ds->chunk;
+    }
+        
+    if (r->data) {
+        // read into user allocated memory
+        ds->chunk->data = r->data;
+    } else {
+        // read into method-allocated memory
+        ds->chunk->data = get_chunk_buffer();
+        if (!ds->chunk->data) {
+            return NULL;
+        }
+    }
+
+    snprintf(ds_name, MAX_DS_NAMELEN, "%s/%s/%s", fp->path, ds->group_name, var->name);
+
+    if (r->sel->type == ADIOS_SELECTION_BOUNDINGBOX)
+    {
+        // transform uint64_t array to int array for DataSpaces
+        for (i=0; i<var->ndims; i++) {
+            offset[i]    = (int) r->sel->u.bb.start[i];
+            readsize[i]  = (int) r->sel->u.bb.count[i];
+        }
+
+        log_debug("-- %s, rank %d: get data: varname=%s start=(%lld,%lld,%lld) count=(%lld,%lld,%lld)}\n",
+                __func__, ds->mpi_rank, ds_name, 
+                r->sel->u.bb.start[0], r->sel->u.bb.start[1], r->sel->u.bb.start[2], 
+                r->sel->u.bb.count[0], r->sel->u.bb.count[1], r->sel->u.bb.count[2]);
+        log_debug("-- %s, rank %d: get data: varname=%s offset=(%d,%d,%d) readsize=(%d,%d,%d)}\n",
+                __func__, ds->mpi_rank, ds_name, offset[0], offset[1], offset[2], 
+                readsize[0], readsize[1], readsize[2]);
+
+        err = adios_read_dataspaces_get (ds_name, var->type, ds->current_step, ds->mpi_rank, 
+                var->ndims, futils_is_called_from_fortran(),
+                offset, readsize, ds->chunk->data);
+    }
+    else if (r->sel->type == ADIOS_SELECTION_POINTS)
+    {
+        err = 0;
+        k = 0;
+        while (!err && k < r->sel->u.points.npoints) {
+            // pick and read k-th point individually
+            for (i=0; i<var->ndims; i++) {
+                offset[i]    = (int) r->sel->u.points.points[k*var->ndims+i];
+                readsize[i]  = 1;
+            }
+
+            err = adios_read_dataspaces_get (ds_name, var->type, ds->current_step, ds->mpi_rank, 
+                    var->ndims, futils_is_called_from_fortran(),
+                    offset, readsize, ds->chunk->data+k*elemsize);
+            k++;
+        }
+    }
+    else
+    {
+        log_error ("Programming error: in Dataspaces method's read_var(), there "
+                   "should be no selection type other than bounding box and points. "
+                   "type = %d, var = %s\n", r->sel->type, var->name);
+        err = 1;
+
+    }
+
+    if (err) {
+        return NULL;
+    }
+
+    return ds->chunk;
+}
+
+int adios_read_dataspaces_perform_reads (const ADIOS_FILE *fp, int blocking)
+{
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    read_request * r;
+
+    /* 1. prepare all reads */
+    // check if all user memory is provided for blocking read
+    if (blocking) {
+        r = ds->req_list;
+        while (r != NULL) {
+            if (r->data == NULL) {
+                adios_error (err_operation_not_supported, 
+                    "Blocking mode at adios_perform_reads() requires that user "
+                    "provides the memory for each read request. Request for "
+                    "variable %s was scheduled without user-allocated memory\n",
+                    ds->vars[r->varid].name);
+                return err_operation_not_supported;
+            }
+            r = r->next;
+        }
+    }
+
+    /* 2. if blocking, do all reads here, otherwise do it one-by-one in check_reads */
+    if (!blocking) 
+        return 0;
+
+    while (ds->req_list != NULL && adios_errno == err_no_error) {
+        read_var (fp, ds->req_list);
+    
+        // remove head from list
+        r = ds->req_list;
+        ds->req_list = ds->req_list->next;
+        free(r);
+        ds->nreq--;
+    }
+    ds->req_list_tail = NULL;
+
+    return adios_errno;
+}
+
+int adios_read_dataspaces_check_reads (const ADIOS_FILE * fp, ADIOS_VARCHUNK ** chunk)
+{
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    read_request * r;
+    int retval;
+
+    if (ds->req_list != NULL) 
+    {
+        if (!ds->req_list->data && ds->req_list->datasize > chunk_buffer_size) {
+            /* Request size does not fit into the chunk buffer.
+               Chop up the request into multiple smaller chunks here.
+            */
+            /* FIXME: do this chunking */
+            log_error ("DATASPACES method cannot do chunking at this moment. "
+                        "Choose a max_chunk_size=N parameter so that each variable "
+                        "request fits into the buffer\n");
+
+        }
+
+        *chunk = read_var (fp, ds->req_list);
+
+        if (*chunk)
+            retval = 1;
+        else
+            retval = adios_errno;
+    
+        // remove head from list
+        r = ds->req_list;
+        ds->req_list = ds->req_list->next;
+        free(r);
+        ds->nreq--;
+    } 
+    else 
+    {
+        // no more chunks (variables) to be read
+        retval = 0; 
+        ds->req_list_tail = NULL;
+    }
+    return retval;
+}
+
+
+/* Tell the DataSpaces order of dimensions for a 1-3 dim array written from Fortran or C.
+   unpack=1: the reverse of packing (to retrieve the original order).
+   didx should be an int [3] array in any case.
+*/
+void ds_dimension_ordering(int ndims, int is_app_fortran, int unpack, int *didx)
+{
+    /* Order of dimensions: in DataSpaces: slow, fast, slowest
+       Fortran: i,j,k --> j, i, k  = lb[1], lb[0], lb[2]
+                i,j   --> j, i     = lb[1], lb[0], lb[2]=1
+                i     --> 1, i     = lb[1]=1, lb[0], lb[2]=1
+       C:       i,j,k --> j, k, i  = lb[1], lb[2], lb[0]
+                i,j   --> i, j     = lb[0], lb[1], lb[2]=1
+                i     --> 1, i     = lb[1]=1, lb[0], lb[2]=1 (same as Fortran)
+
+       unpack: C(i,j,k) ordering applied twice does not result in the original order
+               so we need to have a reverse mapping for this case.
+               For all the other cases, applying twice results in the same order
+               even for packing from Fortran and unpacking to C, and vice versa.
+               F(i,j,k) -(pack)-> DS(j,i,k) -(unpack)-> C(k,j,i) or F(i,j,k)
+               C(i,j,k) -(pack)-> DS(j,k,i) -(unpack)-> C(i,j,k) or F(k,j,i)
+               F(i,j)   -(pack)-> DS(j,i)   -(unpack)-> C(j,i)   or F(i,j)
+               C(i,j)   -(pack)-> DS(i,j)   -(unpack)-> C(i,j)   or F(j,i)
+               F(i)     -(pack)-> DS(1,i)   -(unpack)-> C(i,(1)) or F(i,(1))
+               C(i)     -(pack)-> DS(1,i)   -(unpack)-> C(i,(1)) or F(i,(1))
+    */
+
+    if (ndims == 0) {
+        didx[0] = 0; didx[1] = 1; didx[2] = 2;
+    } else if (is_app_fortran || ndims == 1) {
+        /* Flip 1st and 2nd dimension for DataSpaces representation
+           for any Fortran writings and for any 1D array :
+           Fortran: i,j,k --> j, i, k  = lb[1], lb[0], lb[2]
+           C:       i     --> 1, i     = lb[1]=1, lb[0], lb[2]=1 
+        */
+        didx[0] = 1; didx[1] = 0; didx[2] = 2;
+    } else if (ndims == 2) {
+        /* C: i,j   --> i, j     = lb[0], lb[1], lb[2]=1 */
+        didx[0] = 0; didx[1] = 1; didx[2] = 2;
+    } else { // (ndims == 3) 
+        if (!unpack) {
+            /* C: i,j,k --> j, k, i  = lb[1], lb[2], lb[0] */
+            didx[0] = 1; didx[1] = 2; didx[2] = 0;
+        } else {
+            /* DataSpaces x,y,z --> z,x,y  (ijk->kij, or jki->ijk) */
+            didx[0] = 2; didx[1] = 0; didx[2] = 1;
+        }
+    }
+}
+
+int adios_read_dataspaces_get_attr_byid (const ADIOS_FILE * fp, int attrid, 
+                    enum ADIOS_DATATYPES * type, int * size, void ** data)
+{
+    struct dataspaces_data_struct * ds = (struct dataspaces_data_struct *) fp->fh;
+    struct dataspaces_attr_struct * attrs = ds->attrs;
+
+    if (attrid < 0 || attrid > fp->nattrs) {
+        adios_error (err_invalid_attrid, 
+                     "File %s has %d attributes. Invalid attribute id %d\n",
+                     fp->path, fp->nattrs, attrid);
+        return adios_errno;
+    }
+
+    *type = attrs[attrid].type;
+    *size = common_read_type_size(*type, attrs[attrid].value);
+    *data = (void *) malloc (*size);
+    if (*data) {
+        memcpy (*data, attrs[attrid].value, *size);
+    } else {
+        adios_error (err_no_memory, "Could not allocate memory for attribute info.\n");
+        return adios_errno;
+    }
+    return 0; 
+}
+
+void adios_read_dataspaces_reset_dimension_order (const ADIOS_FILE *fp, int is_fortran)
+{
+    /* not implemented */
+}
+
+void adios_read_dataspaces_get_groupinfo (const ADIOS_FILE *fp, int *ngroups, 
+            char ***group_namelist, int **nvars_per_group, int **nattrs_per_group) 
+{
+    struct dataspaces_data_struct * ds;
+    if (fp) {
+        ds = (struct dataspaces_data_struct *) fp->fh;
+        *ngroups = 1;
+        *group_namelist = (char **) malloc (sizeof (char*));
+        *group_namelist[0] = strdup (ds->group_name);
+    }
+}
+
+int adios_read_dataspaces_is_var_timed (const ADIOS_FILE *fp, int varid)
+{
+    struct dataspaces_data_struct * ds;
+    int retval = 0;
+    if (fp) {
+        ds = (struct dataspaces_data_struct *) fp->fh;
+        if (varid > 0 && varid < fp->nvars)
+            retval = ds->vars[varid].hastime;
+    }
+    return retval;
+}
diff --git a/src/read_datatap.c b/src/read/read_datatap.c
similarity index 100%
rename from src/read_datatap.c
rename to src/read/read_datatap.c
diff --git a/src/read_dimes.c b/src/read/read_dimes.c
similarity index 100%
rename from src/read_dimes.c
rename to src/read/read_dimes.c
diff --git a/src/read_nssi.c b/src/read/read_nssi.c
similarity index 100%
rename from src/read_nssi.c
rename to src/read/read_nssi.c
diff --git a/src/read_bp.c b/src/read_bp.c
deleted file mode 100644
index b0e9a41..0000000
--- a/src/read_bp.c
+++ /dev/null
@@ -1,3521 +0,0 @@
-/* 
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-
-/****************************/
-/* Read method for BP files */
-/****************************/
-
-#include <stdlib.h>
-#include <string.h>
-#include <math.h>
-#include "adios.h"
-#include "bp_utils.h"
-#include "bp_types.h"
-#include "adios_types.h"
-#include "adios_read.h"
-#include "adios_read_hooks.h"
-#include "adios_error.h"
-#include "futils.h"
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-MPI_File * get_BP_file_handle(struct BP_file_handle * l, uint32_t file_index)
-{
-    if (!l)
-        return 0;
-
-    while (l)
-    {
-        if (l->file_index == file_index)
-            return &l->fh;
-
-        l = l->next;
-    }
-
-    return 0;
-}
-
-void add_BP_file_handle (struct BP_file_handle ** l, struct BP_file_handle * n)
-{
-    if (!n)
-        return;
-
-    n->next = *l;
-    *l = n;
-}
-
-
-void close_all_BP_files (struct BP_file_handle * l)
-{
-    struct BP_file_handle * n;
-
-    while (l)
-    {
-        n = l->next;
-
-        MPI_File_close (&l->fh);
-        free (l);
-
-        l = n;
-    }
-}
-
-/* Return 0: if file is little endian, 1 if file is big endian 
- * We know if it is different from the current system, so here
- * we determine the current endianness and report accordingly.
- */
-static int adios_read_bp_get_endianness( uint32_t change_endianness )
-{
-   int LE = 0;
-   int BE = !LE;
-   int i = 1;
-   char *p = (char *) &i;
-   int current_endianness;
-   if (p[0] == 1) // Lowest address contains the least significant byte
-       current_endianness = LE;
-   else
-       current_endianness = BE;
-    if (change_endianness == adios_flag_yes)
-        return !current_endianness;
-    else
-        return current_endianness;
-}
-
-int adios_read_bp_init (MPI_Comm comm) { return 0; }
-int adios_read_bp_finalize () { return 0; }
-
-ADIOS_FILE * adios_read_bp_fopen (const char * fname, MPI_Comm comm)
-{
-    int i, rank;    
-    struct BP_FILE * fh;
-    ADIOS_FILE * fp;
-    uint64_t header_size;
-
-    adios_errno = 0;
-    fh = (struct BP_FILE *) malloc (sizeof (struct BP_FILE));
-    if (!fh) {
-        adios_error ( err_no_memory, "Cannot allocate memory for file info.");
-        return NULL;
-    }
-
-    fh->fname = (fname ? strdup (fname) : 0L);
-    fh->sfh = 0;
-    fh->comm = comm;
-    fh->gvar_h = 0;
-    fh->pgs_root = 0;
-    fh->vars_root = 0;
-    fh->attrs_root = 0;
-    fh->b = malloc (sizeof (struct adios_bp_buffer_struct_v1));
-    if (!fh->b) {
-        adios_error ( err_no_memory, "Cannot allocate memory for file info.");
-        return NULL;
-    }
-    fp = (ADIOS_FILE *) malloc (sizeof (ADIOS_FILE));
-    if (!fp) {
-        adios_error ( err_no_memory, "Cannot allocate memory for file info.");
-        return NULL;
-    }
-
-    adios_buffer_struct_init (fh->b);
-    MPI_Comm_rank (comm, &rank);
-    if (bp_read_open (fname, comm, fh))
-        return NULL;
-
-    /* Only rank=0 process reads the footer and it broadcasts to all other processes */
-    if ( rank == 0 ) {
-        if (bp_read_minifooter (fh))
-            return NULL;
-    }
-    MPI_Bcast (&fh->mfooter, sizeof(struct bp_minifooter),MPI_BYTE, 0, comm);
-    
-    header_size = fh->mfooter.file_size-fh->mfooter.pgs_index_offset;
-
-    if ( rank != 0) {
-        if (!fh->b->buff) {
-            bp_alloc_aligned (fh->b, header_size);
-            if (!fh->b->buff)
-                return NULL;
-            memset (fh->b->buff, 0, header_size);
-            fh->b->offset = 0;
-        }
-    }
-    MPI_Barrier(comm);
-    MPI_Bcast (fh->b->buff, fh->mfooter.file_size-fh->mfooter.pgs_index_offset, MPI_BYTE, 0 , comm);
-
-    /* Everyone parses the index on its own */
-    bp_parse_pgs (fh);
-    bp_parse_vars (fh);
-    bp_parse_attrs (fh);
-
-    /* fill out ADIOS_FILE struct */
-    fp->fh = (uint64_t) fh;
-    fp->groups_count = fh->gvar_h->group_count;
-    fp->vars_count = fh->mfooter.vars_count;
-    fp->attrs_count = fh->mfooter.attrs_count;
-    fp->tidx_start = fh->tidx_start;
-    fp->ntimesteps = fh->tidx_stop - fh->tidx_start + 1;
-    fp->file_size = fh->mfooter.file_size;
-    fp->version = fh->mfooter.version;
-    fp->endianness = adios_read_bp_get_endianness(fh->mfooter.change_endianness);
-    alloc_namelist (&fp->group_namelist,fp->groups_count); 
-    for (i=0;i<fp->groups_count;i++) {
-        if (!fp->group_namelist[i]) {
-            adios_error (err_no_memory, "Could not allocate buffer for %d strings in adios_fopen()", fp->groups_count);
-            adios_read_bp_fclose(fp);
-            return NULL;
-        }
-        else  {
-            strcpy(fp->group_namelist[i],fh->gvar_h->namelist[i]);
-        }
-    }
-    return fp;
-}
-
-/* This function can be called if user places 
-   the wrong sequences of dims for a var 
-*/   
-void adios_read_bp_reset_dimension_order (ADIOS_FILE *fp, int is_fortran)
-{
-    struct BP_FILE * fh = (struct BP_FILE *)(fp->fh);
-    struct bp_index_pg_struct_v1 ** root = &(fh->pgs_root);
-    struct bp_minifooter * mh = &(fh->mfooter);
-    uint64_t i;
-
-    for (i = 0; i < mh->pgs_count; i++) {
-        is_fortran ? ((*root)->adios_host_language_fortran = adios_flag_yes) 
-               : ((*root)->adios_host_language_fortran = adios_flag_no);
-        root = &(*root)->next;
-    }
-}
-
-int adios_read_bp_fclose (ADIOS_FILE *fp) 
-{
-    struct BP_FILE * fh = (struct BP_FILE *) fp->fh;
-    struct BP_GROUP_VAR * gh = fh->gvar_h;
-    struct BP_GROUP_ATTR * ah = fh->gattr_h;
-    struct adios_index_var_struct_v1 * vars_root = fh->vars_root, *vr;
-    struct adios_index_attribute_struct_v1 * attrs_root = fh->attrs_root, *ar;
-    struct bp_index_pg_struct_v1 * pgs_root = fh->pgs_root, *pr;
-    int i,j;
-    MPI_File mpi_fh = fh->mpi_fh;
-
-    adios_errno = 0;
-    if (fh->mpi_fh) 
-        MPI_File_close (&mpi_fh);
-
-    if (fh->sfh)
-        close_all_BP_files (fh->sfh);
-
-    if (fh->b) {
-        adios_posix_close_internal (fh->b);
-        free(fh->b);
-    }
-
-    /* Free variable structures */
-    /* alloc in bp_utils.c: bp_parse_vars() */
-    while (vars_root) {
-        vr = vars_root;
-        vars_root = vars_root->next;
-        for (j = 0; j < vr->characteristics_count; j++) {
-            // alloc in bp_utils.c:bp_parse_characteristics() <- bp_get_characteristics_data()
-            if (vr->characteristics[j].dims.dims)
-                free (vr->characteristics[j].dims.dims);
-            if (vr->characteristics[j].value)
-                free (vr->characteristics[j].value);
-            // NCSU - Clearing up statistics
-            if (vr->characteristics[j].stats)
-            {
-                uint8_t k = 0, idx = 0;
-                uint8_t i = 0, count = adios_get_stat_set_count(vr->type);
-
-                while (vr->characteristics[j].bitmap >> k)
-                {
-                    if ((vr->characteristics[j].bitmap >> k) & 1)
-                    {
-                        for (i = 0; i < count; i ++)
-                        {
-                            if (k == adios_statistic_hist)
-                            {
-                                struct adios_index_characteristics_hist_struct * hist = (struct adios_index_characteristics_hist_struct *) (vr->characteristics [j].stats[i][idx].data);
-                                free (hist->breaks);
-                                free (hist->frequencies);
-                                free (hist);
-                            }
-                            else
-                            free (vr->characteristics[j].stats [i][idx].data);
-                        }
-                        idx ++;
-                    }
-                    k ++;
-                }
-
-                for (i = 0; i < count; i ++)
-                    free (vr->characteristics[j].stats [i]);
-
-                free (vr->characteristics[j].stats);
-                vr->characteristics[j].stats = 0;
-            }
-        }
-        if (vr->characteristics) 
-            free (vr->characteristics);
-        if (vr->group_name) 
-            free (vr->group_name);
-        if (vr->var_name) 
-            free (vr->var_name);
-        if (vr->var_path) 
-            free (vr->var_path);
-        free(vr);
-    }
-
-    /* Free attributes structures */
-    /* alloc in bp_utils.c bp_parse_attrs() */
-    while (attrs_root) {
-        ar = attrs_root;
-        attrs_root = attrs_root->next;
-        for (j = 0; j < ar->characteristics_count; j++) {
-            if (ar->characteristics[j].value)
-                free (ar->characteristics[j].value);
-        }
-        if (ar->characteristics) 
-            free (ar->characteristics);
-        if (ar->group_name) 
-            free (ar->group_name);
-        if (ar->attr_name) 
-            free (ar->attr_name);
-        if (ar->attr_path) 
-            free (ar->attr_path);
-        free(ar);
-    }
-
-
-    /* Free process group structures */
-    /* alloc in bp_utils.c bp_parse_pgs() first loop */
-    //printf ("pgs: %d\n", fh->mfooter.pgs_count);
-    while (pgs_root) {
-        pr = pgs_root;
-        pgs_root = pgs_root->next;
-        //printf("%d\tpg pid=%d addr=%x next=%x\n",i, pr->process_id, pr, pr->next);
-        if (pr->group_name)
-            free(pr->group_name);
-        if (pr->time_index_name)
-            free(pr->time_index_name);
-        free(pr);
-    }
-
-    /* Free variable structures in BP_GROUP_VAR */
-    if (gh) {
-        for (j=0;j<2;j++) { 
-            for (i=0;i<gh->group_count;i++) {
-                if (gh->time_index[j][i])
-                    free(gh->time_index[j][i]);
-            }
-            if (gh->time_index[j])
-                free(gh->time_index[j]);
-        }
-        free (gh->time_index);
-    
-        for (i=0;i<gh->group_count;i++) { 
-            if (gh->namelist[i])
-                free(gh->namelist[i]);
-        }
-        if (gh->namelist)
-            free (gh->namelist);
-
-        for (i=0;i<fh->mfooter.vars_count;i++) {
-            if (gh->var_namelist[i])
-                free(gh->var_namelist[i]);
-            if (gh->var_offsets[i]) 
-                free(gh->var_offsets[i]);
-        }
-        if (gh->var_namelist)
-            free (gh->var_namelist);
-
-        if (gh->var_offsets) 
-            free(gh->var_offsets);
-
-        if (gh->var_counts_per_group)
-            free(gh->var_counts_per_group);
-
-        if (gh->pg_offsets)
-            free (gh->pg_offsets);
-
-        free (gh);
-    }
-
-    /* Free attribute structures in BP_GROUP_ATTR */
-    if (ah) {
-        for (i = 0; i < fh->mfooter.attrs_count; i++) {
-            if (ah->attr_offsets[i]) 
-                free(ah->attr_offsets[i]);
-            if (ah->attr_namelist[i]) 
-                free(ah->attr_namelist[i]);
-        }
-        if (ah->attr_offsets)
-            free(ah->attr_offsets);
-        if (ah->attr_namelist)
-            free(ah->attr_namelist);
-        if (ah->attr_counts_per_group) 
-            free(ah->attr_counts_per_group);
-
-        free(ah);
-    }
-
-    if (fh->fname)
-        free (fh->fname);
-        
-    if (fh)
-        free (fh);    
-
-    free_namelist ((fp->group_namelist),fp->groups_count);
-    free(fp);
-    return 0;
-}
-
-
-ADIOS_GROUP * adios_read_bp_gopen (ADIOS_FILE *fp, const char * grpname)
-{
-    struct BP_FILE * fh = (struct BP_FILE *) fp->fh;
-    int grpid; 
-
-    adios_errno = 0;
-    for (grpid=0;grpid<(fh->gvar_h->group_count);grpid++) {
-        if (!strcmp(fh->gvar_h->namelist[grpid], grpname))
-            break; 
-    }
-    if (grpid >= fh->gvar_h->group_count) {
-        adios_error ( err_invalid_group, "Invalid group name %s", grpname);
-        return NULL;
-    }
-    return adios_read_bp_gopen_byid(fp, grpid);
-}
-
-ADIOS_GROUP * adios_read_bp_gopen_byid (ADIOS_FILE *fp, int grpid)
-{
-    struct BP_FILE * fh = (struct BP_FILE *) fp->fh;
-    struct BP_GROUP * gh;
-    ADIOS_GROUP * gp;
-    int i, offset;
-
-    adios_errno = 0;
-    if (grpid < 0 || grpid >= fh->gvar_h->group_count) {
-        adios_error ( err_invalid_group, "Invalid group index %d", grpid);
-        return NULL;
-    }
-
-    gh = (struct BP_GROUP *) malloc(sizeof(struct BP_GROUP));
-    if (!gh) {
-        adios_error ( err_no_memory, "Could not allocate memory for group info");
-        return NULL;
-    }
-
-    gp = (ADIOS_GROUP *) malloc(sizeof(ADIOS_GROUP));
-    if (!gp) {
-        adios_error ( err_no_memory, "Could not allocate memory for group info");
-        free(gh);
-        return NULL;
-    }
-
-    /* set offset index of variables (which is a long list of all vars in all groups) in this group */
-    offset = 0;
-    for (i=0; i<grpid; i++)
-        offset += fh->gvar_h->var_counts_per_group[i];
-
-    /* gh->vars_root will point to the list of vars in this group */
-    gh->vars_root = fh->vars_root; 
-    for (i=0; i<offset; i++)
-        gh->vars_root = gh->vars_root->next;
-
-    gh->group_id = grpid;
-    gh->vars_offset = offset;
-    gh->vars_count = fh->gvar_h->var_counts_per_group[grpid];
-
-    /* set offset of attributes in this group */
-    offset = 0;
-    for(i=0;i<grpid;i++)
-        offset += fh->gattr_h->attr_counts_per_group[i];
-
-    /* gh->attrs_root will point to the list of vars in this group */
-    gh->attrs_root = fh->attrs_root; 
-    for (i=0; i<offset; i++)
-        gh->attrs_root = gh->attrs_root->next;
-
-    gh->attrs_offset = offset;
-    gh->attrs_count = fh->gattr_h->attr_counts_per_group[grpid];
-
-    gh->fh = fh; 
-
-    /* fill out ADIOS_GROUP struct */
-    gp->grpid = grpid;
-    gp->gh = (uint64_t) gh;
-    gp->fp = fp;
-    gp->vars_count = gh->vars_count;
-    gp->attrs_count = gh->attrs_count;
-    
-    offset = gh->vars_offset;
-    alloc_namelist (&(gp->var_namelist), gp->vars_count);
-    for (i=0;i<gp->vars_count;i++) {
-        if (!gp->var_namelist[i]) { 
-            adios_error (err_no_memory, "Could not allocate buffer for %d strings in adios_gopen()", gp->vars_count);
-            adios_read_bp_gclose(gp);
-            return NULL;
-        }
-        else
-            strcpy(gp->var_namelist[i], gh->fh->gvar_h->var_namelist[i+offset]);
-    }
-
-    offset = gh->attrs_offset;
-    alloc_namelist (&(gp->attr_namelist), gp->attrs_count);
-    for (i=0;i<gp->attrs_count;i++) {
-        if (!gp->attr_namelist[i]) {
-            adios_error (err_no_memory, "Could not allocate buffer for %d strings in adios_gopen()", gp->vars_count);
-            adios_read_bp_gclose(gp);
-            return NULL;
-        }
-        else {
-            strcpy(gp->attr_namelist[i], gh->fh->gattr_h->attr_namelist[i+offset]);
-        }
-    }
-
-    return gp;
-}
-                   
-int adios_read_bp_gclose (ADIOS_GROUP *gp)
-{
-    struct BP_GROUP * gh = (struct BP_GROUP *) gp->gh;
-
-    adios_errno = 0;
-    if (!gh) {
-        adios_error (err_invalid_group_struct, "group handle is NULL!");
-        return  err_invalid_group_struct;
-    }
-    else
-        free (gh);
-
-    free_namelist ((gp->var_namelist),gp->vars_count);
-    free_namelist ((gp->attr_namelist),gp->attrs_count);
-    free(gp);
-    return 0;
-}
-
-
-
-int adios_read_bp_get_attr (ADIOS_GROUP * gp, const char * attrname, enum ADIOS_DATATYPES * type,
-                    int * size, void ** data)
-{
-    // Find the attribute: full path is stored with a starting / 
-    // Like in HDF5, we need to match names given with or without the starting /
-    // startpos is 0 or 1 to indicate if the argument has starting / or not
-    int attrid;
-    int vstartpos = 0, fstartpos = 0; 
-    struct BP_GROUP * gh = (struct BP_GROUP *)gp->gh;
-    int offset;
-
-    adios_errno = 0;
-    if (!gp) {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_get_attr()");
-        return adios_errno;
-    }
-    if (!attrname) {
-        adios_error (err_invalid_attrname, "Null pointer passed as attribute name to adios_get_attr()!");
-        return adios_errno;
-    }
-
-    offset = gh->attrs_offset;
-
-    if (attrname[0] == '/') 
-        vstartpos = 1;
-    for (attrid=0; attrid<(gp->attrs_count);attrid++) {
-        //if (gp->attr_namelist[attrid][0] == '/') 
-        if (gh->fh->gattr_h->attr_namelist[attrid+offset][0] == '/') 
-            fstartpos = 1;
-        //if (!strcmp(gp->attr_namelist[attrid]+fstartpos, attrname+vstartpos))
-        if (!strcmp(gh->fh->gattr_h->attr_namelist[attrid+offset]+fstartpos, attrname+vstartpos))
-            break; 
-    }
-    if (attrid >= gp->attrs_count) {
-        adios_error ( err_invalid_attrname, "Invalid attribute name %s", attrname);
-        return adios_errno;
-    }
-
-    return adios_read_bp_get_attr_byid(gp, attrid, type, size, data);
-}
-
-int adios_read_bp_get_attr_byid (ADIOS_GROUP * gp, int attrid, 
-                    enum ADIOS_DATATYPES * type, int * size, void ** data)
-{
-    int    i, offset, count;
-    struct BP_GROUP * gh;
-    struct BP_FILE * fh;
-    struct adios_index_attribute_struct_v1 * attr_root;
-    struct adios_index_var_struct_v1 * var_root;
-    int    file_is_fortran;
-
-    adios_errno = 0;
-    if (!gp) {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_get_attr()");
-        return adios_errno;
-    }
-    gh = (struct BP_GROUP *) gp->gh;
-    if (!gh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh group handle is NULL!");
-        return adios_errno;
-    }
-    fh = gh->fh;
-    if (!fh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh->fh file handle is NULL!");
-        return adios_errno;
-    }
-    if (attrid < 0 || attrid >= gh->attrs_count) {
-        adios_error (err_invalid_attrid, "Invalid attribute id %d (allowed 0..%d)", attrid, gh->attrs_count);
-        return adios_errno;
-    }
-
-    attr_root = gh->attrs_root; /* need to traverse the attribute list of the group */
-    for (i = 0; i < attrid && attr_root; i++)
-        attr_root = attr_root->next;
-    if (i != attrid) {
-        adios_error (err_corrupted_attribute, "Attribute id=%d is valid but was not found in internal data structures!",attrid);
-        return adios_errno; 
-    }
-
-    file_is_fortran = (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
-
-    if (attr_root->characteristics[0].value) {
-        /* Attribute has its own value */
-        *size = bp_get_type_size (attr_root->type, attr_root->characteristics[0].value);
-        *type = attr_root->type;
-        *data = (void *) malloc (*size);  
-        if (*data)
-            memcpy(*data, attr_root->characteristics[0].value, *size);
-    }
-    else if (attr_root->characteristics[0].var_id) {
-        /* Attribute is a reference to a variable */
-        /* FIXME: var ids are not unique in BP. If a group of variables are written several
-           times under different path using adios_set_path(), the id of a variable is always
-           the same (should be different). As a temporary fix, we look first for a matching
-           id plus path between an attribute and a variable. If not found, then we look for
-           a match on the ids only.*/
-        var_root = gh->vars_root; 
-        while (var_root) {
-            if (var_root->id == attr_root->characteristics[0].var_id && 
-                !strcmp(var_root->var_path, attr_root->attr_path))
-                break;
-            var_root = var_root->next;
-        }
-        if (!var_root) {
-            var_root = gh->vars_root; 
-            while (var_root) {
-                if (var_root->id == attr_root->characteristics[0].var_id)
-                    break;
-                var_root = var_root->next;
-            }
-        }
-
-        if (!var_root) {
-            adios_error (err_invalid_attribute_reference, 
-                   "Attribute %s/%s in group %s is a reference to variable ID %d, which is not found", 
-                   attr_root->attr_path, attr_root->attr_name, attr_root->group_name,
-                   attr_root->characteristics[0].var_id);
-            return adios_errno;
-        }
-
-        /* default values in case of error */
-        *data = NULL;
-        *size = 0;
-        *type = attr_root->type;
-
-        /* FIXME: variable and attribute type may not match, then a conversion is needed. */
-        /* Cases:
-                1. attr has no type, var is byte array     ==> string
-                2. attr has no type, var is not byte array ==> var type
-                3. attr is string, var is byte array       ==> string
-                4. attr type == var type                   ==> var type 
-                5. attr type != var type                   ==> attr type and conversion needed 
-        */
-        /* Error check: attr cannot reference an array in general */
-        if (var_root->characteristics[0].dims.count > 0) {
-            if ( (var_root->type == adios_byte || var_root->type == adios_unsigned_byte) &&
-                 (attr_root->type == adios_unknown || attr_root->type == adios_string) &&
-                 (var_root->characteristics[0].dims.count == 1)) {
-                 ; // this conversions are allowed
-            } else {
-                adios_error (err_invalid_attribute_reference, 
-                    "Attribute %s/%s in group %s, typeid=%d is a reference to an %d-dimensional array variable "
-                    "%s/%s of type %s, which is not supported in ADIOS",
-                    attr_root->attr_path, attr_root->attr_name, attr_root->group_name, attr_root->type,
-                    var_root->characteristics[0].dims.count,
-                    var_root->var_path, var_root->var_name, common_read_type_to_string(var_root->type));
-                return adios_errno;
-            }
-        }
-
-        if ( (attr_root->type == adios_unknown || attr_root->type == adios_string) &&
-             (var_root->type == adios_byte || var_root->type == adios_unsigned_byte) &&
-             (var_root->characteristics[0].dims.count == 1) ) {
-            /* 1D byte arrays are converted to string */
-            /* 1. read in variable */
-            char varname[512];
-            char *tmpdata;
-            uint64_t start, count;
-            int status;
-            start = 0; 
-            count = var_root->characteristics[0].dims.dims[0];
-            snprintf(varname, 512, "%s/%s", var_root->var_path, var_root->var_name);
-            tmpdata = (char *) malloc (count+1);
-            if (tmpdata == NULL) {
-                adios_error (err_no_memory, 
-                      "Cannot allocate memory of %lld bytes for reading in data for attribute %s/%s of group %s.",
-                      count, attr_root->attr_path, attr_root->attr_name, attr_root->group_name);
-                return adios_errno;
-            }
-
-            status = adios_read_bp_read_var (gp, varname, &start, &count, tmpdata);
-            
-            if (status < 0) {
-                char *msg = strdup(adios_get_last_errmsg());
-                adios_error ((enum ADIOS_ERRCODES) status, 
-                      "Cannot read data of variable %s/%s for attribute %s/%s of group %s: %s",
-                      var_root->var_path, var_root->var_name, 
-                      attr_root->attr_path, attr_root->attr_name, attr_root->group_name,
-                      msg);
-                free(tmpdata);
-                free(msg);
-                return status;
-            }
-
-            *type = adios_string;
-            if (file_is_fortran) {
-                /* Fortran byte array to C string */
-                *data = futils_fstr_to_cstr( tmpdata, (int)count); /* FIXME: supports only 2GB strings... */
-                *size = strlen( (char *)data );
-                free(tmpdata);
-            } else {
-                /* C array to C string */
-                tmpdata[count] = '\0';
-                *size = count+1;
-                *data = tmpdata;
-            }
-        } else {
-            /* other types are inherited */
-            *type = var_root->type;
-            *size = bp_get_type_size (var_root->type, var_root->characteristics[0].value);
-            *data = (void *) malloc (*size);  
-            if (*data)
-                memcpy(*data, var_root->characteristics[0].value, *size);
-        }
-    }
-
-    return 0;
-}
-
-
-/* Reverse the order in an array in place.
-   use swapping from Fortran/column-major order to ADIOS-read-api/C/row-major order and back
-*/
-static void swap_order(int n, uint64_t *array, int *timedim)
-{
-    int i;
-    uint64_t tmp;
-    for (i=0; i<n/2; i++) {
-        tmp = array[i];
-        array[i] = array[n-1-i];
-        array[n-1-i] = tmp;
-    }
-    if (*timedim > -1)
-        *timedim = (n-1) - *timedim; // swap the time dimension too
-}
-
-/* Look up variable id based on variable name.
-   Return index 0..gp->vars_count-1 if found, -1 otherwise
-*/
-static int adios_read_bp_find_var(ADIOS_GROUP *gp, const char *varname)
-{
-    // Find the variable: full path is stored with a starting / 
-    // Like in HDF5, we need to match names given with or without the starting /
-    // startpos is 0 or 1 to indicate if the argument has starting / or not
-    int varid;
-    int vstartpos = 0, fstartpos; 
-    struct BP_GROUP * gh = (struct BP_GROUP *)gp->gh;
-    int offset;
-
-    adios_errno = 0;
-    if (!gp) {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group");
-        return -1;
-    }
-    if (!varname) {
-        adios_error (err_invalid_varname, "Null pointer passed as variable name!");
-        return -1;
-    }
-
-    /* Search in gp->fh->gvar_h->var_namelist instead of gp->var_namelist, because that
-       one comes back from the user. One idiot (who writes this comment) sorted the
-       list in place after gopen and before inq_var.
-    */
-    offset = gh->vars_offset;
-
-    if (varname[0] == '/') 
-        vstartpos = 1;
-    for (varid=0; varid<(gp->vars_count);varid++) {
-        fstartpos = 0;
-        /* if (gp->var_namelist[varid][0] == '/') */
-        fstartpos = 0;
-        if (gh->fh->gvar_h->var_namelist[varid+offset][0] == '/')
-            fstartpos = 1;
-        /*if (!strcmp(gp->var_namelist[varid]+fstartpos, varname+vstartpos))*/
-        if (!strcmp(gh->fh->gvar_h->var_namelist[varid+offset]+fstartpos, varname+vstartpos))
-            break; 
-    }
-    if (varid >= gp->vars_count) {
-        adios_error (err_invalid_varname, "Invalid variable name %s", varname);
-        return -1;
-    }
-    return varid;
-}
-
-// NCSU - For custom memory allocation 
-#define CALLOC(var, num, sz, comment)\
-{\
-    var = calloc (num, sz); \
-    if (!var)    {\
-        adios_error_at_line (err_no_memory, __FILE__, __LINE__, "Could not allocate memory for ", comment, " in common_read_get_characteristics"); \
-        return; \
-    }\
-}
-
-#define MALLOC(var,sz,comment)\
-{\
-    var = malloc (sz); \
-    if (!var)    {\
-        adios_error_at_line (err_no_memory, __FILE__, __LINE__, "Could not allocate memory for ", comment, " in common_read_get_characteristics"); \
-        return; \
-    }\
-}\
-
-// NCSU - Reading the statistics
-/** Get value and statistics, allocate space for them too */
-static void adios_read_bp_get_characteristics (struct adios_index_var_struct_v1 * var_root, ADIOS_VARINFO *vi)
-{
-    int i, j, c, count = 1;
-    int size, sum_size, sum_type;
-
-    vi->value = NULL;
-
-    vi->gmin = vi->gmax = NULL;
-    vi->gavg = NULL;
-    vi->mins = vi->maxs = NULL;
-    vi->avgs = NULL;
-    vi->gstd_dev = NULL;
-    vi->std_devs = NULL;
-    vi->hist = NULL;
-
-    // set value for scalars
-    if (var_root->characteristics [0].value) {
-        size = bp_get_type_size(var_root->type, var_root->characteristics [0].value);
-        vi->value = (void *) malloc (size);
-        
-        if (vi->value)
-           memcpy(vi->value, var_root->characteristics [0].value, size);
-        else {
-            adios_error_at_line (err_no_memory, __FILE__, __LINE__, "Could not allocate memory for value in common_read_get_characteristics");
-            return;
-        }
-    } else {
-        vi->value = NULL;
-    }
-
-    int npgs = var_root->characteristics_count, timestep, ntimes = -1;
-    uint64_t gcnt = 0, * cnts;
-
-    double *gsum = NULL, *gsum_square = NULL;
-    double **sums = NULL, **sum_squares = NULL;
-
-    int16_t map[32];
-    memset (map, -1, sizeof(map));
-
-    // Bitmap shows which statistical information has been calculated
-    i = j = 0;
-    while (var_root->characteristics[0].bitmap >> j)
-    {
-        if ((var_root->characteristics[0].bitmap >> j) & 1)
-            map [j] = i ++;
-        j ++;
-     }
-
-    if(vi->timedim >= 0)
-    {    
-        ntimes = vi->dims[0];
-
-        if (map[adios_statistic_min] != -1)
-        {
-            MALLOC(vi->mins, ntimes * sizeof(void *), "minimum per timestep");
-            for (i = 0; i < ntimes; i++)
-                vi->mins[i] = 0;
-        }
-
-        if (map[adios_statistic_max] != -1)
-        {
-            MALLOC(vi->maxs, ntimes * sizeof(void *), "maximum per timestep");
-            for (i = 0; i < ntimes; i++)
-                vi->maxs[i] = 0;
-        }
-
-        if (map[adios_statistic_sum] != -1)
-        {
-            MALLOC(sums, ntimes * sizeof(double *), "summation per timestep");
-            MALLOC(vi->avgs, ntimes * sizeof(double *), "average per timestep");
-
-            for (i = 0; i < ntimes; i++)
-                sums[i] = vi->avgs[i] = 0;
-
-            CALLOC(cnts, ntimes, sizeof(uint64_t), "count of elements per timestep");
-        }
-
-        if (map[adios_statistic_sum_square] != -1)
-        {
-            MALLOC(sum_squares, ntimes * sizeof(double *), "summation per timestep");
-            MALLOC(vi->std_devs, ntimes * sizeof(double *), "standard deviation per timestep");
-
-            for (i = 0; i < ntimes; i++)
-                vi->std_devs[i] = sum_squares[i] = 0;
-        }
-    }
-
-    if (map[adios_statistic_hist] != -1 && (var_root->characteristics[0].stats[0][map[adios_statistic_hist]].data))
-    {
-        struct adios_index_characteristics_stat_struct * stats = var_root->characteristics[0].stats[0];
-        struct adios_index_characteristics_hist_struct * hist = stats[map[adios_statistic_hist]].data;
-        int num_breaks = hist->num_breaks;
-
-        MALLOC(vi->hist, sizeof(struct ADIOS_HIST), "histogram");
-        MALLOC(vi->hist->breaks, num_breaks * sizeof(double), "break points of histogram");    
-        MALLOC(vi->hist->gfrequencies, (num_breaks + 1) * sizeof(uint32_t), "global frequencies of histogram");
-
-        vi->hist->num_breaks = hist->num_breaks;
-        vi->hist->min = hist->min;
-        vi->hist->max = hist->max;
-
-        memcpy(vi->hist->breaks, hist->breaks, num_breaks * sizeof(double));
-        CALLOC(vi->hist->gfrequencies, (num_breaks + 1), bp_get_type_size(adios_unsigned_integer, ""), "global frequency");
-
-        if (ntimes > 0)
-        {
-            MALLOC(vi->hist->frequenciess, (ntimes * sizeof(int32_t *)), "frequencies for timesteps");
-            for(i = 0; i < ntimes; i++)
-                CALLOC(vi->hist->frequenciess[i], (num_breaks + 1), bp_get_type_size(adios_unsigned_integer, ""), "frequency at timestep");
-        }
-    }
-
-    size = bp_get_type_size (var_root->type, "");    
-    sum_size = bp_get_type_size (adios_double, "");
-
-    if (var_root->type == adios_complex || var_root->type == adios_double_complex)
-    {
-        int type;
-        count = 3;
-        timestep = 0;
-
-        if (var_root->type == adios_complex)
-            type = adios_double;
-        else
-            type = adios_long_double;
-
-        // Only a double precision returned for all complex values
-        size = bp_get_type_size (adios_double, "");    
-
-           for (i=0; i<var_root->characteristics_count; i++)
-        {
-            if (ntimes > 0)
-                timestep = var_root->characteristics[i].time_index - 1;
-
-            if (!var_root->characteristics[i].stats)
-                continue;
-
-            struct adios_index_characteristics_stat_struct ** stats = var_root->characteristics[i].stats;
-
-            if ((map[adios_statistic_finite] != -1) && (* ((uint8_t *) stats[0][map[adios_statistic_finite]].data) == 0))
-                continue;
-
-            if (map[adios_statistic_min] != -1 && stats[0][map[adios_statistic_min]].data)
-            {
-                double data[3];
-                for (c = 0; c < count; c ++)
-                    data[c] = bp_value_to_double(type, stats[c][map[adios_statistic_min]].data);
-
-                if(!vi->gmin) {
-                    MALLOC (vi->gmin, count * size, "global minimum")
-                    for (c = 0; c < count; c ++)
-                           ((double * ) vi->gmin)[c] = data[c]; 
-
-                } else {
-                    for (c = 0; c < count; c ++)
-                        if (data[c] < ((double *) vi->gmin)[c])
-                               ((double * ) vi->gmin)[c] = data[c]; 
-                }
-
-                if (ntimes > 0) {
-                    if(!vi->mins[timestep]) {
-                        MALLOC (vi->mins[timestep], count * size, "minimum per timestep")
-                        for (c = 0; c < count; c ++)
-                               ((double **) vi->mins)[timestep][c] = data[c]; 
-
-                    } else {
-                        for (c = 0; c < count; c ++)
-                            if (data[c] < ((double **) vi->mins)[timestep][c])
-                                   ((double **) vi->mins)[timestep][c] = data[c]; 
-                    }
-                }
-            }
-
-            if (map[adios_statistic_max] != -1 && stats[0][map[adios_statistic_max]].data)
-            {
-                double data[3];
-                for (c = 0; c < count; c ++)
-                    data[c] = bp_value_to_double(type, stats[c][map[adios_statistic_max]].data);
-
-                if(!vi->gmax) {
-                    MALLOC (vi->gmax, count * size, "global minimum")
-                    for (c = 0; c < count; c ++)
-                        ((double * ) vi->gmax)[c] = data[c];
-
-                } else {
-                    for (c = 0; c < count; c ++)
-                        if (data[c] > ((double *) vi->gmax)[c])
-                            ((double * ) vi->gmax)[c] = data[c];
-                }
-
-                if (ntimes > 0) {
-                    if(!vi->maxs[timestep]) {
-                        MALLOC (vi->maxs[timestep], count * size, "minimum per timestep")
-                        for (c = 0; c < count; c ++)
-                            ((double **) vi->maxs)[timestep][c] = data[c];
-
-                    } else {
-                        for (c = 0; c < count; c ++)
-                            if (data[c] > ((double **) vi->maxs)[timestep][c])
-                                ((double **) vi->maxs)[timestep][c] = data[c];
-                    }
-                }
-            }
-
-            if (map[adios_statistic_sum] != -1 && stats[0][map[adios_statistic_sum]].data)
-            {    
-                double data[3];
-                for (c = 0; c < count; c ++)
-                    data[c] = bp_value_to_double(type, stats[c][map[adios_statistic_sum]].data);
-
-                if(!gsum) {
-                    MALLOC(gsum, count * sum_size, "global summation")
-                    for (c = 0; c < count; c ++)
-                           gsum[c] = data[c];
-
-                } else {
-                    for (c = 0; c < count; c ++)
-                        gsum[c] = gsum[c] + data[c];
-                }
-
-                if (ntimes > 0) {
-                    if(!sums[timestep]) {
-                        MALLOC(sums[timestep], count * sum_size, "summation per timestep")
-                        for (c = 0; c < count; c ++)
-                            sums[timestep][c] = data[c];
-
-                    } else {
-                        for (c = 0; c < count; c ++)
-                            sums[timestep][c] = sums[timestep][c] + data[c];
-                    }
-                }
-            }
-
-            if (map[adios_statistic_sum_square] != -1 && stats[0][map[adios_statistic_sum_square]].data)
-            {
-                double data[3];
-                for (c = 0; c < count; c ++)
-                    data[c] = bp_value_to_double(type, stats[c][map[adios_statistic_sum_square]].data);
-
-                if(!gsum_square) {
-                    MALLOC(gsum_square, count * sum_size, "global summation of squares")
-                    for (c = 0; c < count; c ++)
-                        gsum_square[c] = data[c];
-
-                } else {
-                    for (c = 0; c < count; c ++)
-                           gsum_square[c] = gsum_square[c] + data[c]; 
-                }
-
-                if (ntimes > 0) {
-                    if(!sum_squares[timestep]) {
-                        MALLOC(sum_squares[timestep], count * sum_size, "summation of square per timestep")
-                        for (c = 0; c < count; c ++)
-                            sum_squares[timestep][c] = data[c];
-
-                    } else {
-                        for (c = 0; c < count; c ++)
-                            sum_squares[timestep][c] = sum_squares[timestep][c] + data[c]; 
-                    }
-                }
-            }
-
-            if (map[adios_statistic_cnt] != -1 && stats[0][map[adios_statistic_cnt]].data)
-            {
-                if (ntimes > 0)
-                    cnts[timestep] += * ((uint32_t *) stats[0][map[adios_statistic_cnt]].data);
-                gcnt += * (uint32_t *) stats[0][map[adios_statistic_cnt]].data;
-            }
-        }
-
-        if(ntimes > 0 && vi->gmin && (map[adios_statistic_sum] != -1) && (map[adios_statistic_sum_square] != -1)) {
-            // min, max, summation exists only for arrays
-            // Calculate average / timestep
-
-            for(timestep = 0; timestep < ntimes; timestep ++) {
-                MALLOC(vi->avgs[timestep], count * sum_size, "average per timestep")
-                for (c = 0; c < count; c ++)
-                    vi->avgs[timestep][c] = sums[timestep][c] / cnts[timestep];
-
-                MALLOC(vi->std_devs[timestep], count * sum_size, "standard deviation per timestep")
-                for (c = 0; c < count; c ++)
-                    vi->std_devs[timestep][c] = sqrt((sum_squares[timestep][c] / cnts[timestep]) - (vi->avgs[timestep][c] * vi->avgs[timestep][c]));
-
-                free (sums[timestep]);
-                free (sum_squares[timestep]);
-            }
-        }
-
-        // Calculate global average
-        if(vi->gmin && gsum && (map[adios_statistic_sum] != -1) && (map[adios_statistic_sum_square] != -1)) {
-            MALLOC(vi->gavg, count * sum_size, "global average")
-
-            if(gcnt > 0)
-                for (c = 0; c < count; c ++)
-                    vi->gavg[c] = gsum[c] / gcnt;
-            else
-                for (c = 0; c < count; c ++)
-                    vi->gavg[c] = gsum[c];
-
-            MALLOC(vi->gstd_dev, count * sum_size, "global average")
-            if(vi->gavg && gcnt > 0)
-                for (c = 0; c < count; c ++)
-                    vi->gstd_dev[c] = sqrt(gsum_square[c] / gcnt - (vi->gavg[c] * vi->gavg[c]));
-            else
-                for (c = 0; c < count; c ++)
-                    vi->gstd_dev[c] = 0;
-        }
-    }
-    else
-    {
-        timestep = 0;
-           for (i=0; i<var_root->characteristics_count; i++)
-        {
-            if (ntimes > 0)
-                timestep = var_root->characteristics[i].time_index - 1;
-                //timestep = i / (npgs / ntimes);
-
-            if (!var_root->characteristics[i].stats)
-                continue;
-
-            struct adios_index_characteristics_stat_struct * stats = var_root->characteristics[i].stats[0];
-            struct adios_index_characteristics_hist_struct * hist = stats[map[adios_statistic_hist]].data;
-
-            if (map[adios_statistic_finite] != -1 && (* ((uint8_t *) stats[map[adios_statistic_finite]].data) == 0))
-                continue;
-
-            if (map[adios_statistic_min] != -1 && stats[map[adios_statistic_min]].data)
-            {
-                if(!vi->gmin) {
-                    MALLOC (vi->gmin, size, "global minimum")
-                       memcpy(vi->gmin, stats[map[adios_statistic_min]].data, size);
-
-                } else if (adios_lt(var_root->type, stats[map[adios_statistic_min]].data, vi->gmin)){
-                       memcpy(vi->gmin, stats[map[adios_statistic_min]].data, size);
-                }
-
-                if (ntimes > 0) {
-                    if(!vi->mins[timestep]) {
-                        MALLOC (vi->mins[timestep], size, "minimum per timestep")
-                        memcpy(vi->mins[timestep], stats[map[adios_statistic_min]].data, size);
-
-                    } else if (adios_lt(var_root->type, stats[map[adios_statistic_min]].data, vi->mins[timestep])) {
-                        memcpy(vi->mins[timestep], stats[map[adios_statistic_min]].data, size);
-                    }
-                }
-            }
-
-            if (map[adios_statistic_max] != -1 && stats[map[adios_statistic_max]].data)
-            {
-                if(!vi->gmax) {
-                    MALLOC (vi->gmax, size, "global maximum")
-                    memcpy(vi->gmax, stats[map[adios_statistic_max]].data, size);
-
-                } else if (adios_lt(var_root->type, vi->gmax, stats[map[adios_statistic_max]].data))
-                       memcpy(vi->gmax, stats[map[adios_statistic_max]].data, size);
-                
-                if (ntimes > 0) {
-                    if(!vi->maxs[timestep]) {
-                        MALLOC (vi->maxs[timestep], size, "maximum per timestep")
-                        memcpy(vi->maxs[timestep], stats[map[adios_statistic_max]].data, size);
-
-                    } else if (adios_lt(var_root->type, vi->maxs[timestep], stats[map[adios_statistic_max]].data)) {
-                        memcpy(vi->maxs[timestep], stats[map[adios_statistic_max]].data, size);    
-                    }
-                }
-            }
-    
-            if (map[adios_statistic_sum] != -1 && stats[map[adios_statistic_sum]].data)
-            {    
-                if(!gsum) {
-                    MALLOC(gsum, sum_size, "global summation")
-                       memcpy(gsum, stats[map[adios_statistic_sum]].data, sum_size);
-
-                } else {
-                    *gsum = *gsum + * ((double *) stats[map[adios_statistic_sum]].data);
-                }
-
-                if (ntimes > 0) {
-                    if(!sums[timestep]) {
-                        MALLOC(sums[timestep], sum_size, "summation per timestep")
-                        memcpy(sums[timestep], stats[map[adios_statistic_sum]].data, sum_size);
-
-                    } else {
-                        *sums[timestep] = *sums[timestep] + * ((double *) stats[map[adios_statistic_sum]].data);
-                    }
-                }
-            }
-
-            if (map[adios_statistic_sum_square] != -1 && stats[map[adios_statistic_sum_square]].data)
-            {
-                if(!gsum_square) {
-                    MALLOC(gsum_square, sum_size, "global summation of squares")
-                    memcpy(gsum_square, stats[map[adios_statistic_sum_square]].data, sum_size);
-
-                } else {
-                       *gsum_square = *gsum_square + * ((double *) stats[map[adios_statistic_sum_square]].data);
-                }
-
-                if (ntimes > 0) {
-                    if(!sum_squares[timestep]) {
-                        MALLOC(sum_squares[timestep], sum_size, "summation of square per timestep")
-                        memcpy(sum_squares[timestep], stats[map[adios_statistic_sum_square]].data, sum_size);
-
-                    } else {
-                        *sum_squares[timestep] = *sum_squares[timestep] + * ((double *) stats[map[adios_statistic_sum_square]].data);
-                    }
-                }
-            }
-
-            if(map[adios_statistic_hist] != -1 && stats[map[adios_statistic_hist]].data)
-            {
-                for(j = 0; j <= vi->hist->num_breaks; j++)
-                {    
-                    uint32_t freq = hist->frequencies[j];
-                    vi->hist->gfrequencies[j] += freq;
-                    if (ntimes > 0)
-                        vi->hist->frequenciess[timestep][j] += freq;
-                }
-            }
-
-            if (map[adios_statistic_cnt] != -1 && stats[map[adios_statistic_cnt]].data)
-            {
-                if (ntimes > 0)
-                    cnts[timestep] += * (uint32_t *) stats[map[adios_statistic_cnt]].data;
-                gcnt += * (uint32_t *) stats[map[adios_statistic_cnt]].data;
-            }
-        }
-
-        if(ntimes > 0 && vi->gmin && (map[adios_statistic_sum] != -1) && (map[adios_statistic_sum_square] != -1)) {
-            // min, max, summation exists only for arrays
-            // Calculate average / timestep
-
-            for(timestep = 0; timestep < ntimes; timestep ++) {
-                MALLOC(vi->avgs[timestep], sum_size, "average per timestep")
-                *(vi->avgs[timestep]) = *(sums[timestep]) / cnts[timestep];
-
-                MALLOC(vi->std_devs[timestep], sum_size, "standard deviation per timestep")
-                *(vi->std_devs[timestep]) = sqrt(*(sum_squares[timestep]) / cnts[timestep] - ((*(vi->avgs[timestep]) * (*(vi->avgs[timestep])))));
-
-                free (sums[timestep]);
-                free (sum_squares[timestep]);
-            }
-        }
-
-        // Calculate global average
-        if(vi->gmin && gsum && (map[adios_statistic_sum] != -1) && (map[adios_statistic_sum_square] != -1)) {
-            MALLOC(vi->gavg, sum_size, "global average")
-            if(gcnt > 0)
-                *vi->gavg = *gsum / gcnt;
-            else
-                vi->gavg = gsum;
-
-            MALLOC(vi->gstd_dev, sum_size, "global average")
-            if(vi->gavg && gcnt > 0)
-                *vi->gstd_dev = sqrt(*gsum_square / gcnt - ((*(vi->gavg)) * (*(vi->gavg))));
-            else
-                *vi->gstd_dev = 0;
-        }
-    }
-
-    if (!vi->value && vi->gmin) {
-        vi->value = vi->gmin; // arrays have no value but we assign here the minimum
-    }
-
-    if(!vi->gmin) {
-        vi->gmin = vi->value; // scalars have value but not min
-    }
-    if(!vi->gmax) {
-        vi->gmax = vi->value; // scalars have value but not max
-    }
-
-    if (sums && gsum) {
-        free (sums);
-        free (gsum);
-    }
-
-    if (sum_squares && gsum_square) {
-        free (sum_squares);
-        free (gsum_square);
-    }    
-}
-
-/* get local and global dimensions and offsets from a variable characteristics 
-   return: 1 = it is a global array, 0 = local array
-*/
-static int adios_read_bp_get_dimensioncharacteristics(struct adios_index_characteristic_struct_v1 *ch, 
-                                               uint64_t *ldims, uint64_t *gdims, uint64_t *offsets)
-{
-    int is_global=0; // global array or just an array written by one process?
-    int ndim = ch->dims.count;
-    int k;
-
-    for (k=0; k < ndim; k++) {
-        ldims[k]   = ch->dims.dims[k*3];
-        gdims[k]   = ch->dims.dims[k*3+1];
-        offsets[k] = ch->dims.dims[k*3+2];
-        is_global = is_global || gdims[k];
-    }
-    return is_global;
-}
-
-static void adios_read_bp_get_dimensions (struct adios_index_var_struct_v1 *var_root, int ntsteps, int file_is_fortran,
-                                  int *ndim, uint64_t **dims, int *timedim)
-{
-    int i, k;
-    int is_global; // global array or just an array written by one process?
-    uint64_t ldims[32];
-    uint64_t gdims[32];
-    uint64_t offsets[32];
-
-    /* Get dimension information */    
-    *ndim = var_root->characteristics [0].dims.count; 
-    *dims = NULL;
-    *timedim = -1;
-    if (*ndim == 0) {
-        /* done with this scalar variable */
-        return ;
-    }
-
-    *dims = (uint64_t *) malloc (sizeof(uint64_t) * (*ndim));
-    memset(*dims,0,sizeof(uint64_t)*(*ndim));
-
-    is_global = adios_read_bp_get_dimensioncharacteristics( &(var_root->characteristics[0]),
-                                                    ldims, gdims, offsets);
-
-    if (!is_global) {
-        /* local array */
-        for (i=0; i < *ndim; i++) {
-            /* size of time dimension is always registered as 1 for an array */
-            if (ldims[i] == 1 && var_root->characteristics_count > 1) {
-                *timedim = i;
-                (*dims)[i] = ntsteps;
-            } else {
-                (*dims)[i] = ldims[i];
-            }
-            gdims[i] = ldims[i];
-        }         
-    }         
-    else {
-        /* global array:
-           time dimension: ldims=1, gdims=0
-           in C array, it can only be the first dim
-           in Fortran array, it can only be the last dim
-           (always the slowest changing dim)
-        */
-        if (gdims[*ndim-1] == 0)
-        {
-            if (!file_is_fortran) {
-                /* first dimension is the time (C array)
-                 * ldims[0] = 1 but gdims does not contain time info and 
-                 * gdims[0] is 1st data dimension and 
-                 * gdims is shorter by one value than ldims in case of C.
-                 * Therefore, gdims[*ndim-1] = 0 if there is a time dimension. 
-                 */
-                *timedim = 0;
-                // error check
-                if (*ndim > 1 && ldims[0] != 1) {
-                    fprintf(stderr,"ADIOS Error: this is a BP file with C ordering but we didn't find"
-                            "an array to have time dimension in the first dimension. l:g:o = (");
-                    for (i=0; i < *ndim; i++) {
-                        fprintf(stderr,"%llu:%llu:%llu%s", ldims[i], gdims[i], offsets[i], (i<*ndim-1 ? ", " : "") );
-                    }
-                    fprintf(stderr, ")\n");
-                }
-                (*dims)[0] = ntsteps;
-                for (i=1; i < *ndim; i++) 
-                    (*dims)[i]=gdims[i-1];
-            } else {
-                // last dimension is the time (Fortran array)
-                *timedim = *ndim - 1;
-
-                if (*ndim > 1 && ldims[*ndim-1] != 1) {
-                    fprintf(stderr,"ADIOS Error: this is a BP file with Fortran array ordering but we didn't find"
-                            "an array to have time dimension in the last dimension. l:g:o = (");
-                    for (i=0; i < *ndim; i++) {
-                        fprintf(stderr,"%llu:%llu:%llu%s", ldims[i], gdims[i], offsets[i], (i<*ndim-1 ? ", " : "") );
-                    }
-                    fprintf(stderr, ")\n");
-                }
-                for (i=0; i < *ndim-1; i++) 
-                    (*dims)[i]=gdims[i];
-                (*dims)[*timedim] = ntsteps;
-            }
-        } else {
-            // no time dimenstion
-            for (i=0; i < *ndim; i++) 
-                 (*dims)[i]=gdims[i];
-        }
-    }
-}
-
-ADIOS_VARINFO * adios_read_bp_inq_var (ADIOS_GROUP *gp, const char * varname) 
-{
-    int varid = adios_read_bp_find_var(gp, varname);
-    if (varid < 0)
-        return NULL;
-    return adios_read_bp_inq_var_byid(gp, varid);
-}
-
-ADIOS_VARINFO * adios_read_bp_inq_var_byid (ADIOS_GROUP *gp, int varid)
-{
-    struct BP_GROUP      * gh;
-    struct BP_FILE       * fh;
-    ADIOS_VARINFO * vi;
-    int file_is_fortran;
-    struct adios_index_var_struct_v1 * var_root;
-    int i,k;
-
-    adios_errno = 0;
-    if (!gp) {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_inq_var()");
-        return NULL;
-    }
-    gh = (struct BP_GROUP *) gp->gh;
-    if (!gh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh group handle is NULL!");
-        return NULL;
-    }
-    fh = gh->fh;
-    if (!fh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh->fh file handle is NULL!");
-        return NULL;
-    }
-    if (varid < 0 || varid >= gh->vars_count) {
-        adios_error (err_invalid_varid, "Invalid variable id %d (allowed 0..%d)", varid, gh->vars_count);
-        return NULL;
-    }
-    vi = (ADIOS_VARINFO *) malloc(sizeof(ADIOS_VARINFO));
-    if (!vi) {
-        adios_error ( err_no_memory, "Could not allocate memory for variable info");
-        return NULL;
-    }
-
-
-    file_is_fortran = (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
-    
-    var_root = gh->vars_root; /* first variable of this group. Need to traverse the list */
-    for (i=0; i<varid && var_root; i++) {
-        var_root = var_root->next;
-    }
-
-    if (i!=varid) {
-        adios_error (err_corrupted_variable, "Variable id=%d is valid but was not found in internal data structures!",varid);
-        return NULL; 
-    }
-
-
-    vi->varid = varid;
-
-    vi->type = var_root->type;
-    if (!var_root->characteristics_count) {
-        adios_error (err_corrupted_variable, "Variable %s does not have information on dimensions", 
-              gp->var_namelist[varid]);
-        free(vi);
-        return NULL;
-    }
-    vi->characteristics_count = var_root->characteristics_count;
-
-    /* Get value or min/max */
-
-    adios_read_bp_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
-                          &(vi->ndim), &(vi->dims), &(vi->timedim));
-    
-    if (file_is_fortran != futils_is_called_from_fortran()) {
-        /* If this is a Fortran written file and this is called from C code/  
-           or this is a C written file and this is called from Fortran code ==>
-           We need to reverse the order of the dimensions */
-        swap_order(vi->ndim, vi->dims, &(vi->timedim));
-        /*printf("File was written from %s and read now from %s, so we swap order of dimensions\n",
-                (file_is_fortran ? "Fortran" : "C"), (futils_is_called_from_fortran() ? "Fortran" : "C"));*/
-    }
-    
-    adios_read_bp_get_characteristics (var_root, vi);
-
-    return vi;
-}
-
-void adios_read_bp_free_varinfo (ADIOS_VARINFO *vp)
-{
-    if (vp) {
-        if (vp->dims)   free(vp->dims);
-        if (vp->value)  free(vp->value);
-        if (vp->gmin && vp->gmin != vp->value)   free(vp->gmin);
-        if (vp->gmax && vp->gmax != vp->value)   free(vp->gmax);
-        //if (vp->mins)   free(vp->mins);
-        //if (vp->maxs)   free(vp->maxs);
-        free(vp);
-    }
-}
-
-#define MPI_FILE_READ_OPS                           \
-        bp_realloc_aligned(fh->b, slice_size);      \
-        fh->b->offset = 0;                          \
-                                                    \
-        MPI_File_seek (fh->mpi_fh                   \
-                      ,(MPI_Offset)slice_offset     \
-                      ,MPI_SEEK_SET                 \
-                      );                            \
-                                                    \
-        MPI_File_read (fh->mpi_fh                   \
-                      ,fh->b->buff                  \
-                      ,slice_size                   \
-                      ,MPI_BYTE                     \
-                      ,&status                      \
-                      );                            \
-        fh->b->offset = 0;                          \
-
-//We also need to be able to read old .bp which doesn't have 'payload_offset'
-#define MPI_FILE_READ_OPS1                                                                  \
-        MPI_File_seek (fh->mpi_fh                                                           \
-                      ,(MPI_Offset) var_root->characteristics[start_idx + idx].offset       \
-                      ,MPI_SEEK_SET);                                                       \
-        MPI_File_read (fh->mpi_fh, fh->b->buff, 8, MPI_BYTE, &status);                      \
-        tmpcount= *((uint64_t*)fh->b->buff);                                                \
-                                                                                            \
-        bp_realloc_aligned(fh->b, tmpcount + 8);                                            \
-        fh->b->offset = 0;                                                                  \
-                                                                                            \
-        MPI_File_seek (fh->mpi_fh                                                           \
-                      ,(MPI_Offset) (var_root->characteristics[start_idx + idx].offset)     \
-                      ,MPI_SEEK_SET);                                                       \
-        MPI_File_read (fh->mpi_fh, fh->b->buff, tmpcount + 8, MPI_BYTE, &status);           \
-        fh->b->offset = 0;                                                                  \
-        adios_parse_var_data_header_v1 (fh->b, &var_header);                                \
-
-
-// To read subfiles
-#define MPI_FILE_READ_OPS2                                                                  \
-        bp_realloc_aligned(fh->b, slice_size);                                              \
-        fh->b->offset = 0;                                                                  \
-                                                                                            \
-        MPI_File * sfh;                                                                     \
-        sfh = get_BP_file_handle (fh->sfh                                                   \
-                                 ,var_root->characteristics[start_idx + idx].file_index     \
-                                 );                                                         \
-        if (!sfh)                                                                           \
-        {                                                                                   \
-            int err;                                                                        \
-            char * ch, * name_no_path, * name;                                              \
-            struct BP_file_handle * new_h =                                                 \
-                  (struct BP_file_handle *) malloc (sizeof (struct BP_file_handle));        \
-            new_h->file_index = var_root->characteristics[start_idx + idx].file_index;      \
-            new_h->next = 0;                                                                \
-            if (ch = strrchr (fh->fname, '/'))                                              \
-            {                                                                               \
-                name_no_path = malloc (strlen (ch + 1) + 1);                                \
-                strcpy (name_no_path, ch + 1);                                              \
-            }                                                                               \
-            else                                                                            \
-            {                                                                               \
-                name_no_path = malloc (strlen (fh->fname) + 1);                             \
-                strcpy (name_no_path, fh->fname);                                           \
-            }                                                                               \
-                                                                                            \
-            name = malloc (strlen (fh->fname) + 5 + strlen (name_no_path) + 1 + 10 + 1);    \
-            sprintf (name, "%s.dir/%s.%d", fh->fname, name_no_path, new_h->file_index);     \
-                                                                                            \
-            err = MPI_File_open (fh->comm                                                   \
-                                ,name                                                       \
-                                ,MPI_MODE_RDONLY                                            \
-                                ,(MPI_Info)MPI_INFO_NULL                                    \
-                                ,&new_h->fh                                                 \
-                                );                                                          \
-           if (err != MPI_SUCCESS)                                                          \
-           {                                                                                \
-               fprintf (stderr, "can not open file %S\n", name);                            \
-               return -1;                                                                   \
-           }                                                                                \
-                                                                                            \
-           add_BP_file_handle (&fh->sfh                                                     \
-                              ,new_h                                                        \
-                              );                                                            \
-           sfh = &new_h->fh;                                                                \
-                                                                                            \
-           free (name_no_path);                                                             \
-           free (name);                                                                     \
-        }                                                                                   \
-                                                                                            \
-        MPI_File_seek (*sfh                                                                 \
-                      ,(MPI_Offset)slice_offset                                             \
-                      ,MPI_SEEK_SET                                                         \
-                      );                                                                    \
-        MPI_File_read (*sfh                                                                 \
-                      ,fh->b->buff                                                          \
-                      ,slice_size                                                           \
-                      ,MPI_BYTE                                                             \
-                      ,&status                                                              \
-                      );                                                                    \
-        fh->b->offset = 0;                                                                  \
-
-
-int64_t adios_read_bp_read_var (ADIOS_GROUP * gp, const char * varname,
-                        const uint64_t * start, const uint64_t * count,
-                        void * data)
-{
-    struct BP_GROUP      * gh;
-    struct BP_FILE       * fh;
-    int varid, has_subfile;
-
-    adios_errno = 0;
-    if (!gp) {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_read_var()");
-        return -adios_errno;
-    }
-
-    gh = (struct BP_GROUP *) gp->gh;
-    if (!gh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh group handle is NULL!");
-        return -adios_errno;
-    }
-
-    fh = gh->fh;
-    if (!fh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh->fh file handle is NULL!");
-        return -adios_errno;
-    }
-
-    varid = adios_read_bp_find_var(gp, varname);
-    if (varid < 0 || varid >= gh->vars_count) {
-        adios_error (err_invalid_varid, "Invalid variable id %d (allowed 0..%d)", varid, gh->vars_count);
-        return -adios_errno;
-    }
-
-    return adios_read_bp_read_var_byid(gp, varid, start, count, data);
-}
-
-/***********************************************
- * This routine is to read in data in a 'local *
- * array fashion (as opposed to global array)  *
- *     Q. Liu, 11/2010                         *
- ***********************************************/
-int64_t adios_read_bp_read_local_var (ADIOS_GROUP * gp, const char * varname,
-                                      int vidx, const uint64_t * start,
-                                      const uint64_t * count, void * data)
-{
-    struct BP_GROUP      * gh;
-    struct BP_FILE       * fh;
-    struct adios_index_var_struct_v1 * var_root;
-    struct adios_var_header_struct_v1 var_header;
-    struct adios_var_payload_struct_v1 var_payload;
-    int    i,j,k, t, varid, start_idx, idx;
-    int    ndim, ndim_notime, has_subfile, file_is_fortran;
-    uint64_t size, * dims;
-    uint64_t ldims[32], gdims[32], offsets[32];
-    uint64_t datasize, nloop, dset_stride,var_stride, total_size=0, items_read;
-    uint64_t count_notime[32], start_notime[32];
-    int timedim = -1, temp_timedim, is_global = 0, size_of_type;
-    uint64_t slice_offset, slice_size, tmpcount = 0;
-    uint64_t datatimeoffset = 0; // offset in data to write a given timestep
-    MPI_Status status;
-
-    adios_errno = 0;
-    if (!gp)
-    {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_read_var()");
-        return -adios_errno;
-    }
-
-    gh = (struct BP_GROUP *) gp->gh;
-    if (!gh)
-    {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh group handle is NULL!");
-        return -adios_errno;
-    }
-
-    fh = gh->fh;
-    if (!fh)
-    {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh->fh file handle is NULL!");
-        return -adios_errno;
-    }
-
-    varid = adios_read_bp_find_var(gp, varname);
-    if (varid < 0 || varid >= gh->vars_count)
-    {
-        adios_error (err_invalid_varid, "Invalid variable id %d (allowed 0..%d)", varid, gh->vars_count);
-        return -adios_errno;
-    }
-
-    /* Check if file is written out by Fortran or C */
-    file_is_fortran = (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
-
-    /* Check whether we need to handle subfiles */
-    has_subfile = fh->mfooter.version & ADIOS_VERSION_HAVE_SUBFILE;
-
-    var_root = gh->vars_root; /* first variable of this group. Need to traverse the list */
-    for (i = 0; i< varid && var_root; i++)
-    {
-        var_root = var_root->next;
-    }
-
-    if (i != varid)
-    {
-        adios_error (err_corrupted_variable, 
-                     "Variable id=%d is valid but was not found in internal data structures!",
-                     varid);
-        return -adios_errno; 
-    }
-
-    if (vidx < 0 || vidx >= var_root->characteristics_count)
-    {
-        adios_error (err_out_of_bound, "idx=%d is out of bound", vidx);
-    }
-
-    ndim = var_root->characteristics [vidx].dims.count;
-
-    /* count_notime/start_notime are working copies of count/start */
-    for (i = 0; i < ndim; i++)
-    {
-        count_notime[i] = count[i];
-        start_notime[i] = start[i];
-    }
-
-    ndim_notime = ndim;
-
-    /* Fortran reader was reported of Fortran dimension order so it gives counts and starts in that order.
-       We need to swap them here to read correctly in C order */
-    if (futils_is_called_from_fortran())
-    {
-        timedim = -1;
-        swap_order(ndim_notime, count_notime, &timedim);
-        swap_order(ndim_notime, start_notime, &timedim);
-    }
-    
-    /* items_read = how many data elements are we going to read in total */
-    items_read = 1;
-    for (i = 0; i < ndim_notime; i++)
-        items_read *= count_notime[i];
-
-    size_of_type = bp_get_type_size (var_root->type, var_root->characteristics [vidx].value);
-
-    /* READ A SCALAR VARIABLE */
-    if (ndim_notime == 0)
-    {
-        slice_size = size_of_type;
-        start_idx = 0; // OPS macros below need it
-        idx = vidx; // OPS macros below need it
-
-        if (var_root->type == adios_string)
-        {
-            // strings are stored without \0 in file
-            // size_of_type here includes \0 so decrease by one
-            size_of_type--;
-        }
-
-        /* Old BP files don't have payload_offset characteristic */
-        if (var_root->characteristics[vidx].payload_offset > 0)
-        {
-            slice_offset = var_root->characteristics[vidx].payload_offset;
-
-            if (!has_subfile)
-            {
-                MPI_FILE_READ_OPS
-            }
-            else
-            {
-                MPI_FILE_READ_OPS2
-            }
-        }
-        else
-        {
-            slice_offset = 0;
-            MPI_FILE_READ_OPS1
-        }
-
-        memcpy((char *)data + total_size, fh->b->buff + fh->b->offset, size_of_type);
-
-        if (fh->mfooter.change_endianness == adios_flag_yes)
-            change_endianness((char *)data + total_size
-                             ,size_of_type
-                             ,var_root->type
-                             );
-
-        if (var_root->type == adios_string)
-        {
-            // add \0 to the end of string
-            // size_of_type here is the length of string
-            // FIXME: how would this work for strings written over time?
-            ((char*)data + total_size)[size_of_type] = '\0';
-        }
-
-        total_size += size_of_type;
-
-        return total_size;
-    } /* READ A SCALAR VARIABLE END HERE */
-
-    /* READ AN ARRAY VARIABLE */
-    uint64_t write_offset = 0;
-    int npg = 0;
-    tmpcount = 0;
-    int flag;
-    datasize = 1;
-    nloop = 1;
-    var_stride = 1;
-    dset_stride = 1;
-    uint64_t payload_size = size_of_type;
-
-    /* To get ldims for the index vidx */
-    adios_read_bp_get_dimensioncharacteristics( &(var_root->characteristics[vidx]),
-                                                ldims, gdims, offsets);
-
-    /* Again, a Fortran written file has the dimensions in Fortran order we need to swap here */
-    /* Only local dims are needed for reading local vars */ 
-    if (file_is_fortran)
-    {
-        i=-1;
-        swap_order(ndim, ldims, &(i));
-    }
-
-    /*
-    printf("ldims   = "); for (j = 0; j < ndim; j++) printf("%d ",ldims[j]); printf("\n");
-    printf("count_notime   = "); for (j = 0; j < ndim_notime; j++) printf("%d ",count_notime[j]); printf("\n");
-    printf("start_notime   = "); for (j = 0; j < ndim_notime; j++) printf("%d ",start_notime[j]); printf("\n");
-    */        
-
-    for (j = 0; j < ndim_notime; j++)
-    {
-        payload_size *= ldims [j];
-    
-        if ( (start_notime[j] > ldims[j]) 
-            || (start_notime[j] + count_notime[j] > ldims[j]))
-        {
-                    adios_error ( err_out_of_bound, "Error: Variable (id=%d) out of bound ("
-                        "the data in dimension %d to read is %llu elements from index %llu"
-                        " but the actual data is [0,%llu])",
-                        varid, j+1, count_notime[j], start_notime[j], ldims[j] - 1);
-                    return -adios_errno;
-        }
-    }
-
-    /* determined how many (fastest changing) dimensions can we read in in one read */
-    int break_dim =  ndim_notime - 1;
-    while (break_dim > -1)
-    {
-        if (start_notime[break_dim] == 0 && ldims[break_dim] == count_notime[break_dim])
-        {
-            datasize *= ldims[break_dim];
-        }
-        else
-            break;
-        
-        break_dim--;
-    }
-    
-    slice_offset = 0;
-    slice_size = 0;
-    /* Note: MPI_FILE_READ_OPS  - for reading single BP file.
-     *       MPI_FILE_READ_OPS2 - for reading those with subfiles.
-     *       MPI_FILE_READ_OPS1 - for reading old version of BP files
-     *                            which don't contain "payload_offset"
-     * Whenever to use OPS macro, start_idx and idx variable needs to be
-     * properly set.
-     */
-    
-    start_idx = 0;
-    idx = vidx;
-
-    if (break_dim <= 0) 
-    {
-        /* The slowest changing dimensions should not be read completely but
-           we still need to read only one block */
-   
-        uint64_t size_in_dset = count_notime[0];
-        uint64_t offset_in_dset = start_notime[0];
-
-        slice_size = (break_dim == -1 ? datasize * size_of_type : size_in_dset * datasize * size_of_type);
-    
-        if (var_root->characteristics[start_idx + idx].payload_offset > 0)
-        {
-            slice_offset = var_root->characteristics[start_idx + idx].payload_offset 
-                         + offset_in_dset * datasize * size_of_type;
-
-            if (!has_subfile)
-            {
-                MPI_FILE_READ_OPS
-            }
-            else
-            {
-                MPI_FILE_READ_OPS2
-            }
-        }
-        else
-        {
-            slice_offset = 0;
-            MPI_FILE_READ_OPS1
-        }
-
-        memcpy ((char *)data, fh->b->buff + fh->b->offset, slice_size);
-        if (fh->mfooter.change_endianness == adios_flag_yes)
-        {
-            change_endianness((char *)data + write_offset, slice_size, var_root->type);
-        }
-    }
-    else 
-    {
-        uint64_t stride_offset = 0;
-        uint64_t * size_in_dset, * offset_in_dset, * offset_in_var;
-        uint64_t start_in_payload, end_in_payload, s;
-        uint64_t var_offset;
-        uint64_t dset_offset;
-
-        size_in_dset = (uint64_t *) malloc (8 * ndim_notime);
-        offset_in_dset = (uint64_t *) malloc (8 * ndim_notime);
-        offset_in_var = (uint64_t *) malloc (8 * ndim_notime);
- 
-        if (size_in_dset == 0 || offset_in_dset == 0 || offset_in_var == 0)
-        {
-             adios_error (err_no_memory, "Malloc failed in %s at %d\n"
-                         , __FILE__, __LINE__
-                         );
-             return -adios_errno;
-        }
-
-        for (i = 0; i < ndim_notime ; i++)
-        {
-            size_in_dset[i] = count_notime[i];
-            offset_in_dset[i] = start_notime[i];
-            offset_in_var[i] = 0;
-        }
- 
-        datasize = 1;
-        var_stride = 1;
-        for (i = ndim_notime - 1; i >= break_dim; i--)
-        {
-            datasize *= size_in_dset[i];
-            dset_stride *= ldims[i];
-            var_stride *= count_notime[i];
-        }
-
-        /* Calculate the size of the chunk we are trying to read in */
-        start_in_payload = 0;
-        end_in_payload = 0;
-        s = 1;
-        for (i = ndim_notime - 1; i >= 0; i--)
-        {
-            start_in_payload += s * offset_in_dset[i] * size_of_type;
-            end_in_payload += s * (offset_in_dset[i] + size_in_dset[i] - 1) * size_of_type;
-            s *= ldims[i];
-        }
-        slice_size = end_in_payload - start_in_payload + 1 * size_of_type;
- 
-        if (var_root->characteristics[start_idx + idx].payload_offset > 0)
-        {
-            slice_offset =  var_root->characteristics[start_idx + idx].payload_offset
-                          + start_in_payload;
-            if (!has_subfile)
-            {
-                MPI_FILE_READ_OPS
-            }
-            else
-            {
-                MPI_FILE_READ_OPS2
-            }
- 
-            for ( i = 0; i < ndim_notime ; i++)
-            {
-                offset_in_dset[i] = 0;
-            }
-        }
-        else
-        {
-            slice_offset =  start_in_payload;
-            MPI_FILE_READ_OPS1
-        }
-
-        var_offset = 0;
-        dset_offset = 0;
-        for (i = 0; i < ndim_notime ; i++)
-        {
-            var_offset = offset_in_var[i] + var_offset * count_notime[i];
-            dset_offset = offset_in_dset[i] + dset_offset * ldims[i];
-        }
-
-        copy_data (data
-                  ,fh->b->buff + fh->b->offset
-                  ,0
-                  ,break_dim
-                  ,size_in_dset
-                  ,ldims
-                  ,count_notime
-                  ,var_stride
-                  ,dset_stride
-                  ,var_offset
-                  ,dset_offset
-                  ,datasize
-                  ,size_of_type 
-                  );
-
-        free (size_in_dset);
-        free (offset_in_dset);
-        free (offset_in_var);
-    }
-    
-    total_size += items_read * size_of_type;
-
-    return total_size;
-}
-
-// The purpose of keeping this function is to be able
-// to read in old BP files. Can be deleted later on.
-int64_t adios_read_bp_read_var_byid1 (ADIOS_GROUP    * gp,
-                             int              varid,
-                             const uint64_t  * start,
-                             const uint64_t  * count,
-                             void           * data)
-{
-    struct BP_GROUP      * gh;
-    struct BP_FILE       * fh;
-    int file_is_fortran;
-    struct adios_index_var_struct_v1 * var_root;
-    struct adios_var_header_struct_v1 var_header;
-    struct adios_var_payload_struct_v1 var_payload;
-    int    i,j,k, idx, timestep;
-    int    start_time, stop_time;
-    int    pgoffset, pgcount, next_pgoffset,start_idx, stop_idx;
-    int    ndim, ndim_notime;  
-    uint64_t size;
-    uint64_t *dims;
-    uint64_t ldims[32];
-    uint64_t gdims[32];
-    uint64_t offsets[32];
-    uint64_t datasize, nloop, dset_stride,var_stride, total_size=0, items_read;
-    uint64_t count_notime[32], start_notime[32];
-    MPI_Status status;
-    int timedim = -1, temp_timedim, timedim_c;
-    int rank;
-    int is_global = 0;
-    int size_of_type;
-    uint64_t slice_offset;
-    uint64_t slice_size;
-    uint64_t tmpcount = 0;
-    uint64_t datatimeoffset = 0; // offset in data to write a given timestep
-
-    adios_errno = 0;
-    if (!gp) {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_read_var()");
-        return -adios_errno;
-    }
-    gh = (struct BP_GROUP *) gp->gh;
-    if (!gh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh group handle is NULL!");
-        return -adios_errno;
-    }
-    fh = gh->fh;
-    if (!fh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh->fh file handle is NULL!");
-        return -adios_errno;
-    }
-    if (varid < 0 || varid >= gh->vars_count) {
-        adios_error (err_invalid_varid, "Invalid variable id %d (allowed 0..%d)", varid, gh->vars_count);
-        return -adios_errno;
-    }
-    
-    file_is_fortran = (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
-    
-    var_root = gh->vars_root; /* first variable of this group. Need to traverse the list */
-    for (i=0; i<varid && var_root; i++) {
-        var_root = var_root->next;
-    }
-
-    if (i!=varid) {
-        adios_error (err_corrupted_variable, "Variable id=%d is valid but was not found in internal data structures!",varid);
-        return -adios_errno; 
-    }
-
-    /* Get dimensions and flip if caller != writer language */
-    adios_read_bp_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
-                          &ndim, &dims, &timedim);
-
-    /* Here the cases in which .bp written from Fortran and C are considered separately.
-       1) bp written from Fortran */
-    if (file_is_fortran)
-    {
-        /* Get the timesteps we need to read */
-        if (timedim > -1) 
-        {
-            if (timedim != ndim - 1)
-            {
-                adios_error (err_no_data_at_timestep,"Variable (id=%d) has wrong time dimension index",
-                      varid);
-                return -adios_errno;
-            }
-            if (futils_is_called_from_fortran())
-            {
-                start_time = start[timedim] + fh->tidx_start;
-                stop_time = start_time + count[timedim] - 1;
-            }
-            else
-            {
-                start_time = start[0] + fh->tidx_start;
-                stop_time = start_time + count[0] - 1;
-            }
-        }
-        else 
-        {
-            /* timeless variable, but we still need to handle the case that
-               var is not written in the first few timesteps. 
-               This happens in Pixie3D.  */
-            for (i = 0; i < fh->mfooter.time_steps; i++)
-            {
-                pgoffset = fh->gvar_h->time_index[0][gh->group_id][i];
-                if (i < fh->mfooter.time_steps - 1)
-                    next_pgoffset = fh->gvar_h->time_index[0][gh->group_id][i + 1];
-                else
-                    next_pgoffset = -1;
-
-                if (fh->gvar_h->pg_offsets[pgoffset] < var_root->characteristics[0].offset
-                && (i == fh->mfooter.time_steps - 1 
-                   ||fh->gvar_h->pg_offsets[next_pgoffset] > var_root->characteristics[0].offset)
-                )
-                {
-                    start_time = fh->tidx_start + i;
-                    stop_time = start_time;
-                    break;
-                }
-            }
-        }
-
-        /* flip dims and timedim to C order */
-        swap_order(ndim, dims, &timedim);
-
-        /* Take out the time dimension from start[] and count[] */
-        /* if we have time dimension */
-        if (timedim > -1)
-        {
-            j = 0;
-            if (futils_is_called_from_fortran())
-                temp_timedim = ndim - 1;
-            else
-                temp_timedim = 0;
-
-            for (i = 0; i < temp_timedim; i++)
-            {
-                count_notime[j] = count[i];
-                start_notime[j] = start[i];
-                j++;
-            }
-            i++; // skip timedim
-            for (; i < ndim; i++)
-            {
-                count_notime[j] = count[i];
-                start_notime[j] = start[i];
-                j++;
-            }
-            ndim_notime = ndim-1;
-        }
-        else
-        /* if we don't have time dimension */
-        {
-            for (i = 0; i < ndim; i++)
-            {
-                count_notime[i] = count[i];
-                start_notime[i] = start[i];
-            }
-            ndim_notime = ndim;
-        }
-    }
-    /* 2) .bp written by C */
-    else
-    {
-        /* Get the timesteps we need to read */
-        if (timedim > -1) 
-        {
-            /* timedim has to be the 1st dimension. To be extended to handle 
-               the cases timedim at any dimension */
-            if (timedim != 0)
-            {
-                adios_error (err_no_data_at_timestep,"Variable (id=%d) has wrong time dimension",
-                      varid);
-                return -adios_errno;
-            }
-
-            if (futils_is_called_from_fortran())
-            {
-                start_time = start[ndim - 1] + fh->tidx_start;
-                stop_time = start_time + count[ndim -1] - 1;
-            }
-            else
-            {
-                start_time = start[0] + fh->tidx_start;
-                stop_time = start_time + count[0] - 1;
-            }
-
-            start_time = start[timedim] + fh->tidx_start;
-            stop_time = start_time + count[timedim] - 1;
-        }
-        else 
-        {
-            /* timeless variable */
-            start_time = fh->tidx_start;
-            stop_time = fh->tidx_start;
-        }
-
-        /* No need to flip dims, timedim as they are already in C order. */
-        //swap_order(ndim, dims, &timedim);
-
-        /* Take out the time dimension from start[] and count[] */
-        if (timedim == -1) /* timeless variable */ 
-        {
-            for (i = 0; i < ndim; i++) 
-            {
-                count_notime[i] = count[i];
-                start_notime[i] = start[i];
-            }
-            ndim_notime = ndim;
-        }
-        /* if we have time dimension */
-        else
-        {
-            j = 0;
-            if (futils_is_called_from_fortran())
-                temp_timedim = ndim - 1;
-            else
-                temp_timedim = 0;
-
-            for (i = 0; i < temp_timedim; i++)
-            {
-                count_notime[j] = count[i];
-                start_notime[j] = start[i];
-                j++;
-            }
-            i++; // skip timedim
-            for (; i < ndim; i++)
-            {
-                count_notime[j] = count[i];
-                start_notime[j] = start[i];
-                j++;
-            }
-            ndim_notime = ndim - 1;
-        }
-    }
-
-    /* Fortran reader was reported of Fortran dimension order so it gives counts and starts in that order.
-       We need to swap them here to read correctly in C order */
-    if ( futils_is_called_from_fortran()) {
-        swap_order(ndim_notime, count_notime, &timedim);
-        swap_order(ndim_notime, start_notime, &timedim);
-    }
-    
-    /* items_read = how many data elements are we going to read in total (per timestep) */
-    items_read = 1;
-    for (i = 0; i < ndim_notime; i++)
-        items_read *= count_notime[i];
-    
-    MPI_Comm_rank(gh->fh->comm, &rank);
-
-    size_of_type = bp_get_type_size (var_root->type, var_root->characteristics [0].value);
-
-    /* For each timestep, do reading separately (they are stored in different sets of process groups */
-    for (timestep = start_time; timestep <= stop_time; timestep++) {
-
-        // pgoffset = the starting offset for the given time step
-        // pgcount  = number of process groups of that time step
-        pgoffset = fh->gvar_h->time_index[0][gh->group_id][timestep - fh->tidx_start];
-        pgcount = fh->gvar_h->time_index[1][gh->group_id][timestep - fh->tidx_start];
-
-        start_idx = -1;
-        for (i=0;i<var_root->characteristics_count;i++) {
-            if (   (  var_root->characteristics[i].offset > fh->gvar_h->pg_offsets[pgoffset])
-                && (  (pgoffset + pgcount == fh->mfooter.pgs_count) 
-                    ||(  var_root->characteristics[i].offset < fh->gvar_h->pg_offsets[pgoffset + 1]))
-               ) 
-            {
-                start_idx = i;
-                break;
-            }
-        }
-/*
-printf ("var_root->characteristics_count = %d\n", var_root->characteristics_count);
-printf ("pg offset 0 = %lld\n", fh->gvar_h->pg_offsets[pgoffset]);
-printf ("pg offset 1 = %lld\n", fh->gvar_h->pg_offsets[pgoffset + 1]);
-printf ("var offset 3 = %lld\n", var_root->characteristics[3].offset);
-printf ("var offset 2 = %lld\n", var_root->characteristics[2].offset);
-printf ("var offset 1 = %lld\n", var_root->characteristics[1].offset);
-printf ("pgcount = %lld\n", pgcount);
-*/
-        for (i=var_root->characteristics_count-1;i>-1;i--) {
-            if (   (  var_root->characteristics[i].offset > fh->gvar_h->pg_offsets[pgoffset])
-                && (  (pgoffset + pgcount == fh->mfooter.pgs_count)
-                    ||(  var_root->characteristics[i].offset < fh->gvar_h->pg_offsets[pgoffset + pgcount]))
-               )
-            {
-                stop_idx = i;
-                break;
-            }
-        }
-
-        if (start_idx<0) {
-            adios_error (err_no_data_at_timestep,"Variable (id=%d) has no data at %d time step",
-                varid, timestep);
-            return -adios_errno;
-        }
-
-        if (ndim_notime == 0) {
-            /* READ A SCALAR VARIABLE */
-
-            slice_size = size_of_type;
-            idx = 0; // macros below need it
-
-            if (var_root->type == adios_string) {
-                // strings are stored without \0 in file
-                // size_of_type here includes \0 so decrease by one
-                size_of_type--;
-            }
-
-            if (var_root->characteristics[start_idx+idx].payload_offset > 0) {
-                slice_offset = var_root->characteristics[start_idx+idx].payload_offset;
-                MPI_FILE_READ_OPS
-            } else {
-                slice_offset = 0;
-                MPI_FILE_READ_OPS1
-            }
-
-            memcpy((char *)data+total_size, fh->b->buff + fh->b->offset, size_of_type);
-            if (fh->mfooter.change_endianness == adios_flag_yes) {
-                change_endianness((char *)data+total_size, size_of_type, var_root->type);
-            }
-
-            if (var_root->type == adios_string) {
-                // add \0 to the end of string
-                // size_of_type here is the length of string
-                // FIXME: how would this work for strings written over time?
-                ((char*)data+total_size)[size_of_type] = '\0';
-            }
-
-            total_size += size_of_type;
-            continue;
-        }
-
-        /* READ AN ARRAY VARIABLE */
-        //int * idx_table = (int *) malloc (sizeof(int) * pgcount);
-        //int * idx_table = (int *) malloc (sizeof(int) * (var_root->characteristics_count - start_idx));
-        int * idx_table = (int *) malloc (sizeof(int) * (stop_idx - start_idx + 1));
-
-        uint64_t write_offset = 0;
-        int npg = 0;
-        tmpcount = 0;
-        if (pgcount > var_root->characteristics_count)
-            pgcount = var_root->characteristics_count;
-
-        // loop over the list of pgs to read from one-by-one
-        for (idx = 0; idx < stop_idx - start_idx + 1; idx++) {
-            int flag;
-            datasize = 1;
-            nloop = 1;
-            var_stride = 1;
-            dset_stride = 1;
-            idx_table[idx] = 1;
-            uint64_t payload_size = size_of_type;
-    
-            /* Each pg can have a different sized array, so we need the actual dimensions from it */
-            is_global = adios_read_bp_get_dimensioncharacteristics( &(var_root->characteristics[start_idx + idx]),
-                                                            ldims, gdims, offsets);
-            if (!is_global) {
-                // we use gdims below, which is 0 for a local array; set to ldims here
-                for (j = 0; j< ndim; j++) {
-                    gdims[j]=ldims[j];
-                }
-            }
-
-            /* Again, a Fortran written file has the dimensions in Fortran order we need to swap here */
-            //if (file_is_fortran != futils_is_called_from_fortran()) {
-            if (file_is_fortran ) {
-                i=-1;
-                swap_order(ndim, gdims,   &(i)); // i is dummy 
-                swap_order(ndim, ldims,   &(i));
-                swap_order(ndim, offsets, &(i));
-            }
-            
-            /* take out the time dimension */
-            /* For C, gdims and offset are one size shorter because the timedim part is missing,
-               so we take it out only for fortran files
-            */
-            if (timedim > -1) {
-                for (i = timedim; i < ndim-1; i++) {
-                    ldims[i] = ldims[i+1];
-                    if (file_is_fortran) {
-                        gdims[i] = gdims[i+1];
-                        offsets[i] = offsets[i+1];
-                    }
-                }
-            }
-            /*
-            printf("ldims   = "); for (j = 0; j<ndim; j++) printf("%d ",ldims[j]); printf("\n");
-            printf("gdims   = "); for (j = 0; j<ndim; j++) printf("%d ",gdims[j]); printf("\n");
-            printf("offsets = "); for (j = 0; j<ndim; j++) printf("%d ",offsets[j]); printf("\n");
-            printf("count_notime   = "); for (j = 0; j<ndim_notime; j++) printf("%d ",count_notime[j]); printf("\n");
-            printf("start_notime   = "); for (j = 0; j<ndim_notime; j++) printf("%d ",start_notime[j]); printf("\n");
-            */
-            for (j = 0; j < ndim_notime; j++) {
-    
-                payload_size *= ldims [j];
-    
-                if ( (count_notime[j] > gdims[j]) 
-                  || (start_notime[j] > gdims[j]) 
-                  || (start_notime[j] + count_notime[j] > gdims[j])){
-                    adios_error ( err_out_of_bound, "Error: Variable (id=%d) out of bound ("
-                        "the data in dimension %d to read is %llu elements from index %llu"
-                        " but the actual data is [0,%llu])",
-                        varid, j+1, count_notime[j], start_notime[j], gdims[j] - 1);
-                    return -adios_errno;
-                }
-    
-                /* check if there is any data in this pg and this dimension to read in */
-                flag = (offsets[j] >= start_notime[j] 
-                        && offsets[j] < start_notime[j] + count_notime[j])
-                    || (offsets[j] < start_notime[j]
-                        && offsets[j] + ldims[j] > start_notime[j] + count_notime[j]) 
-                    || (offsets[j] + ldims[j] > start_notime[j] 
-                        && offsets[j] + ldims[j] <= start_notime[j] + count_notime[j]);
-                idx_table [idx] = idx_table[idx] && flag;
-            }
-            
-            if ( !idx_table[idx] ) {
-                continue;
-            }
-            ++npg;
-
-            /* determined how many (fastest changing) dimensions can we read in in one read */
-            int hole_break; 
-            for (i = ndim_notime - 1; i > -1; i--) {
-                if (offsets[i] == start_notime[i] && ldims[i] == count_notime[i]) {
-                    datasize *= ldims[i];
-                }
-                else
-                    break;
-            }
-    
-            hole_break = i;
-            slice_offset = 0;
-            slice_size = 0;
-
-            if (hole_break == -1) {
-                /* The complete read happens to be exactly one pg, and the entire pg */
-                /* This means we enter this only once, and npg=1 at the end */
-                /* This is a rare case. FIXME: cannot eliminate this? */
-                slice_size = payload_size;
-
-                if (var_root->characteristics[start_idx + idx].payload_offset > 0) {
-                    slice_offset = var_root->characteristics[start_idx + idx].payload_offset;
-                    MPI_FILE_READ_OPS
-                } else {
-                    slice_offset = 0;
-                    MPI_FILE_READ_OPS1
-                }
-    
-                memcpy( (char *)data, fh->b->buff + fh->b->offset, slice_size);
-                if (fh->mfooter.change_endianness == adios_flag_yes) {
-                    change_endianness(data, slice_size, var_root->type);
-                }
-            }
-            else if (hole_break == 0) 
-            {
-                /* The slowest changing dimensions should not be read completely but
-                   we still need to read only one block */
-                int isize;
-                uint64_t size_in_dset = 0;
-                uint64_t offset_in_dset = 0;
-                uint64_t offset_in_var = 0;
-    
-                isize = offsets[0] + ldims[0];
-                if (start_notime[0] >= offsets[0]) {
-                    // head is in
-                    if (start_notime[0]<isize) {
-                        if (start_notime[0] + count_notime[0] > isize)
-                            size_in_dset = isize - start_notime[0];
-                        else
-                            size_in_dset = count_notime[0];
-                        offset_in_dset = start_notime[0] - offsets[0];
-                        offset_in_var = 0;
-                    }
-                }
-                else {
-                    // middle is in
-                    if (isize < start_notime[0] + count_notime[0])
-                        size_in_dset = ldims[0];
-                    else
-                    // tail is in
-                        size_in_dset = count_notime[0] + start_notime[0] - offsets[0];
-                    offset_in_dset = 0;
-                    offset_in_var = offsets[0] - start_notime[0];
-                }
-    
-                slice_size = size_in_dset * datasize * size_of_type;
-                write_offset = offset_in_var * datasize * size_of_type;
-
-                if (var_root->characteristics[start_idx + idx].payload_offset > 0) {
-                    slice_offset = var_root->characteristics[start_idx + idx].payload_offset 
-                                 + offset_in_dset * datasize * size_of_type;
-                    MPI_FILE_READ_OPS
-                } else {
-                    slice_offset = 0;
-                    MPI_FILE_READ_OPS1
-                }
-    
-                memcpy ((char *)data + write_offset, fh->b->buff + fh->b->offset, slice_size);
-                if (fh->mfooter.change_endianness == adios_flag_yes) {
-                    change_endianness((char *)data + write_offset, slice_size, var_root->type);
-                }
-    
-                //write_offset +=  slice_size;
-            }
-            else 
-            {
-
-                uint64_t stride_offset = 0;
-                int isize;
-                uint64_t size_in_dset[10];
-                uint64_t offset_in_dset[10];
-                uint64_t offset_in_var[10];
-                memset(size_in_dset, 0 , 10 * 8);
-                memset(offset_in_dset, 0 , 10 * 8);
-                memset(offset_in_var, 0 , 10 * 8);
-                int hit = 0;
-                for ( i = 0; i < ndim_notime ; i++) {
-                    isize = offsets[i] + ldims[i];
-                    if (start_notime[i] >= offsets[i]) {
-                        // head is in
-                        if (start_notime[i]<isize) {
-                            if (start_notime[i] + count_notime[i] > isize)
-                                size_in_dset[i] = isize - start_notime[i];
-                            else
-                                size_in_dset[i] = count_notime[i];
-                            offset_in_dset[i] = start_notime[i] - offsets[i];
-                            offset_in_var[i] = 0;
-                            hit = 1 + hit * 10;
-                        }
-                        else
-                            hit = -1;
-                    }
-                    else {
-                        // middle is in
-                        if (isize < start_notime[i] + count_notime[i]) {
-                            size_in_dset[i] = ldims[i];
-                            hit = 2 + hit * 10;
-                        }
-                        else {
-                            // tail is in
-                            size_in_dset[i] = count_notime[i] + start_notime[i] - offsets[i];
-                            hit = 3 + hit * 10;
-                        }
-                        offset_in_dset[i] = 0;
-                        offset_in_var[i] = offsets[i] - start_notime[i];
-                    }
-                }
-    
-                datasize = 1;
-                var_stride = 1;
-    
-                for ( i = ndim_notime-1; i >= hole_break; i--) {
-                    datasize *= size_in_dset[i];
-                    dset_stride *= ldims[i];
-                    var_stride *= count_notime[i];
-                }
-    
-                uint64_t start_in_payload = 0, end_in_payload = 0, s = 1;
-                for (i = ndim_notime - 1; i > -1; i--) {
-                    start_in_payload += s * offset_in_dset[i] * size_of_type;
-                    end_in_payload += s * (offset_in_dset[i] + size_in_dset[i] - 1) * size_of_type;
-                    s *= ldims[i];
-                }
-    
-                slice_size = end_in_payload - start_in_payload + 1 * size_of_type;
-    
-                if (var_root->characteristics[start_idx + idx].payload_offset > 0) {
-                    slice_offset =  var_root->characteristics[start_idx + idx].payload_offset
-                                  + start_in_payload;
-                    MPI_FILE_READ_OPS
-    
-                    for ( i = 0; i < ndim_notime ; i++) {
-                        offset_in_dset[i] = 0;
-                    }
-                } else {
-                    slice_offset =  start_in_payload;
-                    MPI_FILE_READ_OPS1
-                }
-
-                uint64_t var_offset = 0;
-                uint64_t dset_offset = 0;
-                for ( i = 0; i < hole_break; i++) {
-                    nloop *= size_in_dset[i];
-                }
-    
-                for ( i = 0; i < ndim_notime ; i++) {
-                    var_offset = offset_in_var[i] + var_offset * count_notime[i];
-                    dset_offset = offset_in_dset[i] + dset_offset * ldims[i];
-                }
-
-                copy_data (data
-                          ,fh->b->buff + fh->b->offset
-                          ,0
-                          ,hole_break
-                          ,size_in_dset
-                          ,ldims
-                          ,count_notime
-                          ,var_stride
-                          ,dset_stride
-                          ,var_offset
-                          ,dset_offset
-                          ,datasize
-                          ,size_of_type 
-                          );
-
-            }
-        }  // end for (idx ... loop over pgs
-    
-        free (idx_table);
-
-        total_size += items_read * size_of_type;
-        // shift target pointer for next read in
-        data = (char *)data + (items_read * size_of_type);
-
-    } // end for (timestep ... loop over timesteps
-
-    free (dims);
-
-    return total_size;
-}
-
-// Search for the start var index.
-static int get_var_start_index (struct adios_index_var_struct_v1 * v, int t)
-{
-    int i = 0;
-
-    while (i < v->characteristics_count) {
-        if (v->characteristics[i].time_index == t) {
-            return i;
-        }
-
-        i++;
-    }
-
-    return -1;
-}
-
-// Search for the stop var index
-static int get_var_stop_index (struct adios_index_var_struct_v1 * v, int t)
-{
-    int i = v->characteristics_count - 1;
-
-    while (i > -1) {
-        if (v->characteristics[i].time_index == t) {
-            return i;
-        }
-
-        i--;      
-    }
-
-    return -1;
-}
-
-int64_t adios_read_bp_read_var_byid2 (ADIOS_GROUP    * gp,
-                                      int            varid,
-                                      const uint64_t * start,
-                                      const uint64_t * count,
-                                      void           * data)
-{
-    struct BP_GROUP      * gh;
-    struct BP_FILE       * fh;
-    struct adios_index_var_struct_v1 * var_root;
-    struct adios_var_header_struct_v1 var_header;
-    struct adios_var_payload_struct_v1 var_payload;
-    int    i,j,k, idx, t;
-    int    start_time, stop_time;
-    int    start_idx, stop_idx;
-    int    ndim, ndim_notime, has_subfile, file_is_fortran;
-    uint64_t size, * dims;
-    uint64_t ldims[32], gdims[32], offsets[32];
-    uint64_t datasize, nloop, dset_stride,var_stride, total_size=0, items_read;
-    uint64_t count_notime[32], start_notime[32];
-    int timedim = -1, temp_timedim, is_global = 0, size_of_type;
-    uint64_t slice_offset, slice_size, tmpcount = 0;
-    uint64_t datatimeoffset = 0; // offset in data to write a given timestep
-    MPI_Status status;
-
-    gh = (struct BP_GROUP *) gp->gh;
-    fh = gh->fh;
-
-    file_is_fortran = (fh->pgs_root->adios_host_language_fortran == adios_flag_yes);
-    has_subfile = fh->mfooter.version & ADIOS_VERSION_HAVE_SUBFILE;
-
-    var_root = gh->vars_root; /* first variable of this group. Need to traverse the list */
-    for (i = 0; i< varid && var_root; i++) {
-        var_root = var_root->next;
-    }
-
-    if (i!=varid) {
-        adios_error (err_corrupted_variable, 
-               "Variable id=%d is valid but was not found in internal data structures!",
-               varid);
-        return -adios_errno; 
-    }
-
-    /* Get dimensions and flip if caller != writer language */
-    adios_read_bp_get_dimensions (var_root, fh->tidx_stop - fh->tidx_start + 1, file_is_fortran, 
-                          &ndim, &dims, &timedim);
-
-    /* In a Fortran written files, dimensions are in reversed order for C */
-    //if ( file_is_fortran != futils_is_called_from_fortran() ) 
-    if (file_is_fortran) 
-        swap_order(ndim, dims, &timedim);
-
-    /* Take out the time dimension from start[] and count[] */
-    if (timedim == -1) {
-        /* For timeless var, we still search from fh->tidx_start to fh->tidx_stop
-           to handle the situation that some variables are dumped out in selected timesteps
-        */
-        start_time = fh->tidx_start;
-        stop_time = fh->tidx_stop;
-
-        for (i = 0; i < ndim; i++) {
-             count_notime[i] = count[i];
-             start_notime[i] = start[i];
-        }
-        ndim_notime = ndim;
-    } else {
-        j = 0;
-        if (futils_is_called_from_fortran())
-            temp_timedim = ndim - 1;
-        else
-            temp_timedim = 0;
-
-        start_time = start[temp_timedim] + fh->tidx_start;
-        stop_time = start_time + count[temp_timedim] - 1;
-
-        for (i = 0; i < temp_timedim; i++) {
-             count_notime[j] = count[i];
-             start_notime[j] = start[i];
-             j++;
-        }
-        i++; // skip timedim
-        for (; i < ndim; i++) {
-             count_notime[j] = count[i];
-             start_notime[j] = start[i];
-             j++;
-        }
-        ndim_notime = ndim-1;
-    }
-
-    /* Fortran reader was reported of Fortran dimension order so it gives counts and starts in that order.
-       We need to swap them here to read correctly in C order */
-    if ( futils_is_called_from_fortran()) {
-        swap_order(ndim_notime, count_notime, &timedim);
-        swap_order(ndim_notime, start_notime, &timedim);
-    }
-    
-    /* items_read = how many data elements are we going to read in total (per timestep) */
-    items_read = 1;
-    for (i = 0; i < ndim_notime; i++)
-        items_read *= count_notime[i];
-    
-    size_of_type = bp_get_type_size (var_root->type, var_root->characteristics [0].value);
-
-    /* For each timestep, do reading separately (they are stored in different sets of process groups */
-    for (t = start_time; t <= stop_time; t++) {
-        start_idx = get_var_start_index(var_root, t);
-        stop_idx = get_var_stop_index(var_root, t);
-
-        if (start_idx < 0 || stop_idx < 0) {
-            adios_error (err_no_data_at_timestep,"Variable (id=%d) has no data at %d time step",
-                varid, t);
-//            return -adios_errno;
-            continue;
-        }
-
-        if (ndim_notime == 0) {
-            /* READ A SCALAR VARIABLE */
-            slice_size = size_of_type;
-            idx = 0; // macros below need it
-
-            if (var_root->type == adios_string) {
-                // strings are stored without \0 in file
-                // size_of_type here includes \0 so decrease by one
-                size_of_type--;
-            }
-
-            if (var_root->characteristics[start_idx+idx].payload_offset > 0) {
-                slice_offset = var_root->characteristics[start_idx+idx].payload_offset;
-                if (!has_subfile) {
-                    MPI_FILE_READ_OPS
-                } else {
-                    MPI_FILE_READ_OPS2
-                }
-            } else {
-                slice_offset = 0;
-                MPI_FILE_READ_OPS1
-            }
-
-            memcpy((char *)data+total_size, fh->b->buff + fh->b->offset, size_of_type);
-            if (fh->mfooter.change_endianness == adios_flag_yes) {
-                change_endianness((char *)data+total_size, size_of_type, var_root->type);
-            }
-
-            if (var_root->type == adios_string) {
-                // add \0 to the end of string
-                // size_of_type here is the length of string
-                // FIXME: how would this work for strings written over time?
-                ((char*)data+total_size)[size_of_type] = '\0';
-            }
-
-            total_size += size_of_type;
-            
-            if (timedim == -1)
-                break;
-            else
-                continue;
-        }
-
-         /* READ AN ARRAY VARIABLE */
-        int * idx_table = (int *) malloc (sizeof(int) * (stop_idx - start_idx + 1));
-
-        uint64_t write_offset = 0;
-        int npg = 0;
-        tmpcount = 0;
-        // loop over the list of pgs to read from one-by-one
-        for (idx = 0; idx < stop_idx - start_idx + 1; idx++) {
-            int flag;
-            datasize = 1;
-            nloop = 1;
-            var_stride = 1;
-            dset_stride = 1;
-            idx_table[idx] = 1;
-            uint64_t payload_size = size_of_type;
-    
-            /* Each pg can have a different sized array, so we need the actual dimensions from it */
-            is_global = adios_read_bp_get_dimensioncharacteristics( &(var_root->characteristics[start_idx + idx]),
-                                                            ldims, gdims, offsets);
-            if (!is_global) {
-                // we use gdims below, which is 0 for a local array; set to ldims here
-                for (j = 0; j< ndim; j++) {
-                    gdims[j]=ldims[j];
-                }
-                // we need to read only the first PG, not all, so let's prevent a second loop
-                stop_idx = start_idx;
-            }
-
-            /* Again, a Fortran written file has the dimensions in Fortran order we need to swap here */
-            //if (file_is_fortran != futils_is_called_from_fortran()) {
-            if (file_is_fortran) {
-                i=-1;
-                swap_order(ndim, gdims,   &(i)); // i is dummy 
-                swap_order(ndim, ldims,   &(i));
-                swap_order(ndim, offsets, &(i));
-            }
-            
-            /* take out the time dimension */
-            /* For C, gdims and offset are one size shorter because the timedim part is missing,
-               so we take it out only for fortran files
-            */
-            if (timedim > -1) {
-                for (i = timedim; i < ndim-1; i++) {
-                    ldims[i] = ldims[i+1];
-                    if (file_is_fortran) {
-                        gdims[i] = gdims[i+1];
-                        offsets[i] = offsets[i+1];
-                    }
-                }
-            }
-
-            /*
-            printf("ldims   = "); for (j = 0; j<ndim; j++) printf("%d ",ldims[j]); printf("\n");
-            printf("gdims   = "); for (j = 0; j<ndim; j++) printf("%d ",gdims[j]); printf("\n");
-            printf("offsets = "); for (j = 0; j<ndim; j++) printf("%d ",offsets[j]); printf("\n");
-            printf("count_notime   = "); for (j = 0; j<ndim_notime; j++) printf("%d ",count_notime[j]); printf("\n");
-            printf("start_notime   = "); for (j = 0; j<ndim_notime; j++) printf("%d ",start_notime[j]); printf("\n");
-            */ 
-                
-            for (j = 0; j < ndim_notime; j++) {
-    
-                payload_size *= ldims [j];
-    
-                if ( (count_notime[j] > gdims[j]) 
-                  || (start_notime[j] > gdims[j]) 
-                  || (start_notime[j] + count_notime[j] > gdims[j])){
-                    adios_error ( err_out_of_bound, "Error: Variable (id=%d) out of bound ("
-                        "the data in dimension %d to read is %llu elements from index %llu"
-                        " but the actual data is [0,%llu])",
-                        varid, j+1, count_notime[j], start_notime[j], gdims[j] - 1);
-                    return -adios_errno;
-                }
-    
-                /* check if there is any data in this pg and this dimension to read in */
-                flag = (offsets[j] >= start_notime[j] 
-                        && offsets[j] < start_notime[j] + count_notime[j])
-                    || (offsets[j] < start_notime[j]
-                        && offsets[j] + ldims[j] > start_notime[j] + count_notime[j]) 
-                    || (offsets[j] + ldims[j] > start_notime[j] 
-                        && offsets[j] + ldims[j] <= start_notime[j] + count_notime[j]);
-                idx_table [idx] = idx_table[idx] && flag;
-            }
-            
-            if ( !idx_table[idx] ) {
-                continue;
-            }
-            ++npg;
-    
-            /* determined how many (fastest changing) dimensions can we read in in one read */
-            int hole_break; 
-            for (i = ndim_notime - 1; i > -1; i--) {
-                if (offsets[i] == start_notime[i] && ldims[i] == count_notime[i]) {
-                    datasize *= ldims[i];
-                }
-                else
-                    break;
-            }
-    
-            hole_break = i;
-            slice_offset = 0;
-            slice_size = 0;
-            if (hole_break == -1) {
-                /* The complete read happens to be exactly one pg, and the entire pg */
-                /* This means we enter this only once, and npg=1 at the end */
-                /* This is a rare case. FIXME: cannot eliminate this? */
-                slice_size = payload_size;
-    
-                if (var_root->characteristics[start_idx + idx].payload_offset > 0) {
-                    slice_offset = var_root->characteristics[start_idx + idx].payload_offset;
-                    if (!has_subfile) {
-                        MPI_FILE_READ_OPS
-                    } else {
-                        MPI_FILE_READ_OPS2
-                    }
-                } else {
-                    slice_offset = 0;
-                    MPI_FILE_READ_OPS1
-                }
-    
-                memcpy( (char *)data, fh->b->buff + fh->b->offset, slice_size);
-                if (fh->mfooter.change_endianness == adios_flag_yes) {
-                    change_endianness(data, slice_size, var_root->type);
-                }
-            }
-            else if (hole_break == 0) 
-            {
-                /* The slowest changing dimensions should not be read completely but
-                   we still need to read only one block */
-                int isize;
-                uint64_t size_in_dset = 0;
-                uint64_t offset_in_dset = 0;
-                uint64_t offset_in_var = 0;
-    
-                isize = offsets[0] + ldims[0];
-                if (start_notime[0] >= offsets[0]) {
-                    // head is in
-                    if (start_notime[0]<isize) {
-                        if (start_notime[0] + count_notime[0] > isize)
-                            size_in_dset = isize - start_notime[0];
-                        else
-                            size_in_dset = count_notime[0];
-                        offset_in_dset = start_notime[0] - offsets[0];
-                        offset_in_var = 0;
-                    }
-                }
-                else {
-                    // middle is in
-                    if (isize < start_notime[0] + count_notime[0])
-                        size_in_dset = ldims[0];
-                    else
-                    // tail is in
-                        size_in_dset = count_notime[0] + start_notime[0] - offsets[0];
-                    offset_in_dset = 0;
-                    offset_in_var = offsets[0] - start_notime[0];
-                }
-    
-                slice_size = size_in_dset * datasize * size_of_type;
-                write_offset = offset_in_var * datasize * size_of_type;
- 
-                if (var_root->characteristics[start_idx + idx].payload_offset > 0) {
-                    slice_offset = var_root->characteristics[start_idx + idx].payload_offset 
-                                 + offset_in_dset * datasize * size_of_type;
-                    if (!has_subfile) {
-                        MPI_FILE_READ_OPS
-                    } else {
-                        MPI_FILE_READ_OPS2
-                    }
-
-                } else {
-                    slice_offset = 0;
-                    MPI_FILE_READ_OPS1
-                }
-    
-                memcpy ((char *)data + write_offset, fh->b->buff + fh->b->offset, slice_size);
-                if (fh->mfooter.change_endianness == adios_flag_yes) {
-                    change_endianness((char *)data + write_offset, slice_size, var_root->type);
-                }
-    
-                //write_offset +=  slice_size;
-            }
-            else 
-            {
-
-                uint64_t stride_offset = 0;
-                int isize;
-                uint64_t size_in_dset[10];
-                uint64_t offset_in_dset[10];
-                uint64_t offset_in_var[10];
-                memset(size_in_dset, 0 , 10 * 8);
-                memset(offset_in_dset, 0 , 10 * 8);
-                memset(offset_in_var, 0 , 10 * 8);
-                int hit = 0;
-                for ( i = 0; i < ndim_notime ; i++) {
-                    isize = offsets[i] + ldims[i];
-                    if (start_notime[i] >= offsets[i]) {
-                        // head is in
-                        if (start_notime[i]<isize) {
-                            if (start_notime[i] + count_notime[i] > isize)
-                                size_in_dset[i] = isize - start_notime[i];
-                            else
-                                size_in_dset[i] = count_notime[i];
-                            offset_in_dset[i] = start_notime[i] - offsets[i];
-                            offset_in_var[i] = 0;
-                            hit = 1 + hit * 10;
-                        }
-                        else
-                            hit = -1;
-                    }
-                    else {
-                        // middle is in
-                        if (isize < start_notime[i] + count_notime[i]) {
-                            size_in_dset[i] = ldims[i];
-                            hit = 2 + hit * 10;
-                        }
-                        else {
-                            // tail is in
-                            size_in_dset[i] = count_notime[i] + start_notime[i] - offsets[i];
-                            hit = 3 + hit * 10;
-                        }
-                        offset_in_dset[i] = 0;
-                        offset_in_var[i] = offsets[i] - start_notime[i];
-                    }
-                }
-    
-                datasize = 1;
-                var_stride = 1;
-    
-                for ( i = ndim_notime-1; i >= hole_break; i--) {
-                    datasize *= size_in_dset[i];
-                    dset_stride *= ldims[i];
-                    var_stride *= count_notime[i];
-                }
-    
-                uint64_t start_in_payload = 0, end_in_payload = 0, s = 1;
-                for (i = ndim_notime - 1; i > -1; i--) {
-                    start_in_payload += s * offset_in_dset[i] * size_of_type;
-                    end_in_payload += s * (offset_in_dset[i] + size_in_dset[i] - 1) * size_of_type;
-                    s *= ldims[i];
-                }
-    
-                slice_size = end_in_payload - start_in_payload + 1 * size_of_type;
-    
-                if (var_root->characteristics[start_idx + idx].payload_offset > 0) {
-                    slice_offset =  var_root->characteristics[start_idx + idx].payload_offset
-                                  + start_in_payload;
-                    if (!has_subfile) {
-                        MPI_FILE_READ_OPS
-                    } else {
-                        MPI_FILE_READ_OPS2
-                    }
- 
-                    for ( i = 0; i < ndim_notime ; i++) {
-                        offset_in_dset[i] = 0;
-                    }
-                } else {
-                    slice_offset =  start_in_payload;
-                    MPI_FILE_READ_OPS1
-                }
-    
-                uint64_t var_offset = 0;
-                uint64_t dset_offset = 0;
-                for ( i = 0; i < hole_break; i++) {
-                    nloop *= size_in_dset[i];
-                }
-    
-                for ( i = 0; i < ndim_notime ; i++) {
-                    var_offset = offset_in_var[i] + var_offset * count_notime[i];
-                    dset_offset = offset_in_dset[i] + dset_offset * ldims[i];
-                }
-    
-                copy_data (data
-                          ,fh->b->buff + fh->b->offset
-                          ,0
-                          ,hole_break
-                          ,size_in_dset
-                          ,ldims
-                          ,count_notime
-                          ,var_stride
-                          ,dset_stride
-                          ,var_offset
-                          ,dset_offset
-                          ,datasize
-                          ,size_of_type 
-                          );
-            }
-        }  // end for (idx ... loop over pgs
-    
-        free (idx_table);
-    
-        total_size += items_read * size_of_type;
-        // shift target pointer for next read in
-        data = (char *)data + (items_read * size_of_type);
-
-        if (timedim == -1)
-            break;
-    } // end for (timestep ... loop over timesteps
-
-    free (dims);
-
-    return total_size;
-}
-
-int64_t adios_read_bp_read_var_byid (ADIOS_GROUP    * gp,
-                                     int            varid,
-                                     const uint64_t  * start,
-                                     const uint64_t  * count,
-                                     void            * data)
-{
-    struct BP_GROUP      * gh;
-    struct BP_FILE       * fh;
-    int has_time_index_characteristic;
-
-    adios_errno = 0;
-    if (!gp) {
-        adios_error (err_invalid_group_struct, "Null pointer passed as group to adios_read_var()");
-        return -adios_errno;
-    }
-
-    gh = (struct BP_GROUP *) gp->gh;
-    if (!gh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh group handle is NULL!");
-        return -adios_errno;
-    }
-
-    fh = gh->fh;
-    if (!fh) {
-        adios_error (err_invalid_group_struct, "Invalid ADIOS_GROUP struct: .gh->fh file handle is NULL!");
-        return -adios_errno;
-    }
-
-    has_time_index_characteristic = fh->mfooter.version & ADIOS_VERSION_HAVE_TIME_INDEX_CHARACTERISTIC;
-    if (!has_time_index_characteristic) {
-        // read older file format. Can be deleted later on.
-        return adios_read_bp_read_var_byid1(gp, varid, start, count, data);
-    } else {
-        return adios_read_bp_read_var_byid2(gp, varid, start, count, data);
-    }
-}
-
-// NCSU - Timer series analysis, correlation
-double adios_stat_cor (ADIOS_VARINFO * vix, ADIOS_VARINFO * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag)
-{
-    int i,j;
-
-    double avg_x = 0.0, avg_y = 0.0, avg_lag = 0.0;
-    double var_x = 0.0, var_y = 0.0, var_lag = 0.0;
-    double cov = 0;
-
-    if (vix == NULL)
-    {
-        fprintf(stderr, "Variable not defined\n");
-        return 0;
-    }
-
-    // If the vix and viy are not time series objects, return.
-    if ((vix->timedim < 0) && (viy->timedim < 0))
-    {             
-        fprintf(stderr, "Covariance must involve timeseries data\n");
-        return 0;
-    }                                                                    
-
-    uint32_t min = vix->dims[0] - 1;
-    if (viy && (min > viy->dims[0] - 1))
-        min = viy->dims[0] - 1;         
-    
-    if(time_start == 0 && time_end == 0) 
-    { //global covariance
-        if(viy == NULL) {
-            fprintf(stderr, "Must have two variables for global covariance\n");
-            return 0;
-        }                                                                          
-
-        // Assign vix to viy, and calculate covariance
-        viy = vix;
-        time_start = 0;
-        time_end = min;
-    }
-    // Check the bounds of time
-    if (    (time_start >= 0) && (time_start <= min)
-            &&      (time_end >= 0)   && (time_end <= min)
-            &&  (time_start <= time_end))
-    {
-        if(viy == NULL) //user must want to run covariance against itself
-        {
-            if(! (time_end+lag) > min)
-            {                                                                        
-                fprintf(stderr, "Must leave enough timesteps for lag\n");
-                return 0;
-            }
-
-            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double (adios_double, vix->avgs[i]) / (time_end - time_start + 1);
-                    avg_lag += bp_value_to_double (adios_double, vix->avgs[i + lag]) / (time_end - time_start + 1);
-                }
-
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    double val_x = bp_value_to_double (adios_double, vix->avgs[i]); 
-                    double val_lag = bp_value_to_double (adios_double, vix->avgs[i + lag]); 
-                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
-                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
-                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
-                }
-            }
-            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double (adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
-                    avg_lag += bp_value_to_double (adios_double, vix->std_devs[i + lag]) / (time_end - time_start + 1);
-                }
-
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    double val_x = bp_value_to_double (adios_double, vix->std_devs[i]);
-                    double val_lag = bp_value_to_double (adios_double, vix->std_devs[i + lag]);
-                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1);
-                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
-                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
-                }
-            }
-            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double (vix->type, vix->mins[i]) / (time_end - time_start + 1);
-                    avg_lag += bp_value_to_double (vix->type, vix->mins[i + lag]) / (time_end - time_start + 1);
-                }
-
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    double val_x = bp_value_to_double (vix->type, vix->mins[i]); 
-                    double val_lag = bp_value_to_double (vix->type, vix->mins[i + lag]); 
-                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
-                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
-                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
-                }
-            }
-            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double (vix->type, vix->maxs[i]) / (time_end - time_start + 1);
-                    avg_lag += bp_value_to_double (vix->type, vix->maxs[i]) / (time_end - time_start + 1);
-                }
-
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    double val_x = bp_value_to_double (vix->type, vix->maxs[i]); 
-                    double val_lag = bp_value_to_double (vix->type, vix->maxs[i + lag]); 
-                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
-                    var_lag += (val_lag - avg_lag) * (val_lag - avg_lag) / (time_end - time_start + 1);
-                    cov += (val_x - avg_x) * (val_lag - avg_lag) / (time_end - time_start + 1);
-                }
-            }
-            else
-            {
-                fprintf (stderr, "Unknown characteristic\n");
-                return 0;
-            }
-            return cov / (sqrt (var_x) * sqrt (var_lag));
-        }
-        else
-        {
-            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double(adios_double, vix->avgs[i]) / (time_end - time_start + 1);
-                    avg_y += bp_value_to_double(adios_double, viy->avgs[i]) / (time_end - time_start + 1);
-                }
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    double val_x = bp_value_to_double (adios_double, vix->avgs[i]); 
-                    double val_y = bp_value_to_double (adios_double, viy->avgs[i]); 
-                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
-                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
-                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
-                }
-            }
-            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double(adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
-                    avg_y += bp_value_to_double(adios_double, viy->std_devs[i]) / (time_end - time_start + 1);
-                }
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    double val_x = bp_value_to_double (adios_double, vix->std_devs[i]);
-                    double val_y = bp_value_to_double (adios_double, viy->std_devs[i]);
-                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1);
-                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
-                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
-                }
-            }
-            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double(vix->type, vix->mins[i]) / (time_end - time_start + 1);
-                    avg_y += bp_value_to_double(viy->type, viy->mins[i]) / (time_end - time_start + 1);
-                }
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    double val_x = bp_value_to_double (vix->type, vix->mins[i]); 
-                    double val_y = bp_value_to_double (viy->type, viy->mins[i]); 
-                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
-                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
-                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
-                }
-            }
-            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double(vix->type, vix->maxs[i]) / (time_end - time_start + 1);
-                    avg_y += bp_value_to_double(vix->type, viy->maxs[i]) / (time_end - time_start + 1);
-                }
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    double val_x = bp_value_to_double (vix->type, vix->maxs[i]); 
-                    double val_y = bp_value_to_double (viy->type, viy->maxs[i]); 
-                    var_x += (val_x - avg_x) * (val_x - avg_x) / (time_end - time_start + 1); 
-                    var_y += (val_y - avg_y) * (val_y - avg_y) / (time_end - time_start + 1);
-                    cov += (val_x - avg_x) * (val_y - avg_y) / (time_end - time_start + 1);
-                }
-            }
-            else
-            {
-                fprintf (stderr, "Unknown characteristic\n");
-                return 0;
-            }
-            return cov / (sqrt (var_x) * sqrt (var_y));
-        }
-    }
-    else
-    {
-        fprintf (stderr, "Time values out of bounds\n");
-        return 0;
-    }
-}
-
-// NCSU - Time series analysis, covariance
-//covariance(x,y) = sum(i=1,..N) [(x_1 - x_mean)(y_i - y_mean)]/N
-double adios_stat_cov (ADIOS_VARINFO * vix, ADIOS_VARINFO * viy, char * characteristic, uint32_t time_start, uint32_t time_end, uint32_t lag)
-{
-    int i,j;
-
-    double avg_x = 0.0, avg_y = 0.0, avg_lag = 0.0;
-    double cov = 0;
-
-    if (vix == NULL)
-    {
-        fprintf(stderr, "Variable not defined\n");
-        return 0;
-    }
-
-    // If the vix and viy are not time series objects, return.
-    if ((vix->timedim < 0) && (viy->timedim < 0))
-    {             
-        fprintf(stderr, "Covariance must involve timeseries data\n");
-        return 0;
-    }                                                                    
-
-    uint32_t min = vix->dims[0] - 1;
-    if (viy && (min > viy->dims[0] - 1))
-        min = viy->dims[0] - 1;         
-    
-    if(time_start == 0 && time_end == 0) 
-    { //global covariance
-        if(viy == NULL) {
-            fprintf(stderr, "Must have two variables for global covariance\n");
-            return 0;
-        }                                                                          
-
-        // Assign vix to viy, and calculate covariance
-        viy = vix;
-        time_start = 0;
-        time_end = min;
-    }
-    // Check the bounds of time
-    if (    (time_start >= 0) && (time_start <= min)
-            &&      (time_end >= 0)   && (time_end <= min)
-            &&  (time_start <= time_end))
-    {
-        if(viy == NULL) //user must want to run covariance against itself
-        {
-            if(! (time_end+lag) > min)
-            {                                                                        
-                fprintf(stderr, "Must leave enough timesteps for lag\n");
-                return 0;
-            }
-
-            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double (adios_double, vix->avgs[i]) / (time_end - time_start + 1);
-                    avg_lag += bp_value_to_double (adios_double, vix->avgs[i + lag]) / (time_end - time_start + 1);
-                }
-
-                for (i = time_start; i <= time_end; i ++)
-                    cov += (bp_value_to_double (adios_double, vix->avgs[i]) - avg_x) * (bp_value_to_double (adios_double, vix->avgs[i+lag]) - avg_lag) / (time_end - time_start + 1);
-            }
-            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double (adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
-                    avg_lag += bp_value_to_double (adios_double, vix->std_devs[i + lag]) / (time_end - time_start + 1);
-                }
-
-                for (i = time_start; i <= time_end; i ++)
-                    cov += (bp_value_to_double (adios_double, vix->std_devs[i]) - avg_x) * (bp_value_to_double (adios_double, vix->std_devs[i+lag]) - avg_lag) / (time_end - time_start + 1);
-            }
-            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double (vix->type, vix->mins[i]) / (time_end - time_start + 1);
-                    avg_lag += bp_value_to_double (vix->type, vix->mins[i + lag]) / (time_end - time_start + 1);
-                }
-
-                for (i = time_start; i <= time_end; i ++)
-                    cov += (bp_value_to_double (vix->type, vix->mins[i]) - avg_x) * (bp_value_to_double (vix->type, vix->mins[i+lag]) - avg_lag) / (time_end - time_start + 1);
-            }
-            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double (vix->type, vix->maxs[i]) / (time_end - time_start + 1);
-                    avg_lag += bp_value_to_double (vix->type, vix->maxs[i + lag]) / (time_end - time_start + 1);
-                }
-
-                for (i = time_start; i <= time_end; i ++)
-                    cov += (bp_value_to_double (vix->type, vix->maxs[i]) - avg_x) * (bp_value_to_double (vix->type, vix->maxs[i+lag]) - avg_lag) / (time_end - time_start + 1);
-            }
-            else
-            {
-                fprintf (stderr, "Unknown characteristic\n");
-                return 0;
-            }
-        }
-        else
-        {
-            if (strcmp(characteristic, "average") == 0 || strcmp(characteristic, "avg") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double(adios_double, vix->avgs[i]) / (time_end - time_start + 1);
-                    avg_y += bp_value_to_double(adios_double, viy->avgs[i]) / (time_end - time_start + 1);
-                }
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    cov += (bp_value_to_double(adios_double, vix->avgs[i]) - avg_x) * (bp_value_to_double(adios_double, viy->avgs[i]) - avg_y) / (time_end - time_start + 1);
-                }
-            }
-            else if (strcmp(characteristic, "standard deviation") == 0 || strcmp(characteristic, "std_dev") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double(adios_double, vix->std_devs[i]) / (time_end - time_start + 1);
-                    avg_y += bp_value_to_double(adios_double, viy->std_devs[i]) / (time_end - time_start + 1);
-                }
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    cov += (bp_value_to_double(adios_double, vix->std_devs[i]) - avg_x) * (bp_value_to_double(adios_double, viy->std_devs[i]) - avg_y) / (time_end - time_start + 1);
-                }
-            }
-            else if (strcmp(characteristic, "minimum") == 0 || strcmp(characteristic, "min") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double(vix->type, vix->mins[i]) / (time_end - time_start + 1);
-                    avg_y += bp_value_to_double(viy->type, viy->mins[i]) / (time_end - time_start + 1);
-                }
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    cov += (bp_value_to_double(vix->type, vix->mins[i]) - avg_x) * (bp_value_to_double(viy->type, viy->mins[i]) - avg_y) / (time_end - time_start + 1);
-                }
-            }
-            else if (strcmp(characteristic, "maximum") == 0 || strcmp(characteristic, "max") == 0)
-            {
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    avg_x += bp_value_to_double(vix->type, vix->maxs[i]) / (time_end - time_start + 1);
-                    avg_y += bp_value_to_double(vix->type, viy->maxs[i]) / (time_end - time_start + 1);
-                }
-                for (i = time_start; i <= time_end; i ++)
-                {
-                    cov += (bp_value_to_double(vix->type, vix->maxs[i]) - avg_x) * (bp_value_to_double(viy->type, viy->maxs[i]) - avg_y) / (time_end - time_start + 1);
-                }
-            }
-            else
-            {
-                fprintf (stderr, "Unknown characteristic\n");
-                return 0;
-            }
-        }
-    }
-    else
-    {
-        fprintf (stderr, "Time values out of bounds\n");
-    }
-    return cov;
-}
diff --git a/src/read_dart.c b/src/read_dart.c
deleted file mode 100644
index 9e1abde..0000000
--- a/src/read_dart.c
+++ /dev/null
@@ -1,1003 +0,0 @@
-/* 
- * ADIOS is freely available under the terms of the BSD license described
- * in the COPYING file in the top level directory of this source distribution.
- *
- * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
- */
-
-
-/**************************************************/
-/* Read method for DART memory-to-memory coupling */
-/**************************************************/
-
-#include <stdlib.h>
-#include <string.h>
-//#include <errno.h>  /* ENOMEM */
-#include "adios.h"
-#include "bp_utils.h"
-#include "bp_types.h"
-#include "adios_types.h"
-#include "adios_read.h"
-#include "adios_read_hooks.h"
-#include "adios_error.h"
-#include "futils.h"
-#include "globals.h"
-#include "ds_metadata.h"
-
-#include "dart.h"
-
-#ifdef DMALLOC
-#include "dmalloc.h"
-#endif
-
-#if 1
-#   define DBG_PRINTF(...) fprintf(stderr,__VA_ARGS__); fflush(NULL)
-#else
-#   define DBG_PRINTF(a,...) 
-#endif
-
-#define MAXDARTNAMELEN 128
-/* Maximum number of different filenames allowed per process during the whole run */
-#define MAXNFILE 10 
-/*#define DART_DO_VERSIONING   define it at configure as -DDART_DO_VERSIONING in CFLAGS */
-
-struct adios_read_dart_fileversions_struct { // describes one variable (of one group)
-    char      * filename[MAXNFILE];
-    int         version[MAXNFILE];  /* for versioning of one given filename */
-};
-static struct adios_read_dart_fileversions_struct file_versions;
-static int n_filenames; /* number of filenames appeared during the run */
-
-
-struct adios_read_dart_var_struct { // describes one variable (of one group)
-    char                 * name;
-    enum ADIOS_DATATYPES   type;
-    int                    hastime; // 0: no, 1:yes (time dimension is not stored in dataspaces)
-    int                    ndims;
-    uint64_t               dims[4]; // we have max 3+time dims in DataSpaces
-    void                 * value;
-};
-
-struct adios_read_dart_attr_struct { // describes one attribute (of one group)
-    char                 * name;
-    enum ADIOS_DATATYPES   type;
-    void                 * value;
-};
-
-struct adios_read_dart_group_struct { // accessible as fp->fh->groups[grpid]
-    int group_index_len;       // length of group index in GROUP at fn/gn variable 
-    struct adios_read_dart_var_struct  * vars;  // number of vars is ADIOS_GROUP->vars_count
-    struct adios_read_dart_attr_struct * attrs; // number of attrs is ADIOS_GROUP->attrs_count
-};
-
-struct adios_read_dart_data_struct { // accessible as fp->fh
-    char *fname;               // path of file 
-    int access_version;        // counting the access
-    int disconnect_at_fclose;  // disconnect from DART in fclose()
-    int mpi_rank;              // just for debug prints
-    int ngroups;               // number of groups (=1 right now)
-    struct adios_read_dart_group_struct * groups;
-};
-
-// Declarations
-static int adios_read_dart_get (const char * varname, enum ADIOS_DATATYPES vartype, 
-                                struct adios_read_dart_data_struct * ds, 
-                                int ndims, int is_fortran_ordering, 
-                                int * offset, int * readsize, void * data);
-
-/* If init is used, we connect to DART here, otherwise we connect in fopen.
-   If multiple fopen..fclose cycles are used, init/finalize must be used too to
-   avoid multiple connection/disconnection in fopen/fclose.
-*/
-int adios_read_dart_init (MPI_Comm comm) 
-{ 
-    int  nproc, drank, dpeers;
-    int  rank, err;
-    int  appid, was_set;
-    MPI_Comm_rank(comm, &rank);
-    MPI_Comm_size(comm, &nproc);
-
-    /* Connect to DART, but only if we are not yet connected (from Write API) */
-    if (!globals_adios_is_dart_connected()) {
-        appid = globals_adios_get_application_id (&was_set);
-        if (!was_set) 
-            appid = 2;
-        DBG_PRINTF("-- %s, rank %d: connect to dart with nproc=%d and appid=%d\n", __func__, rank, nproc, appid);
-        err = dart_init(nproc, appid);
-        if (err < 0) {
-            adios_error (err_connection_failed, "Failed to connect with DART\n");
-            return -err_connection_failed;
-        }
-
-        //drank = dart_rank(dcg);
-        //dpeers = dart_peers(dcg);
-    }
-    globals_adios_set_dart_connected_from_reader();
-    n_filenames = 0;
-    return 0; 
-}
-
-int adios_read_dart_finalize () 
-{ 
-    // disconnect from DART only if we the reader is connected (the writer not anymore)
-    if (globals_adios_is_dart_connected_from_reader() && 
-        !globals_adios_is_dart_connected_from_both()) 
-    {
-        dart_finalize();
-        DBG_PRINTF("-- %s: disconnected from dart\n", __func__);
-    }
-    globals_adios_set_dart_disconnected_from_reader();
-}
-
-ADIOS_FILE * ds_unpack_file_info (char * buf, int buf_len, 
-                                  /* OUT */ struct adios_read_dart_data_struct * ds)
-{
-    ADIOS_FILE *fp;
-    struct adios_read_dart_group_struct * groups; // will be added to ds->groups
-    char * b = buf;
-    int blen, glen, i;
-
-    if (!buf || buf_len < 21)
-        return NULL;
-
-    fp = (ADIOS_FILE *) malloc (sizeof (ADIOS_FILE));
-    if (!fp) {
-        adios_error (err_no_memory, "Cannot allocate memory for file info.");
-        return NULL;
-    }
-
-    // add the single group to ds
-    groups = (struct adios_read_dart_group_struct *) malloc (sizeof(struct adios_read_dart_data_struct));
-    if (!groups) {
-        adios_error (err_no_memory, "Cannot allocate memory for group struct in file info.");
-        return NULL;
-    }
-    fp->groups_count = 1;  // FIXME: more groups per file in the future?
-    ds->groups = groups;
-
-    blen = *(int*)b;  // buf len again from buffer itself
-    if (blen != buf_len) {
-        DBG_PRINTF("WARNING: %s(): expected file info  buffer length is %d but buffer head says %d\n", 
-                    __func__, buf_len, blen);
-    }
-    b += sizeof(int); // skip buf len
-    fp->tidx_start = *(int*)b; // time index
-    b += sizeof(int);
-    fp->vars_count = *(int*)b; // number of variables
-    b += sizeof(int);
-    fp->attrs_count = *(int*)b; // number of attributes
-    b += sizeof(int);
-    groups[0].group_index_len = *(int*)b; // length of group index
-    b += sizeof(int);
-    glen = *(int*)b; // length of (only) group name
-    b += sizeof(int);
-
-    fp->fh = (uint64_t)ds; // note: repeated in the caller fopen(), where is the right place?
-    fp->ntimesteps = 1;
-    fp->file_size = 0;
-    fp->version = 1;
-    fp->endianness = 0; // FIXME: not always Little Endian. Does it matter? 
-    alloc_namelist (&fp->group_namelist, fp->groups_count);
-    for (i=0;i<fp->groups_count;i++) {
-        if (!fp->group_namelist[i]) {
-            adios_error (err_no_memory, "Could not allocate buffer for %d strings in adios_fopen()", 
-                        fp->groups_count);
-            if (i>0) free_namelist ((fp->group_namelist),i);
-            free(fp);
-            return NULL;
-        }
-        else  {
-            strcpy(fp->group_namelist[i],b);
-        }
-    }
-
-    return fp;
-}
-
-
-ADIOS_FILE * adios_read_dart_fopen (const char * fname, MPI_Comm comm)
-{
-    ADIOS_FILE * fp;
-    struct adios_read_dart_data_struct * ds;
-    int i;    
-
-    adios_errno = 0;
-
-    ds = (struct adios_read_dart_data_struct *) malloc (sizeof(struct adios_read_dart_data_struct));
-    if (!ds) {
-        adios_error (err_no_memory, "Cannot allocate memory for file info.");
-        return NULL;
-    }
-
-    /* fill out dart method specific struct */
-    ds->fname = strdup(fname);
-#ifdef DART_DO_VERSIONING
-   // check this filename's version number
-    int fidx;
-    for (fidx=0; fidx<n_filenames; fidx++) {
-        if (!strcmp(fname, file_versions.filename[fidx]))
-            break;
-    }
-    if (fidx == n_filenames) {
-        if (n_filenames < MAXNFILE) {
-            file_versions.filename[ n_filenames ] = strdup(fname);
-            file_versions.version [ n_filenames ] = -1;
-            n_filenames++;
-        } else {
-            DBG_PRINTF("ADIOS ERROR: rank %d: Too many different filenames has been used for adios_fopen().\n\tDART method allows max %d files\n", ds->mpi_rank, MAXNFILE);
-            adios_error (err_too_many_files, "Too many different filenames has been used for adios_fopen().\n\tDART method allows max %d files", MAXNFILE);
-            return NULL;
-        }
-    }
-    ds->access_version = file_versions.version[fidx]+1;  /* Read data of separate versions from DataSpaces */
-    DBG_PRINTF("fopen version filename=%s version=%d fidx=%d\n", fname, ds->access_version, fidx);
-#else
-    ds->access_version = 0;    /* Data in DataSpaces is always overwritten (read same version) */
-#endif
-    MPI_Comm_rank(comm, &ds->mpi_rank);
-
-    /* if not connected to DART, connect now (and disconnect in fclose) */
-    if (!globals_adios_is_dart_connected_from_reader()) {
-        DBG_PRINTF("-- %s, rank %d: call init first\n", __func__, ds->mpi_rank);
-        if (!adios_read_dart_init(comm)) {
-            return NULL;
-        }
-        ds->disconnect_at_fclose = 1;
-    } else {
-        ds->disconnect_at_fclose = 0;
-    }
-
-    /* Try to get variable with fname. If it does not exists, we get an error, which means
-       the data does not exist. So we return an error just like with real files */
-    int offset[] = {0,0,0}, readsize[3] = {128,1,1};
-    char file_info_buf[128];
-    int err;
-    char dart_fname[MAXDARTNAMELEN];
-    snprintf(dart_fname, MAXDARTNAMELEN, "FILE@%s",fname);
-    DBG_PRINTF("-- %s, rank %d: Get variable %s\n", __func__, ds->mpi_rank, dart_fname);
-    /* We perform dart_lock_on_read here and release it in fclose */
-    DBG_PRINTF("   rank %d: call dcg_lock_on_read(%s)\n", ds->mpi_rank, fname);
-    dart_lock_on_read(fname);
-    DBG_PRINTF("   rank %d: dart_get %s\n", ds->mpi_rank, dart_fname);
-    err = adios_read_dart_get(dart_fname, adios_byte, ds, 1, 0, offset, readsize, file_info_buf);
-    if (err) {
-        /* Check if this file is finalized by the writer */
-        char dart_cname[MAXDARTNAMELEN];
-        int coffset[] = {0,0,0}, creadsize[3] = {1,1,1};
-        int cvalue; 
-        int save_version = ds->access_version;
-        snprintf(dart_cname, MAXDARTNAMELEN, "CLOSED@%s",fname);
-        ds->access_version = 0; // this variable is stored with version 0 only
-        DBG_PRINTF("   rank %d: dart_get %s\n", ds->mpi_rank, dart_cname);
-        err = adios_read_dart_get(dart_cname, adios_integer, ds, 1, 0, coffset, creadsize, &cvalue);
-        ds->access_version = save_version; 
-        if (!err) {
-            /* This file was finalized */
-            adios_error (err_end_of_file, "End of file '%s'. Writer finalized this file.\n", fname);
-        } else {
-            /* Not finalized, just no new timestep available */
-            adios_error (err_file_not_found_error, "Data of '%s' does not exist in DataSpaces\n", dart_fname);
-        }
-        DBG_PRINTF("   rank %d: call dcg_unlock_on_read(%s)\n", ds->mpi_rank, fname);
-        dart_unlock_on_read(fname);
-        free(ds);
-        return NULL;
-    } else {
-        DBG_PRINTF("-- %s, rank %d: data of '%s' exists\n", __func__, ds->mpi_rank, dart_fname);
-    }
-
-    fp = ds_unpack_file_info (file_info_buf, 128, ds);
-    /*fp = (ADIOS_FILE *) malloc (sizeof (ADIOS_FILE));*/
-    if (!fp) {
-        adios_error (err_no_memory, "Cannot allocate memory for file info.");
-        dart_unlock_on_read(ds->fname);
-        return NULL;
-    }
-
-    fp->fh = (uint64_t) ds;
-    DBG_PRINTF("-- %s, rank %d: done fp=%x, fp->fh=%x\n", __func__, ds->mpi_rank, fp, fp->fh);
-#ifdef DART_DO_VERSIONING
-    file_versions.version[fidx]++; // next open will use new version
-#endif
-    return fp;
-}
-
-int adios_read_dart_fclose (ADIOS_FILE *fp) 
-{
-    struct adios_read_dart_data_struct * ds = (struct adios_read_dart_data_struct *) fp->fh;
-    int i,j;
-
-    adios_errno = 0;
-
-    DBG_PRINTF("-- %s, rank %d: fp=%x\n", __func__, ds->mpi_rank, fp);
-
-    /* Release read lock locked in fopen */
-    dart_unlock_on_read(ds->fname);
-    
-    /* Disconnect from DART if we connected in fopen() */
-    if (ds && ds->disconnect_at_fclose) {
-        adios_read_dart_finalize();
-    }
-
-    free_namelist ((fp->group_namelist),fp->groups_count);
-    if (ds->fname) { free(ds->fname); ds->fname = 0; }
-    free(ds);
-    free(fp);
-    return 0;
-}
-
-/* This function can be called if user places 
-   the wrong sequences of dims for a var 
-*/
-void adios_read_dart_reset_dimension_order (ADIOS_FILE *fp, int is_fortran)
-{
-    /* unimplemented */
-}
-
-ADIOS_GROUP * ds_unpack_group_info (char * buf, struct adios_read_dart_group_struct * group)
-        
-{
-    ADIOS_GROUP *gp;
-    char * b = buf;
-    int i, j, k, blen, namelen, extrabyte;
-    int datasize;
-    struct adios_read_dart_var_struct * vars;
-    struct adios_read_dart_attr_struct * attrs;
-    int buf_len = group->group_index_len;
-    uint64_t dims[3]; // all variables has 3 dimension values in the index 
-    int didx[3]; // dimension reordering 
-    
-
-    if (!buf || buf_len < 12)
-        return NULL;
-
-    gp = (ADIOS_GROUP *) malloc(sizeof(ADIOS_GROUP));
-    if (!gp) {
-        adios_error (err_no_memory, "Could not allocate memory for group info");
-        return NULL;
-    }
-
-    
-    DBG_PRINTF("   %s: buffer length = %d, content:\n", __func__, buf_len);
-    for (i=0; i<buf_len; i+=16) {
-        for (j=0; j<4; j++) {
-            DBG_PRINTF("%3.3d %3.3d %3.3d %3.3d    ", b[i+4*j], b[i+4*j+1], b[i+4*j+2], b[i+4*j+3]);
-        }
-        DBG_PRINTF("\n");
-    }
-    
-
-    blen = *(int*)b;  // buf len again from buffer itself
-    if (blen != buf_len) {
-        DBG_PRINTF("WARNING: %s(): expected group info buffer length is %d but buffer head says %d\n", 
-                    __func__, buf_len, blen);
-    }
-    b += sizeof(int); 
-    gp->vars_count = *(int*)b; // number of variables
-    b += sizeof(int);
-    gp->attrs_count = *(int*)b; // number of attributes
-    b += sizeof(int);
-
-    DBG_PRINTF("   %s(): vars count = %d, attrs count = %d\n", __func__, gp->vars_count, gp->attrs_count);
-    gp->var_namelist = (char **) calloc (sizeof(char*), gp->vars_count);
-    gp->attr_namelist = (char **) calloc (sizeof(char*),  gp->attrs_count);
-    if (!gp->var_namelist || !gp->attr_namelist) {
-        adios_error (err_no_memory, "Could not allocate space for variable/attribute names when opening a group");
-        free(gp);
-        if (gp->var_namelist) free(gp->var_namelist);
-        return NULL;
-    }
-
-    vars = (struct adios_read_dart_var_struct *) 
-              malloc (gp->vars_count * sizeof(struct adios_read_dart_var_struct));
-    attrs = (struct adios_read_dart_attr_struct *) 
-              malloc (gp->attrs_count * sizeof(struct adios_read_dart_attr_struct));
-
-    if (!vars || !attrs) {
-        adios_error (err_no_memory, "Could not allocate space for variable/attribute metadata");
-        free(gp);
-        free(gp->var_namelist);
-        free(gp->attr_namelist);
-        if (vars) free(vars);
-        return NULL;
-    }
-
-    group->vars = vars;
-    group->attrs = attrs;
-
-    // extract each variable
-    DBG_PRINTF("    Extract variables\n");
-    for (i=0;i<gp->vars_count;i++) {
-        DBG_PRINTF("      var %d, b = %d\n", i, b);
-        namelen = *(int*)b; // lenght of name
-        b += sizeof(int);
-        DBG_PRINTF("        namelen = %d, b = %d\n", namelen, b);
-        gp->var_namelist[i] = (char *) malloc (namelen+1);
-        if (!gp->var_namelist[i]) {
-            adios_error (err_no_memory, "Could not allocate space for variable name when opening a group"); 
-            if (i>0) free_namelist ((gp->var_namelist),i);
-            free(gp);
-            return NULL;
-        }
-        else  {
-            memcpy(gp->var_namelist[i], b, namelen);
-            gp->var_namelist[i][namelen] = '\0';
-        }
-        b += namelen;
-        vars[i].name = strdup(gp->var_namelist[i]);  
-        DBG_PRINTF("        name = %s, b = %d\n", vars[i].name, b);
-        // type
-        vars[i].type = *(enum ADIOS_DATATYPES*)b; 
-        b += sizeof(int);
-        DBG_PRINTF("        type = %d, b = %d\n", (int)vars[i].type, b);
-        // hastime
-        vars[i].hastime = *(int*)b; 
-        b += sizeof(int);
-        DBG_PRINTF("        hastime = %d, b = %d\n", vars[i].hastime, b);
-        // dimensions
-        vars[i].ndims = *(int*)b; 
-        b += sizeof(int);
-        DBG_PRINTF("        ndims w/o time = %d, b = %d\n", vars[i].ndims, b);
-        for (j=0; j < 3; j++) {
-            dims[j] = *(uint64_t*)b; 
-            b += 8;
-            DBG_PRINTF("          unordered dim[%d] = %lld, b = %d\n", j, dims[j], b);
-        }
-        // reorder DS dimensions to Fortran/C dimensions
-        ds_dimension_ordering (vars[i].ndims, futils_is_called_from_fortran(), 
-                               1 /*unpack*/, didx);
-        // handle time too in this reordering
-        k=0;
-        if (vars[i].hastime && !futils_is_called_from_fortran()) {
-            // C reader: time dimension is first. 
-            k=1;
-            vars[i].dims[0] = 1;
-            DBG_PRINTF("          dim[0] = %lld (time)\n", vars[i].dims[0], b);
-        }
-        for (j=0; j < vars[i].ndims; j++) {
-            vars[i].dims[j+k] = dims[didx[j]];
-            DBG_PRINTF("          dim[%d] = %lld, b = %d\n", j+k, vars[i].dims[j+k], b);
-        }
-        if (vars[i].hastime && futils_is_called_from_fortran()) {
-            // Fortran reader: time dimension is last
-            vars[i].dims[ vars[i].ndims ] = 1;
-            DBG_PRINTF("          dim[%d] = %lld (time)", 
-                    vars[i].ndims, vars[i].dims[vars[i].ndims]);
-        }
-
-        if (vars[i].hastime) {
-            vars[i].ndims++;
-            DBG_PRINTF("        ndims = %d (with time)\n", vars[i].ndims);
-        }
-        if (vars[i].ndims == 0) { // && !vars[i].hastime) {
-            // need to get scalar value too
-            if (vars[i].type != adios_string) {
-                datasize = common_read_type_size(vars[i].type, NULL);
-                extrabyte=0;
-            } else {
-                memcpy (&datasize, b, sizeof(int));
-                b += sizeof(int);
-                extrabyte=1;
-            }
-            vars[i].value = (void *) malloc (datasize+extrabyte);
-            if (vars[i].value) {
-                memcpy (vars[i].value, b, datasize);
-                if (vars[i].type == adios_string) 
-                    ((char *)vars[i].value)[datasize] = '\0';
-            } else {
-                DBG_PRINTF("ERROR: cannot allocate %d bytes to store the value of variable %s\n",
-                        datasize, vars[i].name);
-            }
-            
-            b += datasize;
-            DBG_PRINTF("        value read, b = %d\n", b);
-        } else {
-            vars[i].value = NULL;
-        }
-    }
-
-    // extract each attribute
-    for (i=0;i<gp->attrs_count;i++) {
-        namelen = *(int*)b; // lenght of name
-        b += sizeof(int);
-        gp->attr_namelist[i] = (char *) malloc (namelen+1);
-        if (!gp->attr_namelist[i]) {
-            adios_error (err_no_memory, "Could not allocate space for attribute name when opening a group"); 
-            if (i>0) free_namelist ((gp->attr_namelist),i);
-            free(gp);
-            return NULL;
-        }
-        else  {
-            memcpy(gp->attr_namelist[i], b, namelen);
-            gp->attr_namelist[i][namelen] = '\0';
-        }
-        b += namelen;
-        attrs[i].name = strdup(gp->var_namelist[i]);  
-        // type
-        attrs[i].type = *(enum ADIOS_DATATYPES*)b; 
-        b += sizeof(int);
-        // get attribute value 
-        if (attrs[i].type != adios_string) {
-            datasize = common_read_type_size(attrs[i].type, NULL);
-            extrabyte=0;
-        } else {
-            memcpy (&datasize, b, sizeof(int));
-            b += sizeof(int);
-            extrabyte=1;
-        }
-        
-        attrs[i].value = (void *) malloc (datasize+extrabyte);
-        if (attrs[i].value) {
-            memcpy (attrs[i].value, b, datasize);
-            if (attrs[i].type == adios_string) 
-                ((char*)attrs[i].value)[datasize] = '\0';
-            DBG_PRINTF("        value read, b = %d\n", b);
-        } else {
-            DBG_PRINTF("ERROR: cannot allocate %d bytes to store the value of attribute %s\n",
-                    datasize, attrs[i].name);
-        }
-        
-        b += datasize;
-    }
-    return gp;
-}
-
-ADIOS_GROUP * adios_read_dart_gopen (ADIOS_FILE *fp, const char * grpname)
-{
-    ADIOS_GROUP * gp;
-    struct adios_read_dart_data_struct * ds = (struct adios_read_dart_data_struct *) fp->fh;
-    int grpid;
-
-    adios_errno = 0;
-    /* check if grpname is found in the group name list */
-    for (grpid=0; grpid < fp->groups_count; grpid++) {
-        if (!strcmp (grpname, fp->group_namelist[grpid]))
-            break;
-    }
-    if (grpid >= fp->groups_count) {
-        adios_error (err_invalid_group, "Invalid group name %s for file %s", grpname, ds->fname);
-        return NULL;
-    }
-
-    /* Try to get group metadata from DataSpaces. If it does not exists, we get an error, which means
-       the data does not exist. */
-    int offset[] = {0,0,0}, readsize[3] = {ds->groups[0].group_index_len,1,1};
-    char * group_info_buf = malloc (ds->groups[0].group_index_len);
-    if (!group_info_buf) {
-            adios_error (err_no_memory, "%s: Could not allocate buffer for group info buffer of %d bytes", 
-                        __func__, ds->groups[0].group_index_len);
-        return NULL;
-    }
-    int err;
-    char dart_name[MAXDARTNAMELEN];
-    snprintf (dart_name, MAXDARTNAMELEN, "GROUP@%s/%s",ds->fname, grpname);
-    DBG_PRINTF("-- %s, rank %d: Get variable %s with size %d\n", __func__, ds->mpi_rank, dart_name, readsize[0]);
-    err = adios_read_dart_get(dart_name, adios_byte, ds, 1, 0, offset, readsize, group_info_buf);
-    if (err) {
-        adios_error (err_invalid_group, "Invalid group name %s for file %s. "
-                     "Entity %s could not be retrieved from DataSpaces\n",
-                     grpname, ds->fname, dart_name);
-        return NULL;
-    } else {
-        DBG_PRINTF("-- %s, rank %d: data of '%s' exists\n", __func__, ds->mpi_rank, dart_name);
-    }
-
-
-    gp = ds_unpack_group_info (group_info_buf, &(ds->groups[grpid]));
-    if (!gp) {
-        DBG_PRINTF("-- %s, rank %d: unpacking group index failed\n", __func__, ds->mpi_rank);
-        return NULL;
-    }
-
-    /* fill out ADIOS_GROUP struct */
-    gp->grpid = grpid;
-    gp->gh = (uint64_t) 0;
-    gp->fp = fp;
-    gp->timestep = ds->access_version;
-    gp->lasttimestep = ds->access_version;
-    
-    free (group_info_buf);
-    return gp;
-}
-
-ADIOS_GROUP * adios_read_dart_gopen_byid (ADIOS_FILE *fp, int grpid)
-{
-    struct adios_read_dart_data_struct * ds = (struct adios_read_dart_data_struct *) fp->fh;
-    if ( grpid < 0 || grpid > fp->groups_count-1) {
-        adios_error (err_invalid_group, "Invalid group id %s. There are %d groups in %s", 
-                     grpid, fp->groups_count, ds->fname);
-        return NULL;
-    }
-    return adios_read_dart_gopen (fp, fp->group_namelist[grpid]);
-}
-                   
-int adios_read_dart_gclose (ADIOS_GROUP *gp)
-{
-    struct adios_read_dart_data_struct * ds = 
-                (struct adios_read_dart_data_struct *) gp->fp->fh;
-    struct adios_read_dart_var_struct * vars = 
-                (struct adios_read_dart_var_struct *) ds->groups[gp->grpid].vars;
-    struct adios_read_dart_attr_struct * attrs = 
-                (struct adios_read_dart_attr_struct *) ds->groups[gp->grpid].attrs;
-    int i;
-
-    adios_errno = 0;
-
-    free_namelist ((gp->var_namelist),gp->vars_count);
-    free_namelist ((gp->attr_namelist),gp->attrs_count);
-    for (i=0; i<gp->vars_count; i++) {
-        free (vars[i].name);
-        free (vars[i].value);
-    }
-    free(ds->groups[gp->grpid].vars);
-    for (i=0; i<gp->attrs_count; i++) {
-        free (attrs[i].name);
-        free (attrs[i].value);
-    }
-    free(ds->groups[gp->grpid].attrs);
-    free(gp);
-    return 0;
-}
-
-
-
-int adios_read_dart_get_attr (ADIOS_GROUP * gp, const char * attrname, enum ADIOS_DATATYPES * type,
-                    int * size, void ** data)
-{
-    struct adios_read_dart_data_struct * ds = (struct adios_read_dart_data_struct *) gp->fp->fh;
-    struct adios_read_dart_attr_struct * attrs = ds->groups[gp->grpid].attrs;
-
-    int attrid, vstartpos=0, fstartpos;
-
-    // find names with or without beginning /
-    if (attrname[0] == '/') vstartpos = 1;
-
-    for (attrid=0; attrid < gp->attrs_count; attrid++) {
-        if (attrs[attrid].name[0] == '/') vstartpos = 1;
-        else fstartpos = 0;
-        if (!strcmp (attrs[attrid].name+fstartpos, attrname+vstartpos))
-            break; // found this name
-    }
-
-    if (attrid == gp->attrs_count) {
-        adios_error (err_invalid_attrname, 
-                     "attribute name '%s' not found among %d attributes of group '%s'!",
-                     attrname, gp->attrs_count, gp->fp->group_namelist[gp->grpid]
-                    );
-        return adios_errno;
-    }
-
-    return adios_read_dart_get_attr_byid(gp, attrid, type, size, data);
-}
-
-int adios_read_dart_get_attr_byid (ADIOS_GROUP * gp, int attrid, 
-                    enum ADIOS_DATATYPES * type, int * size, void ** data)
-{
-    struct adios_read_dart_data_struct * ds = (struct adios_read_dart_data_struct *) gp->fp->fh;
-    struct adios_read_dart_attr_struct * attrs = ds->groups[gp->grpid].attrs;
-
-    if (attrid < 0 || attrid > gp->attrs_count) {
-        adios_error (err_invalid_attrid, "Group %s has %d attributes. Invalid attrid %d",
-                    gp->fp->group_namelist[gp->grpid], gp->attrs_count, attrid);
-        return adios_errno;
-    }
-
-    adios_errno = 0;
-    *type = attrs[attrid].type;
-    *size = common_read_type_size(*type, attrs[attrid].value);
-    *data = (void *) malloc (*size);
-    if (*data) {
-        memcpy (*data, attrs[attrid].value, *size);
-    } else {
-        adios_error (err_no_memory, "Could not allocate memory for variable info.");
-        return adios_errno;
-    }
-    return 0; 
-}
-
-/** Search name in list with or without leading /, return position or -1 if not found */
-static int adios_read_dart_find_varname (int nvars, struct adios_read_dart_var_struct * vars, const char * name) 
-{
-    int id, vstartpos=0, fstartpos;
-
-    // find names with or without beginning /
-    if (name[0] == '/') vstartpos = 1;
-
-    DBG_PRINTF("   find var %s, startpos=%d\n", name, vstartpos);
-
-    for (id=0; id < nvars; id++) {
-        if (vars[id].name[0] == '/') fstartpos = 1;
-        else fstartpos = 0;
-        DBG_PRINTF("     check %s, startpos=%d\n", vars[id].name, fstartpos);
-        if (!strcmp (vars[id].name+fstartpos, name+vstartpos))
-            break; // found this name
-    }
-
-    if (id == nvars) {
-        return -1;
-    }
-    return id;
-}
-
-ADIOS_VARINFO * adios_read_dart_inq_var (ADIOS_GROUP *gp, const char * varname) 
-{
-    struct adios_read_dart_data_struct * ds = (struct adios_read_dart_data_struct *) gp->fp->fh;
-    struct adios_read_dart_var_struct * vars = ds->groups[gp->grpid].vars;
-    int varid; 
-
-    varid = adios_read_dart_find_varname (gp->vars_count, vars, varname);
-    if (varid == -1) {
-        adios_error (err_invalid_varname, 
-                     "Variable name '%s' not found among %d variables of group '%s'!",
-                     varname, gp->vars_count, gp->fp->group_namelist[gp->grpid]
-                    );
-        return NULL;
-    }
-
-    return adios_read_dart_inq_var_byid(gp, varid);
-}
-
-ADIOS_VARINFO * adios_read_dart_inq_var_byid (ADIOS_GROUP *gp, int varid)
-{
-    struct adios_read_dart_data_struct * ds = (struct adios_read_dart_data_struct *) gp->fp->fh;
-    struct adios_read_dart_var_struct * vars = ds->groups[gp->grpid].vars;
-    ADIOS_VARINFO * vi;
-    int i,k;
-
-    if (varid < 0 || varid > gp->vars_count) {
-        adios_error (err_invalid_varid, "Group %s has %d variables. Invalid varid %d",
-                    gp->fp->group_namelist[gp->grpid], gp->vars_count, varid);
-        return NULL;
-    }
-
-    adios_errno = 0;
-    vi = (ADIOS_VARINFO *) malloc(sizeof(ADIOS_VARINFO));
-    if (!vi) {
-        adios_error (err_no_memory, "Could not allocate memory for variable info.");
-        return NULL;
-    }
-
-    vi->varid = varid;
-    vi->type = vars[varid].type;
-    vi->ndim = vars[varid].ndims;
-    vi->dims = vars[varid].dims;
-    if (vars[varid].hastime)
-        vi->timedim = 0;
-    else
-        vi->timedim = -1;
-    vi->value = vars[varid].value;
-    vi->gmin = NULL;
-    vi->gmax = NULL;
-    vi->mins = NULL;
-    vi->maxs = NULL;
-    
-    return vi;
-}
-
-void adios_read_dart_free_varinfo (ADIOS_VARINFO *vp)
-{
-    if (vp) {
-        //if (vp->dims)   free(vp->dims);  // link to vars[varid].dims
-        //if (vp->value)  free(vp->value); // link to vars[varid].value
-        if (vp->gmin && vp->gmin != vp->value)   free(vp->gmin);
-        if (vp->gmax && vp->gmax != vp->value)   free(vp->gmax);
-        if (vp->mins)   free(vp->mins);
-        if (vp->maxs)   free(vp->maxs);
-        free(vp);
-    }
-}
-
-static int adios_read_dart_get (const char * varname, enum ADIOS_DATATYPES vartype, 
-                                struct adios_read_dart_data_struct * ds, 
-                                int ndims, int is_fortran_ordering, 
-                                int * offset, int * readsize, void * data)
-{
-
-    struct obj_data *od;
-    int elemsize = common_read_type_size(vartype, NULL);
-    int i, err;
-    int didx[3];
-    int lb[3] = {0,0,0};
-    int ub[3] = {0,0,0};
-
-    // reorder DS dimensions to Fortran/C dimensions
-    ds_dimension_ordering (ndims, is_fortran_ordering, 0 /*pack*/, didx);
-    for (i=0; i<3; i++) {
-        lb[i] = offset[didx[i]];
-        ub[i] = offset[didx[i]]+readsize[didx[i]]-1;
-    }
-
-    DBG_PRINTF("-- %s, rank %d: get data: varname=%s version=%d, lb=(%d,%d,%d) ub=(%d,%d,%d)}\n",
-        __func__, ds->mpi_rank, varname, ds->access_version, lb[0], lb[1], lb[2], 
-        ub[0], ub[1], ub[2]);
-
-    err =  dart_get (varname, ds->access_version, elemsize, 
-                     lb[0], lb[1], lb[2],
-                     ub[0], ub[1], ub[2],
-                     data
-                    );
-    /*if (err == -ENOMEM) {
-        adios_error (err_no_memory, "Not enough memory for DART to perform dart_get()");  
-        return -err_no_memory;
-    } 
-    else*/ if (err) {
-        adios_error (err_corrupted_variable, "DART failed to read variable %s.", varname);  
-        return -err_corrupted_variable;
-    }
-
-    return 0;
-}
-
-int64_t adios_read_dart_read_var (ADIOS_GROUP * gp, const char * varname,
-                        const uint64_t * start, const uint64_t * count,
-                        void * data)
-{
-    struct adios_read_dart_data_struct * ds = (struct adios_read_dart_data_struct *) gp->fp->fh;
-    struct adios_read_dart_var_struct * vars = ds->groups[gp->grpid].vars;
-    int varid; 
-
-    varid = adios_read_dart_find_varname (gp->vars_count, vars, varname);
-    if (varid == -1) {
-        adios_error (err_invalid_varname,
-                "Variable name '%s' not found among %d variables of group '%s'!",
-                varname, gp->vars_count, gp->fp->group_namelist[gp->grpid]
-                );
-        return -adios_errno;
-    }
-
-    return adios_read_dart_read_var_byid(gp, varid, start, count, data);
-}
-
-
-int64_t adios_read_dart_read_var_byid (ADIOS_GROUP    * gp,
-                             int              varid,
-                             const uint64_t  * start,
-                             const uint64_t  * count,
-                             void           * data)
-{
-    int64_t total_size;
-    int offset[3] = {0,0,0};
-    int readsize[3] = {1,1,1};
-    struct adios_read_dart_data_struct * ds = (struct adios_read_dart_data_struct *) gp->fp->fh;
-    struct adios_read_dart_var_struct * vars = ds->groups[gp->grpid].vars;
-    int elemsize;
-    int err;
-    int i,k,ndims,tidx;
-    char dart_name[MAXDARTNAMELEN];
-
-    if (varid < 0 || varid > gp->vars_count) {
-        adios_error (err_invalid_varid, "Group %s has %d variables. Invalid varid %d",
-                    gp->fp->group_namelist[gp->grpid], gp->vars_count, varid);
-        return -adios_errno;
-    }
-
-    elemsize = common_read_type_size(vars[varid].type, vars[varid].value);
-
-    // handle scalars first (no need to read from space again)
-    if (vars[varid].ndims == 0) { // && !vars[varid].hastime) {
-        if (data) {
-            memcpy (data, vars[varid].value, elemsize);
-        } else {
-            adios_error (err_no_memory, "adios_read_var() expects an allocated array to store data.");
-            return -adios_errno;
-        }
-        return elemsize;
-    }
-        
-    adios_errno = 0;
-    k=0;
-    ndims = vars[varid].ndims;
-    /* DART uses integers for boundaries */
-    if (vars[varid].hastime) {
-        /* DART has no time dimensions stored in space. Remove from dims */
-        ndims = vars[varid].ndims - 1;
-        if (futils_is_called_from_fortran()) {
-            // Fortran: time dim is last
-            k = 0;
-            tidx = ndims;
-        } else {
-            // C: time dim is first
-            k = 1;
-            tidx = 0;
-        }
-        if (start[tidx] != gp->timestep || count[tidx] != 1) {
-            adios_error (err_out_of_bound, 
-                         "offset/readsize is out of bound in time dimension %d for variable %s\n"
-                         "you can read 1 element from offset (=timestep) %lld\n" 
-                         "you provided start=%lld, count=%lld\n",
-                         tidx, vars[varid].name, gp->timestep, start[tidx], count[tidx]
-                         );
-            return -adios_errno;
-        }
-    } else {
-        k = 0;
-    }
-    total_size = elemsize;
-    for (i=0; i<ndims; i++) {
-        if ( start[i+k] < 0 || start[i+k]+count[i+k] > vars[varid].dims[i+k]) {
-            adios_error (err_out_of_bound, 
-                         "offset/readsize is out of bound in dimension %d for variable %s\n"
-                         "size of dimension %d = %lld; you provided start=%lld, count=%lld",
-                         i+k, vars[varid].name, i+k, vars[varid].dims[i+k], start[i+k], count[i+k]
-                         );
-            return -adios_errno;
-        }
-        offset[i]    = (int) start[i+k];
-        readsize[i]  = (int) count[i+k];
-        total_size   = total_size * count[i+k];
-    }
-
-    snprintf(dart_name, MAXDARTNAMELEN, "%s/%s/%s", 
-             ds->fname, gp->fp->group_namelist[gp->grpid], vars[varid].name);
-    DBG_PRINTF("-- %s, rank %d: get data: varname=%s start=(%lld,%lld,%lld,%lld) count=(%lld,%lld,%lld,%lld)}\n",
-        __func__, ds->mpi_rank, dart_name, start[0], start[1], start[2], start[3], count[0], count[1], count[2], count[3]);
-    DBG_PRINTF("-- %s, rank %d: get data: varname=%s offset=(%d,%d,%d) readsize=(%d,%d,%d)}\n",
-        __func__, ds->mpi_rank, dart_name, offset[0], offset[1], offset[2], readsize[0], readsize[1], readsize[2]);
-
-    err = adios_read_dart_get(dart_name, vars[varid].type, ds, 
-                              ndims, futils_is_called_from_fortran(),
-                              offset, readsize, data);
-    if (err)
-        return err;
-
-    return total_size;
-}
-
-
-/* Tell the DataSpaces order of dimensions for a 1-3 dim array written from Fortran or C.
-   unpack=1: the reverse of packing (to retrieve the original order).
-   didx should be an int [3] array in any case.
-*/
-void ds_dimension_ordering(int ndims, int is_app_fortran, int unpack, int *didx)
-{
-    /* Order of dimensions: in DataSpaces: slow, fast, slowest
-       Fortran: i,j,k --> j, i, k  = lb[1], lb[0], lb[2]
-                i,j   --> j, i     = lb[1], lb[0], lb[2]=1
-                i     --> 1, i     = lb[1]=1, lb[0], lb[2]=1
-       C:       i,j,k --> j, k, i  = lb[1], lb[2], lb[0]
-                i,j   --> i, j     = lb[0], lb[1], lb[2]=1
-                i     --> 1, i     = lb[1]=1, lb[0], lb[2]=1 (same as Fortran)
-
-       unpack: C(i,j,k) ordering applied twice does not result in the original order
-               so we need to have a reverse mapping for this case.
-               For all the other cases, applying twice results in the same order
-               even for packing from Fortran and unpacking to C, and vice versa.
-               F(i,j,k) -(pack)-> DS(j,i,k) -(unpack)-> C(k,j,i) or F(i,j,k)
-               C(i,j,k) -(pack)-> DS(j,k,i) -(unpack)-> C(i,j,k) or F(k,j,i)
-               F(i,j)   -(pack)-> DS(j,i)   -(unpack)-> C(j,i)   or F(i,j)
-               C(i,j)   -(pack)-> DS(i,j)   -(unpack)-> C(i,j)   or F(j,i)
-               F(i)     -(pack)-> DS(1,i)   -(unpack)-> C(i,(1)) or F(i,(1))
-               C(i)     -(pack)-> DS(1,i)   -(unpack)-> C(i,(1)) or F(i,(1))
-    */
-
-    if (ndims == 0) {
-        didx[0] = 0; didx[1] = 1; didx[2] = 2;
-    } else if (is_app_fortran || ndims == 1) {
-        /* Flip 1st and 2nd dimension for DataSpaces representation
-           for any Fortran writings and for any 1D array :
-           Fortran: i,j,k --> j, i, k  = lb[1], lb[0], lb[2]
-           C:       i     --> 1, i     = lb[1]=1, lb[0], lb[2]=1 
-        */
-        didx[0] = 1; didx[1] = 0; didx[2] = 2;
-    } else if (ndims == 2) {
-        /* C: i,j   --> i, j     = lb[0], lb[1], lb[2]=1 */
-        didx[0] = 0; didx[1] = 1; didx[2] = 2;
-    } else { // (ndims == 3) 
-        if (!unpack) {
-            /* C: i,j,k --> j, k, i  = lb[1], lb[2], lb[0] */
-            didx[0] = 1; didx[1] = 2; didx[2] = 0;
-        } else {
-            /* DataSpaces x,y,z --> z,x,y  (ijk->kij, or jki->ijk) */
-            didx[0] = 2; didx[1] = 0; didx[2] = 1;
-        }
-    }
-}
-
-
-int64_t adios_read_dart_read_local_var (ADIOS_GROUP * gp, const char * varname,
-                                      int vidx, const uint64_t * start,
-                                      const uint64_t * count, void * data)
-{  
-    adios_error (err_operation_not_supported, "adios_read_local_var() is not supported with DART method.");
-    return -adios_errno;
-}
diff --git a/src/adios_dart.c b/src/write/adios_dataspaces.c
similarity index 70%
rename from src/adios_dart.c
rename to src/write/adios_dataspaces.c
index 5255733..f56e30e 100644
--- a/src/adios_dart.c
+++ b/src/write/adios_dataspaces.c
@@ -7,39 +7,35 @@
 // xml parser
 #include <mxml.h>
 
-// dart
+// for dataspaces ???
 #include <sys/uio.h>
 
 // see if we have MPI or other tools
 #include "config.h"
 
-#include "adios.h"
-#include "adios_types.h"
-#include "adios_transport_hooks.h"
-#include "adios_internals.h"
-#include "adios_internals_mxml.h"
-#include "ds_metadata.h"
+#include "public/adios.h"
+#include "public/adios_types.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_internals.h"
+#include "core/adios_internals_mxml.h"
+#include "core/util.h"
+#include "core/ds_metadata.h"
+#include "core/adios_logger.h"
 
-#include "dart.h"
+#include "dataspaces.h"
 
-/*#define DART_DO_VERSIONING  define it at configure as -DDART_DO_VERSIONING in CFLAGS */
+/*#define DATASPACES_NO_VERSIONING  define it at configure as -DDATASPACES_NO_VERSIONING in CFLAGS */
 
-#define adios_logger(verbose_level, ...) if (adios_dart_verbose >= verbose_level) fprintf (stderr, __VA_ARGS__); 
+static int adios_dataspaces_initialized = 0;
+#define MAX_DS_NAMELEN 128
+#define MAX_NUM_OF_FILES 20
+//static char ds_type_var_name[MAX_DS_NAMELEN];
+static char ds_var_name[MAX_DS_NAMELEN];
+static unsigned int adios_dataspaces_verbose = 3;
 
-#define log_error(...) adios_logger(0, __VA_ARGS__)
-#define log_warn(...) adios_logger(1, __VA_ARGS__)
-#define log_info(...) adios_logger(2, __VA_ARGS__)
-#define log_debug(...) adios_logger(3, __VA_ARGS__)
-
-static int adios_dart_initialized = 0;
-#define MAXDARTNAMELEN 128
-//static char dart_type_var_name[MAXDARTNAMELEN];
-static char dart_var_name[MAXDARTNAMELEN];
-static unsigned int adios_dart_verbose = 3;
-
-struct adios_DART_data_struct
+struct adios_ds_data_struct
 {
-    int rank;   // dart rank or MPI rank if MPI is available
+    int rank;   // dataspaces rank or MPI rank if MPI is available
     int peers;  // from xml parameter or group communicator
     int appid;  // from xml parameter or 1
     int time_index; // versioning in DataSpaces, start from 0
@@ -48,12 +44,13 @@ struct adios_DART_data_struct
     MPI_Comm mpi_comm;
 #endif
     int  num_of_files; // how many files do we have with this method
-    char *fnames[20];  // names of files (needed at finalize)
+    char *fnames[MAX_NUM_OF_FILES];  // names of files (needed at finalize)
+    int  fversions[MAX_NUM_OF_FILES];   // last steps of files (needed at finalize)
 };
 
 
 
-int get_dim_rank_value(struct adios_dimension_item_struct * dim_info, struct adios_group_struct *group)
+static int get_dim_rank_value(struct adios_dimension_item_struct * dim_info, struct adios_group_struct *group)
 {
     if(!dim_info)
        return 0;
@@ -104,47 +101,7 @@ int get_dim_rank_value(struct adios_dimension_item_struct * dim_info, struct adi
     }
 }
 
-void adios_dart_init (const char * parameters,
-                     struct adios_method_struct * method
-                     )
-{
-    struct adios_DART_data_struct *p = 0;
-    if (!adios_dart_initialized)
-    {
-        adios_dart_initialized = 1;
-    }
-   
-    method->method_data = calloc (1, sizeof (struct adios_DART_data_struct));
-    p = (struct adios_DART_data_struct*)method->method_data;
-    
-    int index, i;
-    char temp[64];
-    int num_peers;
-    int appid;
-    int was_set;
-    
-    num_peers = 1;
-    // Application ID should be set by the application calling adios_set_application_id()
-    appid = globals_adios_get_application_id (&was_set);
-    if (!was_set)
-        appid = 1;
-
-    //Init the static data structure
-    p->peers = num_peers;
-    p->appid = appid;
-    p->time_index = 0;
-    p->n_writes = 0;
-#if HAVE_MPI
-    p->mpi_comm = MPI_COMM_NULL;
-#endif
-    p->num_of_files = 0;
-
-    log_info ("adios_dart_init: appid=%d\n", p->appid);
-   
-}
-
-
-static void adios_dart_var_to_comm  (const char * comm_name
+static void adios_dataspaces_var_to_comm  (const char * comm_name
                                     ,enum ADIOS_FLAG host_language_fortran
                                     ,void * data
                                     ,MPI_Comm * comm
@@ -211,71 +168,131 @@ static void adios_dart_var_to_comm  (const char * comm_name
     }
 }
 
-int adios_dart_open (struct adios_file_struct * fd,
-                    struct adios_method_struct * method,
-                    void *comm
-                    )
+
+static int connect_to_dspaces (struct adios_ds_data_struct * p, MPI_Comm comm)
 {
     int ret = 0;
-    struct adios_DART_data_struct *p = (struct adios_DART_data_struct *)
-                                                method->method_data;
-    int num_peers = p->peers;
-  
-    log_info ("adios_dart_open: open %s, mode=%d, time_index=%d \n",
-                        fd->name, fd->mode, p->time_index);
+    int num_peers;
 
-    // connect to DART at the very first adios_open(), disconnect in adios_finalize()
-    // connect only if the READ API has not connected yet
-    if (!globals_adios_is_dart_connected()) {
+    if (!globals_adios_is_dataspaces_connected()) {
 
-#if HAVE_MPI
-    // if we have MPI and a communicator, we can get the exact size of this application
-    // that we need to tell DART
-        MPI_Comm group_comm;
-        if (comm) {
-            adios_dart_var_to_comm (fd->group->group_comm, fd->group->adios_host_language_fortran,
-                                    comm, &group_comm);
-            MPI_Comm_rank ( group_comm, &(p->rank));
-            MPI_Comm_size ( group_comm, &num_peers);
-            p->peers = num_peers;
-            p->mpi_comm = group_comm;
-        }
-#endif
+        MPI_Comm_rank (comm, &(p->rank));
+        MPI_Comm_size (comm, &num_peers);
+
+        // Application ID should be set by the application calling adios_set_application_id()
+        int was_set;
+        p->appid = globals_adios_get_application_id (&was_set);
+        if (!was_set)
+            p->appid = 1;
 
-        log_debug ("adios_dart_open: rank=%d connect to DART, peers=%d, appid=%d \n",
-                        p->rank, num_peers, p->appid);
+        log_debug ("adios_dataspaces: rank=%d connect to DATASPACES, peers=%d, appid=%d \n",
+                p->rank, num_peers, p->appid);
 
         //Init the dart client
-        ret = dart_init (num_peers, p->appid);
+        ret = dspaces_init (num_peers, p->appid);
         if (ret) {
-            log_error ("adios_dart_open: rank=%d Failed to connect to DART: err=%d,  rank=%d\n", p->rank, ret);        
+            log_error ("adios_dataspaces: rank=%d Failed to connect to DATASPACES: err=%d,  rank=%d\n", p->rank, ret);        
             return ret;
         }
 
 #if ! HAVE_MPI
-        dart_rank (&(p->rank));
-        dart_peers (&(p->peers));
+        dspaces_rank (&(p->rank));
+        dspaces_peers (&(p->peers));
 #endif
 
-        log_debug ("adios_dart_open: rank=%d connected to DART: peers=%d\n", p->rank, p->peers);        
+        log_debug ("adios_dataspaces: rank=%d connected to DATASPACES: peers=%d\n", p->rank, p->peers);        
+        globals_adios_set_dataspaces_connected_from_writer();
     }
-    globals_adios_set_dart_connected_from_writer();
+    return ret;
+}
+
+
+void adios_dataspaces_init (const PairStruct * parameters,
+                     struct adios_method_struct * method
+                     )
+{
+    struct adios_ds_data_struct *p = 0;
+    if (!adios_dataspaces_initialized)
+    {
+        adios_dataspaces_initialized = 1;
+    }
+   
+    method->method_data = calloc (1, sizeof (struct adios_ds_data_struct));
+    p = (struct adios_ds_data_struct*)method->method_data;
+    
+    int index, i;
+    char temp[64];
+
+    //Init the static data structure
+    p->peers = 1;
+    p->appid = -1;
+    p->time_index = 0;
+    p->n_writes = 0;
+#if HAVE_MPI
+    p->mpi_comm = MPI_COMM_NULL;
+#endif
+    p->num_of_files = 0;
+
+    connect_to_dspaces (p, MPI_COMM_WORLD);
+
+    log_info ("adios_dataspaces_init: done\n");
    
+}
+
+
+
+int adios_dataspaces_open (struct adios_file_struct * fd,
+                    struct adios_method_struct * method,
+                    void *comm
+                    )
+{
+    int ret = 0;
+    struct adios_ds_data_struct *p = (struct adios_ds_data_struct *)
+                                                method->method_data;
+  
+    log_info ("adios_dataspaces_open: open %s, mode=%d, time_index=%d \n",
+                        fd->name, fd->mode, p->time_index);
+
+#if HAVE_MPI
+    // if we have MPI and a communicator, we can get the exact size of this application
+    // that we need to tell DATASPACES
+    MPI_Comm group_comm;
+    if (comm) {
+        adios_dataspaces_var_to_comm (
+                fd->group->group_comm, 
+                fd->group->adios_host_language_fortran,
+                comm, &group_comm);
+    } else {
+        group_comm = MPI_COMM_WORLD;
+    }
+    MPI_Comm_rank (group_comm, &(p->rank));
+    MPI_Comm_size (group_comm, &(p->peers));
+    p->mpi_comm = group_comm;
+#endif
+
+    // connect to DATASPACES at the very first adios_open(), disconnect in adios_finalize()
+    // connect only if the READ API has not connected yet
+    /*
+    ret = connect_to_dspaces (p, group_comm);
+    if (ret)
+        return ret;
+    */
+
     if (fd->mode == adios_mode_write || fd->mode == adios_mode_append)
     {
-        log_debug ("adios_dart_open: rank=%d call write lock...\n", p->rank);        
-        dart_lock_on_write (fd->name);  
-        log_debug ("adios_dart_open: rank=%d got write lock\n", p->rank);        
+        log_debug ("adios_dataspaces_open: rank=%d call write lock...\n", p->rank);        
+        dspaces_lock_on_write (fd->name, &p->mpi_comm);  
+        log_debug ("adios_dataspaces_open: rank=%d got write lock\n", p->rank);        
     }
     else if (fd->mode == adios_mode_read)
     {
-        dart_lock_on_read (fd->name);
+        dspaces_lock_on_read (fd->name, &p->mpi_comm);
     } 
   
     return ret;
 }
 
-enum ADIOS_FLAG adios_dart_should_buffer (struct adios_file_struct * fd
+enum ADIOS_FLAG adios_dataspaces_should_buffer (struct adios_file_struct * fd
                                          ,struct adios_method_struct * method
                                          )
 {
@@ -294,18 +311,18 @@ enum ADIOS_FLAG adios_dart_should_buffer (struct adios_file_struct * fd
 }
 
 
-void adios_dart_write (struct adios_file_struct * fd
+void adios_dataspaces_write (struct adios_file_struct * fd
                       ,struct adios_var_struct * v
                       ,void * data
                       ,struct adios_method_struct * method
                       )
 {
-    struct adios_DART_data_struct *p = (struct adios_DART_data_struct *)
+    struct adios_ds_data_struct *p = (struct adios_ds_data_struct *)
                                                             method->method_data;
     struct adios_group_struct *group = fd->group;
     //Get var size
     //  FIXME: type size of a string >2GB does not fit to int. 
-    //  adios_get_type_size returns uint64_t but dart_put handles only int
+    //  adios_get_type_size returns uint64_t but dspaces_put handles only int
     //  as element size
     int var_type_size = (int) adios_get_type_size(v->type, v->data);
     //Get var name
@@ -337,22 +354,22 @@ void adios_dart_write (struct adios_file_struct * fd
         var_dimensions = var_dimensions->next;
     }
 
-#ifdef DART_DO_VERSIONING
-    version = p->time_index;  /* Add new data as separate to DataSpaces */
-#else
+#ifdef DATASPACES_NO_VERSIONING
     version = 0;              /* Update/overwrite data in DataSpaces  (we write time_index as a variable at close)*/
+#else
+    version = p->time_index;  /* Add new data as separate to DataSpaces */
 #endif
     
     if (v->path != NULL && v->path[0] != '\0' && strcmp(v->path,"/")) 
-        snprintf(dart_var_name, MAXDARTNAMELEN, "%s/%s/%s/%s", fd->name, fd->group->name, v->path, v->name);
+        snprintf(ds_var_name, MAX_DS_NAMELEN, "%s/%s/%s/%s", fd->name, fd->group->name, v->path, v->name);
     else 
-        snprintf(dart_var_name, MAXDARTNAMELEN, "%s/%s//%s", fd->name, fd->group->name, v->name);
+        snprintf(ds_var_name, MAX_DS_NAMELEN, "%s/%s//%s", fd->name, fd->group->name, v->name);
 
-    //snprintf(dart_type_var_name, MAXDARTNAMELEN, "TYPE@%s", dart_var_name);
+    //snprintf(dspaces_type_var_name, MAX_DS_NAMELEN, "TYPE@%s", ds_var_name);
     
     /* non-global variables are put in space ONLY by rank = 0 process */
     if (gdims[0] == 0 && p->rank != 0) {
-        //fprintf(stderr, "rank=%d var_name=%s is not global. Skip\n", p->rank, dart_var_name);
+        //fprintf(stderr, "rank=%d var_name=%s is not global. Skip\n", p->rank, ds_var_name);
         return;
     }
 
@@ -370,7 +387,7 @@ void adios_dart_write (struct adios_file_struct * fd
     
 
     log_debug ("var_name=%s, type=%s(%d) elemsize=%d, version=%d, ndims=%d, size=(%d,%d,%d), gdim=(%d,%d,%d), lb=(%d,%d,%d), ub=(%d,%d,%d)\n",
-            dart_var_name, adios_type_to_string_int(v->type), v->type, var_type_size, version, ndims,
+            ds_var_name, adios_type_to_string_int(v->type), v->type, var_type_size, version, ndims,
             dims[0], dims[1], dims[2], gdims[0], gdims[1], gdims[2], lb[0], lb[1], lb[2], ub[0], ub[1], ub[2]);
 
     /* non-timed scalars are written in the metadata at close(), not here */
@@ -378,26 +395,27 @@ void adios_dart_write (struct adios_file_struct * fd
         return;
 
     /* Put type info as T<varname>, integer in 0,0,0,0,0,0 position */
-    //err = dart_put(dart_type_var_name, version, 4, 0,0,0,0,0,0, &(v->type)); 
+    //err = dspaces_put(dspaces_type_var_name, version, 4, 0,0,0,0,0,0, &(v->type)); 
 
     ds_dimension_ordering(ndims,
             group->adios_host_language_fortran == adios_flag_yes, 
             0 /*pack*/, didx);
 
-    dart_put(dart_var_name, version, var_type_size, 
+    dspaces_put(ds_var_name, version, var_type_size, 
              lb[didx[0]], lb[didx[1]], lb[didx[2]], 
              ub[didx[0]], ub[didx[1]], ub[didx[2]], 
              data);
     
     log_debug ("var_name=%s, dimension ordering=(%d,%d,%d), gdims=(%d,%d,%d), lb=(%d,%d,%d), ub=(%d,%d,%d)\n",
-            dart_var_name, 
+            ds_var_name, 
             didx[0], didx[1], didx[2], 
             gdims[didx[0]], gdims[didx[1]], gdims[didx[2]], 
             lb[didx[0]], lb[didx[1]], lb[didx[2]], 
             ub[didx[0]], ub[didx[1]], ub[didx[2]]);
+    dspaces_put_sync();
 }
 
-void adios_dart_get_write_buffer (struct adios_file_struct * fd
+void adios_dataspaces_get_write_buffer (struct adios_file_struct * fd
                                  ,struct adios_var_struct * v
                                  ,uint64_t * size
                                  ,void ** buffer
@@ -460,13 +478,13 @@ void adios_dart_get_write_buffer (struct adios_file_struct * fd
 }
 
 /* NOT IMPLEMENTED. Use the Read API to read variables */
-void adios_dart_read (struct adios_file_struct * fd
+void adios_dataspaces_read (struct adios_file_struct * fd
                      ,struct adios_var_struct * v, void * buffer
                      ,uint64_t buffer_size
                      ,struct adios_method_struct * method
                      )
 {
-    struct adios_DART_data_struct *p = (struct adios_DART_data_struct *)
+    struct adios_ds_data_struct *p = (struct adios_ds_data_struct *)
                                                             method->method_data;
     uint64_t var_type_size = adios_get_type_size(v->type, v->data);
 
@@ -482,22 +500,22 @@ void adios_dart_read (struct adios_file_struct * fd
 
     version = p->time_index;
 
-    //dart_lock_on_read_();
+    //dspaces_lock_on_read_();
 
-    //dart_get
+    //dspaces_get
 
-    //dart_unlock_on_read_();
+    //dspaces_unlock_on_read_();
 }
 
 /* Gather var/attr indices from all processes to rank 0 */
-static void adios_dart_gather_indices (struct adios_file_struct * fd
+static void adios_dataspaces_gather_indices (struct adios_file_struct * fd
                                ,struct adios_method_struct * method
                                ,struct adios_index_process_group_struct_v1 **pg_root 
                                ,struct adios_index_var_struct_v1 **vars_root
                                ,struct adios_index_attribute_struct_v1 ** attrs_root
                                )
 {
-    struct adios_DART_data_struct *p = (struct adios_DART_data_struct *)
+    struct adios_ds_data_struct *p = (struct adios_ds_data_struct *)
                                                 method->method_data;
     struct adios_index_process_group_struct_v1 * my_pg_root = 0;
     struct adios_index_var_struct_v1 * my_vars_root = 0;
@@ -604,6 +622,19 @@ static void adios_dart_gather_indices (struct adios_file_struct * fd
                 __func__, my_pg_root, my_vars_root, my_attrs_root);
 }
 
+static int ds_get_full_name_len (char * path, char * name)
+{
+    int len;
+    // make full name
+    if (!path || !path[0] || !strcmp (path, "/")) { 
+        // no path, just name + leading /
+        len = strlen(name) + 1;
+    } else {
+        len = strlen(path) + strlen(name) + 1;
+    }
+    return len;
+}
+
 static int ds_get_full_name (char * path, char * name, int maxlen,
                             /*OUT*/char * out)
 {
@@ -631,7 +662,7 @@ void ds_pack_group_info (struct adios_file_struct *fd
                                   ,char ** buffer, int *buffer_size, int *nvars, int *nattrs
                                   )
 {
-    struct adios_DART_data_struct *p = (struct adios_DART_data_struct *)
+    struct adios_ds_data_struct *p = (struct adios_ds_data_struct *)
                                                 method->method_data;
     struct adios_index_var_struct_v1 * v = vars_root;
     struct adios_index_attribute_struct_v1 * a = attrs_root;
@@ -649,7 +680,7 @@ void ds_pack_group_info (struct adios_file_struct *fd
     size = 3*sizeof(int); //header for buffer: length, nvars, nattrs
     while (v) {
         size += 4*sizeof(int) // name len, type, hastime, number of dims 
-                + strlen(v->var_name) + strlen(v->var_path) + 1  // full path
+                + ds_get_full_name_len (v->var_path, v->var_name) // full path
                 + 3 * 8; // always write 3 dimensions in the index (even for scalars)
         if (v->characteristics->dims.count == 0) {
             // For scalars, we write the value into the index
@@ -664,7 +695,8 @@ void ds_pack_group_info (struct adios_file_struct *fd
     }
 
     while (a) {
-        size += sizeof(int) + strlen(a->attr_name) + strlen(a->attr_path) + 1 // name len + name
+        size += sizeof(int) 
+                + ds_get_full_name_len (a->attr_path, a->attr_name)
                 + sizeof(int); // type
         if (a->type != adios_string)
             size += adios_get_type_size(a->type, NULL);
@@ -676,6 +708,14 @@ void ds_pack_group_info (struct adios_file_struct *fd
         a = a->next;
     }
 
+    // Required for Cray Gemini: align buffer to 8 bytes boundaries
+    int align_bytes = 0; // number of extra bytes at the end
+    if (size % 8) {
+        align_bytes = 8 - (size % 8);
+        size += align_bytes;
+        log_debug (" after alignment, size = %d, align_bytes = %d\n", size, align_bytes);
+    }
+
     *buffer = (char *) malloc (size);
     *buffer_size = size;
 
@@ -774,7 +814,7 @@ void ds_pack_group_info (struct adios_file_struct *fd
         // store scalar value too
         if (a->type != adios_string) {
             size = adios_get_type_size(a->type, NULL);
-            memcpy (b, &(a->characteristics->value), size); 
+            memcpy (b, a->characteristics->value, size); 
             b += size; 
         } else {
             size = adios_get_type_size(a->type, a->characteristics->value);
@@ -786,6 +826,13 @@ void ds_pack_group_info (struct adios_file_struct *fd
         a = a->next;
     }
 
+    // alignment
+    if (align_bytes) {
+        uint64_t zero = 0;
+        memcpy (b, &zero, align_bytes); 
+        b += align_bytes;
+    }
+
     // sanity check
     if ( (int)(b-*buffer) > *buffer_size) {
         log_error ("ERROR in %s. Calculated group index buffer size as %d, but filled after that with %d bytes\n",
@@ -801,9 +848,10 @@ void ds_pack_group_info (struct adios_file_struct *fd
     b = *buffer;
     for (i=0; i<*buffer_size; i+=16) {
         for (j=0; j<4; j++) {
-            log_debug("%3.3d %3.3d %3.3d %3.3d    ", b[i+4*j], b[i+4*j+1], b[i+4*j+2], b[i+4*j+3]);
+            log_debug_cont ("%3.3hhu %3.3hhu %3.3hhu %3.3hhu    ", 
+                            b[i+4*j], b[i+4*j+1], b[i+4*j+2], b[i+4*j+3]);
         }
-        log_debug("\n");
+        log_debug_cont("\n");
     }
     
 
@@ -836,17 +884,18 @@ void ds_pack_file_info (int time, int nvars, int nattrs, int group_index_len, ch
     b[namelen] = 0;
 }
 
-void adios_dart_close (struct adios_file_struct * fd
+void adios_dataspaces_close (struct adios_file_struct * fd
                       ,struct adios_method_struct * method
                       )
 {
-    struct adios_DART_data_struct *p = (struct adios_DART_data_struct *)
+    struct adios_ds_data_struct *p = (struct adios_ds_data_struct *)
                                                 method->method_data;
     struct adios_index_process_group_struct_v1 * pg_root;
     struct adios_index_var_struct_v1 * vars_root;
     struct adios_index_attribute_struct_v1 * attrs_root;
     struct adios_attribute_struct * a = fd->group->attributes;
     int lb[3], ub[3], didx[3]; // for reordering DS dimensions
+    unsigned int version;
 
     if (fd->mode == adios_mode_write || fd->mode == adios_mode_append)
     {
@@ -858,17 +907,20 @@ void adios_dart_close (struct adios_file_struct * fd
 
         //adios_write_close_vars_v1 (fd);
         /* Gather var/attr indices from all processes to rank 0 */
-        adios_dart_gather_indices (fd, method, &pg_root, &vars_root ,&attrs_root);
+        adios_dataspaces_gather_indices (fd, method, &pg_root, &vars_root ,&attrs_root);
+
+        // make sure all processes have finished putting data to the space 
+        // before we put metadata from rank 0
+        MPI_Barrier (p->mpi_comm); 
 
         if (p->rank == 0) {
 
             /* Write two adios specific variables with the name of the file and name of the group into the space */
             /* ADIOS Read API fopen() checks these variables to see if writing already happened */
-            unsigned int version;
-#ifdef DART_DO_VERSIONING
-            version = p->time_index;  /* Add new data as separate to DataSpaces */
-#else
+#ifdef DATASPACES_NO_VERSIONING
             version = 0;              /* Update/overwrite data in DataSpaces */
+#else
+            version = p->time_index;  /* Add new data as separate to DataSpaces */
 #endif
 
             /* Make metadata from indices */
@@ -880,21 +932,22 @@ void adios_dart_close (struct adios_file_struct * fd
 
             
             /* Put GROUP at fn/gn header into space */
-            snprintf(dart_var_name, MAXDARTNAMELEN, "GROUP@%s/%s", fd->name, fd->group->name);
-            log_debug ("%s: put %s with buf len %d into space\n", __func__, dart_var_name, indexlen);
+            snprintf(ds_var_name, MAX_DS_NAMELEN, "GROUP@%s/%s", fd->name, fd->group->name);
+            log_debug ("%s: put %s with buf len %d into space\n", __func__, ds_var_name, indexlen);
             ub[0] = indexlen-1; ub[1] = 0; ub[2] = 0;
             ds_dimension_ordering(1, 0, 0, didx); // C ordering of 1D array into DS
-            dart_put(dart_var_name, version, 1,    0, 0, 0, /* lb 0..2 */
+            dspaces_put(ds_var_name, version, 1,    0, 0, 0, /* lb 0..2 */
                      ub[didx[0]], ub[didx[1]], ub[didx[2]],  indexbuf); 
+            free (indexbuf);
 
             /* Create and put FILE at fn header into space */
             char * file_info_buf; /* store FILE at fn's group list */
             int    file_info_buf_len; /* = 128 currently */
-            snprintf (dart_var_name, MAXDARTNAMELEN, "FILE@%s", fd->name);
+            snprintf (ds_var_name, MAX_DS_NAMELEN, "FILE@%s", fd->name);
             ds_pack_file_info (p->time_index, nvars, nattrs, indexlen, fd->group->name, 
                                &file_info_buf, &file_info_buf_len);
             log_debug ("%s: put %s = buflen=%d time=%d nvars=%d nattr=%d index=%d name=%d:%s into space\n",
-                __func__, dart_var_name, 
+                __func__, ds_var_name, 
                 *(int*)file_info_buf, *(int*)(file_info_buf+4), 
                 *(int*)(file_info_buf+8), *(int*)(file_info_buf+12),
                 *(int*)(file_info_buf+16), *(int*)(file_info_buf+20),
@@ -902,38 +955,59 @@ void adios_dart_close (struct adios_file_struct * fd
             /* Flip 1st and 2nd dimension for DataSpaces representation for a 1D array*/
             ub[0] = file_info_buf_len-1; ub[1] = 0; ub[2] = 0;
             ds_dimension_ordering(1, 0, 0, didx); // C ordering of 1D array into DS
-            dart_put(dart_var_name, version, 1,    0, 0, 0, /* lb 0..2 */
+            dspaces_put_sync(); //wait on previous put to finish
+            dspaces_put(ds_var_name, version, 1,    0, 0, 0, /* lb 0..2 */
                      ub[didx[0]], ub[didx[1]], ub[didx[2]], file_info_buf); 
 
-            free (indexbuf);
+            /* Create and put VERSION at fn version info into space */
+            int version_buf[2] = {version, 0}; /* last version put in space; not terminated */
+            int version_buf_len = 2; 
+            snprintf (ds_var_name, MAX_DS_NAMELEN, "VERSION@%s", fd->name);
+            log_debug ("%s: put %s with buf = [%d,%d] (len=%d integers) into space\n", 
+                       __func__, ds_var_name, version_buf[0], version_buf[1], version_buf_len);
+            ub[0] = version_buf_len-1; ub[1] = 0; ub[2] = 0;
+            ds_dimension_ordering(1, 0, 0, didx); // C ordering of 1D array into DS
+            dspaces_put_sync(); //wait on previous put to finish
+            dspaces_put(ds_var_name, 0, sizeof(int),    0, 0, 0, /* lb 0..2 */
+                     ub[didx[0]], ub[didx[1]], ub[didx[2]],  version_buf); 
+            dspaces_put_sync(); //wait on previous put to finish
+            
+        }
 
-            // remember this filename for finalize
-            int i;
-            for (i=0; i<p->num_of_files; i++) {
-                if (!strcmp(fd->name, p->fnames[i]))
-                    break;
-            }
-            if (i == p->num_of_files) {
-                if (p->num_of_files < 20) {
-                    p->fnames[ p->num_of_files ] = strdup(fd->name);
-                    p->num_of_files++;
-                } else {
-                    log_error ("%s: Max 20 files can be written by one application using the DART method\n",__func__);
-                }
+        // remember this filename and its version for finalize
+        int i;
+        for (i=0; i<p->num_of_files; i++) {
+            if (!strcmp(fd->name, p->fnames[i]))
+                break;
+        }
+        if (i == p->num_of_files) {
+            if (p->num_of_files < MAX_NUM_OF_FILES) {
+                p->fnames[ p->num_of_files ] = strdup(fd->name);
+                p->num_of_files++;
+            } else {
+                log_error ("%s: Max %d files can be written by one application "
+                        "using the DATASPACES method\n",
+                        __func__, MAX_NUM_OF_FILES);
             }
         }
+        if (i < p->num_of_files) {
+            p->fversions[i] = version;
+        }
+
 
         // free allocated index lists
         adios_clear_index_v1 (pg_root, vars_root, attrs_root);
 
-        log_debug("%s: call dart_put_sync()\n", __func__);
-        dart_put_sync();
-        log_debug("%s: call dart_unlock_on_write(%s)\n", __func__, fd->name);
-        dart_unlock_on_write(fd->name);
+        // rank=0 may be in put_sync when others call unlock, which is a global op
+        MPI_Barrier (p->mpi_comm); 
+        //log_debug("%s: call dspaces_put_sync()\n", __func__);
+        //dspaces_put_sync();
+        log_debug("%s: call dspaces_unlock_on_write(%s)\n", __func__, fd->name);
+        dspaces_unlock_on_write(fd->name, &p->mpi_comm);
     }
     else if( fd->mode == adios_mode_read )
     {
-        dart_unlock_on_read(fd->name);
+        dspaces_unlock_on_read(fd->name, &p->mpi_comm);
     } 
 
     /* Increment the time index */
@@ -943,53 +1017,66 @@ void adios_dart_close (struct adios_file_struct * fd
     log_info ("%s: exit\n", __func__);
 }
 
-void adios_dart_finalize (int mype, struct adios_method_struct * method)
+void adios_dataspaces_finalize (int mype, struct adios_method_struct * method)
 {
-    struct adios_DART_data_struct *p = (struct adios_DART_data_struct *)
+    struct adios_ds_data_struct *p = (struct adios_ds_data_struct *)
         method->method_data;
     int i;
-    char dart_var_name[MAXDARTNAMELEN];
-
-    if (p->rank == 0) {
-        // tell the readers which files are finalized
-        //dart_lock_on_write("CLOSE");
-        for (i=0; i<p->num_of_files; i++) {
-            /* Put CLOSED at fn into space. Indicates that this file will not be extended anymore. */
-            snprintf(dart_var_name, MAXDARTNAMELEN, "CLOSED@%s", p->fnames[i]);
-            log_debug ("%s: put %s with %d bytes into the space\n", __func__, dart_var_name, sizeof(int));
-            dart_put(dart_var_name, 0, sizeof(int),    0, 0, 0,    0, 0, 0, &i); 
-            free (p->fnames[i]);
+    char ds_var_name[MAX_DS_NAMELEN];
+    int lb[3] = {0,0,0}; 
+    int ub[3] = {1,0,0}; // we put 2 integers to space, 
+    int didx[3]; // for reordering DS dimensions
+    int value[2] = {0, 1}; // integer to be written to space (terminated=1)
+
+    // tell the readers which files are finalized
+    ds_dimension_ordering(1, 0, 0, didx); // C ordering of 1D array into DS
+    for (i=0; i<p->num_of_files; i++) {
+        /* Put VERSION at fn into space. Indicates that this file will not be extended anymore.  */
+        log_debug("%s: call dspaces_lock_on_write(%s), rank=%d\n", __func__, p->fnames[i], mype);
+        dspaces_lock_on_write(p->fnames[i], &p->mpi_comm); // lock is global operation in DataSpaces
+        if (p->rank == 0) {
+            value[0] = p->fversions[i];
+            snprintf(ds_var_name, MAX_DS_NAMELEN, "VERSION@%s", p->fnames[i]);
+            log_debug ("%s: update %s in the space [%d, %d]\n", 
+                    __func__, ds_var_name, value[0], value[1] );
+            dspaces_put(ds_var_name, 0, sizeof(int),   
+                    lb[didx[0]], lb[didx[1]], lb[didx[2]], 
+                    ub[didx[0]], ub[didx[1]], ub[didx[2]],  
+                    &value); 
+            log_debug("%s: call dspaces_put_sync()\n", __func__);
+            dspaces_put_sync();
         }
-        //dart_put_sync();
-        //dart_unlock_on_write("CLOSE");
+        log_debug("%s: call dspaces_unlock_on_write(%s), rank=%d\n", __func__, p->fnames[i], mype);
+        dspaces_unlock_on_write(p->fnames[i], &p->mpi_comm);
+        free (p->fnames[i]);
     }
 
-    // disconnect from dart if we are connected from writer but not anymore from reader
-    if (globals_adios_is_dart_connected_from_writer() && 
-            !globals_adios_is_dart_connected_from_both())
+    // disconnect from dataspaces if we are connected from writer but not anymore from reader
+    if (globals_adios_is_dataspaces_connected_from_writer() && 
+            !globals_adios_is_dataspaces_connected_from_both())
     {
-        log_debug ("%s: call dart_barrier(), rank=%d\n", __func__,mype);
-        dart_barrier();
-        log_debug ("%s: call dart_finalize(), rank=%d\n", __func__,mype);
-        dart_finalize();
+        log_debug ("%s: call dspaces_barrier(), rank=%d\n", __func__,mype);
+        dspaces_barrier();
+        log_debug ("%s: call dspaces_finalize(), rank=%d\n", __func__,mype);
+        dspaces_finalize();
 
     }
-    globals_adios_set_dart_disconnected_from_writer();
+    globals_adios_set_dataspaces_disconnected_from_writer();
 
-    adios_dart_initialized = 0;
+    adios_dataspaces_initialized = 0;
 
     log_info("%s: exit\n", __func__);
 }
 
-void adios_dart_end_iteration (struct adios_method_struct * method)
+void adios_dataspaces_end_iteration (struct adios_method_struct * method)
 {
 }
 
-void adios_dart_start_calculation (struct adios_method_struct * method)
+void adios_dataspaces_start_calculation (struct adios_method_struct * method)
 {
 }
 
-void adios_dart_stop_calculation (struct adios_method_struct * method)
+void adios_dataspaces_stop_calculation (struct adios_method_struct * method)
 {
 }
 
diff --git a/src/adios_datatap.c b/src/write/adios_datatap.c
similarity index 98%
rename from src/adios_datatap.c
rename to src/write/adios_datatap.c
index 6535938..e68f555 100644
--- a/src/adios_datatap.c
+++ b/src/write/adios_datatap.c
@@ -7,9 +7,10 @@
 #include <string.h>
 #include <ffs.h>
 #include <atl.h>
-#include "adios.h"
-#include "adios_internals.h"
-#include "adios_transport_hooks.h"
+#include "public/adios.h"
+#include "core/adios_internals.h"
+#include "core/adios_transport_hooks.h"
+#include "core/util.h"
 
 #include <sys/queue.h>
 #if HAVE_PORTALS == 1
@@ -150,7 +151,7 @@ findFixedName(struct fm_structure *fm, char *name)
 
 
 extern void
-adios_datatap_init(const char *params, struct adios_method_struct *method)
+adios_datatap_init(const PairStruct *params, struct adios_method_struct *method)
 {
 	if (method->method_data != NULL)
 	{
@@ -165,10 +166,10 @@ adios_datatap_init(const char *params, struct adios_method_struct *method)
 
 	mdata->opencount = 0;
 	mdata->initialized = 1;
-	if (params != NULL && strlen(params) > 1)
+	if (md->parameters != NULL && strlen(md->parameters) > 1)
 	{
 //contains the file name of the file to read?
-		mdata->pfile = strdup(params);
+		mdata->pfile = strdup(md->parameters);
 	}
 	else
 		mdata->pfile = strdup("params");
@@ -1060,7 +1061,7 @@ adios_datatap_open(struct adios_file_struct *fd,
 }
 
 extern void
-adios_datatap_init(const char *params, struct adios_method_struct *method)
+adios_datatap_init(const PairStruct *params, struct adios_method_struct *method)
 {
 }
 
diff --git a/src/adios_dimes.c b/src/write/adios_dimes.c
similarity index 94%
rename from src/adios_dimes.c
rename to src/write/adios_dimes.c
index 71fe6d5..9c79845 100644
--- a/src/adios_dimes.c
+++ b/src/write/adios_dimes.c
@@ -13,11 +13,12 @@
 // see if we have MPI or other tools
 #include "config.h"
 
-#include "adios.h"
-#include "adios_types.h"
-#include "adios_transport_hooks.h"
-#include "adios_internals.h"
-#include "adios_internals_mxml.h"
+#include "public/adios.h"
+#include "public/adios_types.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_internals.h"
+#include "core/adios_internals_mxml.h"
+#include "core/util.h"
 
 #include "dimes.h"
 /*#define DIMES_DO_VERSIONING define it at configure as -DDART_DO_VERSIONING in CFLAGS*/
@@ -89,7 +90,7 @@ int adios_dimes_get_dim_rank_value(struct adios_dimension_item_struct * dim_info
     }
 }
 
-void adios_dimes_init(const char *parameters,
+void adios_dimes_init(const PairStruct *parameters,
 					struct adios_method_struct *method)
 {
 	struct adios_DIMES_data_struct *p = NULL;
diff --git a/src/adios_mpi.c b/src/write/adios_mpi.c
similarity index 81%
rename from src/adios_mpi.c
rename to src/write/adios_mpi.c
index 08f640d..ed1c727 100644
--- a/src/adios_mpi.c
+++ b/src/write/adios_mpi.c
@@ -24,11 +24,13 @@
 // xml parser
 #include <mxml.h>
 
-#include "adios.h"
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
-#include "adios_internals.h"
-#include "buffer.h"
+#include "public/adios_error.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_internals.h"
+#include "core/buffer.h"
+#include "core/util.h"
+#include "core/adios_logger.h"
 #ifdef DMALLOC
 #include "dmalloc.h"
 #endif
@@ -48,8 +50,6 @@ struct adios_MPI_data_struct
     int rank;
     int size;
 
-    void * comm; // used to pass from open to should_buffer until cleaned up
-
     struct adios_bp_buffer_struct_v1 b;
 
     struct adios_index_process_group_struct_v1 * old_pg_root;
@@ -284,10 +284,8 @@ static void adios_var_to_comm (const char * comm_name
         {
             if (!t)
             {
-                fprintf (stderr, "communicator not provided and none "
-                                 "listed in XML.  Defaulting to "
-                                 "MPI_COMM_SELF\n"
-                        );
+                log_warn ("MPI method: communicator not provided and none "
+                          "listed in XML.  Defaulting to MPI_COMM_SELF\n");
 
                 *comm = MPI_COMM_SELF;
             }
@@ -309,10 +307,8 @@ static void adios_var_to_comm (const char * comm_name
             {
                 if (!t)
                 {
-                    fprintf (stderr, "communicator not provided and none "
-                                     "listed in XML.  Defaulting to "
-                                     "MPI_COMM_SELF\n"
-                            );
+                    log_warn ("MPI method: communicator not provided and none "
+                              "listed in XML.  Defaulting to MPI_COMM_SELF\n");
 
                     *comm = MPI_COMM_SELF;
                 }
@@ -332,10 +328,8 @@ static void adios_var_to_comm (const char * comm_name
             {
                 if (!t)
                 {
-                    fprintf (stderr, "communicator not provided but one "
-                                     "listed in XML.  Defaulting to "
-                                     "MPI_COMM_WORLD\n"
-                            );
+                    log_warn ("MPI method: communicator not provided but one "
+                              "listed in XML.  Defaulting to MPI_COMM_WORLD\n");
 
                     *comm = MPI_COMM_WORLD;
                 }
@@ -355,15 +349,14 @@ static void adios_var_to_comm (const char * comm_name
     }
     else
     {
-        fprintf (stderr, "coordination-communication not provided. "
-                         "Using MPI_COMM_WORLD instead\n"
-                );
+        log_warn ("MPI method: coordination-communication not provided. "
+                  "Using MPI_COMM_WORLD instead\n");
 
         *comm = MPI_COMM_WORLD;
     }
 }
 
-void adios_mpi_init (const char * parameters
+void adios_mpi_init (const PairStruct * parameters
                     ,struct adios_method_struct * method
                     )
 {
@@ -410,9 +403,19 @@ int adios_mpi_open (struct adios_file_struct * fd
     gettimeofday (&timing.t0, NULL); // only used on rank == size - 1, but we don't
                               // have the comm yet to get the rank/size
 #endif
-    // we have to wait for the group_size (should_buffer) to get the comm
-    // before we can do an open for any of the modes
-    md->comm = comm;
+    adios_buffer_struct_clear (&md->b);
+
+    adios_var_to_comm (fd->group->group_comm
+                      ,fd->group->adios_host_language_fortran
+                      ,comm
+                      ,&md->group_comm
+                      );
+    if (md->group_comm != MPI_COMM_NULL)
+    {
+        MPI_Comm_rank (md->group_comm, &md->rank);
+        MPI_Comm_size (md->group_comm, &md->size);
+    }
+    fd->group->process_id = md->rank;
 
 #if COLLECT_METRICS
     timing.write_count = 0;
@@ -421,6 +424,10 @@ int adios_mpi_open (struct adios_file_struct * fd
     timing.t24 = 0;
 #endif
 
+    // we have to wait for the group_size (should_buffer) 
+    // to calculate stripe sizes from output sizes of the processes
+    // before we can do an open for any of the modes
+
     return 1;
 }
 
@@ -540,11 +547,11 @@ adios_mpi_build_file_offset(struct adios_MPI_data_struct *md,
             offset[0] = fd->write_size_bytes;
 
             MPI_Gather (offset, 1, MPI_LONG_LONG
-                       ,0, 0, 0
+                       ,0, 1, MPI_LONG_LONG
                        ,0, md->group_comm
                        );
 
-            MPI_Scatter (0, 0, 0
+            MPI_Scatter (0, 1, MPI_LONG_LONG
                         ,offset, 1, MPI_LONG_LONG
                         ,0, md->group_comm
                         );
@@ -647,18 +654,6 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
     name = malloc (strlen (method->base_path) + strlen (fd->name) + 1);
     sprintf (name, "%s%s", method->base_path, fd->name);
 
-    adios_var_to_comm (fd->group->group_comm
-                      ,fd->group->adios_host_language_fortran
-                      ,md->comm
-                      ,&md->group_comm
-                      );
-    if (md->group_comm != MPI_COMM_NULL)
-    {
-        MPI_Comm_rank (md->group_comm, &md->rank);
-        MPI_Comm_size (md->group_comm, &md->size);
-    }
-    fd->group->process_id = md->rank;
-
     if (md->rank == md->size - 1)
         next = -1;
     else
@@ -683,9 +678,9 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
                     int len = 0;
                     memset (e, 0, MPI_MAX_ERROR_STRING);
                     MPI_Error_string (err, e, &len);
-                    fprintf (stderr, "1: MPI open read failed for %s: '%s'\n"
-                            ,name, e
-                            );
+                    adios_error (err_file_open_error, 
+                                 "MPI method: open read failed for %s: '%s'\n",
+                                 name, e);
                     free (name);
 
                     return adios_flag_no;
@@ -770,7 +765,7 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
                     MPI_Offset offset [3];
                     offset [0] = offset [1] = offset [2] = 0;
 
-                    MPI_Scatter (0, 0, 0
+                    MPI_Scatter (0, 3, MPI_LONG_LONG
                                 ,offset, 3, MPI_LONG_LONG
                                 ,0, md->group_comm
                                 );
@@ -818,9 +813,9 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
                 int len = 0;
                 memset (e, 0, MPI_MAX_ERROR_STRING);
                 MPI_Error_string (err, e, &len);
-                fprintf (stderr, "2: MPI open write failed for %s: '%s'\n"
-                        ,name, e
-                        );
+                adios_error (err_file_open_error, 
+                        "MPI method, rank %d: open read failed for %s: '%s'\n", 
+                        md->rank, name, e);
                 free (name);
 
                 return adios_flag_no;
@@ -886,9 +881,9 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
                 int len = 0;
                 memset (e, 0, MPI_MAX_ERROR_STRING);
                 MPI_Error_string (err, e, &len);
-                fprintf (stderr, "3: MPI open write failed for %s: '%s'\n"
-                        ,name, e
-                        );
+                adios_error (err_file_open_error, 
+                        "MPI method, rank %d: open write failed for %s: '%s'\n", 
+                        md->rank, name, e);
                 free (name);
 
                 return adios_flag_no;
@@ -901,9 +896,9 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
         }
 
         case adios_mode_append:
+        case adios_mode_update:
         {
             int old_file = 1;
-            adios_buffer_struct_clear (&md->b);
 
             if (md->group_comm == MPI_COMM_NULL || md->rank == 0)
             {
@@ -925,9 +920,9 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
                         int len = 0;
                         memset (e, 0, MPI_MAX_ERROR_STRING);
                         MPI_Error_string (err, e, &len);
-                        fprintf (stderr, "4: MPI open write failed for %s: '%s'\n"
-                                ,name, e
-                                );
+                        adios_error (err_file_open_error, 
+                                "MPI method, rank %d: open for append failed for %s: '%s'\n", 
+                                md->rank, name, e);
                         free (name);
 
                         return adios_flag_no;
@@ -1087,9 +1082,9 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
                 int len = 0;
                 memset (e, 0, MPI_MAX_ERROR_STRING);
                 MPI_Error_string (err, e, &len);
-                fprintf (stderr, "5: MPI open write failed for %s: '%s'\n"
-                        ,name, e
-                        );
+                adios_error (err_file_open_error, 
+                        "MPI method, rank %d: open for append failed for %s: '%s'\n", 
+                        md->rank, name, e);
                 free (name);
 
                 return adios_flag_no;
@@ -1100,7 +1095,9 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
 
         default:
         {
-            fprintf (stderr, "Unknown file mode: %d\n", fd->mode);
+            adios_error (err_invalid_file_mode, 
+                         "MPI method: Unknown file mode requested: %d\n", 
+                         fd->mode);
 
             free (name);
 
@@ -1150,9 +1147,10 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
             int len = 0;
             memset (e, 0, MPI_MAX_ERROR_STRING);
             MPI_Error_string (err, e, &len);
-            fprintf (stderr, "adios_mpi_should_buffer failed %s: '%s'\n"
-                    ,fd->name, e
-                    );
+            adios_error (err_write_error, 
+                         "MPI method, rank %d: adios_group_size() failed to "
+                         "write header to %s: '%s'\n",
+                         md->rank, fd->name, e);
             free (name);
 
             return adios_flag_no;
@@ -1162,11 +1160,8 @@ enum ADIOS_FLAG adios_mpi_should_buffer (struct adios_file_struct * fd
         MPI_Get_count (&md->status, MPI_BYTE, &count);
         if (count != fd->bytes_written)
         {
-            fprintf (stderr, "a:MPI method tried to write %llu, "
-                             "only wrote %d\n"
-                    ,fd->bytes_written
-                    ,count
-                    );
+            log_warn ("a:MPI method tried to write %llu, only wrote %llu\n",
+                      fd->bytes_written, count);
         }
         fd->base_offset += count;
         fd->offset = 0;
@@ -1255,20 +1250,19 @@ void adios_mpi_write (struct adios_file_struct * fd
             int len = 0;
             memset (e, 0, MPI_MAX_ERROR_STRING);
             MPI_Error_string (err, e, &len);
-            fprintf (stderr, "adios_mpi_write (1) failed %s: '%s'\n"
-                    ,fd->name, e
-                    );       
+            adios_error (err_write_error, 
+                         "MPI method, rank %d: adios_write() of header of variable %s to "
+                         "file %s failed: '%s'\n ",
+                         md->rank, v->name, fd->name, e);       
         }
 
         int count;
         MPI_Get_count (&md->status, MPI_BYTE, &count);
         if (count != fd->bytes_written)
         {
-            fprintf (stderr, "b:MPI method tried to write %llu, "
-                             "only wrote %d\n"
-                    ,fd->bytes_written
-                    ,count
-                    );
+            log_warn ("MPI method, rank %d: tried to write %llu bytes, "
+                      "only wrote %d of header of variable %s\n",
+                      md->rank, fd->bytes_written, count, v->name);
         }
         fd->base_offset += count;
         fd->offset = 0;
@@ -1280,8 +1274,13 @@ void adios_mpi_write (struct adios_file_struct * fd
         uint64_t var_size = adios_get_var_size (v, fd->group, v->data);
 
         if (fd->base_offset + var_size > fd->pg_start_in_file + fd->write_size_bytes)
-            fprintf (stderr, "adios_mpi_write exceeds pg bound(1). File is corrupted. "
-                             "Need to enlarge group size. \n");
+            adios_error (err_out_of_bound, 
+                         "MPI method, rank %d: adios_write() of variable %s exceeds pg bound.\n"
+                         "File is corrupted. Need to enlarge group size in adios_group_size().\n"
+                         "Group size=%llu, offset at end of this variable data=%llu\n",
+                         md->rank, v->name, 
+                         fd->write_size_bytes,
+                         fd->base_offset - fd->pg_start_in_file + var_size);
 #if 0
         err = MPI_File_write (md->fh, v->data, var_size, MPI_BYTE, &md->status);
 #endif
@@ -1313,19 +1312,18 @@ void adios_mpi_write (struct adios_file_struct * fd
             int len = 0;
             memset (e, 0, MPI_MAX_ERROR_STRING);
             MPI_Error_string (err, e, &len);
-            fprintf (stderr, "adios_mpi_write (2) failed %s: '%s'\n"
-                    ,fd->name, e
-                    );       
+            adios_error (err_write_error, 
+                         "MPI method, rank %d: adios_write() of variable %s to "
+                         "file %s failed: '%s'\n ",
+                         md->rank, v->name, fd->name, e);       
         }
 
         MPI_Get_count (&md->status, MPI_BYTE, &count);
         if (count != var_size)
         {
-            fprintf (stderr, "c:MPI method tried to write %llu, "
-                             "only wrote %d\n"
-                    ,var_size
-                    ,count
-                    );
+            log_warn ("MPI method, rank %d: tried to write %llu bytes, "
+                      "only wrote %d of variable %s\n",
+                      md->rank, var_size, count, v->name);
         }
         fd->base_offset += count;
         fd->offset = 0;
@@ -1353,6 +1351,8 @@ void adios_mpi_get_write_buffer (struct adios_file_struct * fd
                                 )
 {
     uint64_t mem_allowed;
+    struct adios_MPI_data_struct * md = (struct adios_MPI_data_struct *)
+                                                      method->method_data;
 
     if (*size == 0)
     {
@@ -1374,9 +1374,9 @@ void adios_mpi_get_write_buffer (struct adios_file_struct * fd
         if (!*buffer)
         {
             adios_method_buffer_free (mem_allowed);
-            fprintf (stderr, "Out of memory allocating %llu bytes for %s\n"
-                    ,*size, v->name
-                    );
+            adios_error (err_no_memory,
+                         "MPI method, rank %d: cannot allocate %llu bytes for variable %s\n",
+                         md->rank, *size, v->name);
             v->got_buffer = adios_flag_no;
             v->free_data = adios_flag_no;
             v->data_size = 0;
@@ -1395,11 +1395,11 @@ void adios_mpi_get_write_buffer (struct adios_file_struct * fd
     else
     {
         adios_method_buffer_free (mem_allowed);
-        fprintf (stderr, "OVERFLOW: Cannot allocate requested buffer of %llu "
-                         "bytes for %s\n"
-                ,*size
-                ,v->name
-                );
+ 
+        adios_error (err_buffer_overflow,
+                "MPI method, rank %d: OVERFLOW: Cannot get requested ADIOS buffer of %llu "
+                "bytes for variable %s. Remaining buffer size was %llu\n",
+                md->rank, *size, v->name, mem_allowed);
         *size = 0;
         *buffer = 0;
     }
@@ -1487,9 +1487,8 @@ static void adios_mpi_do_read (struct adios_file_struct * fd
                 }
                 else
                 {
-                    printf ("MPI read: skipping name: %s path: %s\n"
-                           ,var_header.name, var_header.path
-                           );
+                    log_warn ("MPI method, rank %d: read: skipping name: %s path: %s\n",
+                           md->rank, var_header.name, var_header.path);
                     adios_parse_var_data_payload_v1 (&md->b, &var_header
                                                     ,NULL, 0
                                                     );
@@ -1513,9 +1512,9 @@ static void adios_mpi_do_read (struct adios_file_struct * fd
         }
 
         default:
-            fprintf (stderr, "MPI read: file version unknown: %u\n"
-                    ,md->b.version
-                    );
+            adios_error (err_invalid_file_version, 
+                         "MPI method read: ADIOS file version unknown: %u\n",
+                         md->b.version);
             return;
     }
 
@@ -1608,21 +1607,19 @@ void adios_mpi_close (struct adios_file_struct * fd
                     int len = 0;
                     memset (e, 0, MPI_MAX_ERROR_STRING);
                     MPI_Error_string (err, e, &len);
-                    fprintf (stderr, "adios_mpi_close (1) failed %s: '%s'\n"
-                            ,fd->name, e
-                            );       
-
+                    adios_error (err_write_error, 
+                         "MPI method, rank %d: adios_close(): writing of variable header "
+                         "of %llu bytes to file %s failed: '%s'\n",
+                         md->rank, md->vars_header_size, fd->name, e);       
                 }
 
                 int count;
                 MPI_Get_count (&md->status, MPI_BYTE, &count);
                 if (count != md->vars_header_size)
                 {
-                    fprintf (stderr, "d:MPI method tried to write %llu, "
-                                     "only wrote %d\n"
-                            ,md->vars_header_size
-                            ,count
-                            );
+                    log_warn ("MPI method, rank %d: adios_close() tried to write %llu bytes "
+                              "of variable header but only wrote %d\n",
+                              md->rank, md->vars_header_size, count);
                 }
                 fd->offset = 0;
                 fd->bytes_written = 0;
@@ -1638,66 +1635,71 @@ void adios_mpi_close (struct adios_file_struct * fd
                 fd->offset = 0;
                 fd->bytes_written = 0;
 
-                while (a)
-                {
-                    adios_write_attribute_v1 (fd, a);
-                    if (fd->base_offset + fd->bytes_written > fd->pg_start_in_file + fd->write_size_bytes)
-                        fprintf (stderr, "mpi_file_write exceeds PG bound(2). File is corrupted. "
-                                         "Need to enlarge group size.\n");
+                if (!fd->group->process_id) { // from ADIOS 1.4, only rank 0 writes attributes
+                    while (a)
+                    {
+                        adios_write_attribute_v1 (fd, a);
+                        if (fd->base_offset + fd->bytes_written > fd->pg_start_in_file + fd->write_size_bytes)
+                            adios_error (err_out_of_bound, 
+                                    "MPI method, rank %d: writing of the attributes exceeds pg bound.\n"
+                                    "File is corrupted. Need to enlarge group size in adios_group_size().\n"
+                                    "Group size=%llu, offset at end of this variable data=%llu\n",
+                                    md->rank, 
+                                    fd->write_size_bytes,
+                                    fd->base_offset - fd->pg_start_in_file + fd->bytes_written);
 #if 0
-                    err = MPI_File_write (md->fh, fd->buffer, fd->bytes_written
-                                         ,MPI_BYTE, &md->status
-                                         );
+                        err = MPI_File_write (md->fh, fd->buffer, fd->bytes_written
+                                ,MPI_BYTE, &md->status
+                                );
 #endif
-                    {
-                        uint64_t total_written = 0;
-                        uint64_t to_write = fd->bytes_written;
-                        int write_len = 0;
-                        int count;
-                        char * buf_ptr = fd->buffer;
-                        while (total_written < fd->bytes_written)
                         {
-                            write_len = (to_write > INT32_MAX) ? INT32_MAX : to_write;
-                            err = MPI_File_write (md->fh, buf_ptr, write_len, MPI_BYTE, &md->status);
-                            MPI_Get_count(&md->status, MPI_BYTE, &count);
-                            if (count != write_len)
+                            uint64_t total_written = 0;
+                            uint64_t to_write = fd->bytes_written;
+                            int write_len = 0;
+                            int count;
+                            char * buf_ptr = fd->buffer;
+                            while (total_written < fd->bytes_written)
                             {
-                                err = count;
-                                break;
+                                write_len = (to_write > INT32_MAX) ? INT32_MAX : to_write;
+                                err = MPI_File_write (md->fh, buf_ptr, write_len, MPI_BYTE, &md->status);
+                                MPI_Get_count(&md->status, MPI_BYTE, &count);
+                                if (count != write_len)
+                                {
+                                    err = count;
+                                    break;
+                                }
+                                total_written += count;
+                                buf_ptr += count;
+                                to_write -= count;
+                                //err = total_written;
                             }
-                            total_written += count;
-                            buf_ptr += count;
-                            to_write -= count;
-                            //err = total_written;
                         }
-                    }
-                    if (err != MPI_SUCCESS) 
-                    {              
-                        char e [MPI_MAX_ERROR_STRING];
-                        int len = 0;
-                        memset (e, 0, MPI_MAX_ERROR_STRING);
-                        MPI_Error_string (err, e, &len);
-                        fprintf (stderr, "adios_mpi_close (2) failed %s: '%s'\n"
-                                ,fd->name, e
-                                );       
+                        if (err != MPI_SUCCESS) 
+                        {              
+                            char e [MPI_MAX_ERROR_STRING];
+                            int len = 0;
+                            memset (e, 0, MPI_MAX_ERROR_STRING);
+                            MPI_Error_string (err, e, &len);
+                            adios_error (err_write_error, 
+                                    "MPI method, rank %d: adios_close(): writing of attributes "
+                                    "of %llu bytes to file %s failed: '%s'\n",
+                                    md->rank, fd->bytes_written, fd->name, e);       
+                        }
 
-                    }
+                        MPI_Get_count (&md->status, MPI_BYTE, &count);
+                        if (count != fd->bytes_written)
+                        {
+                            log_warn ("MPI method, rank %d: adios_close() tried to write "
+                                      "%llu bytes of attributes but only wrote %d\n",
+                                      md->rank, fd->bytes_written, count);
+                        }
+                        fd->base_offset += count;
+                        fd->offset = 0;
+                        fd->bytes_written = 0;
+                        adios_shared_buffer_free (&md->b);
 
-                    MPI_Get_count (&md->status, MPI_BYTE, &count);
-                    if (count != fd->bytes_written)
-                    {
-                        fprintf (stderr, "e:MPI method tried to write %llu, "
-                                         "only wrote %d\n"
-                                ,fd->bytes_written
-                                ,count
-                                );
+                        a = a->next;
                     }
-                    fd->base_offset += count;
-                    fd->offset = 0;
-                    fd->bytes_written = 0;
-                    adios_shared_buffer_free (&md->b);
-
-                    a = a->next;
                 }
 
                 // set it up so that it will start at 0, but have correct sizes
@@ -1740,19 +1742,18 @@ void adios_mpi_close (struct adios_file_struct * fd
                     int len = 0;
                     memset (e, 0, MPI_MAX_ERROR_STRING);
                     MPI_Error_string (err, e, &len);
-                    fprintf (stderr, "adios_mpi_close (3) failed %s: '%s'\n"
-                            ,fd->name, e
-                            );       
+                    adios_error (err_write_error, 
+                            "MPI method, rank %d: adios_close(): writing of variable header "
+                            "of %llu bytes to file %s failed: '%s'\n",
+                            md->rank, md->vars_header_size, fd->name, e);       
                 }
 
                 MPI_Get_count (&md->status, MPI_BYTE, &count);
                 if (count != md->vars_header_size)
                 {
-                    fprintf (stderr, "f:MPI method tried to write %llu, "
-                                     "only wrote %d\n"
-                            ,md->vars_header_size
-                            ,count
-                            );
+                    log_warn ("MPI method, rank %d: adios_close() tried to write %llu bytes "
+                              "of variable header but only wrote %d\n",
+                              md->rank, md->vars_header_size, count);
                 }
                 fd->offset = 0;
                 fd->bytes_written = 0;
@@ -1810,9 +1811,12 @@ void adios_mpi_close (struct adios_file_struct * fd
                                                            ,&new_pg_root
                                                            );
                         adios_parse_vars_index_v1 (&md->b, &new_vars_root);
+                        // do not merge attributes from other processes from 1.4
+                        /*
                         adios_parse_attributes_index_v1 (&md->b
                                                         ,&new_attrs_root
                                                         );
+                        */
                         adios_merge_index_v1 (&md->old_pg_root
                                              ,&md->old_vars_root
                                              ,&md->old_attrs_root
@@ -1867,13 +1871,21 @@ void adios_mpi_close (struct adios_file_struct * fd
                     to_write = (int32_t) fd->bytes_written;
                 }
 
+                if (fd->base_offset + fd->bytes_written > 
+                    fd->pg_start_in_file + fd->write_size_bytes) 
+                {
+                    adios_error (err_out_of_bound, 
+                            "MPI method, rank %d: size of buffered data exceeds pg bound.\n"
+                            "File is corrupted. Need to enlarge group size in adios_group_size().\n"
+                            "Group size=%llu, offset at end of variable buffer=%llu\n",
+                            md->rank, 
+                            fd->write_size_bytes,
+                            fd->base_offset - fd->pg_start_in_file + fd->bytes_written);
+                }
+
                 while (bytes_written < fd->bytes_written)
                 {
                     // everyone writes their data
-                    if (fd->base_offset + bytes_written + to_write > 
-                           fd->pg_start_in_file + fd->write_size_bytes)
-                        fprintf (stderr, "mpi_file_write exceeds PG bound(3). File is corrupted. "
-                                         "Need to enlarge group size.\n");
 
                     MPI_File_seek (md->fh, fd->base_offset + bytes_written
                                   ,MPI_SEEK_SET
@@ -1887,9 +1899,11 @@ void adios_mpi_close (struct adios_file_struct * fd
                         int len = 0;
                         memset (e, 0, MPI_MAX_ERROR_STRING);
                         MPI_Error_string (err, e, &len);
-                        fprintf (stderr, "adios_mpi_close (4) failed %s: '%s'\n"
-                                ,fd->name, e
-                                );       
+                        adios_error (err_write_error, 
+                                "MPI method, rank %d: adios_close(): writing of buffered data "
+                                "[%llu..%llu] to file %s failed: '%s'\n",
+                                md->rank, bytes_written, bytes_written+to_write-1, 
+                                fd->name, e);       
                     }
                     bytes_written += to_write;
                     if (fd->bytes_written > bytes_written)
@@ -1942,10 +1956,9 @@ timeval_subtract (&timing.t8, &b, &a);
                         MPI_Get_count(&md->status, MPI_BYTE, &count);
                         if (count != write_len)
                         {
-                            fprintf (stderr, "Need to do multi-write 1 (tried: "
-                                             "%d wrote: %d) errno %d\n"
-                                    ,write_len, count, errno
-                                    );
+                            log_error ("MPI method, rank %d: Need to do multi-write 1 (tried: "
+                                    "%d wrote: %d) errno %d\n",
+                                    md->rank, write_len, count, errno);
                             err = count;
                             break;
                         }
@@ -1961,9 +1974,10 @@ timeval_subtract (&timing.t8, &b, &a);
                     int len = 0;
                     memset (e, 0, MPI_MAX_ERROR_STRING);
                     MPI_Error_string (err, e, &len);
-                    fprintf (stderr, "adios_mpi_close (5) failed %s: '%s'\n"
-                            ,fd->name, e
-                            );       
+                    adios_error (err_write_error, 
+                            "MPI method, rank %d: adios_close(): writing of index data "
+                            "of %llu bytes to file %s failed: '%s'\n",
+                            md->rank, buffer_offset, fd->name, e);       
                 }
             }
 #if COLLECT_METRICS
@@ -1997,6 +2011,7 @@ timeval_subtract (&timing.t8, &b, &a);
         }
 
         case adios_mode_append:
+        case adios_mode_update:
         {
             char * buffer = 0;
             uint64_t buffer_size = 0;
@@ -2048,20 +2063,19 @@ timeval_subtract (&timing.t8, &b, &a);
                     int len = 0;
                     memset (e, 0, MPI_MAX_ERROR_STRING);
                     MPI_Error_string (err, e, &len);
-                    fprintf (stderr, "adios_mpi_close (6) failed %s: '%s'\n"
-                            ,fd->name, e
-                            );       
+                    adios_error (err_write_error, 
+                         "MPI method, rank %d: adios_close(): writing of variable header "
+                         "of %llu bytes to file %s failed: '%s'\n",
+                         md->rank, md->vars_header_size, fd->name, e);       
                 }
 
                 int count;
                 MPI_Get_count (&md->status, MPI_BYTE, &count);
                 if (count != md->vars_header_size)
                 {
-                    fprintf (stderr, "d:MPI method tried to write %llu, "
-                                     "only wrote %d\n"
-                            ,md->vars_header_size
-                            ,count
-                            );
+                    log_warn ("MPI method, rank %d: adios_close() tried to write %llu bytes "
+                              "of variable header but only wrote %d\n",
+                              md->rank, md->vars_header_size, count);
                 }
                 fd->offset = 0;
                 fd->bytes_written = 0;
@@ -2077,62 +2091,71 @@ timeval_subtract (&timing.t8, &b, &a);
                 fd->offset = 0;
                 fd->bytes_written = 0;
 
-                while (a)
-                {
-                    adios_write_attribute_v1 (fd, a);
+                if (!fd->group->process_id) { // from ADIOS 1.4, only rank 0 writes attributes
+                    while (a)
+                    {
+                        adios_write_attribute_v1 (fd, a);
+                        if (fd->base_offset + fd->bytes_written > fd->pg_start_in_file + fd->write_size_bytes)
+                            adios_error (err_out_of_bound, 
+                                    "MPI method, rank %d: writing of the attributes exceeds pg bound.\n"
+                                    "File is corrupted. Need to enlarge group size in adios_group_size().\n"
+                                    "Group size=%llu, offset at end of this variable data=%llu\n",
+                                    md->rank, 
+                                    fd->write_size_bytes,
+                                    fd->base_offset - fd->pg_start_in_file + fd->bytes_written);
 #if 0
-                    err = MPI_File_write (md->fh, fd->buffer, fd->bytes_written
-                                         ,MPI_BYTE, &md->status
-                                         );
+                        err = MPI_File_write (md->fh, fd->buffer, fd->bytes_written
+                                ,MPI_BYTE, &md->status
+                                );
 #endif
-                    {
-                        uint64_t total_written = 0;
-                        uint64_t to_write = fd->bytes_written;
-                        int write_len = 0;
-                        int count;
-                        char * buf_ptr = fd->buffer;
-                        while (total_written < fd->bytes_written)
                         {
-                            write_len = (to_write > INT32_MAX) ? INT32_MAX : to_write;
-                            err = MPI_File_write (md->fh, buf_ptr, write_len, MPI_BYTE, &md->status);
-                            MPI_Get_count(&md->status, MPI_BYTE, &count);
-                            if (count != write_len)
+                            uint64_t total_written = 0;
+                            uint64_t to_write = fd->bytes_written;
+                            int write_len = 0;
+                            int count;
+                            char * buf_ptr = fd->buffer;
+                            while (total_written < fd->bytes_written)
                             {
-                                err = count;
-                                break;
+                                write_len = (to_write > INT32_MAX) ? INT32_MAX : to_write;
+                                err = MPI_File_write (md->fh, buf_ptr, write_len, MPI_BYTE, &md->status);
+                                MPI_Get_count(&md->status, MPI_BYTE, &count);
+                                if (count != write_len)
+                                {
+                                    err = count;
+                                    break;
+                                }
+                                total_written += count;
+                                buf_ptr += count;
+                                to_write -= count;
+                                //err = total_written;
                             }
-                            total_written += count;
-                            buf_ptr += count;
-                            to_write -= count;
-                            //err = total_written;
+                        }              
+                        if (err != MPI_SUCCESS) 
+                        {              
+                            char e [MPI_MAX_ERROR_STRING];
+                            int len = 0;
+                            memset (e, 0, MPI_MAX_ERROR_STRING);
+                            MPI_Error_string (err, e, &len);
+                            adios_error (err_write_error, 
+                                    "MPI method, rank %d: adios_close(): writing of attributes "
+                                    "of %llu bytes to file %s failed: '%s'\n",
+                                    md->rank, fd->bytes_written, fd->name, e);       
                         }
-                    }              
-                    if (err != MPI_SUCCESS) 
-                    {              
-                        char e [MPI_MAX_ERROR_STRING];
-                        int len = 0;
-                        memset (e, 0, MPI_MAX_ERROR_STRING);
-                        MPI_Error_string (err, e, &len);
-                        fprintf (stderr, "adios_mpi_close (7) failed %s: '%s'\n"
-                                ,fd->name, e
-                                );       
-                    }
 
-                    MPI_Get_count (&md->status, MPI_BYTE, &count);
-                    if (count != fd->bytes_written)
-                    {
-                        fprintf (stderr, "e:MPI method tried to write %llu, "
-                                         "only wrote %d\n"
-                                ,fd->bytes_written
-                                ,count
-                                );
-                    }
-                    fd->base_offset += count;
-                    fd->offset = 0;
-                    fd->bytes_written = 0;
-                    adios_shared_buffer_free (&md->b);
+                        MPI_Get_count (&md->status, MPI_BYTE, &count);
+                        if (count != fd->bytes_written)
+                        {
+                            log_warn ("MPI method, rank %d: adios_close() tried to write "
+                                      "%llu bytes of attributes but only wrote %d\n",
+                                      md->rank, fd->bytes_written, count);
+                        }
+                        fd->base_offset += count;
+                        fd->offset = 0;
+                        fd->bytes_written = 0;
+                        adios_shared_buffer_free (&md->b);
 
-                    a = a->next;
+                        a = a->next;
+                    }
                 }
 
                 // set it up so that it will start at 0, but have correct sizes
@@ -2175,20 +2198,18 @@ timeval_subtract (&timing.t8, &b, &a);
                     int len = 0;
                     memset (e, 0, MPI_MAX_ERROR_STRING);
                     MPI_Error_string (err, e, &len);
-                    fprintf (stderr, "adios_mpi_close (8) failed %s: '%s'\n"
-                            ,fd->name, e
-                            );       
-
+                    adios_error (err_write_error, 
+                            "MPI method, rank %d: adios_close(): writing of variable header "
+                            "of %llu bytes to file %s failed: '%s'\n",
+                            md->rank, md->vars_header_size, fd->name, e);       
                 }
 
                 MPI_Get_count (&md->status, MPI_BYTE, &count);
                 if (count != md->vars_header_size)
                 {
-                    fprintf (stderr, "f:MPI method tried to write %llu, "
-                                     "only wrote %d\n"
-                            ,md->vars_header_size
-                            ,count
-                            );
+                    log_warn ("MPI method, rank %d: adios_close() tried to write %llu bytes "
+                              "of variable header but only wrote %d\n",
+                              md->rank, md->vars_header_size, count);
                 }
                 fd->offset = 0;
                 fd->bytes_written = 0;
@@ -2242,9 +2263,12 @@ timeval_subtract (&timing.t8, &b, &a);
                                                            ,&new_pg_root
                                                            );
                         adios_parse_vars_index_v1 (&md->b, &new_vars_root);
+                        // do not merge attributes from other processes from 1.4
+                        /*
                         adios_parse_attributes_index_v1 (&md->b
                                                         ,&new_attrs_root
                                                         );
+                         */
                         adios_merge_index_v1 (&md->old_pg_root
                                              ,&md->old_vars_root
                                              ,&md->old_attrs_root
@@ -2285,6 +2309,17 @@ timeval_subtract (&timing.t8, &b, &a);
 
             if (fd->shared_buffer == adios_flag_yes)
             {
+                if (fd->base_offset + fd->bytes_written > 
+                    fd->pg_start_in_file + fd->write_size_bytes) 
+                {
+                    adios_error (err_out_of_bound, 
+                            "MPI method, rank %d: size of buffered data exceeds pg bound.\n"
+                            "File is corrupted. Need to enlarge group size in adios_group_size().\n"
+                            "Group size=%llu, offset at end of variable buffer=%llu\n",
+                            md->rank, 
+                            fd->write_size_bytes,
+                            fd->base_offset - fd->pg_start_in_file + fd->bytes_written);
+                }
                 // everyone writes their data
                 MPI_File_seek (md->fh, fd->base_offset, MPI_SEEK_SET);
 #if 0
@@ -2320,9 +2355,10 @@ timeval_subtract (&timing.t8, &b, &a);
                     int len = 0;
                     memset (e, 0, MPI_MAX_ERROR_STRING);
                     MPI_Error_string (err, e, &len);
-                    fprintf (stderr, "adios_mpi_close (9) failed %s: '%s'\n"
-                            ,fd->name, e
-                            );       
+                    adios_error (err_write_error, 
+                            "MPI method, rank %d: adios_close(): writing of buffered data "
+                            "of %llu bytes to file %s failed: '%s'\n",
+                            md->rank, fd->bytes_written, fd->name, e);       
                 }
             }
 
@@ -2354,6 +2390,9 @@ timeval_subtract (&timing.t8, &b, &a);
                         MPI_Get_count(&md->status, MPI_BYTE, &count);
                         if (count != write_len)
                         {
+                            log_error ("MPI method, rank %d: Need to do multi-write 2 (tried: "
+                                    "%d wrote: %d) errno %d\n",
+                                    md->rank, write_len, count, errno);
                             err = count;
                             break;
                         }
@@ -2369,9 +2408,10 @@ timeval_subtract (&timing.t8, &b, &a);
                     int len = 0;
                     memset (e, 0, MPI_MAX_ERROR_STRING);
                     MPI_Error_string (err, e, &len);
-                    fprintf (stderr, "adios_mpi_close (10) failed %s: '%s'\n"
-                            ,fd->name, e
-                            );       
+                    adios_error (err_write_error, 
+                            "MPI method, rank %d: adios_close(): writing of index data "
+                            "of %llu bytes to file %s failed: '%s'\n",
+                            md->rank, buffer_offset, fd->name, e);       
                 }
             }
 
@@ -2393,7 +2433,9 @@ timeval_subtract (&timing.t8, &b, &a);
 
         default:
         {
-            fprintf (stderr, "Unknown file mode: %d\n", fd->mode);
+            adios_error (err_invalid_file_mode,
+                    "MPI method: Unknown file mode: %d in adios_close()\n", 
+                    fd->mode);
         }
     }
 
diff --git a/src/adios_mpi_amr.c b/src/write/adios_mpi_amr.c
similarity index 82%
rename from src/adios_mpi_amr.c
rename to src/write/adios_mpi_amr.c
index 061cd8b..4343fff 100644
--- a/src/adios_mpi_amr.c
+++ b/src/write/adios_mpi_amr.c
@@ -18,11 +18,13 @@
 // xml parser
 #include <mxml.h>
 
-#include "adios.h"
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
-#include "adios_internals.h"
-#include "buffer.h"
+#include "public/adios_error.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_internals.h"
+#include "core/buffer.h"
+#include "core/util.h"
+#include "core/adios_logger.h"
 
 enum ADIOS_MPI_AMR_IO_TYPE
 {
@@ -49,6 +51,21 @@ static int adios_mpi_amr_initialized = 0;
 #define DEFAULT_STRIPE_COUNT 1
 #define DEFAULT_STRIPE_SIZE  1024*1024
 
+
+
+#ifdef SKEL_TIMING
+#define START_TIMER(t) adios_timing_go (fd->timing_obj, (t) ) 
+#else
+#define START_TIMER(t) ; 
+#endif
+
+#ifdef SKEL_TIMING
+#define STOP_TIMER(t) adios_timing_stop (fd->timing_obj, (t) )
+#else
+#define STOP_TIMER(t) ;
+#endif
+
+
 struct adios_MPI_data_struct
 {
     MPI_File fh;
@@ -60,8 +77,6 @@ struct adios_MPI_data_struct
     int rank;
     int size;
 
-    void * comm; // temporary until moved from should_buffer to open
-
     struct adios_bp_buffer_struct_v1 b;
 
     struct adios_index_process_group_struct_v1 * old_pg_root;
@@ -83,7 +98,6 @@ struct adios_MPI_data_struct
     MPI_Offset * g_offsets;
     int * g_ost_skipping_list;
     pthread_t g_sot;
-    pthread_t g_mot;
     pthread_t g_swt; // subfile open thread, metadata file open thread, subfile write thread
     struct adios_MPI_thread_data_open * open_thread_data;
     enum ADIOS_MPI_AMR_IO_TYPE g_io_type;
@@ -166,7 +180,9 @@ int * allocOSTList (int n_ost)
 
     if (ost_list == 0)
     {   
-        fprintf (stderr, "can not malloc");
+        adios_error (err_no_memory, 
+                "Can not malloc %d bytes in allocOSTList() in MPI_AMR method\n",
+                n_ost*sizeof(int));
         return 0;
     }
     memset (ost_list, 0, n_ost * sizeof (int));
@@ -183,7 +199,7 @@ int * parseOSTSkipping (int * ost_list, char * str, int n_ost)
 
     if (ost_list == 0)
     {
-        fprintf (stderr, "Pointer ost_list is null.\n");
+        log_warn ("MPI_AMR method: Pointer ost_list is null.\n");
         return 0;
     }
 
@@ -297,7 +313,7 @@ adios_mpi_amr_set_striping_unit(struct adios_MPI_data_struct * md, char *paramet
         n_ost = md->g_num_ost - n_ost_skipping;
         if (n_ost <= 0)
         {
-            fprintf (stderr, "No OST to use. Set num_ost=NNN in the adios config xml file.\n");
+            log_warn ("MPI_AMR method: No OST to use. Set num_ost=NNN in the adios config xml file.\n");
             return;
         }
 
@@ -327,7 +343,7 @@ adios_mpi_amr_set_striping_unit(struct adios_MPI_data_struct * md, char *paramet
         close(fd);
     }
     else
-        printf("Warning: open failed on file %s %s.\n",filename,strerror(errno));
+        log_warn("MPI_AMR method: open to set lustre striping failed on file %s %s.\n",filename,strerror(errno));
 }
 
 static void
@@ -447,7 +463,7 @@ adios_mpi_amr_set_aggregation_parameters(char * parameters, struct adios_MPI_dat
     md->g_is_aggregator = (int *) malloc (nproc * sizeof(int));
     if (md->g_is_aggregator == 0)
     {
-        fprintf (stderr, "can not malloc\n");
+        adios_error (err_no_memory, "Can not malloc %d bytes in MPI_AMR method, adios_mpi_amr_set_aggregation_parameters()\n", nproc*sizeof(int));
         return;
     }
     memset (md->g_is_aggregator, 0, nproc * sizeof(int));
@@ -505,7 +521,7 @@ static void adios_mpi_amr_buffer_write (char ** buffer, uint64_t * buffer_size
         }
         else
         {
-            fprintf (stderr, "Cannot allocate memory in adios_mpi_amr_buffer_write.  "
+            adios_error (err_no_memory, "Cannot allocate memory in adios_mpi_amr_buffer_write.  "
                              "Requested: %llu\n", *buffer_offset + size + 1000);
 
             return;
@@ -612,7 +628,9 @@ struct adios_var_struct * adios_mpi_amr_copy_var (struct adios_var_struct * v)
                             malloc (sizeof (struct adios_var_struct));
     if (v_new == 0)
     {
-        fprintf (stderr, "can not malloc\n");
+        adios_error (err_no_memory, "MPI_AMR method: Cannot allocate %d bytes "
+            "to duplicate variable structure in adios_mpi_amr_copy_var()\n",
+            sizeof (struct adios_var_struct));
         return 0;
     }
 
@@ -786,7 +804,9 @@ void * adios_mpi_amr_do_write_thread (void * param)
 
     if (count != *(td->total_data_size))
     {
-        fprintf (stderr, "Err in adios_mpi_amr_striping_unit_write()\n");
+        adios_error (err_unspecified, "Error in adios_mpi_amr_striping_unit_write(). "
+            "count = %llu != thread's total_data_size = %llu\n",
+            count, td->total_data_size);
     }
 
     return NULL;
@@ -806,10 +826,8 @@ static void adios_var_to_comm (const char * comm_name
         {
             if (!t)
             {
-                fprintf (stderr, "communicator not provided and none "
-                                 "listed in XML.  Defaulting to "
-                                 "MPI_COMM_SELF\n"
-                        );
+                log_warn ("MPI_AMR method: Communicator not provided and none "
+                        "listed in XML.  Defaulting to MPI_COMM_SELF\n");
 
                 *comm = MPI_COMM_SELF;
             }
@@ -831,10 +849,8 @@ static void adios_var_to_comm (const char * comm_name
             {
                 if (!t)
                 {
-                    fprintf (stderr, "communicator not provided and none "
-                                     "listed in XML.  Defaulting to "
-                                     "MPI_COMM_SELF\n"
-                            );
+                    log_warn ("MPI_AMR method: Communicator not provided and none "
+                            "listed in XML.  Defaulting to MPI_COMM_SELF\n");
 
                     *comm = MPI_COMM_SELF;
                 }
@@ -854,10 +870,8 @@ static void adios_var_to_comm (const char * comm_name
             {
                 if (!t)
                 {
-                    fprintf (stderr, "communicator not provided but one "
-                                     "listed in XML.  Defaulting to "
-                                     "MPI_COMM_WORLD\n"
-                            );
+                    log_warn ("MPI_AMR method: Communicator not provided but one is "
+                            "listed in XML.  Defaulting to MPI_COMM_WORLD\n");
 
                     *comm = MPI_COMM_WORLD;
                 }
@@ -877,15 +891,15 @@ static void adios_var_to_comm (const char * comm_name
     }
     else
     {
-        fprintf (stderr, "coordination-communication not provided. "
-                         "Using MPI_COMM_WORLD instead\n"
-                );
+        log_warn ("MPI_AMR method: Coordination-communication not provided. "
+                  "Using MPI_COMM_WORLD instead\n"
+                 );
 
         *comm = MPI_COMM_WORLD;
     }
 }
 
-void adios_mpi_amr_init (const char * parameters
+void adios_mpi_amr_init (const PairStruct * parameters
                          ,struct adios_method_struct * method
                          )
 {
@@ -927,6 +941,19 @@ void adios_mpi_amr_init (const char * parameters
     adios_buffer_struct_init (&md->b);
 }
 
+
+
+#ifdef SKEL_TIMING
+// Indices for the timer object
+int ADIOS_TIMER_MPI_AMR_COMM = ADIOS_TIMING_MAX_USER_TIMERS + 0;
+int ADIOS_TIMER_MPI_AMR_IO = ADIOS_TIMING_MAX_USER_TIMERS + 1;
+int ADIOS_TIMER_MPI_AMR_MD = ADIOS_TIMING_MAX_USER_TIMERS + 2;
+int ADIOS_TIMER_MPI_AMR_AD_WRITE = ADIOS_TIMING_MAX_USER_TIMERS + 3;
+int ADIOS_TIMER_MPI_AMR_AD_CLOSE = ADIOS_TIMING_MAX_USER_TIMERS + 4;
+int ADIOS_TIMER_MPI_AMR_AD_SHOULD_BUFFER = ADIOS_TIMING_MAX_USER_TIMERS + 5;
+#endif
+
+
 int adios_mpi_amr_open (struct adios_file_struct * fd
                         ,struct adios_method_struct * method, void * comm
                         )
@@ -934,9 +961,37 @@ int adios_mpi_amr_open (struct adios_file_struct * fd
     struct adios_MPI_data_struct * md = (struct adios_MPI_data_struct *)
                                                     method->method_data;
 
-    // we have to wait for the group_size (should_buffer) to get the comm
+
+    adios_var_to_comm (fd->group->group_comm
+                      ,fd->group->adios_host_language_fortran
+                      ,comm
+                      ,&md->group_comm
+                      );
+
+    if (md->group_comm != MPI_COMM_NULL)
+    {
+        MPI_Comm_rank (md->group_comm, &md->rank);
+        MPI_Comm_size (md->group_comm, &md->size);
+    }
+
+    fd->group->process_id = md->rank;
+#ifdef SKEL_TIMING
+    int timer_count = 6;
+    char ** timer_names = (char**) malloc (timer_count * sizeof (char*) );
+    timer_names [0] = "Communication";
+    timer_names [1] = "I/O"; 
+    timer_names [2] = "Metadata";
+    timer_names [3] = "ad_write"; 
+    timer_names [4] = "ad_close";
+    timer_names [5] = "ad_should_buffer";
+
+    fd->timing_obj = adios_timing_create (timer_count, timer_names);
+#endif
+
+
+    // we have to wait for the group_size (should_buffer)
+    // to calculate stripe sizes from output sizes of the processes
     // before we can do an open for any of the modes
-    md->comm = comm;
 
     return 1;
 }
@@ -988,23 +1043,11 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
     int next;
     uint16_t flag;
 
+    START_TIMER (ADIOS_TIMER_MPI_AMR_AD_SHOULD_BUFFER);
+
     name = malloc (strlen (method->base_path) + strlen (fd->name) + 1);
     sprintf (name, "%s%s", method->base_path, fd->name);
 
-    adios_var_to_comm (fd->group->group_comm
-                      ,fd->group->adios_host_language_fortran
-                      ,md->comm
-                      ,&md->group_comm
-                      );
-
-    if (md->group_comm != MPI_COMM_NULL)
-    {
-        MPI_Comm_rank (md->group_comm, &md->rank);
-        MPI_Comm_size (md->group_comm, &md->size);
-    }
-
-    fd->group->process_id = md->rank;
-
     if (md->rank == md->size - 1)
         next = -1;
     else
@@ -1018,7 +1061,7 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
     {
         case adios_mode_read:
         {
-            fprintf (stderr, "Read mode is not supported in MPI_AMR method.\n");
+            adios_error (err_invalid_file_mode, "MPI_AMR method: Read mode is not supported.\n");
             break;
         }
 
@@ -1036,7 +1079,7 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
                 f = open(fd->name, O_CREAT | O_RDWR | O_LOV_DELAY_CREATE, 0644);
                 if (f == -1)
                 {
-                    fprintf (stderr,"open() failed: %s\n", strerror(errno));
+                    adios_error (err_file_open_error,"MPI_AMR method: open() failed: %s\n", strerror(errno));
                     return -1;
                 }
 
@@ -1052,9 +1095,7 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
                 rc = llapi_lov_get_uuids(f, uuids, &md->g_num_ost);
                 if (rc != 0)
                 {
-                    fprintf (stderr, "get uuids failed: %s\n"
-                            ,strerror(errno)
-                            );
+                    log_warn ("MPI_AMR method: Lustre get uuids failed after creating the file: %s\n" ,strerror(errno));
                 }
 #endif
                 close (f);
@@ -1146,9 +1187,9 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
                         int len = 0;
                         memset (e, 0, MPI_MAX_ERROR_STRING);
                         MPI_Error_string (err, e, &len);
-                        fprintf (stderr, "MPI open write failed for %s: '%s'\n"
-                                ,name, e
-                                );
+                        adios_error (err_file_open_error,
+                                     "MPI_AMR method: MPI open failed for %s: '%s'\n", 
+                                     name, e);
                         free (name);
 
                         return adios_flag_no;
@@ -1192,9 +1233,9 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
                     int len = 0;
                     memset (e, 0, MPI_MAX_ERROR_STRING);
                     MPI_Error_string (err, e, &len);
-                    fprintf (stderr, "MPI open write failed for %s: '%s'\n"
-                            ,name, e
-                            );
+                    adios_error (err_file_open_error,
+                                 "MPI_AMR method: MPI open failed for %s: '%s'\n", 
+                                 name, e);
                     free (name);
 
                     return adios_flag_no;
@@ -1323,9 +1364,9 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
                 int len = 0;
                 memset (e, 0, MPI_MAX_ERROR_STRING);
                 MPI_Error_string (err, e, &len);
-                fprintf (stderr, "MPI open write failed for %s: '%s'\n"
-                        ,name, e
-                        );
+                adios_error (err_file_open_error,
+                             "MPI_AMR method: MPI open failed for %s: '%s'\n", 
+                             name, e);
                 free (name);
 
                 return adios_flag_no;
@@ -1379,11 +1420,11 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
 
 
                     MPI_Gather (&offset, 1, MPI_LONG_LONG
-                               ,0, 0, 0
+                               ,0, 1, MPI_LONG_LONG
                                ,0, md->group_comm
                                );
 
-                    MPI_Scatter (0, 0, 0
+                    MPI_Scatter (0, 1, MPI_LONG_LONG
                                 ,&offset, 1, MPI_LONG_LONG
                                 ,0, md->group_comm
                                 );
@@ -1401,7 +1442,7 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
 
         default:
         {
-            fprintf (stderr, "Unknown file mode: %d\n", fd->mode);
+            adios_error (err_invalid_file_mode, "MPI_AMR method: Unknown file mode requested: %d\n", fd->mode);
 
             free (name);
 
@@ -1419,19 +1460,18 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
 
         if (is_aggregator (md->rank))
         {
+            START_TIMER (ADIOS_TIMER_MPI_AMR_MD);
             count = adios_mpi_amr_striping_unit_write(
                                   md->fh
                                  ,fd->base_offset
                                  ,fd->buffer
                                  ,fd->bytes_written
                                  );
+            STOP_TIMER (ADIOS_TIMER_MPI_AMR_MD);
             if (count != fd->bytes_written)
             {
-                fprintf (stderr, "a:MPI method tried to write %llu, "
-                                 "only wrote %llu\n"
-                        ,fd->bytes_written
-                        ,count
-                        );
+                log_warn ("a:MPI_AMR method tried to write %llu, only wrote %llu\n", 
+                          fd->bytes_written, count);
             }
         }
         fd->base_offset += count;
@@ -1450,6 +1490,8 @@ enum ADIOS_FLAG adios_mpi_amr_should_buffer (struct adios_file_struct * fd
         adios_shared_buffer_free (&md->b);
     }
 
+    STOP_TIMER (ADIOS_TIMER_MPI_AMR_AD_SHOULD_BUFFER);
+
     return fd->shared_buffer;
 }
 
@@ -1459,6 +1501,7 @@ void adios_mpi_amr_write (struct adios_file_struct * fd
                          ,struct adios_method_struct * method
                          )
 {
+    START_TIMER (ADIOS_TIMER_MPI_AMR_AD_WRITE);
     struct adios_MPI_data_struct * md = (struct adios_MPI_data_struct *)
                                                       method->method_data;
     if (v->got_buffer == adios_flag_yes)
@@ -1513,8 +1556,10 @@ void adios_mpi_amr_write (struct adios_file_struct * fd
             aggr_buff = malloc (total_size);
             if (aggr_buff == 0)
             {
-                fprintf (stderr, "Can not alloc aggregation buffer.\n"
-                                 "Need to increase the number of aggregators.\n"
+                adios_error (err_no_memory, 
+                        "MPI_AMR method: Cannot allocate aggregation buffer of %llu size.\n"
+                        "Need to increase the number of aggregators.\n",
+                        total_size
                         );
                 return;
             }
@@ -1529,19 +1574,18 @@ void adios_mpi_amr_write (struct adios_file_struct * fd
         uint64_t count = 0;
         if (is_aggregator(md->rank))
         {
+            START_TIMER (ADIOS_TIMER_MPI_AMR_IO);
             count = adios_mpi_amr_striping_unit_write(
                            md->fh
                           ,-1
                           ,aggr_buff
                           ,total_size
                           );
+            STOP_TIMER (ADIOS_TIMER_MPI_AMR_IO);
             if (count != total_size)
             {
-                fprintf (stderr, "b:MPI method tried to write %llu, "
-                                 "only wrote %llu\n"
-                        ,total_size
-                        ,count
-                        );
+                log_warn ("b:MPI_AMR method tried to write %llu, only wrote %llu\n",
+                          total_size, count);
             }
 
             FREE (aggr_buff);
@@ -1571,6 +1615,7 @@ void adios_mpi_amr_write (struct adios_file_struct * fd
         fd->bytes_written = 0;
         adios_shared_buffer_free (&md->b);
     }
+    STOP_TIMER (ADIOS_TIMER_MPI_AMR_AD_WRITE);
 }
 
 void adios_mpi_amr_get_write_buffer (struct adios_file_struct * fd
@@ -1602,9 +1647,9 @@ void adios_mpi_amr_get_write_buffer (struct adios_file_struct * fd
         if (!*buffer)
         {
             adios_method_buffer_free (mem_allowed);
-            fprintf (stderr, "Out of memory allocating %llu bytes for %s\n"
-                    ,*size, v->name
-                    );
+            adios_error (err_no_memory, 
+                    "MPI_AMR method: Out of memory allocating %llu bytes for variable %s\n",
+                    *size ,v->name);
             v->got_buffer = adios_flag_no;
             v->free_data = adios_flag_no;
             v->data_size = 0;
@@ -1623,11 +1668,10 @@ void adios_mpi_amr_get_write_buffer (struct adios_file_struct * fd
     else
     {
         adios_method_buffer_free (mem_allowed);
-        fprintf (stderr, "OVERFLOW: Cannot allocate requested buffer of %llu "
-                         "bytes for %s\n"
-                ,*size
-                ,v->name
-                );
+        adios_error (err_buffer_overflow, 
+                "MPI_AMR method: OVERFLOW: Cannot allocate requested buffer of %llu "
+                "bytes for %s. Allowed max size is %llu\n",
+                *size, v->name, mem_allowed);
         *size = 0;
         *buffer = 0;
     }
@@ -1715,9 +1759,8 @@ static void adios_mpi_amr_do_read (struct adios_file_struct * fd
                 }
                 else
                 {
-                    printf ("MPI read: skipping name: %s path: %s\n"
-                           ,var_header.name, var_header.path
-                           );
+                    log_warn ("MPI AMR method read: skipping name: %s path: %s\n",
+                           var_header.name, var_header.path);
                     adios_parse_var_data_payload_v1 (&md->b, &var_header
                                                     ,NULL, 0
                                                     );
@@ -1741,9 +1784,9 @@ static void adios_mpi_amr_do_read (struct adios_file_struct * fd
         }
 
         default:
-            fprintf (stderr, "MPI read: file version unknown: %u\n"
-                    ,md->b.version
-                    );
+            adios_error (err_invalid_file_version, 
+                    "MPI_AMR method read: file version unknown: %u\n",
+                    md->b.version);
             return;
     }
 
@@ -1785,8 +1828,10 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
     {
         case adios_mode_read:
         case adios_mode_append:
+        case adios_mode_update:
         {
-            fprintf (stderr, "Only \"w\" is supported by MPI_AMR Brigade IO\n");
+            adios_error (err_invalid_file_mode, 
+                    "Only \"w\" mode is supported by MPI_AMR Brigade IO\n");
             break;
         }
         case adios_mode_write:
@@ -1801,6 +1846,7 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
             int i, new_rank, new_group_size, new_rank2, new_group_size2, max_data_size = 0, total_data_size = 0, total_data_size1 = 0;
             MPI_Comm new_comm, new_comm2;
 
+            START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
             MPI_Comm_split (md->group_comm, md->g_color1, md->rank, &new_comm);
             MPI_Comm_rank (new_comm, &new_rank);
             MPI_Comm_size (new_comm, &new_group_size);
@@ -1808,6 +1854,7 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
             MPI_Comm_split (md->group_comm, md->g_color2, md->rank, &new_comm2);
             MPI_Comm_rank (new_comm2, &new_rank2);
             MPI_Comm_size (new_comm2, &new_group_size2);
+            STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
             if (fd->shared_buffer == adios_flag_no)
             {
@@ -1823,19 +1870,18 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                 uint64_t count;
                 if (is_aggregator(md->rank))
                 {
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_MD);
                     count = adios_mpi_amr_striping_unit_write(
                                    md->fh
                                   ,md->vars_start
                                   ,fd->buffer
                                   ,md->vars_header_size
                                   );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_MD);
                     if (count != md->vars_header_size)
                     {
-                        fprintf (stderr, "d:MPI method tried to write %llu, "
-                                         "only wrote %d\n"
-                                ,md->vars_header_size
-                                ,count
-                                );
+                        log_warn ("d:MPI_AMR method tried to write %llu, only wrote %llu\n",
+                                md->vars_header_size, count);
                     }
                 }
                 fd->offset = 0;
@@ -1854,83 +1900,90 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                 fd->offset = 0;
                 fd->bytes_written = 0;
 
-                while (a)
-                {
-                    adios_write_attribute_v1 (fd, a);
+                if (!fd->group->process_id) { // from ADIOS 1.4, only rank 0 writes attributes
+                    while (a)
+                    {
+                        adios_write_attribute_v1 (fd, a);
 
-                    int bytes_written[new_group_size];
-                    int disp[new_group_size];
-                    int total_size = 0;
-                    void * aggr_buff;
+                        int bytes_written[new_group_size];
+                        int disp[new_group_size];
+                        int total_size = 0;
+                        void * aggr_buff;
 
-                    MPI_Gather (&fd->bytes_written, 1, MPI_INT
-                               ,bytes_written, 1, MPI_INT
-                               ,0, new_comm
-                               );
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
+                        MPI_Gather (&fd->bytes_written, 1, MPI_INT
+                                ,bytes_written, 1, MPI_INT
+                                ,0, new_comm
+                                );
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
-                    disp[0] = 0;
-                    for (i = 1; i < new_group_size; i++)
-                    {
-                        disp[i] = disp[i - 1] + bytes_written[i - 1];
-                    }
-                    total_size += disp[new_group_size - 1]
-                                + bytes_written[new_group_size - 1];
+                        disp[0] = 0;
+                        for (i = 1; i < new_group_size; i++)
+                        {
+                            disp[i] = disp[i - 1] + bytes_written[i - 1];
+                        }
+                        total_size += disp[new_group_size - 1]
+                            + bytes_written[new_group_size - 1];
 
-                    if (is_aggregator(md->rank))
-                    {
-                        aggr_buff = malloc (total_size);
-                        if (aggr_buff == 0)
+                        if (is_aggregator(md->rank))
                         {
-                            fprintf (stderr, "Can not alloc aggregation buffer.\n"
-                                             "Need to increase the number of aggregators.\n"
-                                    );
-                            return;
+                            aggr_buff = malloc (total_size);
+                            if (aggr_buff == 0)
+                            {
+                                adios_error (err_no_memory, 
+                                        "MPI_AMR method (BG): Cannot allocate aggregation buffer.\n"
+                                        "Need to increase the number of aggregators.\n");
+                                return;
+                            }
                         }
-                    }
 
-                    MPI_Gatherv (fd->buffer, fd->bytes_written, MPI_BYTE
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
+                        MPI_Gatherv (fd->buffer, fd->bytes_written, MPI_BYTE
                                 ,aggr_buff, bytes_written, disp, MPI_BYTE
                                 ,0, new_comm);
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
-                    if (is_aggregator (md->rank))
-                    {
-                        count = adios_mpi_amr_striping_unit_write(
-                                          md->fh,
-                                          -1,
-                                          aggr_buff, //fd->buffer,
-                                          total_size //fd->bytes_written,
-                                          );
-                        if (count != total_size)
+                        if (is_aggregator (md->rank))
                         {
-                            fprintf (stderr, "e:MPI method tried to write %llu, "
-                                             "only wrote %llu\n"
-                                     ,fd->bytes_written
-                                     ,count
-                                     );
+                            START_TIMER (ADIOS_TIMER_MPI_AMR_IO);
+                            count = adios_mpi_amr_striping_unit_write(
+                                    md->fh,
+                                    -1,
+                                    aggr_buff, //fd->buffer,
+                                    total_size //fd->bytes_written,
+                                    );
+                            STOP_TIMER (ADIOS_TIMER_MPI_AMR_IO);
+                            if (count != total_size)
+                            {
+                                log_warn ("e:MPI method tried to write %llu, only wrote %llu\n",
+                                          fd->bytes_written, count);
+                            }
                         }
-                    }
 
-                    // Broadcast new offsets to all processors in the communicator.
-                    uint64_t new_offsets[new_group_size];
+                        // Broadcast new offsets to all processors in the communicator.
+                        uint64_t new_offsets[new_group_size];
 
-                    if (is_aggregator (md->rank))
-                    {
-                        new_offsets[0] = a->write_offset;
-                        for (i = 1; i < new_group_size; i++)
+                        if (is_aggregator (md->rank))
                         {
-                            new_offsets[i] = new_offsets[i - 1] + bytes_written[i - 1];
+                            new_offsets[0] = a->write_offset;
+                            for (i = 1; i < new_group_size; i++)
+                            {
+                                new_offsets[i] = new_offsets[i - 1] + bytes_written[i - 1];
+                            }
                         }
-                    }
 
-                    MPI_Bcast (new_offsets, new_group_size, MPI_LONG_LONG, 0, new_comm);
-                    a->write_offset = new_offsets[new_rank];
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
+                        MPI_Bcast (new_offsets, new_group_size, MPI_LONG_LONG, 0, new_comm);
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
+                        a->write_offset = new_offsets[new_rank];
 
-                    fd->base_offset += count;
-                    fd->offset = 0;
-                    fd->bytes_written = 0;
-                    adios_shared_buffer_free (&md->b);
+                        fd->base_offset += count;
+                        fd->offset = 0;
+                        fd->bytes_written = 0;
+                        adios_shared_buffer_free (&md->b);
 
-                    a = a->next;
+                        a = a->next;
+                    }
                 }
 
                 // set it up so that it will start at 0, but have correct sizes
@@ -1943,19 +1996,18 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                 if (is_aggregator(md->rank))
                 {
                     *(uint16_t *)fd->buffer = *(uint16_t *)fd->buffer * new_group_size;
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_MD);
                     count = adios_mpi_amr_striping_unit_write(
                                   md->fh,
                                   md->vars_start,
                                   fd->buffer,
                                   md->vars_header_size
                                   );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_MD);
                     if (count != md->vars_header_size)
                     {
-                        fprintf (stderr, "f:MPI method tried to write %llu, "
-                                         "only wrote %llu\n"
-                                ,md->vars_header_size
-                                ,count
-                                );
+                        log_warn ("f:MPI_AMR method tried to write %llu, only wrote %llu\n",
+                                  md->vars_header_size, count);
                     }
                 }
 
@@ -1983,13 +2035,16 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                 disp = (int *) malloc (new_group_size * 4);
                 if (pg_sizes == 0 || disp == 0)
                 {
-                    fprintf (stderr, "can not malloc\n");
+                    adios_error (err_no_memory, "MPI_AMR method: Cannot allocate memory "
+                                "for merging process blocks (mpi_amr_bg_close)\n");
                     return;
                 }
 
+                START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                 MPI_Allgather (&pg_size, 1, MPI_INT
                               ,pg_sizes, 1, MPI_INT
                               ,new_comm);
+                STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                 disp[0] = 0;
                 max_data_size = pg_size;
@@ -2004,17 +2059,19 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                 {
                     if (2 * max_data_size > MAX_AGG_BUF)
                     {
-                        fprintf (stderr, "Warning: The max allowed aggregation buffer is %llu bytes.\n"
-                                "But this ADIOS method needs extra %llu bytes for aggregation\n"
-                                ,MAX_AGG_BUF, 2 * max_data_size);
+                        log_warn ("MPI_AMR method (BG): The max allowed aggregation "
+                                "buffer is %llu bytes.\n"
+                                "But this ADIOS method needs %llu bytes for aggregation\n",
+                                MAX_AGG_BUF, 2 * max_data_size);
                     }
 
                     aggr_buff = malloc (max_data_size);
                     recv_buff = malloc (max_data_size);
                     if (aggr_buff == 0 || recv_buff == 0)
                     {
-                        fprintf (stderr, "Can not alloc %d bytes for aggregation buffer.\n"
-                                ,max_data_size);
+                        adios_error (err_no_memory, "MPI_AMR method (BG): Cannot allocate "
+                                    "2 x %llu bytes for aggregation buffers.\n", 
+                                    max_data_size);
                         return;
                     }
                 }
@@ -2022,15 +2079,17 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                 {
                     if (max_data_size > MAX_AGG_BUF)
                     {
-                        fprintf (stderr, "The max allowed aggregation buffer is %llu.\n"
-                                ,MAX_AGG_BUF);
+                        log_warn ("MPI_AMR method (BG): The max allowed aggregation "
+                                  "buffer is %llu bytes.\n",
+                                  MAX_AGG_BUF);
                     }
 
                     recv_buff = malloc (max_data_size);
                     if (recv_buff == 0)
                     {
-                        fprintf (stderr, "Can not alloc %d bytes for aggregation buffer.\n"
-                                ,max_data_size);
+                        adios_error (err_no_memory, "MPI_AMR method (BG): Cannot allocate "
+                                    "%llu bytes for receive buffer.\n", 
+                                    max_data_size);
                         return;
                     }
                 }
@@ -2050,8 +2109,10 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                     {
                         if (i + 1 < new_group_size)
                         {
+                            START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                             MPI_Irecv (recv_buff, pg_sizes[i + 1], MPI_BYTE, new_rank + 1
                                       ,0, new_comm, &request);
+                            STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                         }
 
                         write_thread_data.fh = &md->fh;
@@ -2060,13 +2121,18 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                         write_thread_data.total_data_size = &pg_sizes[i];
 
                         // This write call is not threaded
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_IO);
                         adios_mpi_amr_do_write_thread ((void *) &write_thread_data);
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_IO);
 
                         index_start1 += pg_sizes[i];
 
                         if (i + 1 < new_group_size)
                         {
+                            START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                             MPI_Wait (&request, &status);
+                            STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
+
                             memcpy (aggr_buff, recv_buff, pg_sizes[i + 1]);
                         }
                     }
@@ -2075,13 +2141,16 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                 {
                     if (new_rank == new_group_size - 1)
                     {
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                         MPI_Send (fd->buffer, pg_size, MPI_BYTE, new_rank - 1
                                  ,0, new_comm);
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     }
                     else
                     {
                         for (i = new_rank + 1; i < new_group_size; i++)
                         {
+                            START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                             // Recv data from upstream rank
                             MPI_Irecv (recv_buff, pg_sizes[i], MPI_BYTE, new_rank + 1
                                       ,0, new_comm, &request);
@@ -2095,6 +2164,7 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                             // Send it to downstream rank
                             MPI_Send (recv_buff, pg_sizes[i], MPI_BYTE, new_rank - 1
                                      ,0, new_comm);
+                            STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                         }
                     }
                 }
@@ -2156,10 +2226,12 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                     uint32_t size = 0, total_size = 0;
                     int i;
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gather (&size, 1, MPI_INT
                                ,index_sizes, 1, MPI_INT
                                ,0, new_comm
                                );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     for (i = 0; i < new_group_size; i++)
                     {
@@ -2169,10 +2241,12 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
 
                     recv_buffer = malloc (total_size);
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gatherv (&size, 0, MPI_BYTE
                                 ,recv_buffer, index_sizes, index_offsets
                                 ,MPI_BYTE, 0, new_comm
                                 );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     char * buffer_save = md->b.buff;
                     uint64_t buffer_size_save = md->b.length;
@@ -2221,6 +2295,7 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                                          ,md->old_attrs_root
                                          );
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gather (&buffer_size, 1, MPI_INT, 0, 0, MPI_INT
                                ,0, new_comm
                                );
@@ -2228,6 +2303,7 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                                 ,0, 0, 0, MPI_BYTE
                                 ,0, new_comm
                                 );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                 }
             }
 
@@ -2265,7 +2341,9 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                     }
                     else
                     {
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_IO);
                         adios_mpi_amr_do_write_thread ((void *) &write_thread_data); 
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_IO);
                     }
                 }
             }
@@ -2280,10 +2358,12 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                     char * recv_buffer = 0;
                     uint32_t size = 0, total_size = 0;
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gather (&size, 1, MPI_INT
                                ,index_sizes, 1, MPI_INT
                                ,0, new_comm2
                                );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     for (i = 0; i < new_group_size2; i++)
                     {
@@ -2293,10 +2373,12 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
 
                     recv_buffer = malloc (total_size);
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gatherv (&size, 0, MPI_BYTE
                                 ,recv_buffer, index_sizes, index_offsets
                                 ,MPI_BYTE, 0, new_comm2
                                 );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     char * buffer_save = md->b.buff;
                     uint64_t buffer_size_save = md->b.length;
@@ -2347,6 +2429,7 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                                          ,md->old_attrs_root
                                          );
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gather (&buffer_size2, 1, MPI_INT
                                ,0, 0, MPI_INT
                                ,0, new_comm2
@@ -2355,6 +2438,7 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                                 ,0, 0, 0, MPI_BYTE
                                 ,0, new_comm2
                                 );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     if (buffer2)
                     {
@@ -2389,17 +2473,14 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
                                             ,flag
                                             );
 
-                if (md->g_threading)
-                {
-                    pthread_join (md->g_mot, NULL);
-                }
-
+                START_TIMER (ADIOS_TIMER_MPI_AMR_MD);
                 adios_mpi_amr_striping_unit_write(
                                   md->mfh,
                                   -1,
                                   global_index_buffer,
                                   global_index_buffer_offset
                                   );
+                STOP_TIMER (ADIOS_TIMER_MPI_AMR_MD);
 
                 if (global_index_buffer)
                 {
@@ -2448,6 +2529,25 @@ void adios_mpi_amr_bg_close (struct adios_file_struct * fd
         break;
     }
 
+    if (md && md->fh)
+        MPI_File_close (&md->fh);
+
+    if (md && md->mfh)
+        MPI_File_close (&md->mfh);
+
+    if (   md->group_comm != MPI_COMM_WORLD
+        && md->group_comm != MPI_COMM_SELF
+        && md->group_comm != MPI_COMM_NULL
+       )
+    {   
+        md->group_comm = MPI_COMM_NULL;
+    }
+
+    md->fh = 0;
+    md->mfh = 0;
+    md->req = 0;
+    memset (&md->status, 0, sizeof (MPI_Status));
+
     return;
 }
 
@@ -2466,19 +2566,12 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
     switch (fd->mode)
     {
         case adios_mode_read:
+        case adios_mode_append:
         {
-            // read the index to find the place to start reading
-            adios_mpi_amr_do_read (fd, method);
-            struct adios_var_struct * v = fd->group->vars;
-            while (v)
-            {
-                v->data = 0;
-                v = v->next;
-            }
-
+            adios_error (err_invalid_file_mode, 
+                        "Only \"w\" mode is supported by MPI_AMR Aggregation IO\n");
             break;
         }
-
         case adios_mode_write:
         {
             char * buffer = 0;
@@ -2491,6 +2584,7 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
             int i, new_rank, new_group_size, new_rank2, new_group_size2, total_data_size = 0, total_data_size1 = 0;;
             MPI_Comm new_comm, new_comm2;
 
+            START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
             MPI_Comm_split (md->group_comm, md->g_color1, md->rank, &new_comm);
             MPI_Comm_rank (new_comm, &new_rank);
             MPI_Comm_size (new_comm, &new_group_size);
@@ -2498,6 +2592,7 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
             MPI_Comm_split (md->group_comm, md->g_color2, md->rank, &new_comm2);
             MPI_Comm_rank (new_comm2, &new_rank2);
             MPI_Comm_size (new_comm2, &new_group_size2);
+            STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
             if (fd->shared_buffer == adios_flag_no)
             {
@@ -2513,19 +2608,19 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                 uint64_t count;
                 if (is_aggregator(md->rank))
                 {
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_MD);
                     count = adios_mpi_amr_striping_unit_write(
                                    md->fh
                                   ,md->vars_start
                                   ,fd->buffer
                                   ,md->vars_header_size
                                   );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_MD);
+
                     if (count != md->vars_header_size)
                     {
-                        fprintf (stderr, "d:MPI method tried to write %llu, "
-                                         "only wrote %d\n"
-                                ,md->vars_header_size
-                                ,count
-                                );
+                        log_warn ("d:MPI_AMR method tried to write %llu, only wrote %d\n",
+                                md->vars_header_size, count);
                     }
                 }
                 fd->offset = 0;
@@ -2544,83 +2639,93 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                 fd->offset = 0;
                 fd->bytes_written = 0;
 
-                while (a)
-                {
-                    adios_write_attribute_v1 (fd, a);
+                if (!fd->group->process_id) { // from ADIOS 1.4, only rank 0 writes attributes
+                    while (a)
+                    {
+                        adios_write_attribute_v1 (fd, a);
 
-                    int bytes_written[new_group_size];
-                    int disp[new_group_size];
-                    int total_size = 0;
-                    void * aggr_buff;
+                        int bytes_written[new_group_size];
+                        int disp[new_group_size];
+                        int total_size = 0;
+                        void * aggr_buff;
 
-                    MPI_Gather (&fd->bytes_written, 1, MPI_INT
-                               ,bytes_written, 1, MPI_INT
-                               ,0, new_comm
-                               );
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
+                        MPI_Gather (&fd->bytes_written, 1, MPI_INT
+                                ,bytes_written, 1, MPI_INT
+                                ,0, new_comm
+                                );
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
-                    disp[0] = 0;
-                    for (i = 1; i < new_group_size; i++)
-                    {
-                        disp[i] = disp[i - 1] + bytes_written[i - 1];
-                    }
-                    total_size += disp[new_group_size - 1]
-                                + bytes_written[new_group_size - 1];
+                        disp[0] = 0;
+                        for (i = 1; i < new_group_size; i++)
+                        {
+                            disp[i] = disp[i - 1] + bytes_written[i - 1];
+                        }
+                        total_size += disp[new_group_size - 1]
+                            + bytes_written[new_group_size - 1];
 
-                    if (is_aggregator(md->rank))
-                    {
-                        aggr_buff = malloc (total_size);
-                        if (aggr_buff == 0)
+                        if (is_aggregator(md->rank))
                         {
-                            fprintf (stderr, "Can not alloc aggregation buffer.\n"
-                                             "Need to increase the number of aggregators.\n"
-                                    );
-                            return;
+                            aggr_buff = malloc (total_size);
+                            if (aggr_buff == 0)
+                            {
+                                adios_error (err_no_memory, 
+                                        "MPI_AMR method (AG): Cannot allocate aggregation buffer.\n"
+                                        "Need to increase the number of aggregators.\n"
+                                        );
+                                return;
+                            }
                         }
-                    }
 
-                    MPI_Gatherv (fd->buffer, fd->bytes_written, MPI_BYTE
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
+                        MPI_Gatherv (fd->buffer, fd->bytes_written, MPI_BYTE
                                 ,aggr_buff, bytes_written, disp, MPI_BYTE
                                 ,0, new_comm);
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
-                    if (is_aggregator (md->rank))
-                    {
-                        count = adios_mpi_amr_striping_unit_write(
-                                          md->fh,
-                                          -1,
-                                          aggr_buff, //fd->buffer,
-                                          total_size //fd->bytes_written,
-                                          );
-                        if (count != total_size)
+                        if (is_aggregator (md->rank))
                         {
-                            fprintf (stderr, "e:MPI method tried to write %llu, "
-                                             "only wrote %llu\n"
-                                     ,fd->bytes_written
-                                     ,count
-                                     );
+                            START_TIMER (ADIOS_TIMER_MPI_AMR_IO);
+                            count = adios_mpi_amr_striping_unit_write(
+                                    md->fh,
+                                    -1,
+                                    aggr_buff, //fd->buffer,
+                                    total_size //fd->bytes_written,
+                                    );
+                            STOP_TIMER (ADIOS_TIMER_MPI_AMR_IO);
+
+                            if (count != total_size)
+                            {
+                                log_warn ("e:MPI_AMR method tried to write %llu, only wrote %llu\n",
+                                        fd->bytes_written, count);
+                            }
                         }
-                    }
 
-                    // Broadcast new offsets to all processors in the communicator.
-                    uint64_t new_offsets[new_group_size];
+                        // Broadcast new offsets to all processors in the communicator.
+                        uint64_t new_offsets[new_group_size];
 
-                    if (is_aggregator (md->rank))
-                    {
-                        new_offsets[0] = a->write_offset;
-                        for (i = 1; i < new_group_size; i++)
+                        if (is_aggregator (md->rank))
                         {
-                            new_offsets[i] = new_offsets[i - 1] + bytes_written[i - 1];
+                            new_offsets[0] = a->write_offset;
+                            for (i = 1; i < new_group_size; i++)
+                            {
+                                new_offsets[i] = new_offsets[i - 1] + bytes_written[i - 1];
+                            }
                         }
-                    }
 
-                    MPI_Bcast (new_offsets, new_group_size, MPI_LONG_LONG, 0, new_comm);
-                    a->write_offset = new_offsets[new_rank];
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
+                        MPI_Bcast (new_offsets, new_group_size, MPI_LONG_LONG, 0, new_comm);
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
+
+                        a->write_offset = new_offsets[new_rank];
 
-                    fd->base_offset += count;
-                    fd->offset = 0;
-                    fd->bytes_written = 0;
-                    adios_shared_buffer_free (&md->b);
+                        fd->base_offset += count;
+                        fd->offset = 0;
+                        fd->bytes_written = 0;
+                        adios_shared_buffer_free (&md->b);
 
-                    a = a->next;
+                        a = a->next;
+                    }
                 }
 
                 // set it up so that it will start at 0, but have correct sizes
@@ -2633,19 +2738,20 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                 if (is_aggregator(md->rank))
                 {
                     *(uint16_t *)fd->buffer = *(uint16_t *)fd->buffer * new_group_size;
+
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_MD);
                     count = adios_mpi_amr_striping_unit_write(
                                   md->fh,
                                   md->vars_start,
                                   fd->buffer,
                                   md->vars_header_size
                                   );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_MD);
+
                     if (count != md->vars_header_size)
                     {
-                        fprintf (stderr, "f:MPI method tried to write %llu, "
-                                         "only wrote %llu\n"
-                                ,md->vars_header_size
-                                ,count
-                                );
+                        log_warn ("f:MPI_AMR method tried to write %llu, only wrote %llu\n",
+                                  md->vars_header_size, count);
                     }
                 }
 
@@ -2670,13 +2776,19 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                 disp = (int *) malloc (new_group_size * 4);
                 if (pg_sizes == 0 || disp == 0)
                 {
-                    fprintf (stderr, "can not malloc\n");
+                    adios_error (err_no_memory, 
+                            "MPI_AMR method (AG): Cannot allocate buffers (%d bytes) "
+                            "for merging process blocks.\n",
+                            2*4*new_group_size
+                            );
                     return;
                 }
 
+                START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                 MPI_Allgather (&pg_size, 1, MPI_INT
                               ,pg_sizes, 1, MPI_INT
                               ,new_comm);
+                STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                 disp[0] = 0;
                 for (i = 1; i < new_group_size; i++)
@@ -2690,16 +2802,18 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                 {
                     if (total_data_size > MAX_AGG_BUF)
                     {
-                        fprintf (stderr, "The max allowed aggregation buffer is %llu.\n"
-                                         "Need to increase the number of aggregators.\n"
-                                ,MAX_AGG_BUF);
+                        log_warn ("The max allowed aggregation buffer is %llu. Requested %llu.\n"
+                                "Need to increase the number of aggregators.\n",
+                                MAX_AGG_BUF, total_data_size);
                     }
                     aggr_buff = malloc (total_data_size);
                     if (aggr_buff == 0)
                     {
-                        fprintf (stderr, "Can not alloc %d bytes for aggregation buffer.\n"
-                                         "Need to increase the number of aggregators.\n"
-                                ,total_data_size);
+                        adios_error (err_no_memory, 
+                                "MPI_AMR method (AG): Cannot allocate %llu bytes "
+                                "for aggregation buffer.\n"
+                                "Need to increase the number of aggregators.\n",
+                                total_data_size);
                         return;
                     }
                 }
@@ -2707,15 +2821,17 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                 {
                 }
 
+                START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                 MPI_Gatherv (fd->buffer, pg_size, MPI_BYTE
                             ,aggr_buff, pg_sizes, disp, MPI_BYTE
                             ,0, new_comm);
+                STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
             }
 
             // Merge PG's on the aggregator side
             if (fd->shared_buffer == adios_flag_yes && md->g_merging_pgs)
             {
-                fprintf (stderr, "Merging pg is not supported yet\n");
+                log_warn ("MPI_AMR method (AG): Merging process blocks is not supported yet\n");
                 // Merge PG's on the aggregator side
                 struct adios_bp_buffer_struct_v1 b;
                 struct adios_process_group_header_struct_v1 pg_header;
@@ -2741,7 +2857,8 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                 // reset vars count
                 if (vars_header.count * new_group_size > UINT16_MAX)
                 {
-                    fprintf (stderr, "Vars count exceed UINT16_MAX");
+                    adios_error (err_too_many_variables, 
+                        "MPI_AMR method (AG): Variable count exceeds UINT16_MAX (%d), UINT16_MAX");
                     return;
                 }
                 *(uint16_t *) (b.buff + vars_count_offset) = 
@@ -2770,16 +2887,22 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                 if (pg_sizes == 0 || attr_sizes == 0 || disp == 0
                  || sendbuf == 0 || recvbuf == 0)
                 {
-                    fprintf (stderr, "can not malloc\n");
+                    adios_error (err_no_memory, 
+                            "MPI_AMR method (AG): Cannot allocate %llu bytes "
+                            "for send/recv/merge buffers.\n",
+                            5*4*new_group_size + 2*4
+                            );
                     return;
                 }
   
                 sendbuf[0] = pg_size;
                 sendbuf[1] = attr_size + SHIM_FOOTER_SIZE;
 
+                START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                 MPI_Allgather (sendbuf, 2, MPI_INT
                               ,recvbuf, 2, MPI_INT
                               ,new_comm);
+                STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                 for (i = 0; i < new_group_size; i++)
                 {
@@ -2803,9 +2926,10 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                     aggr_buff = malloc (total_data_size);
                     if (aggr_buff == 0)
                     {
-                        fprintf (stderr, "Can not alloc %d bytes for aggregation buffer.\n"
-                                         "Need to increase the number of aggregators.\n"
-                                ,total_data_size);
+                        adios_error (err_no_memory, "MPI_AMR method (AG): Cannot allocate "
+                                "%llu bytes for aggregation buffer.\n"
+                                "Need to increase the number of aggregators.\n",
+                                total_data_size);
                         return;
                     }
                 }
@@ -2819,9 +2943,11 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                     void * aggr_attr_buff, * temp_aggr_buff, * temp_aggr_attr_buff;
                     uint16_t new_attr_count = 0, new_attr_len = 0;
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gatherv (fd->buffer, pg_size, MPI_BYTE
                                 ,aggr_buff, pg_sizes, disp, MPI_BYTE
                                 ,0, new_comm);
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     for (i= 0; i < new_group_size; i++)
                     {
@@ -2835,9 +2961,10 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                     aggr_attr_buff = malloc (aggr_attr_size);
                     if (aggr_attr_buff == 0)
                     {
-                        fprintf (stderr, "can not alloc %d bytes for aggregation buffer.\n"
-                                         "Need to increase the number of aggregators.\n"
-                                ,aggr_attr_size);
+                        adios_error (err_no_memory, "MPI_AMR method (AG): Cannot allocate "
+                                "%llu bytes for aggregation attribute buffer.\n"
+                                "Need to increase the number of aggregators.\n",
+                                aggr_attr_size);
                         return;
                     }
 
@@ -2894,9 +3021,11 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                 }
                 else
                 {
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gatherv (fd->buffer + header_size, pg_size, MPI_BYTE
                                 ,aggr_buff, pg_sizes, disp, MPI_BYTE
                                 ,0, new_comm);
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                 }
 
                 uint64_t count = 0;
@@ -2926,7 +3055,8 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
 
                     if (count != total_data_size)
                     {
-                        fprintf (stderr, "Err in adios_mpi_amr_striping_unit_write()\n");
+                        adios_error (err_unspecified, 
+                                     "Error in adios_mpi_amr_striping_unit_write()\n");
                         return;
                     }
 
@@ -3046,10 +3176,12 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                     uint32_t size = 0, total_size = 0;
                     int i;
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gather (&size, 1, MPI_INT
                                ,index_sizes, 1, MPI_INT
                                ,0, new_comm
                                );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     for (i = 0; i < new_group_size; i++)
                     {
@@ -3059,10 +3191,12 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
 
                     recv_buffer = malloc (total_size);
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gatherv (&size, 0, MPI_BYTE
                                 ,recv_buffer, index_sizes, index_offsets
                                 ,MPI_BYTE, 0, new_comm
                                 );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     char * buffer_save = md->b.buff;
                     uint64_t buffer_size_save = md->b.length;
@@ -3111,6 +3245,7 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                                          ,md->old_attrs_root
                                          );
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gather (&buffer_size, 1, MPI_INT, 0, 0, MPI_INT
                                ,0, new_comm
                                );
@@ -3118,6 +3253,7 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                                 ,0, 0, 0, MPI_BYTE
                                 ,0, new_comm
                                 );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                 }
             }
 
@@ -3176,7 +3312,9 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                     }
                     else
                     {
+                        START_TIMER (ADIOS_TIMER_MPI_AMR_IO);
                         adios_mpi_amr_do_write_thread ((void *) &write_thread_data);
+                        STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     }
                 }
 #if 0
@@ -3199,10 +3337,12 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                     char * recv_buffer = 0;
                     uint32_t size = 0, total_size = 0;
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gather (&size, 1, MPI_INT
                                ,index_sizes, 1, MPI_INT
                                ,0, new_comm2
                                );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     for (i = 0; i < new_group_size2; i++)
                     {
@@ -3212,10 +3352,12 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
 
                     recv_buffer = malloc (total_size);
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gatherv (&size, 0, MPI_BYTE
                                 ,recv_buffer, index_sizes, index_offsets
                                 ,MPI_BYTE, 0, new_comm2
                                 );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     char * buffer_save = md->b.buff;
                     uint64_t buffer_size_save = md->b.length;
@@ -3266,6 +3408,7 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                                          ,md->old_attrs_root
                                          );
 
+                    START_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
                     MPI_Gather (&buffer_size2, 1, MPI_INT
                                ,0, 0, MPI_INT
                                ,0, new_comm2
@@ -3274,6 +3417,7 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                                 ,0, 0, 0, MPI_BYTE
                                 ,0, new_comm2
                                 );
+                    STOP_TIMER (ADIOS_TIMER_MPI_AMR_COMM);
 
                     if (buffer2)
                     {
@@ -3321,18 +3465,14 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
                               ,MPI_INFO_NULL, &m_file
                               );
 #endif
-                // Waiting for metadata file to open
-                if (md->g_threading)
-                {
-                    pthread_join (md->g_mot, NULL);
-                }
-
+                START_TIMER (ADIOS_TIMER_MPI_AMR_MD);
                 adios_mpi_amr_striping_unit_write(
                                   md->mfh,
                                   -1,
                                   global_index_buffer,
                                   global_index_buffer_offset
                                   );
+                STOP_TIMER (ADIOS_TIMER_MPI_AMR_MD);
 
                 if (global_index_buffer)
                 {
@@ -3379,242 +3519,11 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
             break;
         }
 
-        case adios_mode_append:
-        {
-            char * buffer = 0;
-            uint64_t buffer_size = 0;
-            uint64_t buffer_offset = 0;
-            uint64_t index_start = md->b.pg_index_offset;
-
-            if (fd->shared_buffer == adios_flag_no)
-            {
-                MPI_Offset new_off;
-                // set it up so that it will start at 0, but have correct sizes
-                MPI_File_get_position (md->fh, &new_off);
-                fd->offset = fd->base_offset - md->vars_start;
-                fd->vars_start = 0;
-                fd->buffer_size = 0;
-                adios_write_close_vars_v1 (fd);
-                // fd->vars_start gets updated with the size written
-                uint64_t count;
-                count = adios_mpi_amr_striping_unit_write(
-                                  md->fh,
-                                  md->vars_start,
-                                  fd->buffer,
-                                  md->vars_header_size
-                                  );
-                if (count != md->vars_header_size)
-                {
-                    fprintf (stderr, "d:MPI method tried to write %llu, "
-                                     "only wrote %llu\n"
-                            ,md->vars_header_size
-                            ,count
-                            );
-                }
-                fd->offset = 0;
-                fd->bytes_written = 0;
-                adios_shared_buffer_free (&md->b);
-
-                adios_write_open_attributes_v1 (fd);
-                md->vars_start = new_off;
-                md->vars_header_size = fd->offset;
-                MPI_File_seek (md->fh, new_off + md->vars_header_size
-                              ,MPI_SEEK_SET
-                              ); // go back to end, but after attr header
-                fd->base_offset += fd->offset;  // add size of header
-                fd->offset = 0;
-                fd->bytes_written = 0;
-
-                while (a)
-                {
-                    adios_write_attribute_v1 (fd, a);
-                    count = adios_mpi_amr_striping_unit_write(
-                                  md->fh,
-                                  -1,
-                                  fd->buffer,
-                                  fd->bytes_written
-                                  );
-                    if (count != fd->bytes_written)
-                    {
-                        fprintf (stderr, "e:MPI method tried to write %llu, "
-                                         "only wrote %llu\n"
-                                ,fd->bytes_written
-                                ,count
-                                );
-                    }
-                    fd->base_offset += count;
-                    fd->offset = 0;
-                    fd->bytes_written = 0;
-                    adios_shared_buffer_free (&md->b);
-
-                    a = a->next;
-                }
-
-                // set it up so that it will start at 0, but have correct sizes
-                fd->offset = fd->base_offset - md->vars_start;
-                fd->vars_start = 0;
-                fd->buffer_size = 0;
-                adios_write_close_attributes_v1 (fd);
-                // fd->vars_start gets updated with the size written
-                count = adios_mpi_amr_striping_unit_write(
-                                  md->fh,
-                                  md->vars_start,
-                                  fd->buffer,
-                                  md->vars_header_size
-                                  );
-                if (count != md->vars_header_size)
-                {
-                    fprintf (stderr, "f:MPI method tried to write %llu, "
-                                     "only wrote %llu\n"
-                            ,md->vars_header_size
-                            ,count
-                            );
-                }
-                fd->offset = 0;
-                fd->bytes_written = 0;
-            }
-
-            // build index appending to any existing index
-            adios_build_index_v1 (fd, &md->old_pg_root, &md->old_vars_root
-                                 ,&md->old_attrs_root
-                                 );
-            // if collective, gather the indexes from the rest and call
-            if (md->group_comm != MPI_COMM_NULL)
-            {
-                if (md->rank == 0)
-                {
-                    int * index_sizes = malloc (4 * md->size);
-                    int * index_offsets = malloc (4 * md->size);
-                    char * recv_buffer = 0;
-                    uint32_t size = 0;
-                    uint32_t total_size = 0;
-                    int i;
-
-                    MPI_Gather (&size, 1, MPI_INT
-                               ,index_sizes, 1, MPI_INT
-                               ,0, md->group_comm
-                               );
-
-                    for (i = 0; i < md->size; i++)
-                    {
-                        index_offsets [i] = total_size;
-                        total_size += index_sizes [i];
-                    }
-
-                    recv_buffer = malloc (total_size);
-
-                    MPI_Gatherv (&size, 0, MPI_BYTE
-                                ,recv_buffer, index_sizes, index_offsets
-                                ,MPI_BYTE, 0, md->group_comm
-                                );
-
-                    char * buffer_save = md->b.buff;
-                    uint64_t buffer_size_save = md->b.length;
-                    uint64_t offset_save = md->b.offset;
-
-                    for (i = 1; i < md->size; i++)
-                    {
-                        md->b.buff = recv_buffer + index_offsets [i];
-                        md->b.length = index_sizes [i];
-                        md->b.offset = 0;
-
-                        adios_parse_process_group_index_v1 (&md->b
-                                                           ,&new_pg_root
-                                                           );
-                        adios_parse_vars_index_v1 (&md->b, &new_vars_root);
-                        adios_parse_attributes_index_v1 (&md->b
-                                                        ,&new_attrs_root
-                                                        );
-                        adios_merge_index_v1 (&md->old_pg_root
-                                             ,&md->old_vars_root
-                                             ,&md->old_attrs_root
-                                             ,new_pg_root, new_vars_root
-                                             ,new_attrs_root
-                                             );
-                        new_pg_root = 0;
-                        new_vars_root = 0;
-                        new_attrs_root = 0;
-                    }
-                    md->b.buff = buffer_save;
-                    md->b.length = buffer_size_save;
-                    md->b.offset = offset_save;
-
-                    free (recv_buffer);
-                    free (index_sizes);
-                    free (index_offsets);
-                }
-                else
-                {
-                    adios_write_index_v1 (&buffer, &buffer_size, &buffer_offset
-                                         ,0, md->old_pg_root
-                                         ,md->old_vars_root
-                                         ,md->old_attrs_root
-                                         );
-
-                    MPI_Gather (&buffer_size, 1, MPI_INT, 0, 0, MPI_INT
-                               ,0, md->group_comm
-                               );
-                    MPI_Gatherv (buffer, buffer_size, MPI_BYTE
-                                ,0, 0, 0, MPI_BYTE
-                                ,0, md->group_comm
-                                );
-                }
-            }
-
-            if (fd->shared_buffer == adios_flag_yes)
-            {
-                // everyone writes their data
-                adios_mpi_amr_striping_unit_write(
-                                  md->fh,
-                                  fd->base_offset,
-                                  fd->buffer,
-                                  fd->bytes_written
-                                  );
-            }
-
-            if (md->rank == 0)
-            {
-                uint32_t flag = 0;
-
-                adios_write_index_v1 (&buffer, &buffer_size, &buffer_offset
-                                     ,index_start, md->old_pg_root
-                                     ,md->old_vars_root
-                                     ,md->old_attrs_root
-                                     );
-
-                flag |= ADIOS_VERSION_HAVE_SUBFILE;
-                adios_write_version_flag_v1 (&buffer, &buffer_size, &buffer_offset, flag);
-/*
-                adios_write_version_v1 (&buffer, &buffer_size, &buffer_offset);
-*/
-
-                adios_mpi_amr_striping_unit_write(
-                                  md->fh,
-                                  md->b.pg_index_offset,
-                                  buffer,
-                                  buffer_offset
-                                  );
-            }
-
-            free (buffer);
-
-            adios_clear_index_v1 (new_pg_root, new_vars_root, new_attrs_root);
-            adios_clear_index_v1 (md->old_pg_root, md->old_vars_root
-                                 ,md->old_attrs_root
-                                 );
-            new_pg_root = 0;
-            new_vars_root = 0;
-            new_attrs_root = 0;
-            md->old_pg_root = 0;
-            md->old_vars_root = 0;
-            md->old_attrs_root = 0;
-
-            break;
-        }
-
         default:
         {
-            fprintf (stderr, "Unknown file mode: %d\n", fd->mode);
+            adios_error (err_invalid_file_mode, 
+                    "MPI_AMR method (AG): Unknown file mode (%d) at close time\n", 
+                    fd->mode);
         }
     }
 
@@ -3636,20 +3545,13 @@ void adios_mpi_amr_ag_close (struct adios_file_struct * fd
     md->mfh = 0;
     md->req = 0;
     memset (&md->status, 0, sizeof (MPI_Status));
-    md->group_comm = MPI_COMM_NULL;
-
-    adios_clear_index_v1 (md->old_pg_root, md->old_vars_root
-                         ,md->old_attrs_root
-                         );
-    md->old_pg_root = 0;
-    md->old_vars_root = 0;
-    md->old_attrs_root = 0;
 }
 
 void adios_mpi_amr_close (struct adios_file_struct * fd
                      ,struct adios_method_struct * method
                      )
 {
+    START_TIMER (ADIOS_TIMER_MPI_AMR_AD_CLOSE);
     struct adios_MPI_data_struct * md = (struct adios_MPI_data_struct *)
                                                  method->method_data;
     if (md->g_io_type == ADIOS_MPI_AMR_IO_AG)
@@ -3662,9 +3564,12 @@ void adios_mpi_amr_close (struct adios_file_struct * fd
     }
     else
     {
-        fprintf (stderr, "unknown I/O type. Only MPI_AMR_AGGREGATION and MPI_AMR_BRIGADE are supported\n");
+        adios_error (err_invalid_write_method, "MPI_AMR method: unknown I/O type (%d). "
+                "Only MPI_AMR_AGGREGATION and MPI_AMR_BRIGADE are supported\n",
+                md->g_io_type);
         return;
     }
+    STOP_TIMER (ADIOS_TIMER_MPI_AMR_AD_CLOSE);
 }
 
 void adios_mpi_amr_finalize (int mype, struct adios_method_struct * method)
diff --git a/src/adios_mpi_lustre.c b/src/write/adios_mpi_lustre.c
similarity index 92%
rename from src/adios_mpi_lustre.c
rename to src/write/adios_mpi_lustre.c
index f233fc2..a1ff456 100644
--- a/src/adios_mpi_lustre.c
+++ b/src/write/adios_mpi_lustre.c
@@ -17,11 +17,23 @@
 // xml parser
 #include <mxml.h>
 
-#include "adios.h"
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
-#include "adios_internals.h"
-#include "buffer.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_internals.h"
+#include "core/buffer.h"
+#include "core/util.h"
+
+#ifdef SKEL_TIMING
+#define START_TIMER(t) adios_timing_go (fd->timing_obj, (t) ) 
+#else
+#define START_TIMER(t) ; 
+#endif
+
+#ifdef SKEL_TIMING
+#define STOP_TIMER(t) adios_timing_stop (fd->timing_obj, (t) )
+#else
+#define STOP_TIMER(t) ;
+#endif
 
 static int adios_mpi_lustre_initialized = 0;
 
@@ -36,8 +48,6 @@ struct adios_MPI_data_struct
     int rank;
     int size;
 
-    void * comm; // temporary until moved from should_buffer to open
-
     struct adios_bp_buffer_struct_v1 b;
 
     struct adios_index_process_group_struct_v1 * old_pg_root;
@@ -593,7 +603,7 @@ static void adios_var_to_comm (const char * comm_name
     }
 }
 
-void adios_mpi_lustre_init (const char * parameters
+void adios_mpi_lustre_init (const PairStruct * parameters
                     ,struct adios_method_struct * method
                     )
 {
@@ -622,6 +632,17 @@ void adios_mpi_lustre_init (const char * parameters
     adios_buffer_struct_init (&md->b);
 }
 
+#ifdef SKEL_TIMING
+// Indices for the timer object
+int ADIOS_TIMER_MPI_LUSTRE_COMM = ADIOS_TIMING_MAX_USER_TIMERS + 0;
+int ADIOS_TIMER_MPI_LUSTRE_IO = ADIOS_TIMING_MAX_USER_TIMERS + 1;
+int ADIOS_TIMER_MPI_LUSTRE_MD = ADIOS_TIMING_MAX_USER_TIMERS + 2;
+int ADIOS_TIMER_MPI_LUSTRE_AD_WRITE = ADIOS_TIMING_MAX_USER_TIMERS + 3;
+int ADIOS_TIMER_MPI_LUSTRE_AD_CLOSE = ADIOS_TIMING_MAX_USER_TIMERS + 4;
+int ADIOS_TIMER_MPI_LUSTRE_AD_SHOULD_BUFFER = ADIOS_TIMING_MAX_USER_TIMERS + 5;
+#endif
+
+
 int adios_mpi_lustre_open (struct adios_file_struct * fd
                    ,struct adios_method_struct * method, void * comm
                    )
@@ -633,9 +654,34 @@ int adios_mpi_lustre_open (struct adios_file_struct * fd
     gettimeofday (&t0, NULL); // only used on rank == size - 1, but we don't
                               // have the comm yet to get the rank/size
 #endif
-    // we have to wait for the group_size (should_buffer) to get the comm
+    adios_var_to_comm (fd->group->group_comm
+                      ,fd->group->adios_host_language_fortran
+                      ,comm
+                      ,&md->group_comm
+                      );
+    if (md->group_comm != MPI_COMM_NULL)
+    {
+        MPI_Comm_rank (md->group_comm, &md->rank);
+        MPI_Comm_size (md->group_comm, &md->size);
+    }
+    fd->group->process_id = md->rank;
+
+#ifdef SKEL_TIMING
+    int timer_count = 6;
+    char ** timer_names = (char**) malloc (timer_count * sizeof (char*) );
+    timer_names [0] = "Communication";
+    timer_names [1] = "I/O";
+    timer_names [2] = "Metadata";
+    timer_names [3] = "ad_write";
+    timer_names [4] = "ad_close";
+    timer_names [5] = "ad_should_buffer";
+
+    fd->timing_obj = adios_timing_create (timer_count, timer_names);
+#endif
+
+    // we have to wait for the group_size (should_buffer) 
+    // to calculate stripe sizes from output sizes of the processes
     // before we can do an open for any of the modes
-    md->comm = comm;
 
     return 1;
 }
@@ -689,21 +735,12 @@ enum ADIOS_FLAG adios_mpi_lustre_should_buffer (struct adios_file_struct * fd
     gettimeofday (&t21, NULL);
 #endif
 
+	START_TIMER (ADIOS_TIMER_MPI_LUSTRE_AD_SHOULD_BUFFER);
+
+
     name = malloc (strlen (method->base_path) + strlen (fd->name) + 1);
     sprintf (name, "%s%s", method->base_path, fd->name);
 
-    adios_var_to_comm (fd->group->group_comm
-                      ,fd->group->adios_host_language_fortran
-                      ,md->comm
-                      ,&md->group_comm
-                      );
-    if (md->group_comm != MPI_COMM_NULL)
-    {
-        MPI_Comm_rank (md->group_comm, &md->rank);
-        MPI_Comm_size (md->group_comm, &md->size);
-    }
-    fd->group->process_id = md->rank;
-
     if (md->rank == md->size - 1)
         next = -1;
     else
@@ -817,7 +854,7 @@ enum ADIOS_FLAG adios_mpi_lustre_should_buffer (struct adios_file_struct * fd
                     MPI_Offset offset [3];
                     offset [0] = offset [1] = offset [2] = 0;
 
-                    MPI_Scatter (0, 0, 0
+                    MPI_Scatter (0, 3, MPI_LONG_LONG
                                 ,offset, 3, MPI_LONG_LONG
                                 ,0, md->group_comm
                                 );
@@ -939,11 +976,11 @@ enum ADIOS_FLAG adios_mpi_lustre_should_buffer (struct adios_file_struct * fd
                         offset = fd->write_size_bytes;
 
                     MPI_Gather (&offset, 1, MPI_LONG_LONG
-                               ,0, 0, 0
+                               ,0, 1, MPI_LONG_LONG
                                ,0, md->group_comm
                                );
 
-                    MPI_Scatter (0, 0, 0
+                    MPI_Scatter (0, 1, MPI_LONG_LONG
                                 ,&offset, 1, MPI_LONG_LONG
                                 ,0, md->group_comm
                                 );
@@ -1235,11 +1272,11 @@ enum ADIOS_FLAG adios_mpi_lustre_should_buffer (struct adios_file_struct * fd
 
 
                     MPI_Gather (&offset, 1, MPI_LONG_LONG
-                               ,0, 0, 0
+                               ,0, 1, MPI_LONG_LONG
                                ,0, md->group_comm
                                );
 
-                    MPI_Scatter (0, 0, 0
+                    MPI_Scatter (0, 1, MPI_LONG_LONG
                                 ,&offset, 1, MPI_LONG_LONG
                                 ,0, md->group_comm
                                 );
@@ -1356,6 +1393,8 @@ enum ADIOS_FLAG adios_mpi_lustre_should_buffer (struct adios_file_struct * fd
         adios_shared_buffer_free (&md->b);
     }
 
+	STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_AD_SHOULD_BUFFER);
+
 #if COLLECT_METRICS
     gettimeofday (&t22, NULL);
 #endif
@@ -1371,6 +1410,9 @@ void adios_mpi_lustre_write (struct adios_file_struct * fd
     struct adios_MPI_data_struct * md = (struct adios_MPI_data_struct *)
                                                       method->method_data;
 
+	START_TIMER (ADIOS_TIMER_MPI_LUSTRE_AD_WRITE);
+
+
     if (v->got_buffer == adios_flag_yes)
     {
         if (data != v->data)  // if the user didn't give back the same thing
@@ -1438,6 +1480,10 @@ void adios_mpi_lustre_write (struct adios_file_struct * fd
         fd->bytes_written = 0;
         adios_shared_buffer_free (&md->b);
     }
+
+	STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_AD_WRITE);
+
+
 #if COLLECT_METRICS
     static int writes_seen = 0;
 
@@ -1640,6 +1686,8 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
     static int iteration = 0;
 #endif
 
+	START_TIMER (ADIOS_TIMER_MPI_LUSTRE_AD_CLOSE);
+
     switch (fd->mode)
     {
         case adios_mode_read:
@@ -1675,12 +1723,14 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                 // fd->vars_start gets updated with the size written
                 uint64_t count;
                 int retlen;
+				START_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 count = adios_mpi_lustre_striping_unit_write(
                                   md->fh,
                                   md->vars_start,
                                   fd->buffer,
                                   md->vars_header_size,
                                   md->block_unit);
+				STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 if (count != md->vars_header_size)
                 {
                     fprintf (stderr, "d:MPI method tried to write %llu, "
@@ -1703,38 +1753,43 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                 fd->offset = 0;
                 fd->bytes_written = 0;
 
-                while (a)
-                {
-                    adios_write_attribute_v1 (fd, a);
-                    if (fd->base_offset + fd->bytes_written > fd->pg_start_in_file + fd->write_size_bytes)
-                        fprintf (stderr, "adios_mpi_write exceeds pg bound. File is corrupted. "
-                                         "Need to enlarge group size. \n");
-                    count = adios_mpi_lustre_striping_unit_write(
-                                      md->fh,
-                                      -1,
-                                      fd->buffer,
-                                      fd->bytes_written,
-                                      md->block_unit);
-                    if (count != fd->bytes_written)
+                if (!fd->group->process_id) { // from ADIOS 1.4, only rank 0 writes attributes
+                    while (a)
                     {
-                        fprintf (stderr, "e:MPI method tried to write %llu, "
-                                         "only wrote %llu\n"
-                                ,fd->bytes_written
-                                ,count
-                                );
-                    }
-                    fd->base_offset += count;
-                    fd->offset = 0;
-                    fd->bytes_written = 0;
-                    adios_shared_buffer_free (&md->b);
+                        adios_write_attribute_v1 (fd, a);
+                        if (fd->base_offset + fd->bytes_written > fd->pg_start_in_file + fd->write_size_bytes)
+                            fprintf (stderr, "adios_mpi_write exceeds pg bound. File is corrupted. "
+                                    "Need to enlarge group size. \n");
+                        START_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
+                        count = adios_mpi_lustre_striping_unit_write(
+                                md->fh,
+                                -1,
+                                fd->buffer,
+                                fd->bytes_written,
+                                md->block_unit);
+                        STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
+                        if (count != fd->bytes_written)
+                        {
+                            fprintf (stderr, "e:MPI method tried to write %llu, "
+                                    "only wrote %llu\n"
+                                    ,fd->bytes_written
+                                    ,count
+                                    );
+                        }
+                        fd->base_offset += count;
+                        fd->offset = 0;
+                        fd->bytes_written = 0;
+                        adios_shared_buffer_free (&md->b);
 
-                    a = a->next;
+                        a = a->next;
+                    }
                 }
 
                 // set it up so that it will start at 0, but have correct sizes
                 fd->offset = fd->base_offset - md->vars_start;
                 fd->vars_start = 0;
                 fd->buffer_size = 0;
+				START_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 adios_write_close_attributes_v1 (fd);
                 // fd->vars_start gets updated with the size written
                 count = adios_mpi_lustre_striping_unit_write(
@@ -1743,6 +1798,7 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                                   fd->buffer,
                                   md->vars_header_size,
                                   md->block_unit);
+				STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 if (count != md->vars_header_size)
                 {
                     fprintf (stderr, "f:MPI method tried to write %llu, "
@@ -1780,10 +1836,12 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                     uint32_t total_size = 0;
                     int i;
 
+					START_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
                     MPI_Gather (&size, 1, MPI_INT
                                ,index_sizes, 1, MPI_INT
                                ,0, md->group_comm
                                );
+					STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
 
                     for (i = 0; i < md->size; i++)
                     {
@@ -1793,10 +1851,12 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
 
                     recv_buffer = malloc (total_size);
 
+					START_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
                     MPI_Gatherv (&size, 0, MPI_BYTE
                                 ,recv_buffer, index_sizes, index_offsets
                                 ,MPI_BYTE, 0, md->group_comm
                                 );
+					STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
 
                     char * buffer_save = md->b.buff;
                     uint64_t buffer_size_save = md->b.length;
@@ -1812,9 +1872,12 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                                                            ,&new_pg_root
                                                            );
                         adios_parse_vars_index_v1 (&md->b, &new_vars_root);
+                        // do not merge attributes from other processes from 1.4
+                        /*
                         adios_parse_attributes_index_v1 (&md->b
                                                         ,&new_attrs_root
                                                         );
+                         */
                         adios_merge_index_v1 (&md->old_pg_root
                                              ,&md->old_vars_root
                                              ,&md->old_attrs_root
@@ -1841,6 +1904,7 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                                          ,md->old_attrs_root
                                          );
 
+					START_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
                     MPI_Gather (&buffer_size, 1, MPI_INT, 0, 0, MPI_INT
                                ,0, md->group_comm
                                );
@@ -1848,6 +1912,7 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                                 ,0, 0, 0, MPI_BYTE
                                 ,0, md->group_comm
                                 );
+					STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
                 }
             }
 
@@ -1861,12 +1926,14 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                     fprintf (stderr, "adios_mpi_write exceeds pg bound. File is corrupted. "
                              "Need to enlarge group size. \n");
 
+				START_TIMER (ADIOS_TIMER_MPI_LUSTRE_IO);
                 adios_mpi_lustre_striping_unit_write(
                                   md->fh,
                                   fd->base_offset,
                                   fd->buffer,
                                   fd->bytes_written,
                                   md->block_unit);
+				STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_IO);
             }
 
             if (md->rank == 0)
@@ -1878,12 +1945,14 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                                      );
                 adios_write_version_v1 (&buffer, &buffer_size, &buffer_offset);
 
+				START_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 adios_mpi_lustre_striping_unit_write(
                                   md->fh,
                                   md->b.pg_index_offset,
                                   buffer,
                                   buffer_offset,
                                   md->block_unit);
+				STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
             }
 #if COLLECT_METRICS
             gettimeofday (&t8, NULL);
@@ -1940,12 +2009,14 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                 adios_write_close_vars_v1 (fd);
                 // fd->vars_start gets updated with the size written
                 uint64_t count;
+				START_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 count = adios_mpi_lustre_striping_unit_write(
                                   md->fh,
                                   md->vars_start,
                                   fd->buffer,
                                   md->vars_header_size,
                                   md->block_unit);
+				STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 if (count != md->vars_header_size)
                 {
                     fprintf (stderr, "d:MPI method tried to write %llu, "
@@ -1968,29 +2039,33 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                 fd->offset = 0;
                 fd->bytes_written = 0;
 
-                while (a)
-                {
-                    adios_write_attribute_v1 (fd, a);
-                    count = adios_mpi_lustre_striping_unit_write(
-                                  md->fh,
-                                  -1,
-                                  fd->buffer,
-                                  fd->bytes_written,
-                                  md->block_unit);
-                    if (count != fd->bytes_written)
+                if (!fd->group->process_id) { // from ADIOS 1.4, only rank 0 writes attributes
+                    while (a)
                     {
-                        fprintf (stderr, "e:MPI method tried to write %llu, "
-                                         "only wrote %llu\n"
-                                ,fd->bytes_written
-                                ,count
-                                );
-                    }
-                    fd->base_offset += count;
-                    fd->offset = 0;
-                    fd->bytes_written = 0;
-                    adios_shared_buffer_free (&md->b);
+                        adios_write_attribute_v1 (fd, a);
+                        START_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
+                        count = adios_mpi_lustre_striping_unit_write(
+                                md->fh,
+                                -1,
+                                fd->buffer,
+                                fd->bytes_written,
+                                md->block_unit);
+                        STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
+                        if (count != fd->bytes_written)
+                        {
+                            fprintf (stderr, "e:MPI method tried to write %llu, "
+                                    "only wrote %llu\n"
+                                    ,fd->bytes_written
+                                    ,count
+                                    );
+                        }
+                        fd->base_offset += count;
+                        fd->offset = 0;
+                        fd->bytes_written = 0;
+                        adios_shared_buffer_free (&md->b);
 
-                    a = a->next;
+                        a = a->next;
+                    }
                 }
 
                 // set it up so that it will start at 0, but have correct sizes
@@ -1999,12 +2074,14 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                 fd->buffer_size = 0;
                 adios_write_close_attributes_v1 (fd);
                 // fd->vars_start gets updated with the size written
+				START_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 count = adios_mpi_lustre_striping_unit_write(
                                   md->fh,
                                   md->vars_start,
                                   fd->buffer,
                                   md->vars_header_size,
                                   md->block_unit);
+				STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 if (count != md->vars_header_size)
                 {
                     fprintf (stderr, "f:MPI method tried to write %llu, "
@@ -2033,10 +2110,12 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                     uint32_t total_size = 0;
                     int i;
 
+					START_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
                     MPI_Gather (&size, 1, MPI_INT
                                ,index_sizes, 1, MPI_INT
                                ,0, md->group_comm
                                );
+					STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
 
                     for (i = 0; i < md->size; i++)
                     {
@@ -2046,10 +2125,12 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
 
                     recv_buffer = malloc (total_size);
 
+					START_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
                     MPI_Gatherv (&size, 0, MPI_BYTE
                                 ,recv_buffer, index_sizes, index_offsets
                                 ,MPI_BYTE, 0, md->group_comm
                                 );
+					STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
 
                     char * buffer_save = md->b.buff;
                     uint64_t buffer_size_save = md->b.length;
@@ -2065,9 +2146,12 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                                                            ,&new_pg_root
                                                            );
                         adios_parse_vars_index_v1 (&md->b, &new_vars_root);
+                        // do not merge attributes from other processes from 1.4
+                        /*
                         adios_parse_attributes_index_v1 (&md->b
                                                         ,&new_attrs_root
                                                         );
+                         */
                         adios_merge_index_v1 (&md->old_pg_root
                                              ,&md->old_vars_root
                                              ,&md->old_attrs_root
@@ -2094,6 +2178,7 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                                          ,md->old_attrs_root
                                          );
 
+					START_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
                     MPI_Gather (&buffer_size, 1, MPI_INT, 0, 0, MPI_INT
                                ,0, md->group_comm
                                );
@@ -2101,18 +2186,21 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                                 ,0, 0, 0, MPI_BYTE
                                 ,0, md->group_comm
                                 );
+					STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_COMM);
                 }
             }
 
             if (fd->shared_buffer == adios_flag_yes)
             {
                 // everyone writes their data
+				START_TIMER (ADIOS_TIMER_MPI_LUSTRE_IO);
                 adios_mpi_lustre_striping_unit_write(
                                   md->fh,
                                   fd->base_offset,
                                   fd->buffer,
                                   fd->bytes_written,
                                   md->block_unit);
+				STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_IO);
             }
 
             if (md->rank == 0)
@@ -2124,12 +2212,14 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
                                      );
                 adios_write_version_v1 (&buffer, &buffer_size, &buffer_offset);
 
+				START_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
                 adios_mpi_lustre_striping_unit_write(
                                   md->fh,
                                   md->b.pg_index_offset,
                                   buffer,
                                   buffer_offset,
                                   md->block_unit);
+				STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_MD);
             }
 
             free (buffer);
@@ -2176,6 +2266,9 @@ void adios_mpi_lustre_close (struct adios_file_struct * fd
     md->old_pg_root = 0;
     md->old_vars_root = 0;
     md->old_attrs_root = 0;
+
+	STOP_TIMER (ADIOS_TIMER_MPI_LUSTRE_AD_CLOSE);
+
 #if COLLECT_METRICS
     print_metrics (md, iteration++);
 #endif
diff --git a/src/adios_nc4.c b/src/write/adios_nc4.c
similarity index 97%
rename from src/adios_nc4.c
rename to src/write/adios_nc4.c
index 4c16652..9d291c5 100644
--- a/src/adios_nc4.c
+++ b/src/write/adios_nc4.c
@@ -13,14 +13,14 @@
 #include <stdio.h>
 
 #include "mpi.h"
-#include "adios.h"
-#include "adios_types.h"
-#include "adios_bp_v1.h"
-#include "adios_transport_hooks.h"
-#include "adios_internals.h"
+#include "public/adios_types.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_internals.h"
+#include "core/util.h"
 #include "netcdf.h"
 
-#include "io_timer.h"
+#include "nssi/io_timer.h"
 
 
 #ifndef FALSE
@@ -329,7 +329,11 @@ static void parse_dimension_name(
 //			strcpy(dimname, group->time_index_name);
             sprintf(dimname, "%s_dim", group->time_index_name);
         } else {
-            dimname[0] = '\0';
+            if (dim->rank > 0) {
+                sprintf(dimname, "n%lld_dim", dim->rank);
+            } else {
+                dimname[0] = '\0';
+            }
         }
     }
 
@@ -579,7 +583,8 @@ static int decipher_dims(
     dims = pvar->dimensions;
     for (i=0;i<global_dim_count;i++) {
         parse_dimension_name(group, pvar_root, patt_root, &dims->global_dimension, dimname);
-        ncd_gen_name(nc4_global_dimnames[i], pvar->path, dimname);
+        //ncd_gen_name(nc4_global_dimnames[i], pvar->path, dimname);
+        ncd_gen_name(nc4_global_dimnames[i], "", dimname);
         if (DEBUG>3) printf("global_dimension[%d]->name==%s, ->rank==%llu, ->id==%d, time_index==%d\n",
                 i, nc4_global_dimnames[i], dims->global_dimension.rank, dims->global_dimension.id, dims->global_dimension.time_index);
         if (dims) {
@@ -589,7 +594,8 @@ static int decipher_dims(
     dims = pvar->dimensions;
     for (i=0;i<local_dim_count;i++) {
         parse_dimension_name(group, pvar_root, patt_root, &dims->dimension, dimname);
-        ncd_gen_name(nc4_local_dimnames[i], pvar->path, dimname);
+        //ncd_gen_name(nc4_local_dimnames[i], pvar->path, dimname);
+        ncd_gen_name(nc4_local_dimnames[i], "", dimname);
         if (DEBUG>3) printf("local_dimension[%d]->name ==%s, ->rank==%llu, ->id==%d, time_index==%d\n",
                 i, nc4_local_dimnames[i], dims->dimension.rank, dims->dimension.id, dims->dimension.time_index);
         if (dims) {
@@ -599,7 +605,8 @@ static int decipher_dims(
     dims = pvar->dimensions;
     for (i=0;i<local_offset_count;i++) {
         parse_dimension_name(group, pvar_root, patt_root, &dims->local_offset, dimname);
-        ncd_gen_name(nc4_local_offset_names[i], pvar->path, dimname);
+        //ncd_gen_name(nc4_local_offset_names[i], pvar->path, dimname);
+        ncd_gen_name(nc4_local_offset_names[i], "", dimname);
         if (DEBUG>3) printf("local_offset[%d]->name    ==%s, ->rank==%llu, ->id==%d, time_index==%d\n",
                 i, nc4_local_offset_names[i], dims->local_offset.rank, dims->local_offset.id, dims->local_offset.time_index);
         if (dims) {
@@ -619,7 +626,8 @@ static int decipher_dims(
             nc4_localdims[local_idx] = 1;
             nc4_offsets[loffs_idx] = 0;
             parse_dimension_name(group, pvar_root, patt_root, &dims->dimension, dimname);
-            ncd_gen_name(nc4_global_dimnames[global_idx], pvar->path, dimname);
+            //ncd_gen_name(nc4_global_dimnames[global_idx], pvar->path, dimname);
+            ncd_gen_name(nc4_global_dimnames[global_idx], "", dimname);
             strcpy(nc4_local_dimnames[local_idx], nc4_global_dimnames[global_idx]);
             strcpy(nc4_local_offset_names[loffs_idx], nc4_global_dimnames[global_idx]);
             if ((global_dim_count < local_dim_count) && (local_idx < local_dim_count)) {
@@ -631,7 +639,8 @@ static int decipher_dims(
             if (dimname[0] == '\0') {
                 sprintf(dimname, "local_%d", local_idx);
             }
-            ncd_gen_name(nc4_local_dimnames[local_idx], pvar->path, dimname);
+            //ncd_gen_name(nc4_local_dimnames[local_idx], pvar->path, dimname);
+            ncd_gen_name(nc4_local_dimnames[local_idx], "", dimname);
             parse_dimension_size(group, pvar_root, patt_root, &dims->dimension, &nc4_localdims[local_idx]);
         }
         if (myrank==0) {
@@ -643,7 +652,8 @@ static int decipher_dims(
             if (dimname[0] == '\0') {
                 sprintf(dimname, "global_%d", global_idx);
             }
-            ncd_gen_name(nc4_global_dimnames[global_idx], pvar->path, dimname);
+            //ncd_gen_name(nc4_global_dimnames[global_idx], pvar->path, dimname);
+            ncd_gen_name(nc4_global_dimnames[global_idx], "", dimname);
             parse_dimension_size(group, pvar_root, patt_root, &dims->global_dimension, &nc4_globaldims[global_idx]);
             if (myrank==0) {
                 if (DEBUG>3) printf(":g(%d)", nc4_globaldims[global_idx]);
@@ -655,7 +665,8 @@ static int decipher_dims(
             if (dimname[0] == '\0') {
                 sprintf(dimname, "offset_%d", loffs_idx);
             }
-            ncd_gen_name(nc4_local_offset_names[loffs_idx], pvar->path, dimname);
+            //ncd_gen_name(nc4_local_offset_names[loffs_idx], pvar->path, dimname);
+            ncd_gen_name(nc4_local_offset_names[loffs_idx], "", dimname);
             parse_dimension_size(group, pvar_root, patt_root, &dims->local_offset, &nc4_offsets[loffs_idx]);
             if (myrank==0) {
                 if (DEBUG>3) printf(":o(%d)", nc4_offsets[loffs_idx]);
@@ -997,6 +1008,8 @@ static int write_header(
         if (myrank==0) if (DEBUG>3) printf("\twriting fixed dimension array var!\n");
 
         if (var_exists == adios_flag_no) {
+
+#ifdef THIS_IS_UNDEFINED /* I do not think we need to define ADIOS local dimension variables in NC4 */
             for (i=0;i<deciphered_dims.local_dim_count;i++) {
                 Func_Timer("inqdim", rc = nc_inq_dimid(ncid, deciphered_dims.nc4_local_dimnames[i], &deciphered_dims.nc4_local_dimids[i]););
                 if (rc == NC_EBADDIM) {
@@ -1012,6 +1025,8 @@ static int write_header(
                     goto escape;
                 }
             }
+#endif
+
             for (i=0;i<deciphered_dims.global_dim_count;i++) {
                 Func_Timer("inqdim", rc = nc_inq_dimid(ncid, deciphered_dims.nc4_global_dimnames[i], &deciphered_dims.nc4_global_dimids[i]););
                 if (rc == NC_EBADDIM) {
@@ -1027,6 +1042,7 @@ static int write_header(
                     goto escape;
                 }
             }
+
             if (deciphered_dims.has_globaldims == adios_flag_yes) {
                 Func_Timer("defvar", rc = nc_def_var(ncid, fullname, nc4_type_id, deciphered_dims.global_dim_count, deciphered_dims.nc4_global_dimids, &nc4_varid););
                 if (rc != NC_NOERR) {
@@ -1316,7 +1332,7 @@ static void adios_var_to_comm_nc4(
     }
 }
 void adios_nc4_init(
-        const char *parameters,
+        const PairStruct *parameters,
         struct adios_method_struct *method)
 {
     struct adios_nc4_data_struct *md=NULL;
diff --git a/src/adios_nssi.c b/src/write/adios_nssi.c
similarity index 99%
rename from src/adios_nssi.c
rename to src/write/adios_nssi.c
index 1231a1f..de34a63 100644
--- a/src/adios_nssi.c
+++ b/src/write/adios_nssi.c
@@ -19,6 +19,7 @@
 #include "adios_bp_v1.h"
 #include "adios_transport_hooks.h"
 #include "adios_internals.h"
+#include "util.h"
 #ifdef HAVE_NSSI
 #include "nssi_client.h"
 #include "adios_nssi_args.h"
@@ -941,7 +942,7 @@ static void adios_var_to_comm_nssi(
 }
 
 void adios_nssi_init(
-        const char *parameters,
+        const PairStruct *parameters,
         struct adios_method_struct *method)
 {
     int rc=NSSI_OK;
diff --git a/src/adios_phdf5.c b/src/write/adios_phdf5.c
similarity index 94%
rename from src/adios_phdf5.c
rename to src/write/adios_phdf5.c
index f5efa7e..6f8d4b9 100644
--- a/src/adios_phdf5.c
+++ b/src/write/adios_phdf5.c
@@ -12,15 +12,17 @@
 #include <string.h>
 
 #include "mpi.h"
-#include "adios.h"
-#include "adios_types.h"
-#include "adios_bp_v1.h"
-#include "adios_transport_hooks.h"
-#include "adios_internals.h"
+#include "public/adios_types.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_transport_hooks.h"
+#include "core/adios_internals.h"
+#include "core/util.h"
 #ifdef PHDF5 
 #include "hdf5.h"
 #endif
 
+static const int debug=0;
+
 #define NUM_GP 24
 void adios_phdf5_end_iteration (struct adios_method_struct * method)
 {
@@ -44,7 +46,7 @@ void adios_phdf5_get_write_buffer (struct adios_file_struct * fd
 
 
 #ifndef PHDF5
-void adios_phdf5_init(const char *parameters
+void adios_phdf5_init(const PairStruct * parameters
                      ,struct adios_method_struct * method
                      ){}
 void adios_phdf5_finalize (int mype, struct adios_method_struct * method){}
@@ -77,7 +79,7 @@ int adios_getsize(enum ADIOS_DATATYPES type, void * val);
 
 // adios_flag determine whether it is dataset or group
 
-void hw_gopen (hid_t root_id, char * path, hid_t * grp_id, int * level,enum ADIOS_FLAG grpflag);
+void hw_gopen (hid_t root_id, char * path, hid_t * grp_id, int * level,enum ADIOS_FLAG *grpflag);
 void hw_gclose ( hid_t * grp_ids, int level, enum ADIOS_FLAG grpflag);
 
 int getH5TypeId ( enum ADIOS_DATATYPES type, hid_t* h5_type_id, enum ADIOS_FLAG);
@@ -140,7 +142,7 @@ static void adios_var_to_comm_phdf5 (enum ADIOS_FLAG host_language_fortran
         *comm = MPI_COMM_WORLD;
     }
 }
-void adios_phdf5_init(const char *parameters
+void adios_phdf5_init(const PairStruct * parameters
                      ,struct adios_method_struct * method
                      )
 {
@@ -251,18 +253,19 @@ void adios_phdf5_write (struct adios_file_struct * fd
                                                        method->method_data;
     if (fd->mode == adios_mode_write || fd->mode == adios_mode_append)
     {
-        if (md->rank==0) {
+        if (debug && md->rank==0) {
             fprintf(stderr, "-------------------------\n");
             fprintf(stderr, "write var: %s start!\n", v->name);
         }
         hw_var (md->root_id, fd->group->vars, fd->group->attributes
                  ,v, fd->group->adios_host_language_fortran,md->rank,md->size);
+        MPI_Barrier(md->comm);
     }
     else
     {
        //fprintf(stderr, "entering unknown phdf5 mode %d!\n", fd->mode);
     }
-    if (md->rank==0) {
+    if (debug && md->rank==0) {
         fprintf(stderr, "write var: %s end!\n", v->name);
         //fprintf(stderr, "-------------------------\n");
     }
@@ -320,7 +323,7 @@ void adios_phdf5_close (struct adios_file_struct * fd
     struct adios_attribute_struct * a = fd->group->attributes;
 
     if (fd->mode == adios_mode_read) {
-        if (md->rank==0) {
+        if (debug && md->rank==0) {
            fprintf(stderr, "-------------------------\n");
            fprintf(stderr, "reading done, phdf5 file is closed;\n");
            fprintf(stderr, "-------------------------\n");
@@ -337,7 +340,7 @@ void adios_phdf5_close (struct adios_file_struct * fd
                           ,md->size);
             a = a->next;
         }
-        if (md->rank==0) {
+        if (debug && md->rank==0) {
            fprintf(stderr, "-------------------------\n");
            fprintf(stderr, "writing done, phdf5 file is closed;\n");
            fprintf(stderr, "-------------------------\n");
@@ -377,12 +380,13 @@ int hw_attribute ( hid_t root_id
     hsize_t * h5_globaldims, * h5_localdims, * h5_offsets, * h5_strides; 
     struct adios_dimension_struct * dims;
     struct adios_var_struct * var_linked;
+    enum ADIOS_FLAG flag = adios_flag_unknown;
      
     h5_plist_id = H5Pcreate(H5P_DATASET_XFER);
     h5_plist_id=H5P_DEFAULT;  
  
     H5Pset_dxpl_mpio(h5_plist_id, H5FD_MPIO_COLLECTIVE); 
-    hw_gopen (root_id, patt->path,grp_ids, &level, adios_flag_yes);
+    hw_gopen (root_id, patt->path,grp_ids, &level, &flag);
     int err_code = 0;
     //printf("patt->type=%d patt->name : %s\n", patt->type, patt->name);
     if (patt->type == -1) {
@@ -393,7 +397,7 @@ int hw_attribute ( hid_t root_id
                         ,var_linked->name, var_linked->id);
                 err_code = -2;  
                 H5Pclose(h5_plist_id);
-                hw_gclose (grp_ids,level, adios_flag_yes);
+                hw_gclose (grp_ids,level, flag);
                 return err_code;
         }
         else
@@ -487,7 +491,7 @@ int hw_attribute ( hid_t root_id
         }
     }
     H5Pclose (h5_plist_id); 
-    hw_gclose (grp_ids,level, adios_flag_yes);
+    hw_gclose (grp_ids,level, flag);
     return err_code;
 } 
 int hr_var (hid_t root_id
@@ -504,6 +508,7 @@ int hr_var (hid_t root_id
     herr_t  status; 
     hid_t   h5_plist_id, h5_type_id, h5_dataspace_id, h5_dataset_id, h5_memspace_id, grp_ids[NUM_GP];
     struct adios_dimension_struct * dims = pvar->dimensions;
+    enum ADIOS_FLAG flag_yes = adios_flag_yes;
 
     h5_plist_id = H5Pcreate(H5P_DATASET_XFER);
     h5_plist_id = H5P_DEFAULT;
@@ -525,7 +530,7 @@ int hr_var (hid_t root_id
     //    sprintf (name, "%s/%s", name, pvar->name);
 
     if (pvar->path)
-        hw_gopen (root_id, pvar->path, grp_ids, &level, adios_flag_yes);
+        hw_gopen (root_id, pvar->path, grp_ids, &level, &flag_yes);
     //printf("root_id=%d, grd_ids[%d]=%d\n", root_id, level, grp_ids[level]); 
     // variable is scalar only need to read by every processor 
 
@@ -544,7 +549,7 @@ int hr_var (hid_t root_id
             fprintf (stderr, "PHDF5 ERROR: can not open dataset: %s in hr_var\n", pvar->name);
         H5Sclose (h5_dataspace_id);
         H5Tclose (h5_type_id);
-        hw_gclose (grp_ids,level, adios_flag_yes);
+        hw_gclose (grp_ids,level, flag_yes);
         return err_code; 
     }
 // variable is dataset
@@ -560,7 +565,7 @@ int hr_var (hid_t root_id
         hsize_t * h5_globaldims, * h5_localdims, * h5_offsets, * h5_strides; 
         hsize_t h5_gbstrides[2],h5_gbglobaldims[2], h5_gblocaldims[2], h5_gboffsets[2], *h5_gbdims;
         char name[256];
-        if(myrank==0)printf("\tenter global writing!\n");
+        if(debug && myrank==0)printf("\tenter global writing!\n");
         h5_gbdims = (hsize_t *)malloc(rank * 3 * sizeof(hsize_t));
         h5_strides = (hsize_t *) malloc (rank * sizeof(hsize_t));
 
@@ -689,6 +694,7 @@ int hw_var (hid_t root_id
     herr_t  status; 
     hid_t   h5_plist_id, h5_type_id, h5_dataspace_id, h5_dataset_id, h5_memspace_id, grp_ids[NUM_GP];
     struct adios_dimension_struct * dims = pvar->dimensions;
+    enum ADIOS_FLAG flag_yes = adios_flag_yes;
      
     h5_plist_id = H5Pcreate(H5P_DATASET_XFER);
     h5_plist_id=H5P_DEFAULT;   
@@ -711,9 +717,9 @@ int hw_var (hid_t root_id
     //for(i=0;i<nproc;i++)
     {
     if (pvar->path)
-        hw_gopen (root_id, pvar->path, grp_ids, &level, adios_flag_yes);
+        hw_gopen (root_id, pvar->path, grp_ids, &level, &flag_yes);
     }
-    // printf("root_id=%d, grp_id=%d\n", root_id, grp_ids[level]);
+    printf("root_id=%d, grp_id=%d\n", root_id, grp_ids[level]);
 
     if (!dims) {
         h5_dataspace_id = H5Screate(H5S_SCALAR);
@@ -739,7 +745,7 @@ int hw_var (hid_t root_id
         H5Sclose (h5_dataspace_id); 
         H5Tclose (h5_type_id);
         H5Pclose (h5_plist_id);
-        hw_gclose (grp_ids,level, adios_flag_yes);
+        hw_gclose (grp_ids,level, flag_yes);
         return 0;
     }// end of scalar read
 
@@ -754,7 +760,7 @@ int hw_var (hid_t root_id
 
         hsize_t h5_gbstrides[2], h5_gbglobaldims[2], h5_gblocaldims[2], h5_gboffsets[2];
         char name[256];
-        if(myrank==0)printf("\tenter global reading!\n");
+        if(debug&&myrank==0)printf("\tenter global reading!\n");
 
         h5_gbstrides [0] = 1;
         h5_gbstrides [1] = 1;
@@ -780,7 +786,7 @@ int hw_var (hid_t root_id
              h5_offsets[i] = parse_dimension (pvar_root, patt_root, &dims->local_offset);
              if (dims)
                  dims = dims -> next;
-             if (myrank==0) {
+             if (debug && myrank==0) {
                  printf("\t%s[%d]: g(%d):l(%d):o(%d)\n"
                        ,pvar->name,i
                        ,h5_globaldims[i]
@@ -1081,12 +1087,12 @@ void hw_gclose (hid_t * grp_id, int level, enum ADIOS_FLAG flag) {
 // adios_flag_no       dataset
 // adios_flag_unknown 
 
-void hw_gopen (hid_t root_id, char * path, hid_t * grp_id, int * level, enum ADIOS_FLAG flag) {
+void hw_gopen (hid_t root_id, char * path, hid_t * grp_id, int * level, enum ADIOS_FLAG *flag) {
 
-    if (flag == adios_flag_unknown) {
-        fprintf (stderr, "Unknown flag in hw_gclose!\n");
-        return;
-    }
+    //if (flag == adios_flag_unknown) {
+    //   fprintf (stderr, "Unknown flag in hw_gclose!\n");
+    //    return;
+    //}
     int i, idx = 0, len = 0;
     char * pch, ** grp_name, * tmpstr;
     tmpstr= (char *)malloc(strlen(path)+1);
@@ -1107,15 +1113,27 @@ void hw_gopen (hid_t root_id, char * path, hid_t * grp_id, int * level, enum ADI
     for ( i = 0; i < *level; i++) {
         grp_id [i + 1] = H5Gopen (grp_id [i],grp_name [i]);
         if (grp_id [i + 1] < 0) {
-            if ((i+1) == *level && (flag == adios_flag_no)) {
-                MPI_Barrier(MPI_COMM_WORLD);
+            if ((i+1) == *level && (*flag == adios_flag_unknown)) {
+                /* FIX: attribute may belong to a dataset or is a standalone thing */
+                //MPI_Barrier(MPI_COMM_WORLD);
+                grp_id [i + 1] = H5Dopen (grp_id [i],grp_name [i]);
+                if (grp_id [i + 1] < 0) {
+                    grp_id [i + 1] = H5Gcreate (grp_id [i], grp_name [i], 0);
+                    *flag = adios_flag_yes; // it is a (new) group
+                } else {
+                    *flag = adios_flag_no; // it is an existing dataset
+                }
+                //MPI_Barrier(MPI_COMM_WORLD);
+            }
+            if ((i+1) == *level && (*flag == adios_flag_no)) {
+                //MPI_Barrier(MPI_COMM_WORLD);
                 grp_id [i + 1] = H5Dopen (grp_id [i],grp_name [i]);
-                MPI_Barrier(MPI_COMM_WORLD);
+                //MPI_Barrier(MPI_COMM_WORLD);
             }
             else {
-                MPI_Barrier(MPI_COMM_WORLD);
+                //MPI_Barrier(MPI_COMM_WORLD);
                 grp_id [i + 1] = H5Gcreate (grp_id [i], grp_name [i], 0);
-                MPI_Barrier(MPI_COMM_WORLD);
+                //MPI_Barrier(MPI_COMM_WORLD);
 //                printf("creat grp:name[%d]=%s id=%d level=%d\n", i,grp_name[i],grp_id[i+1],*level);
             }
         }
diff --git a/src/adios_posix.c b/src/write/adios_posix.c
similarity index 88%
rename from src/adios_posix.c
rename to src/write/adios_posix.c
index 57e7d3e..a27c623 100644
--- a/src/adios_posix.c
+++ b/src/write/adios_posix.c
@@ -21,16 +21,30 @@
 // xml parser
 #include <mxml.h>
 
-#include "adios.h"
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
-#include "adios_internals.h"
-#include "buffer.h"
+#include "public/adios.h" // MPI or dummy MPI for seq. build
+#include "core/adios_transport_hooks.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_internals.h"
+#include "core/buffer.h"
+#include "core/util.h"
 
 #if defined(__APPLE__) 
 #    define O_LARGEFILE 0
 #endif
 
+#ifdef SKEL_TIMING
+#define START_TIMER(t) adios_timing_go (fd->timing_obj, (t) ) 
+#else
+#define START_TIMER(t) ; 
+#endif
+
+#ifdef SKEL_TIMING
+#define STOP_TIMER(t) adios_timing_stop (fd->timing_obj, (t) )
+#else
+#define STOP_TIMER(t) ;
+#endif
+
+
 static int adios_posix_initialized = 0;
 
 struct adios_POSIX_data_struct
@@ -149,7 +163,7 @@ static void adios_var_to_comm (const char * comm_name
 }
 #endif
 
-void adios_posix_init (const char * parameters
+void adios_posix_init (const PairStruct * parameters
                       ,struct adios_method_struct * method
                       )
 {
@@ -176,6 +190,18 @@ void adios_posix_init (const char * parameters
 #endif
 }
 
+
+// Indices for the timer object
+#ifdef SKEL_TIMING
+int ADIOS_TIMER_POSIX_COMM = ADIOS_TIMING_MAX_USER_TIMERS + 0;
+int ADIOS_TIMER_POSIX_IO = ADIOS_TIMING_MAX_USER_TIMERS + 1;
+int ADIOS_TIMER_POSIX_MD = ADIOS_TIMING_MAX_USER_TIMERS + 2;
+int ADIOS_TIMER_POSIX_AD_OPEN = ADIOS_TIMING_MAX_USER_TIMERS + 3;
+int ADIOS_TIMER_POSIX_AD_WRITE = ADIOS_TIMING_MAX_USER_TIMERS + 4;
+int ADIOS_TIMER_POSIX_AD_CLOSE = ADIOS_TIMING_MAX_USER_TIMERS + 5;
+int ADIOS_TIMER_POSIX_AD_SHOULD_BUFFER = ADIOS_TIMING_MAX_USER_TIMERS + 6;
+#endif
+
 int adios_posix_open (struct adios_file_struct * fd
                      ,struct adios_method_struct * method, void * comm
                      )
@@ -186,6 +212,23 @@ int adios_posix_open (struct adios_file_struct * fd
     char * name_with_rank, rank_string[16];
     struct adios_POSIX_data_struct * p = (struct adios_POSIX_data_struct *)
                                                           method->method_data;
+
+#ifdef SKEL_TIMING
+    int timer_count = 7;
+    char ** timer_names = (char**) malloc (timer_count * sizeof (char*) );
+    timer_names [0] = "Communication";
+    timer_names [1] = "I/O";
+    timer_names [2] = "Metadata";
+    timer_names [3] = "ad_open";
+    timer_names [4] = "ad_write";
+    timer_names [5] = "ad_close";
+    timer_names [6] = "ad_should_buffer";
+
+    fd->timing_obj = adios_timing_create (timer_count, timer_names);
+#endif
+
+START_TIMER (ADIOS_TIMER_POSIX_AD_OPEN);
+
 #ifdef HAVE_MPI
     // Need to figure out new the new fd->name, such as restart.bp.0, restart.bp.1....
     adios_var_to_comm (fd->group->group_comm
@@ -214,6 +257,7 @@ int adios_posix_open (struct adios_file_struct * fd
 
         MPI_Comm_rank (p->group_comm, &p->rank);
         MPI_Comm_size (p->group_comm, &p->size);
+        fd->group->process_id = p->rank;
 
         sprintf (rank_string, "%d", p->rank);
         // fd->name + '.' + MPI rank + '\0'
@@ -352,6 +396,7 @@ int adios_posix_open (struct adios_file_struct * fd
         }
 
         case adios_mode_append:
+        case adios_mode_update:
         {
             int old_file = 1;
 #ifdef HAVE_MPI
@@ -502,6 +547,8 @@ int adios_posix_open (struct adios_file_struct * fd
 
     free (subfile_name);
     free (mdfile_name);
+	
+	STOP_TIMER (ADIOS_TIMER_POSIX_AD_OPEN);
 
     return 1;
 }
@@ -513,13 +560,17 @@ enum ADIOS_FLAG adios_posix_should_buffer (struct adios_file_struct * fd
     struct adios_POSIX_data_struct * p = (struct adios_POSIX_data_struct *)
                                                           method->method_data;
 
+	START_TIMER (ADIOS_TIMER_POSIX_AD_SHOULD_BUFFER);
+
     if (fd->shared_buffer == adios_flag_no && fd->mode != adios_mode_read)
     {
         // write the process group header
         adios_write_process_group_header_v1 (fd, fd->write_size_bytes);
 
         lseek (p->b.f, fd->base_offset, SEEK_SET);
+		START_TIMER (ADIOS_TIMER_POSIX_MD);
         ssize_t s = write (p->b.f, fd->buffer, fd->bytes_written);
+		STOP_TIMER (ADIOS_TIMER_POSIX_MD);
         if (s != fd->bytes_written)
         {
             fprintf (stderr, "POSIX method tried to write %llu, "
@@ -544,6 +595,8 @@ enum ADIOS_FLAG adios_posix_should_buffer (struct adios_file_struct * fd
         adios_shared_buffer_free (&p->b);
     }
 
+	STOP_TIMER (ADIOS_TIMER_POSIX_AD_SHOULD_BUFFER);
+
     return fd->shared_buffer;   // buffer if there is space
 }
 
@@ -556,6 +609,8 @@ void adios_posix_write (struct adios_file_struct * fd
     struct adios_POSIX_data_struct * p = (struct adios_POSIX_data_struct *)
                                                           method->method_data;
 
+	START_TIMER (ADIOS_TIMER_POSIX_AD_WRITE);
+
     if (v->got_buffer == adios_flag_yes)
     {
         if (data != v->data)  // if the user didn't give back the same thing
@@ -577,7 +632,9 @@ void adios_posix_write (struct adios_file_struct * fd
     {
         // var payload sent for sizing information
         adios_write_var_header_v1 (fd, v);
+		START_TIMER (ADIOS_TIMER_POSIX_MD);
         ssize_t s = write (p->b.f, fd->buffer, fd->bytes_written);
+		STOP_TIMER (ADIOS_TIMER_POSIX_MD);
         if (s != fd->bytes_written)
         {
             fprintf (stderr, "POSIX method tried to write %llu, "
@@ -592,7 +649,7 @@ void adios_posix_write (struct adios_file_struct * fd
         adios_shared_buffer_free (&p->b);
 
         // write payload
-        // adios_write_var_payload_v1 (fd, v);
+        adios_write_var_payload_v1 (fd, v);
         uint64_t var_size = adios_get_var_size (v, fd->group, v->data);
         if (fd->base_offset + var_size > fd->pg_start_in_file + fd->write_size_bytes)
             fprintf (stderr, "adios_posix_write exceeds pg bound. File is corrupted. "
@@ -611,7 +668,9 @@ void adios_posix_write (struct adios_file_struct * fd
 
         while (bytes_written < var_size)
         {
+			START_TIMER (ADIOS_TIMER_POSIX_IO);
             bytes_written += write (p->b.f, v->data + bytes_written, to_write);
+			STOP_TIMER (ADIOS_TIMER_POSIX_IO);
             if (var_size > bytes_written)
             {
                 if (var_size - bytes_written > INT32_MAX)
@@ -625,7 +684,9 @@ void adios_posix_write (struct adios_file_struct * fd
             }
         }
 
-//        s = write (p->b.f, v->data, var_size);
+		START_TIMER (ADIOS_TIMER_POSIX_IO);
+        s = write (p->b.f, v->data, var_size);
+		STOP_TIMER (ADIOS_TIMER_POSIX_IO);
         s = bytes_written;
         if (s != var_size)
         {
@@ -640,6 +701,8 @@ void adios_posix_write (struct adios_file_struct * fd
         fd->bytes_written = 0;
         adios_shared_buffer_free (&p->b);
     }
+
+	STOP_TIMER (ADIOS_TIMER_POSIX_AD_WRITE);
 }
 
 void adios_posix_get_write_buffer (struct adios_file_struct * fd
@@ -764,6 +827,7 @@ static void adios_posix_do_write (struct adios_file_struct * fd
     // for append buffered, base_offset = start, fd->offset = size
     lseek (p->b.f, fd->base_offset + fd->offset, SEEK_SET);
     write (p->b.f, buffer, buffer_size);
+
 }
 
 static void adios_posix_do_read (struct adios_file_struct * fd
@@ -913,6 +977,8 @@ void adios_posix_close (struct adios_file_struct * fd
     struct adios_index_var_struct_v1 * new_vars_root = 0;
     struct adios_index_attribute_struct_v1 * new_attrs_root = 0;
 
+	START_TIMER (ADIOS_TIMER_POSIX_AD_CLOSE);
+
     switch (fd->mode)
     {
         case adios_mode_write:
@@ -928,7 +994,9 @@ void adios_posix_close (struct adios_file_struct * fd
                 adios_write_close_vars_v1 (fd);
                 // fd->vars_start gets updated with the size written
                 fd->offset = lseek (p->b.f, p->vars_start, SEEK_SET);
+				START_TIMER (ADIOS_TIMER_POSIX_IO);
                 ssize_t s = write (p->b.f, fd->buffer, p->vars_header_size);
+				STOP_TIMER (ADIOS_TIMER_POSIX_IO);
                 if (s != fd->vars_start)
                 {
                     fprintf (stderr, "POSIX method tried to write %llu, "
@@ -950,27 +1018,31 @@ void adios_posix_close (struct adios_file_struct * fd
                 fd->offset = 0;
                 fd->bytes_written = 0;
 
-                while (a)
-                {
-                    adios_write_attribute_v1 (fd, a);
-                    if (fd->base_offset + fd->bytes_written > fd->pg_start_in_file + fd->write_size_bytes)
-                        fprintf (stderr, "adios_posix_write exceeds pg bound. File is corrupted. "
-                                         "Need to enlarge group size. \n");
-                    ssize_t s = write (p->b.f, fd->buffer, fd->bytes_written);
-                    if (s != fd->bytes_written)
+                if (!fd->group->process_id) { // from ADIOS 1.4, only rank 0 writes attributes
+                    while (a)
                     {
-                        fprintf (stderr, "POSIX method tried to write %llu, "
-                                         "only wrote %llu\n"
-                                ,fd->bytes_written
-                                ,s
-                                );
-                    }
-                    fd->base_offset += s;
-                    fd->offset = 0;
-                    fd->bytes_written = 0;
-                    adios_shared_buffer_free (&p->b);
+                        adios_write_attribute_v1 (fd, a);
+                        if (fd->base_offset + fd->bytes_written > fd->pg_start_in_file + fd->write_size_bytes)
+                            fprintf (stderr, "adios_posix_write exceeds pg bound. File is corrupted. "
+                                    "Need to enlarge group size. \n");
+                        START_TIMER (ADIOS_TIMER_POSIX_MD);
+                        ssize_t s = write (p->b.f, fd->buffer, fd->bytes_written);
+                        STOP_TIMER (ADIOS_TIMER_POSIX_MD);
+                        if (s != fd->bytes_written)
+                        {
+                            fprintf (stderr, "POSIX method tried to write %llu, "
+                                    "only wrote %llu\n"
+                                    ,fd->bytes_written
+                                    ,s
+                                    );
+                        }
+                        fd->base_offset += s;
+                        fd->offset = 0;
+                        fd->bytes_written = 0;
+                        adios_shared_buffer_free (&p->b);
 
-                    a = a->next;
+                        a = a->next;
+                    }
                 }
 
                 // set it up so that it will start at 0, but have correct sizes
@@ -980,7 +1052,9 @@ void adios_posix_close (struct adios_file_struct * fd
                 adios_write_close_attributes_v1 (fd);
                 fd->offset = lseek (p->b.f, p->vars_start, SEEK_SET);
                 // fd->vars_start gets updated with the size written
+				START_TIMER (ADIOS_TIMER_POSIX_MD);
                 s = write (p->b.f, fd->buffer, p->vars_header_size);
+				STOP_TIMER (ADIOS_TIMER_POSIX_MD);
                 if (s != p->vars_header_size)
                 {
                     fprintf (stderr, "POSIX method tried to write %llu, "
@@ -1010,7 +1084,9 @@ void adios_posix_close (struct adios_file_struct * fd
                                  ,p->old_attrs_root
                                  );
             adios_write_version_v1 (&buffer, &buffer_size, &buffer_offset);
-            adios_posix_do_write (fd, method, buffer, buffer_offset);
+			START_TIMER (ADIOS_TIMER_POSIX_IO);
+            adios_posix_do_write (fd, method, buffer, buffer_offset); // Buffered vars written here
+			STOP_TIMER (ADIOS_TIMER_POSIX_IO);
 #ifdef HAVE_MPI
             if (p->group_comm != MPI_COMM_SELF)
             {
@@ -1022,10 +1098,12 @@ void adios_posix_close (struct adios_file_struct * fd
                     int i;
                     uint32_t size = 0, total_size = 0;
 
+					START_TIMER (ADIOS_TIMER_POSIX_COMM);
                     MPI_Gather (&size, 1, MPI_INT
                                ,index_sizes, 1, MPI_INT
                                ,0, p->group_comm
                                );
+					STOP_TIMER (ADIOS_TIMER_POSIX_COMM);
 
                     for (i = 0; i < p->size; i++)
                     {
@@ -1034,10 +1112,12 @@ void adios_posix_close (struct adios_file_struct * fd
                     }
 
                     recv_buffer = malloc (total_size);
+					START_TIMER (ADIOS_TIMER_POSIX_COMM);
                     MPI_Gatherv (&size, 0, MPI_BYTE
                                 ,recv_buffer, index_sizes, index_offsets
                                 ,MPI_BYTE, 0, p->group_comm
                                 );
+					STOP_TIMER (ADIOS_TIMER_POSIX_COMM);
 
                     char * buffer_save = p->b.buff;
                     uint64_t buffer_size_save = p->b.length;
@@ -1053,9 +1133,12 @@ void adios_posix_close (struct adios_file_struct * fd
                                                            ,&new_pg_root
                                                            );
                         adios_parse_vars_index_v1 (&p->b, &new_vars_root);
+                        // do not merge attributes from other processes from 1.4
+                        /*
                         adios_parse_attributes_index_v1 (&p->b
                                                         ,&new_attrs_root
                                                         );
+                        */
 
                         adios_merge_index_v1 (&p->old_pg_root
                                              ,&p->old_vars_root
@@ -1094,7 +1177,9 @@ void adios_posix_close (struct adios_file_struct * fd
                                                 ,&global_index_buffer_offset
                                                 ,flag
                                                 );
+					START_TIMER (ADIOS_TIMER_POSIX_MD);
                     ssize_t s = write (p->mf, global_index_buffer, global_index_buffer_offset);
+					STOP_TIMER (ADIOS_TIMER_POSIX_MD);
                     if (s != global_index_buffer_offset)
                     {
                         fprintf (stderr, "POSIX method tried to write %llu, "
@@ -1108,6 +1193,7 @@ void adios_posix_close (struct adios_file_struct * fd
                 }
                 else
                 {
+					START_TIMER (ADIOS_TIMER_POSIX_COMM);
 					// Added this explicit cast to avoid truncation of low-order bytes on BGP
 					int i_buffer_size = (int) buffer_size;
                     MPI_Gather (&i_buffer_size, 1, MPI_INT
@@ -1119,6 +1205,7 @@ void adios_posix_close (struct adios_file_struct * fd
                                 ,0, 0, 0, MPI_BYTE
                                 ,0, p->group_comm
                                 );
+					STOP_TIMER (ADIOS_TIMER_POSIX_COMM);
                 }
             }
 #endif
@@ -1130,6 +1217,7 @@ void adios_posix_close (struct adios_file_struct * fd
         }
 
         case adios_mode_append:
+        case adios_mode_update:
         {
             if (fd->shared_buffer == adios_flag_no)
             {
@@ -1142,7 +1230,9 @@ void adios_posix_close (struct adios_file_struct * fd
                 adios_write_close_vars_v1 (fd);
                 // fd->vars_start gets updated with the size written
                 fd->offset = lseek (p->b.f, p->vars_start, SEEK_SET);
+				START_TIMER (ADIOS_TIMER_POSIX_IO);
                 ssize_t s = write (p->b.f, fd->buffer, p->vars_header_size);
+				STOP_TIMER (ADIOS_TIMER_POSIX_IO);
                 if (s != fd->vars_start)
                 {
                     fprintf (stderr, "POSIX method tried to write %llu, "
@@ -1164,24 +1254,28 @@ void adios_posix_close (struct adios_file_struct * fd
                 fd->offset = 0;
                 fd->bytes_written = 0;
 
-                while (a)
-                {
-                    adios_write_attribute_v1 (fd, a);
-                    ssize_t s = write (p->b.f, fd->buffer, fd->bytes_written);
-                    if (s != fd->bytes_written)
+                if (!fd->group->process_id) { // from ADIOS 1.4, only rank 0 writes attributes
+                    while (a)
                     {
-                        fprintf (stderr, "POSIX method tried to write %llu, "
-                                         "only wrote %llu\n"
-                                ,fd->bytes_written
-                                ,s
-                                );
-                    }
-                    fd->base_offset += s;
-                    fd->offset = 0;
-                    fd->bytes_written = 0;
-                    adios_shared_buffer_free (&p->b);
+                        adios_write_attribute_v1 (fd, a);
+                        START_TIMER (ADIOS_TIMER_POSIX_MD);
+                        ssize_t s = write (p->b.f, fd->buffer, fd->bytes_written);
+                        STOP_TIMER (ADIOS_TIMER_POSIX_MD);
+                        if (s != fd->bytes_written)
+                        {
+                            fprintf (stderr, "POSIX method tried to write %llu, "
+                                    "only wrote %llu\n"
+                                    ,fd->bytes_written
+                                    ,s
+                                    );
+                        }
+                        fd->base_offset += s;
+                        fd->offset = 0;
+                        fd->bytes_written = 0;
+                        adios_shared_buffer_free (&p->b);
 
-                    a = a->next;
+                        a = a->next;
+                    }
                 }
 
                 // set it up so that it will start at 0, but have correct sizes
@@ -1191,7 +1285,9 @@ void adios_posix_close (struct adios_file_struct * fd
                 adios_write_close_attributes_v1 (fd);
                 fd->offset = lseek (p->b.f, p->vars_start, SEEK_SET);
                 // fd->vars_start gets updated with the size written
+				START_TIMER (ADIOS_TIMER_POSIX_MD);
                 s = write (p->b.f, fd->buffer, p->vars_header_size);
+				STOP_TIMER (ADIOS_TIMER_POSIX_MD);
                 if (s != p->vars_header_size)
                 {
                     fprintf (stderr, "POSIX method tried to write %llu, "
@@ -1228,10 +1324,12 @@ void adios_posix_close (struct adios_file_struct * fd
                     int i;
                     uint32_t size = 0, total_size = 0;
 
+					START_TIMER (ADIOS_TIMER_POSIX_COMM);
                     MPI_Gather (&size, 1, MPI_INT
                                ,index_sizes, 1, MPI_INT
                                ,0, p->group_comm
                                );
+					STOP_TIMER (ADIOS_TIMER_POSIX_COMM);
 
                     for (i = 0; i < p->size; i++)
                     {
@@ -1240,10 +1338,13 @@ void adios_posix_close (struct adios_file_struct * fd
                     }
 
                     recv_buffer = malloc (total_size);
+
+					START_TIMER (ADIOS_TIMER_POSIX_COMM);
                     MPI_Gatherv (&size, 0, MPI_BYTE
                                 ,recv_buffer, index_sizes, index_offsets
                                 ,MPI_BYTE, 0, p->group_comm
                                 );
+					STOP_TIMER (ADIOS_TIMER_POSIX_COMM);
 
                     char * buffer_save = p->b.buff;
                     uint64_t buffer_size_save = p->b.length;
@@ -1259,9 +1360,12 @@ void adios_posix_close (struct adios_file_struct * fd
                                                            ,&new_pg_root
                                                            );
                         adios_parse_vars_index_v1 (&p->b, &new_vars_root);
+                        // do not merge attributes from other processes from 1.4
+                        /*
                         adios_parse_attributes_index_v1 (&p->b
                                                         ,&new_attrs_root
                                                         );
+                         */
 
                         adios_merge_index_v1 (&p->old_pg_root
                                              ,&p->old_vars_root
@@ -1307,7 +1411,9 @@ void adios_posix_close (struct adios_file_struct * fd
                                                 ,flag
                                                 );
 
+					START_TIMER (ADIOS_TIMER_POSIX_MD);
                     ssize_t s = write (p->mf, global_index_buffer, global_index_buffer_offset);
+					STOP_TIMER (ADIOS_TIMER_POSIX_MD);
                     if (s != global_index_buffer_offset)
                     {
                         fprintf (stderr, "POSIX method tried to write %llu, "
@@ -1323,6 +1429,7 @@ void adios_posix_close (struct adios_file_struct * fd
                 }
                 else
                 {
+					START_TIMER (ADIOS_TIMER_POSIX_COMM);
                     MPI_Gather (&buffer_size, 1, MPI_INT
                                ,0, 0, MPI_INT
                                ,0, p->group_comm
@@ -1332,11 +1439,14 @@ void adios_posix_close (struct adios_file_struct * fd
                                 ,0, 0, 0, MPI_BYTE
                                 ,0, p->group_comm
                                 );
+					STOP_TIMER (ADIOS_TIMER_POSIX_COMM);
                 }
             }
 #endif
             adios_write_version_v1 (&buffer, &buffer_size, &buffer_offset);
+			START_TIMER (ADIOS_TIMER_POSIX_MD);
             adios_posix_do_write (fd, method, buffer, buffer_offset);
+			STOP_TIMER (ADIOS_TIMER_POSIX_MD);
 
             free (buffer);
 
@@ -1370,6 +1480,9 @@ void adios_posix_close (struct adios_file_struct * fd
     p->old_pg_root = 0;
     p->old_vars_root = 0;
     p->old_attrs_root = 0;
+
+	STOP_TIMER (ADIOS_TIMER_POSIX_AD_CLOSE);
+
 }
 
 void adios_posix_finalize (int mype, struct adios_method_struct * method)
diff --git a/src/adios_posix1.c b/src/write/adios_posix1.c
similarity index 99%
rename from src/adios_posix1.c
rename to src/write/adios_posix1.c
index 316290c..1afd8a1 100644
--- a/src/adios_posix1.c
+++ b/src/write/adios_posix1.c
@@ -20,11 +20,12 @@
 // xml parser
 #include <mxml.h>
 
-#include "adios.h"
-#include "adios_transport_hooks.h"
-#include "adios_bp_v1.h"
-#include "adios_internals.h"
-#include "buffer.h"
+#include "public/adios.h" // MPI or dummy MPI
+#include "core/adios_transport_hooks.h"
+#include "core/adios_bp_v1.h"
+#include "core/adios_internals.h"
+#include "core/buffer.h"
+#include "core/util.h"
 
 static int adios_posix1_initialized = 0;
 
@@ -42,7 +43,7 @@ struct adios_POSIX1_data_struct
     uint64_t vars_header_size;
 };
 
-void adios_posix1_init (const char * parameters
+void adios_posix1_init (const PairStruct * parameters
                       ,struct adios_method_struct * method
                       )
 {
diff --git a/tests/C/Makefile.am b/tests/C/Makefile.am
index f4fe2e0..8a64259 100644
--- a/tests/C/Makefile.am
+++ b/tests/C/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
diff --git a/tests/C/Makefile.in b/tests/C/Makefile.in
index 1bae90e..5f62858 100644
--- a/tests/C/Makefile.in
+++ b/tests/C/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ noinst_PROGRAMS = adios_test_c$(EXEEXT)
 subdir = tests/C
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,23 +62,28 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_adios_test_c_OBJECTS = adios_test_c-adios_test_c.$(OBJEXT)
 adios_test_c_OBJECTS = $(am_adios_test_c_OBJECTS)
 am__DEPENDENCIES_1 =
 adios_test_c_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+adios_test_c_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(adios_test_c_CFLAGS) \
+	$(CFLAGS) $(adios_test_c_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(adios_test_c_SOURCES)
 DIST_SOURCES = $(adios_test_c_SOURCES)
 ETAGS = etags
@@ -106,32 +111,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -140,72 +145,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -216,11 +196,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -228,7 +208,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -254,26 +237,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -285,29 +261,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 adios_test_c_SOURCES = adios_test_c.c
 adios_test_c_CPPFLAGS = $(ADIOSLIB_CPPFLAGS)
@@ -324,14 +314,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/C/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  tests/C/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/C/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu tests/C/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -349,16 +339,19 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 adios_test_c$(EXEEXT): $(adios_test_c_OBJECTS) $(adios_test_c_DEPENDENCIES) 
 	@rm -f adios_test_c$(EXEEXT)
-	$(LINK) $(adios_test_c_LDFLAGS) $(adios_test_c_OBJECTS) $(adios_test_c_LDADD) $(LIBS)
+	$(adios_test_c_LINK) $(adios_test_c_OBJECTS) $(adios_test_c_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -387,82 +380,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -491,6 +487,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -503,7 +500,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -511,18 +508,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -542,19 +559,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/Fortran/Makefile.in b/tests/Fortran/Makefile.in
index 4305d77..3701327 100644
--- a/tests/Fortran/Makefile.in
+++ b/tests/Fortran/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ noinst_PROGRAMS = adios_test_f$(EXEEXT)
 subdir = tests/Fortran
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,20 +62,24 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_adios_test_f_OBJECTS = adios_test_f-adios_test_f.$(OBJEXT)
 adios_test_f_OBJECTS = $(am_adios_test_f_OBJECTS)
 am__DEPENDENCIES_1 =
 adios_test_f_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+adios_test_f_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(adios_test_f_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
 FCLD = $(FC)
 SOURCES = $(adios_test_f_SOURCES)
 DIST_SOURCES = $(adios_test_f_SOURCES)
@@ -104,32 +108,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -138,72 +142,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = $(MPIFC)
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -214,11 +193,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -226,7 +205,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -252,26 +234,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -283,28 +258,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 INCLUDES = $(all_includes) -I$(top_builddir)/src
 AUTOMAKE_OPTIONS = no-dependencies
 
@@ -327,14 +315,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Fortran/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  tests/Fortran/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Fortran/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu tests/Fortran/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -352,16 +340,19 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 adios_test_f$(EXEEXT): $(adios_test_f_OBJECTS) $(adios_test_f_DEPENDENCIES) 
 	@rm -f adios_test_f$(EXEEXT)
-	$(FCLINK) $(adios_test_f_LDFLAGS) $(adios_test_f_OBJECTS) $(adios_test_f_LDADD) $(LIBS)
+	$(adios_test_f_LINK) $(adios_test_f_OBJECTS) $(adios_test_f_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -390,82 +381,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -493,6 +487,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -505,7 +500,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -513,18 +508,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -544,19 +559,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 392ad0c..c6dc738 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,7 +36,9 @@ host_triplet = @host@
 subdir = tests
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -60,18 +60,50 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = C bp_read suite Fortran genarray
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 ADIOSLIB_CFLAGS = @ADIOSLIB_CFLAGS@
 ADIOSLIB_CPPFLAGS = @ADIOSLIB_CPPFLAGS@
@@ -94,32 +126,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -128,72 +160,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -204,11 +211,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -216,7 +223,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -242,26 +252,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -273,28 +276,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUITEDIR = suite
 @BUILD_FORTRAN_FALSE@@BUILD_WRITE_TRUE at SUBDIRS = C bp_read ${SUITEDIR}
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at SUBDIRS = C Fortran genarray bp_read ${SUITEDIR}
@@ -305,14 +321,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  tests/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu tests/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -330,6 +346,7 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -337,10 +354,6 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -348,7 +361,7 @@ uninstall-info-am:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -365,16 +378,15 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -400,16 +412,16 @@ maintainer-clean-recursive:
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -417,14 +429,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -436,81 +448,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -540,6 +572,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -550,8 +583,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -559,18 +591,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -589,22 +641,25 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/bp_read/Makefile.am b/tests/bp_read/Makefile.am
index 1aedc33..adc3a9b 100644
--- a/tests/bp_read/Makefile.am
+++ b/tests/bp_read/Makefile.am
@@ -1,10 +1,10 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src #-I/ccs/home/sklasky/parallel-netcdf/jaguar/include
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
 if BUILD_FORTRAN
-noinst_PROGRAMS=genbp bp_read_f bp_read_c
+noinst_PROGRAMS=genbp bp_read_f bp_read_f_v1 bp_read_c
 else
 noinst_PROGRAMS=genbp bp_read_c
 endif
@@ -23,10 +23,16 @@ bp_read_f_CPPFLAGS = $(ADIOSLIB_CPPFLAGS)
 bp_read_f_CFLAGS = $(ADIOSLIB_CFLAGS)
 bp_read_f_LDADD = $(top_builddir)/src/libadiosreadf.a $(ADIOSREADLIB_LDADD)
 bp_read_f_LDFLAGS = $(ADIOSREADLIB_LDFLAGS) 
+
+bp_read_f_v1_SOURCES = bp_read_f_v1.F90
+bp_read_f_v1_CPPFLAGS = $(ADIOSLIB_CPPFLAGS)
+bp_read_f_v1_CFLAGS = $(ADIOSLIB_CFLAGS)
+bp_read_f_v1_LDADD = $(top_builddir)/src/libadiosreadf_v1.a $(ADIOSREADLIB_LDADD)
+bp_read_f_v1_LDFLAGS = $(ADIOSREADLIB_LDFLAGS) 
 endif
 
 bp_read_c_SOURCES = bp_read_c.c
-bp_read_c_CPPFLAGS = $(ADIOSLIB_CPPFLAGS)
+bp_read_c_CPPFLAGS = -DADIOS_USE_READ_API_1 $(ADIOSLIB_CPPFLAGS)
 bp_read_c_CFLAGS = $(ADIOSLIB_CFLAGS)
 bp_read_c_LDADD = $(top_builddir)/src/libadiosread.a $(ADIOSREADLIB_LDADD)
 bp_read_c_LDFLAGS = $(ADIOSREADLIB_LDFLAGS) 
diff --git a/tests/bp_read/Makefile.in b/tests/bp_read/Makefile.in
index 700d363..9243251 100644
--- a/tests/bp_read/Makefile.in
+++ b/tests/bp_read/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -39,11 +37,14 @@ host_triplet = @host@
 @BUILD_FORTRAN_FALSE at noinst_PROGRAMS = genbp$(EXEEXT) \
 @BUILD_FORTRAN_FALSE@	bp_read_c$(EXEEXT)
 @BUILD_FORTRAN_TRUE at noinst_PROGRAMS = genbp$(EXEEXT) \
- at BUILD_FORTRAN_TRUE@	bp_read_f$(EXEEXT) bp_read_c$(EXEEXT)
+ at BUILD_FORTRAN_TRUE@	bp_read_f$(EXEEXT) bp_read_f_v1$(EXEEXT) \
+ at BUILD_FORTRAN_TRUE@	bp_read_c$(EXEEXT)
 subdir = tests/bp_read
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -65,12 +66,16 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_bp_read_c_OBJECTS = bp_read_c-bp_read_c.$(OBJEXT)
 bp_read_c_OBJECTS = $(am_bp_read_c_OBJECTS)
 am__DEPENDENCIES_1 =
 bp_read_c_DEPENDENCIES = $(top_builddir)/src/libadiosread.a \
 	$(am__DEPENDENCIES_1)
+bp_read_c_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(bp_read_c_CFLAGS) \
+	$(CFLAGS) $(bp_read_c_LDFLAGS) $(LDFLAGS) -o $@
 am__bp_read_f_SOURCES_DIST = bp_read_f.F90
 @BUILD_FORTRAN_TRUE at am_bp_read_f_OBJECTS =  \
 @BUILD_FORTRAN_TRUE@	bp_read_f-bp_read_f.$(OBJEXT)
@@ -78,30 +83,48 @@ bp_read_f_OBJECTS = $(am_bp_read_f_OBJECTS)
 @BUILD_FORTRAN_TRUE at bp_read_f_DEPENDENCIES =  \
 @BUILD_FORTRAN_TRUE@	$(top_builddir)/src/libadiosreadf.a \
 @BUILD_FORTRAN_TRUE@	$(am__DEPENDENCIES_1)
+bp_read_f_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(bp_read_f_LDFLAGS) $(LDFLAGS) -o $@
+am__bp_read_f_v1_SOURCES_DIST = bp_read_f_v1.F90
+ at BUILD_FORTRAN_TRUE@am_bp_read_f_v1_OBJECTS =  \
+ at BUILD_FORTRAN_TRUE@	bp_read_f_v1-bp_read_f_v1.$(OBJEXT)
+bp_read_f_v1_OBJECTS = $(am_bp_read_f_v1_OBJECTS)
+ at BUILD_FORTRAN_TRUE@bp_read_f_v1_DEPENDENCIES =  \
+ at BUILD_FORTRAN_TRUE@	$(top_builddir)/src/libadiosreadf_v1.a \
+ at BUILD_FORTRAN_TRUE@	$(am__DEPENDENCIES_1)
+bp_read_f_v1_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(bp_read_f_v1_LDFLAGS) $(LDFLAGS) -o $@
 am_genbp_OBJECTS = genbp-genbp.$(OBJEXT)
 genbp_OBJECTS = $(am_genbp_OBJECTS)
 genbp_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(top_builddir)/src/libadiosread.a $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+genbp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(genbp_CFLAGS) $(CFLAGS) $(genbp_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
 FCLD = $(FC)
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(bp_read_c_SOURCES) $(bp_read_f_SOURCES) $(genbp_SOURCES)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(bp_read_c_SOURCES) $(bp_read_f_SOURCES) \
+	$(bp_read_f_v1_SOURCES) $(genbp_SOURCES)
 DIST_SOURCES = $(bp_read_c_SOURCES) $(am__bp_read_f_SOURCES_DIST) \
-	$(genbp_SOURCES)
+	$(am__bp_read_f_v1_SOURCES_DIST) $(genbp_SOURCES)
 ETAGS = etags
 CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -127,32 +150,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -161,72 +184,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = $(MPIFC)
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -237,11 +235,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -249,7 +247,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -275,26 +276,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -306,30 +300,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 INCLUDES = $(all_includes) -I$(top_builddir)/src \
-	#-I/ccs/home/sklasky/parallel-netcdf/jaguar/include
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 
 # read_coords read_phi read_parts_global read_gena read_gena_pncd read_pixie_all
@@ -343,8 +350,13 @@ genbp_LDFLAGS = $(ADIOSLIB_LDFLAGS)
 @BUILD_FORTRAN_TRUE at bp_read_f_CFLAGS = $(ADIOSLIB_CFLAGS)
 @BUILD_FORTRAN_TRUE at bp_read_f_LDADD = $(top_builddir)/src/libadiosreadf.a $(ADIOSREADLIB_LDADD)
 @BUILD_FORTRAN_TRUE at bp_read_f_LDFLAGS = $(ADIOSREADLIB_LDFLAGS) 
+ at BUILD_FORTRAN_TRUE@bp_read_f_v1_SOURCES = bp_read_f_v1.F90
+ at BUILD_FORTRAN_TRUE@bp_read_f_v1_CPPFLAGS = $(ADIOSLIB_CPPFLAGS)
+ at BUILD_FORTRAN_TRUE@bp_read_f_v1_CFLAGS = $(ADIOSLIB_CFLAGS)
+ at BUILD_FORTRAN_TRUE@bp_read_f_v1_LDADD = $(top_builddir)/src/libadiosreadf_v1.a $(ADIOSREADLIB_LDADD)
+ at BUILD_FORTRAN_TRUE@bp_read_f_v1_LDFLAGS = $(ADIOSREADLIB_LDFLAGS) 
 bp_read_c_SOURCES = bp_read_c.c
-bp_read_c_CPPFLAGS = $(ADIOSLIB_CPPFLAGS)
+bp_read_c_CPPFLAGS = -DADIOS_USE_READ_API_1 $(ADIOSLIB_CPPFLAGS)
 bp_read_c_CFLAGS = $(ADIOSLIB_CFLAGS)
 bp_read_c_LDADD = $(top_builddir)/src/libadiosread.a $(ADIOSREADLIB_LDADD)
 bp_read_c_LDFLAGS = $(ADIOSREADLIB_LDFLAGS) 
@@ -362,14 +374,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/bp_read/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  tests/bp_read/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bp_read/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu tests/bp_read/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -387,22 +399,28 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 bp_read_c$(EXEEXT): $(bp_read_c_OBJECTS) $(bp_read_c_DEPENDENCIES) 
 	@rm -f bp_read_c$(EXEEXT)
-	$(LINK) $(bp_read_c_LDFLAGS) $(bp_read_c_OBJECTS) $(bp_read_c_LDADD) $(LIBS)
+	$(bp_read_c_LINK) $(bp_read_c_OBJECTS) $(bp_read_c_LDADD) $(LIBS)
 bp_read_f$(EXEEXT): $(bp_read_f_OBJECTS) $(bp_read_f_DEPENDENCIES) 
 	@rm -f bp_read_f$(EXEEXT)
-	$(FCLINK) $(bp_read_f_LDFLAGS) $(bp_read_f_OBJECTS) $(bp_read_f_LDADD) $(LIBS)
+	$(bp_read_f_LINK) $(bp_read_f_OBJECTS) $(bp_read_f_LDADD) $(LIBS)
+bp_read_f_v1$(EXEEXT): $(bp_read_f_v1_OBJECTS) $(bp_read_f_v1_DEPENDENCIES) 
+	@rm -f bp_read_f_v1$(EXEEXT)
+	$(bp_read_f_v1_LINK) $(bp_read_f_v1_OBJECTS) $(bp_read_f_v1_LDADD) $(LIBS)
 genbp$(EXEEXT): $(genbp_OBJECTS) $(genbp_DEPENDENCIES) 
 	@rm -f genbp$(EXEEXT)
-	$(LINK) $(genbp_LDFLAGS) $(genbp_OBJECTS) $(genbp_LDADD) $(LIBS)
+	$(genbp_LINK) $(genbp_OBJECTS) $(genbp_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -425,6 +443,12 @@ bp_read_f-bp_read_f.o: bp_read_f.F90
 bp_read_f-bp_read_f.obj: bp_read_f.F90
 	$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bp_read_f_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o bp_read_f-bp_read_f.obj `if test -f 'bp_read_f.F90'; then $(CYGPATH_W) 'bp_read_f.F90'; else $(CYGPATH_W) '$(srcdir)/bp_read_f.F90'; fi`
 
+bp_read_f_v1-bp_read_f_v1.o: bp_read_f_v1.F90
+	$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bp_read_f_v1_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o bp_read_f_v1-bp_read_f_v1.o `test -f 'bp_read_f_v1.F90' || echo '$(srcdir)/'`bp_read_f_v1.F90
+
+bp_read_f_v1-bp_read_f_v1.obj: bp_read_f_v1.F90
+	$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bp_read_f_v1_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS) -c -o bp_read_f_v1-bp_read_f_v1.obj `if test -f 'bp_read_f_v1.F90'; then $(CYGPATH_W) 'bp_read_f_v1.F90'; else $(CYGPATH_W) '$(srcdir)/bp_read_f_v1.F90'; fi`
+
 .c.o:
 	$(COMPILE) -c $<
 
@@ -452,82 +476,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -556,6 +583,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -568,7 +596,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -576,18 +604,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -607,19 +655,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/bp_read/bp_read_f.F90 b/tests/bp_read/bp_read_f.F90
index 18c1e61..713a2e0 100644
--- a/tests/bp_read/bp_read_f.F90
+++ b/tests/bp_read/bp_read_f.F90
@@ -6,15 +6,25 @@
 !
 
 program read_bp_f
+    use adios_read_mod
     implicit none
     include "mpif.h"
 
-    integer :: gcnt, vcnt, acnt, tstart, ntsteps, tstop, vrank, vtype, timedim, ierr
-    integer :: comm,i,j,k,l,m
-    integer*8 :: read_bytes
-    integer*8 :: fh, gh
+    integer :: gcnt, vcnt, acnt, tfirst, tlast  ! file info
+    integer :: vsteps, vrank, vtype ! variable info
+    integer :: ierr
+    integer :: comm,nproc,rank
+    integer :: i,j,k,l,m
+    integer*8 :: fh
+    integer*8 :: sel
     integer*8, dimension(10) :: dims, start, readsize
-    integer, dimension(1000) :: var, vartrue
+
+    integer :: an_int
+    real*4  :: a_real
+    real*8  :: a_double
+    complex*8  :: a_complex
+    character(len=1024) :: a_string
+
     !character, dimension(:), allocatable :: varchar
     !integer, dimension(:), allocatable :: varint
     !real*8, dimension(:), allocatable :: vardouble
@@ -22,60 +32,56 @@ program read_bp_f
     integer, dimension(100000) :: varint
     real*8, dimension(10000000) :: vardouble
     integer :: totalsize
-    character (len=100), dimension(5000) :: vnamelist
-    character (len=100), dimension(5000) :: anamelist
-    character (len=100), dimension(5000) :: gnamelist
 
-    integer :: ilom,ihip,jlom,jhip,klom,khip,nx
-    integer, dimension(3) :: vstart, readcount
-    integer,dimension(48) :: bconds  ! all boundary conditions as one array
-    character(20)    :: vname
-    integer          :: one, rank, nproc 
-    real*8,dimension(102,66,3)  :: b1
+    character (len=128), dimension(:), allocatable :: vnamelist
+    character (len=128), dimension(:), allocatable :: anamelist
+    character (len=128), dimension(:), allocatable :: gnamelist
+
+    character(256) :: path
 
     call MPI_Init (ierr)
     comm = MPI_COMM_WORLD
     call mpi_comm_rank(comm, rank, ierr)
     call mpi_comm_size(comm, nproc, ierr)
 
-    call adios_set_read_method (1, ierr);
-    varchar = ' '
-    !call adios_fopen (fh, "/lustre/spider/scratch/pnorbert/TRACKP.bp", comm, ierr)
-    !call adios_fopen (fh, "TRACKP_00010.bp", comm, ierr)
-    !call adios_fopen (fh, "g_1x4_5x1.bp", comm, ierr)
-    !call adios_fopen (fh, "pixie3d.bp", comm, ierr)
-    !call adios_fopen (fh, "g_2x2_2x2_t1.bp", comm, ierr)
-    !call adios_fopen (fh, "xgcp.bp", comm, ierr)
-    !call adios_fopen (fh, "pgood.bp", comm, ierr)
-    !call adios_fopen (fh, "xgc.flowdiag.bp", comm, ierr)
-    !call adios_fopen (fh, "xgc.restart.000.03600.bp", comm, ierr)
-    call adios_fopen (fh, "adios_global.bp", comm, gcnt, ierr)
-    !call adios_fopen (fh, "testbp.bp", comm, ierr)
-    !call adios_fopen (fh, "record.bp", comm, ierr)
-    !call adios_fopen (fh, "outxz.bp", comm, ierr)
-
-    call adios_inq_file (fh,vcnt,acnt,tstart,ntsteps,gnamelist,ierr) 
-    tstop = ntsteps+ntsteps-1
-    write (*,'("Number of timesteps : ",i0," starting from ",i0)') ntsteps, tstart
-    write (*,'("Number of groups : ",i0)') gcnt
+    call processArgs(path)
 
-    do i=1,gcnt 
-        write (*,"(i5, a, a)") i,")  ", trim(gnamelist(i))
-    enddo
+    call adios_read_init_method (ADIOS_READ_METHOD_BP, comm, "verbose=4", ierr);
+    call adios_read_open_file (fh, path, 0, comm, ierr)
+    if (ierr .ne. 0) then
+        call exit(1)
+    endif
+
+    varchar = ' '
 
-    call adios_gopen (fh, gh, gnamelist(1), vcnt, acnt, ierr) 
-    call adios_inq_group(gh, vnamelist, anamelist, ierr)
+    call adios_inq_file (fh,vcnt,acnt,tfirst,tlast,ierr) 
+    allocate (vnamelist(vcnt))
+    allocate (anamelist(acnt))
+    call adios_inq_varnames  (fh, vnamelist, ierr)
+    call adios_inq_attrnames (fh, anamelist, ierr)
 
-    write (*,'("Number of variables in group ",a,": ",i0)') trim(gnamelist(1)), vcnt
+    write (*,'("Number of variables  : ",i0)') vcnt
     do i=1,vcnt 
         write (*,"(i5, a, a)") i,")  ", trim(vnamelist(i))
     enddo
 
-    write (*,'("Number of attributes in group ",a,": ",i0)') trim(gnamelist(1)), acnt
+    write (*,'("Number of attributes : ",i0)') acnt
     do i=1,acnt 
         write (*,"(i5, a, a)") i,")  ", trim(anamelist(i))
     enddo
 
+    write (*,'("Timesteps            : ",i0," - ",i0)') tfirst, tlast
+    
+    ! Not required, but get the list of groupnames and print here
+    call adios_inq_ngroups (fh, gcnt, ierr)
+    allocate (gnamelist(gcnt))
+    call adios_inq_groupnames (fh, gnamelist, ierr)
+    write (*,'("Number of groups : ",i0)') gcnt
+    do i=1,gcnt 
+        write (*,"(i5, a, a)") i,")  ", trim(gnamelist(i))
+    enddo
+    deallocate (gnamelist)
+
     ! vtype 
     ! 0 byte 
     ! 1 short 
@@ -93,77 +99,87 @@ program read_bp_f
     ! 54 unsigned_long
     !write (*,*) "name    ",  "  ndim    ", "    dims"
 
-    write (*,*)"-----------------------------"
-    !do i=1,vcnt 
-    !    call adios_inq_var (gh, vnamelist(i), vtype, vrank, dims, timedim, ierr)
-    !    start(1:10)=0
-    !    readsize(1:10)=1 
-    !    totalsize=1
-    !    do j=1,vrank
-    !        readsize(j) = dims(j)
-    !        totalsize=totalsize*dims(j)
-    !    enddo
-    !    write (*,'(a," ndims=",i0," type=",i0," size=",i0)') trim(vnamelist(i)),vrank,vtype,totalsize
-    !    if (vtype == 0) then
-    !        !if(allocated(varchar)) deallocate(varchar)
-    !        !allocate(varchar(totalsize))
-    !        !varchar(1)="!"
-    !        call adios_read_var (gh, vnamelist(i), start, readsize, varchar, read_bytes)
-    !    else if (vtype == 2) then
-    !        !write (*,*) "  totalsize = ", totalsize
-    !        !if (totalsize == 1) totalsize = 10
-    !        !if(allocated(varint)) then
-    !        !    write (*,*) "  dealloc varint"
-    !        !    deallocate(varint)
-    !        !endif
-    !        !write (*,*) "  alloc varint, size = ", totalsize
-    !        !allocate(varint(totalsize))
-    !        !write (*,*) "  totalsize = ", totalsize
-    !        !varint(:)=5
-    !        !print *, varint(1:10)
-    !        call adios_read_var (gh, vnamelist(i), start, readsize, varint, read_bytes)
-    !        print *, varint(1)
-    !    else if (vtype == 6) then
-    !        !if(allocated(vardouble)) deallocate(vardouble)
-    !        !allocate(vardouble(totalsize))
-    !        call adios_read_var (gh, vnamelist(i), start, readsize, vardouble, read_bytes)
-    !    else
-    !        write (*,'(a16,": Only integer or double type is handled here")') trim(vnamelist(i))
-    !    endif
-    !    if (vrank == 0) then
-    !        if (vtype == 0) then
-    !            write(*,'("    = ",a)') varchar(1:1)
-    !        else if (vtype == 2) then
-    !            write(*,'("    = ",i0)') varint(1)
-    !        else if (vtype == 6) then 
-    !            write(*,'("    = ",d20.10)') vardouble(1)
-    !        endif
-    !    else
-    !        !write (*,*)"-----------------------------"
-    !        !write (*,'(a30,t32," dimensions = [",i0,$)') vnamelist(i), dims(1)
-    !        write (*,'("   dimensions = [",i0,$)') dims(1)
-    !        do j=2,vrank
-    !            write (*,'(",",i0,$)') dims(j)
-    !        enddo
-    !        if (vtype == 0) then
-    !            write (*,'("] = ",a)') varchar
-    !        else
-    !            write (*,'("]")') 
-    !        endif
-    !    endif
-    !enddo
-
-    start(1) = 0
-    start(2) = rank
-    readsize(1) = 10
-    readsize(2) = 1
-    call adios_read_var (gh, "temperature", start, readsize, vardouble, read_bytes)
-    call adios_gclose(gh, ierr)
-    call adios_fclose(fh, ierr)
-
-    do i=1,4
-      write (*,*) vardouble(i) 
+    write (*,*)"-------- VARIABLE INFO ---------"
+    do i=1,vcnt 
+        call adios_inq_var (fh, vnamelist(i), vtype, vsteps, vrank, dims, ierr)
+        if (vrank == 0) then
+            !! scalar variable
+            sel = 0
+            write (*,'(a,"    scalar: type=",i0," steps=",i0,$)') trim(vnamelist(i)), vtype, vrank
+            if (vtype == adios_integer) then
+                !call adios_get_scalar (fh, vnamelist(i), an_int, ierr)
+                call adios_schedule_read (fh, sel, vnamelist(i), 0, 1,  an_int, ierr)
+                call adios_perform_reads (fh, ierr)
+                write(*,'("    = ",i0)') an_int
+            else if (vtype == adios_real) then 
+                call adios_get_scalar (fh, vnamelist(i), a_real, ierr)
+                write(*,'("    = ",d20.10)') a_real
+            else if (vtype == adios_double) then 
+                call adios_get_scalar (fh, vnamelist(i), a_double, ierr)
+                write(*,'("    = ",d20.10)') a_double
+            else if (vtype == adios_string) then
+                call adios_get_scalar (fh, vnamelist(i), a_string, ierr)
+                write(*,'("    = ",a)') trim(a_string)
+            else if (vtype == adios_complex) then 
+                call adios_get_scalar (fh, vnamelist(i), a_complex, ierr)
+                write(*,'("    = (",d20.10,",",d20.10,")")') a_complex
+            else
+                write (*,*) " This type is not handled here"
+            endif
+        else
+            !! array variable
+            start(1:10)=0
+            readsize(1:10)=1 
+            totalsize=1
+            write (*,'(a,"    type=",i0," ndims=",i0,"{",$)') trim(vnamelist(i)),vrank,vtype
+            do j=1,vrank
+                readsize(j) = dims(j)
+                totalsize=totalsize*dims(j)
+                write(*,'(" ",i0,$)') dims(j)
+            enddo
+            write(*,'("}")') 
+        endif
     enddo
 
+    call adios_read_close(fh, ierr)
+
+    deallocate (vnamelist)
+    deallocate (anamelist)
+
     call MPI_Finalize (ierr)
 end program
+
+!!***************************
+subroutine usage()
+    write (*,*) "Usage: bp_read_f path]"
+    write (*,*) "    path: name of bp file"
+end subroutine usage
+
+!!***************************
+subroutine processArgs(path)
+
+    implicit none
+    character(len=256), intent(out) :: path
+
+#ifndef __GFORTRAN__
+#ifndef __GNUC__
+    interface
+         integer function iargc()
+         end function iargc
+    end interface
+#endif
+#endif
+
+    integer :: numargs
+
+    !! process arguments
+    numargs = iargc()
+    !print *,"Number of arguments:",numargs
+    if ( numargs < 1 ) then
+        call usage()
+        call exit(1)
+    endif
+    call getarg(1, path)
+
+end subroutine processArgs
+
diff --git a/tests/bp_read/bp_read_f.F90 b/tests/bp_read/bp_read_f_v1.F90
similarity index 84%
copy from tests/bp_read/bp_read_f.F90
copy to tests/bp_read/bp_read_f_v1.F90
index 18c1e61..127a067 100644
--- a/tests/bp_read/bp_read_f.F90
+++ b/tests/bp_read/bp_read_f_v1.F90
@@ -31,28 +31,20 @@ program read_bp_f
     integer,dimension(48) :: bconds  ! all boundary conditions as one array
     character(20)    :: vname
     integer          :: one, rank, nproc 
+    integer          :: timestep, lasttimestep
     real*8,dimension(102,66,3)  :: b1
+    character(256) :: path
 
     call MPI_Init (ierr)
     comm = MPI_COMM_WORLD
     call mpi_comm_rank(comm, rank, ierr)
     call mpi_comm_size(comm, nproc, ierr)
 
-    call adios_set_read_method (1, ierr);
+    call processArgs(path)
+
+    call adios_set_read_method (0, ierr);
     varchar = ' '
-    !call adios_fopen (fh, "/lustre/spider/scratch/pnorbert/TRACKP.bp", comm, ierr)
-    !call adios_fopen (fh, "TRACKP_00010.bp", comm, ierr)
-    !call adios_fopen (fh, "g_1x4_5x1.bp", comm, ierr)
-    !call adios_fopen (fh, "pixie3d.bp", comm, ierr)
-    !call adios_fopen (fh, "g_2x2_2x2_t1.bp", comm, ierr)
-    !call adios_fopen (fh, "xgcp.bp", comm, ierr)
-    !call adios_fopen (fh, "pgood.bp", comm, ierr)
-    !call adios_fopen (fh, "xgc.flowdiag.bp", comm, ierr)
-    !call adios_fopen (fh, "xgc.restart.000.03600.bp", comm, ierr)
-    call adios_fopen (fh, "adios_global.bp", comm, gcnt, ierr)
-    !call adios_fopen (fh, "testbp.bp", comm, ierr)
-    !call adios_fopen (fh, "record.bp", comm, ierr)
-    !call adios_fopen (fh, "outxz.bp", comm, ierr)
+    call adios_fopen (fh, path, comm, gcnt, ierr)
 
     call adios_inq_file (fh,vcnt,acnt,tstart,ntsteps,gnamelist,ierr) 
     tstop = ntsteps+ntsteps-1
@@ -64,7 +56,7 @@ program read_bp_f
     enddo
 
     call adios_gopen (fh, gh, gnamelist(1), vcnt, acnt, ierr) 
-    call adios_inq_group(gh, vnamelist, anamelist, ierr)
+    call adios_inq_group(gh, vnamelist, anamelist, timestep, lasttimestep, ierr)
 
     write (*,'("Number of variables in group ",a,": ",i0)') trim(gnamelist(1)), vcnt
     do i=1,vcnt 
@@ -167,3 +159,39 @@ program read_bp_f
 
     call MPI_Finalize (ierr)
 end program
+
+!!***************************
+subroutine usage()
+    write (*,*) "Usage: bp_read_f path]"
+    write (*,*) "    path: name of bp file"
+end subroutine usage
+
+!!***************************
+subroutine processArgs(path)
+
+    implicit none
+    character(len=256), intent(out) :: path
+
+#ifndef __GFORTRAN__
+#ifndef __GNUC__
+    interface
+         integer function iargc()
+         end function iargc
+    end interface
+#endif
+#endif
+
+    integer :: numargs
+
+    !! process arguments
+    numargs = iargc()
+    !print *,"Number of arguments:",numargs
+    if ( numargs < 1 ) then
+        call usage()
+        call exit(1)
+    endif
+    call getarg(1, path)
+
+end subroutine processArgs
+
+
diff --git a/tests/genarray/Makefile.in b/tests/genarray/Makefile.in
index d328f2e..91fe4de 100644
--- a/tests/genarray/Makefile.in
+++ b/tests/genarray/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -41,7 +39,9 @@ noinst_PROGRAMS = genarray$(EXEEXT) genarray2D$(EXEEXT) \
 subdir = tests/genarray
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -63,32 +63,45 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 PROGRAMS = $(noinst_PROGRAMS)
 am_copyarray_OBJECTS = copyarray-copyarray.$(OBJEXT)
 copyarray_OBJECTS = $(am_copyarray_OBJECTS)
 am__DEPENDENCIES_1 =
 copyarray_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
+copyarray_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(copyarray_LDFLAGS) $(LDFLAGS) -o $@
 am_copyarray2D_OBJECTS = copyarray2D-copyarray2D.$(OBJEXT)
 copyarray2D_OBJECTS = $(am_copyarray2D_OBJECTS)
 copyarray2D_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
+copyarray2D_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(copyarray2D_LDFLAGS) $(LDFLAGS) -o $@
 am_genarray_OBJECTS = genarray-genarray.$(OBJEXT)
 genarray_OBJECTS = $(am_genarray_OBJECTS)
 genarray_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
+genarray_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(genarray_LDFLAGS) $(LDFLAGS) -o $@
 am_genarray2D_OBJECTS = genarray2D-genarray2D.$(OBJEXT)
 genarray2D_OBJECTS = $(am_genarray2D_OBJECTS)
 genarray2D_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+genarray2D_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(genarray2D_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
 FCLD = $(FC)
 SOURCES = $(copyarray_SOURCES) $(copyarray2D_SOURCES) \
 	$(genarray_SOURCES) $(genarray2D_SOURCES)
@@ -119,32 +132,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -153,72 +166,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = $(MPIFC)
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -229,11 +217,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -241,7 +229,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -267,26 +258,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -298,28 +282,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 INCLUDES = $(all_includes) -I$(top_builddir)/src
 AUTOMAKE_OPTIONS = no-dependencies
 genarray_SOURCES = genarray.F90
@@ -356,14 +353,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/genarray/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  tests/genarray/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/genarray/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu tests/genarray/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -381,25 +378,28 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-noinstPROGRAMS:
-	@list='$(noinst_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(noinst_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
 copyarray$(EXEEXT): $(copyarray_OBJECTS) $(copyarray_DEPENDENCIES) 
 	@rm -f copyarray$(EXEEXT)
-	$(FCLINK) $(copyarray_LDFLAGS) $(copyarray_OBJECTS) $(copyarray_LDADD) $(LIBS)
+	$(copyarray_LINK) $(copyarray_OBJECTS) $(copyarray_LDADD) $(LIBS)
 copyarray2D$(EXEEXT): $(copyarray2D_OBJECTS) $(copyarray2D_DEPENDENCIES) 
 	@rm -f copyarray2D$(EXEEXT)
-	$(FCLINK) $(copyarray2D_LDFLAGS) $(copyarray2D_OBJECTS) $(copyarray2D_LDADD) $(LIBS)
+	$(copyarray2D_LINK) $(copyarray2D_OBJECTS) $(copyarray2D_LDADD) $(LIBS)
 genarray$(EXEEXT): $(genarray_OBJECTS) $(genarray_DEPENDENCIES) 
 	@rm -f genarray$(EXEEXT)
-	$(FCLINK) $(genarray_LDFLAGS) $(genarray_OBJECTS) $(genarray_LDADD) $(LIBS)
+	$(genarray_LINK) $(genarray_OBJECTS) $(genarray_LDADD) $(LIBS)
 genarray2D$(EXEEXT): $(genarray2D_OBJECTS) $(genarray2D_DEPENDENCIES) 
 	@rm -f genarray2D$(EXEEXT)
-	$(FCLINK) $(genarray2D_LDFLAGS) $(genarray2D_OBJECTS) $(genarray2D_LDADD) $(LIBS)
+	$(genarray2D_LINK) $(genarray2D_OBJECTS) $(genarray2D_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -446,82 +446,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -550,6 +553,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -562,7 +566,7 @@ clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -570,18 +574,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -601,19 +625,22 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
 	clean-libtool clean-noinstPROGRAMS ctags distclean \
 	distclean-compile distclean-generic distclean-libtool \
 	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install 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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
 
 
 genarray.F90: gwrite_genarray.fh
@@ -625,6 +652,7 @@ gwrite_genarray.fh: genarray3d.xml
 gread_genarray.fh: genarray3d.xml
 	rm -f gwrite_genarray.fh gread_genarray.fh
 	$(top_builddir)/utils/gpp/gpp.py genarray3d.xml
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/tests/genarray/copyarray.F90 b/tests/genarray/copyarray.F90
index 8268c51..8e64754 100644
--- a/tests/genarray/copyarray.F90
+++ b/tests/genarray/copyarray.F90
@@ -187,14 +187,21 @@ end subroutine generateLocalArray
 !!***************************
 subroutine readArray()
     use genarray_comm
+    use adios_write_mod
+    use adios_read_mod
     implicit none
-    integer*8 adios_handle, adios_groupsize, adios_err
+    integer*8 adios_handle, adios_groupsize
+    integer adios_err
+    integer*8 fp, s
     include 'mpif.h'
 
     call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
     cache_start_time = MPI_WTIME()
 
     group = "genarray"
+
+! TODO: Fix this to use the new read API
+
     call adios_open (adios_handle, group, inputfile, "r", group_comm, adios_err)
 #include "gread_genarray.fh"
     call MPI_BARRIER(MPI_COMM_WORLD,adios_err)
diff --git a/tests/genarray/genarray.F90 b/tests/genarray/genarray.F90
index aaa0547..2444bb1 100644
--- a/tests/genarray/genarray.F90
+++ b/tests/genarray/genarray.F90
@@ -53,6 +53,7 @@ end module genarray_comm
 
 program genarray
     use genarray_comm
+    use adios_write_mod
     implicit none
     include 'mpif.h'
 
@@ -163,6 +164,7 @@ end subroutine generateLocalArray
 !!***************************
 subroutine writeArray()
     use genarray_comm
+    use adios_write_mod
     implicit none
     integer*8 adios_handle, adios_groupsize
     integer adios_err
diff --git a/tests/genarray/genarray3d.xml b/tests/genarray/genarray3d.xml
index 035a860..b53bb4d 100644
--- a/tests/genarray/genarray3d.xml
+++ b/tests/genarray/genarray3d.xml
@@ -41,7 +41,7 @@
 
   </adios-group>
 
-  <method group="genarray" method="POSIX"/>
+  <method group="genarray" method="MPI"/>
 
   <buffer size-MB="20" allocate-time="now"/>
 
diff --git a/tests/suite/Makefile.in b/tests/suite/Makefile.in
index eaefeac..25a3aa7 100644
--- a/tests/suite/Makefile.in
+++ b/tests/suite/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -38,7 +36,9 @@ host_triplet = @host@
 subdir = tests/suite
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -60,18 +60,50 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 ADIOSLIB_CFLAGS = @ADIOSLIB_CFLAGS@
 ADIOSLIB_CPPFLAGS = @ADIOSLIB_CPPFLAGS@
@@ -94,32 +126,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -128,72 +160,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -204,11 +211,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -216,7 +223,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -242,26 +252,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -273,28 +276,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = programs 
 EXTRA_DIST = HOWTO-Add-new-test \
              HOWTO-Run          \
@@ -310,14 +326,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/suite/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  tests/suite/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/suite/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu tests/suite/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -335,6 +351,7 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -342,10 +359,6 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -353,7 +366,7 @@ uninstall-info-am:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -370,16 +383,15 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -405,16 +417,16 @@ maintainer-clean-recursive:
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -422,14 +434,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -441,82 +453,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/reference $(distdir)/tests
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -546,6 +577,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -556,8 +588,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -565,18 +596,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -595,22 +646,25 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/suite/programs/Makefile.am b/tests/suite/programs/Makefile.am
index dcd7f0b..a2e678a 100644
--- a/tests/suite/programs/Makefile.am
+++ b/tests/suite/programs/Makefile.am
@@ -9,7 +9,18 @@
 # 5. add to EXTRA_DIST any non-source files that should go with the distribution
 check_readonly_C=
 if BUILD_WRITE
-check_C= 
+check_C=local_array_time \
+        adios_amr_write \
+        adios_amr_write_2vars \
+        adios_staged_read \
+        adios_staged_read_v2 \
+        adios_staged_read_2vars \
+        write_read \
+        write_alternate \
+        two_groups \
+        many_vars \
+        selections \
+        connect_to_space_subset
 endif
 
 if BUILD_FORTRAN
@@ -40,11 +51,72 @@ posix_method.o: gwrite_posix_method.fh
 gwrite_posix_method.fh: posix_method.xml
 	$(top_srcdir)/utils/gpp/gpp.py posix_method.xml
 
+local_array_time_SOURCES=local_array_time.c
+local_array_time_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+local_array_time_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
 
-EXTRA_DIST = posix_method.xml
+adios_amr_write_SOURCES=adios_amr_write.c
+adios_amr_write_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+adios_amr_write_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+adios_amr_write.o: adios_amr_write.c
 
-CLEANFILES = gwrite_posix_method.fh gread_posix_method.fh
+adios_amr_write_2vars_SOURCES=adios_amr_write_2vars.c
+adios_amr_write_2vars_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+adios_amr_write_2vars_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+adios_amr_write_2vars.o: adios_amr_write_2vars.c
 
+adios_staged_read_SOURCES=adios_staged_read.c
+adios_staged_read_LDADD = $(top_builddir)/src/libadiosread.a $(ADIOSREADLIB_LDADD)
+adios_staged_read_LDFLAGS = $(AM_LDFLAGS) $(ADIOSREADLIB_LDFLAGS)
+adios_staged_read.o: adios_staged_read.c
+
+adios_staged_read_v2_SOURCES=adios_staged_read_v2.c
+adios_staged_read_v2_LDADD = $(top_builddir)/src/libadiosread.a $(ADIOSREADLIB_LDADD)
+adios_staged_read_v2_LDFLAGS = $(AM_LDFLAGS) $(ADIOSREADLIB_LDFLAGS)
+adios_staged_read_v2.o: adios_staged_read_v2.c
+
+adios_staged_read_2vars_SOURCES=adios_staged_read_2vars.c
+adios_staged_read_2vars_LDADD = $(top_builddir)/src/libadiosread.a $(ADIOSREADLIB_LDADD)
+adios_staged_read_2vars_LDFLAGS = $(AM_LDFLAGS) $(ADIOSREADLIB_LDFLAGS)
+adios_staged_read_2vars.o: adios_staged_read_2vars.c
+
+write_read_SOURCES=write_read.c
+write_read_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+write_read_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+write_read.o: write_read.c
+
+write_alternate_SOURCES=write_alternate.c
+write_alternate_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+write_alternate_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+write_alternate.o: write_alternate.c
+
+two_groups_SOURCES=two_groups.c
+two_groups_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+two_groups_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+two_groups.o: two_groups.c
+
+many_vars_SOURCES=many_vars.c
+many_vars_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+many_vars_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+many_vars.o: many_vars.c
+
+selections_SOURCES=selections.c
+selections_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+selections_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+selections.o: selections.c
+
+connect_to_space_subset_SOURCES=connect_to_space_subset.c
+connect_to_space_subset_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+connect_to_space_subset_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+connect_to_space_subset.o: connect_to_space_subset.c
+
+EXTRA_DIST = adios_amr_write.xml adios_amr_write_2vars.xml \
+             posix_method.xml local_array_time.xml  \
+             write_alternate.xml write_read.xml
+
+CLEANFILES = gwrite_posix_method.fh gread_posix_method.fh 
+
+CC=$(MPICC)
 FC=$(MPIFC)
 
 FCLINK = \
diff --git a/tests/suite/programs/Makefile.in b/tests/suite/programs/Makefile.in
index 6c68570..cd19310 100644
--- a/tests/suite/programs/Makefile.in
+++ b/tests/suite/programs/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -35,12 +33,15 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_1) \
-	$(am__EXEEXT_1)
+check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \
+	$(am__EXEEXT_3)
+TESTS =
 subdir = tests/suite/programs
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,25 +63,155 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
-am__EXEEXT_1 =
+CONFIG_CLEAN_VPATH_FILES =
+ at BUILD_WRITE_TRUE@am__EXEEXT_1 = local_array_time$(EXEEXT) \
+ at BUILD_WRITE_TRUE@	adios_amr_write$(EXEEXT) \
+ at BUILD_WRITE_TRUE@	adios_amr_write_2vars$(EXEEXT) \
+ at BUILD_WRITE_TRUE@	adios_staged_read$(EXEEXT) \
+ at BUILD_WRITE_TRUE@	adios_staged_read_v2$(EXEEXT) \
+ at BUILD_WRITE_TRUE@	adios_staged_read_2vars$(EXEEXT) \
+ at BUILD_WRITE_TRUE@	write_read$(EXEEXT) write_alternate$(EXEEXT) \
+ at BUILD_WRITE_TRUE@	two_groups$(EXEEXT) many_vars$(EXEEXT) \
+ at BUILD_WRITE_TRUE@	selections$(EXEEXT) \
+ at BUILD_WRITE_TRUE@	connect_to_space_subset$(EXEEXT)
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at am__EXEEXT_2 =  \
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE@	posix_method$(EXEEXT)
+am__EXEEXT_3 =
+am_adios_amr_write_OBJECTS = adios_amr_write.$(OBJEXT)
+adios_amr_write_OBJECTS = $(am_adios_amr_write_OBJECTS)
+am__DEPENDENCIES_1 =
+adios_amr_write_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+adios_amr_write_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_amr_write_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_amr_write_2vars_OBJECTS = adios_amr_write_2vars.$(OBJEXT)
+adios_amr_write_2vars_OBJECTS = $(am_adios_amr_write_2vars_OBJECTS)
+adios_amr_write_2vars_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+adios_amr_write_2vars_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_amr_write_2vars_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_staged_read_OBJECTS = adios_staged_read.$(OBJEXT)
+adios_staged_read_OBJECTS = $(am_adios_staged_read_OBJECTS)
+adios_staged_read_DEPENDENCIES = $(top_builddir)/src/libadiosread.a \
+	$(am__DEPENDENCIES_1)
+adios_staged_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_staged_read_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_staged_read_2vars_OBJECTS =  \
+	adios_staged_read_2vars.$(OBJEXT)
+adios_staged_read_2vars_OBJECTS =  \
+	$(am_adios_staged_read_2vars_OBJECTS)
+adios_staged_read_2vars_DEPENDENCIES =  \
+	$(top_builddir)/src/libadiosread.a $(am__DEPENDENCIES_1)
+adios_staged_read_2vars_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_staged_read_2vars_LDFLAGS) $(LDFLAGS) -o $@
+am_adios_staged_read_v2_OBJECTS = adios_staged_read_v2.$(OBJEXT)
+adios_staged_read_v2_OBJECTS = $(am_adios_staged_read_v2_OBJECTS)
+adios_staged_read_v2_DEPENDENCIES =  \
+	$(top_builddir)/src/libadiosread.a $(am__DEPENDENCIES_1)
+adios_staged_read_v2_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_staged_read_v2_LDFLAGS) $(LDFLAGS) -o $@
+am_connect_to_space_subset_OBJECTS =  \
+	connect_to_space_subset.$(OBJEXT)
+connect_to_space_subset_OBJECTS =  \
+	$(am_connect_to_space_subset_OBJECTS)
+connect_to_space_subset_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+connect_to_space_subset_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(connect_to_space_subset_LDFLAGS) $(LDFLAGS) -o $@
+am_local_array_time_OBJECTS = local_array_time.$(OBJEXT)
+local_array_time_OBJECTS = $(am_local_array_time_OBJECTS)
+local_array_time_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+local_array_time_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(local_array_time_LDFLAGS) $(LDFLAGS) -o $@
+am_many_vars_OBJECTS = many_vars.$(OBJEXT)
+many_vars_OBJECTS = $(am_many_vars_OBJECTS)
+many_vars_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+many_vars_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(many_vars_LDFLAGS) $(LDFLAGS) -o $@
 am_posix_method_OBJECTS = posix_method.$(OBJEXT)
 posix_method_OBJECTS = $(am_posix_method_OBJECTS)
-am__DEPENDENCIES_1 =
 posix_method_DEPENDENCIES = $(top_builddir)/src/libadiosf.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+posix_method_LINK = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS) \
+	$(posix_method_LDFLAGS) $(LDFLAGS) -o $@
+am_selections_OBJECTS = selections.$(OBJEXT)
+selections_OBJECTS = $(am_selections_OBJECTS)
+selections_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+selections_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(selections_LDFLAGS) $(LDFLAGS) -o $@
+am_two_groups_OBJECTS = two_groups.$(OBJEXT)
+two_groups_OBJECTS = $(am_two_groups_OBJECTS)
+two_groups_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+two_groups_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(two_groups_LDFLAGS) $(LDFLAGS) -o $@
+am_write_alternate_OBJECTS = write_alternate.$(OBJEXT)
+write_alternate_OBJECTS = $(am_write_alternate_OBJECTS)
+write_alternate_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+write_alternate_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(write_alternate_LDFLAGS) $(LDFLAGS) -o $@
+am_write_read_OBJECTS = write_read.$(OBJEXT)
+write_read_OBJECTS = $(am_write_read_OBJECTS)
+write_read_DEPENDENCIES = $(top_builddir)/src/libadios.a \
+	$(am__DEPENDENCIES_1)
+write_read_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(write_read_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/config/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
 PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
-LTPPFCCOMPILE = $(LIBTOOL) --mode=compile $(FC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_FCFLAGS) $(FCFLAGS)
+LTPPFCCOMPILE = $(LIBTOOL) --tag=FC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
 FCLD = $(FC)
-SOURCES = $(posix_method_SOURCES)
-DIST_SOURCES = $(posix_method_SOURCES)
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
+SOURCES = $(adios_amr_write_SOURCES) $(adios_amr_write_2vars_SOURCES) \
+	$(adios_staged_read_SOURCES) \
+	$(adios_staged_read_2vars_SOURCES) \
+	$(adios_staged_read_v2_SOURCES) \
+	$(connect_to_space_subset_SOURCES) $(local_array_time_SOURCES) \
+	$(many_vars_SOURCES) $(posix_method_SOURCES) \
+	$(selections_SOURCES) $(two_groups_SOURCES) \
+	$(write_alternate_SOURCES) $(write_read_SOURCES)
+DIST_SOURCES = $(adios_amr_write_SOURCES) \
+	$(adios_amr_write_2vars_SOURCES) $(adios_staged_read_SOURCES) \
+	$(adios_staged_read_2vars_SOURCES) \
+	$(adios_staged_read_v2_SOURCES) \
+	$(connect_to_space_subset_SOURCES) $(local_array_time_SOURCES) \
+	$(many_vars_SOURCES) $(posix_method_SOURCES) \
+	$(selections_SOURCES) $(two_groups_SOURCES) \
+	$(write_alternate_SOURCES) $(write_read_SOURCES)
 ETAGS = etags
 CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ADIOSLIB_CFLAGS = @ADIOSLIB_CFLAGS@
@@ -104,32 +235,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
-CC = @CC@
+CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -138,72 +269,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = $(MPIFC)
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -214,11 +320,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -226,7 +332,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -252,26 +361,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -283,28 +385,41 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 
 # Add your codes that you want to build at 'make check'
 # Do not build Fortran codes if Fortran is not supported.
@@ -316,13 +431,21 @@ target_alias = @target_alias@
 # 4. add files to CLEANFILES that should be deleted at 'make clean'
 # 5. add to EXTRA_DIST any non-source files that should go with the distribution
 check_readonly_C = 
- at BUILD_WRITE_TRUE@check_C = 
+ at BUILD_WRITE_TRUE@check_C = local_array_time \
+ at BUILD_WRITE_TRUE@        adios_amr_write \
+ at BUILD_WRITE_TRUE@        adios_amr_write_2vars \
+ at BUILD_WRITE_TRUE@        adios_staged_read \
+ at BUILD_WRITE_TRUE@        adios_staged_read_v2 \
+ at BUILD_WRITE_TRUE@        adios_staged_read_2vars \
+ at BUILD_WRITE_TRUE@        write_read \
+ at BUILD_WRITE_TRUE@        write_alternate \
+ at BUILD_WRITE_TRUE@        two_groups \
+ at BUILD_WRITE_TRUE@        many_vars \
+ at BUILD_WRITE_TRUE@        selections \
+ at BUILD_WRITE_TRUE@        connect_to_space_subset
+
 @BUILD_FORTRAN_TRUE at check_readonly_Fortran = 
 @BUILD_FORTRAN_TRUE@@BUILD_WRITE_TRUE at check_Fortran = posix_method
-
-# Sequential tests to be executed by "make check" can be defined right here in TESTS
-# Parallel tests should be defined in ../tests/*.sh and executed by ../test.sh
-TESTS = 
 INCLUDES = $(all_includes) -I$(top_builddir)/src
 
 #############################
@@ -333,8 +456,47 @@ INCLUDES = $(all_includes) -I$(top_builddir)/src
 posix_method_SOURCES = posix_method.F90
 posix_method_LDADD = $(top_builddir)/src/libadiosf.a $(ADIOSLIB_LDADD)
 posix_method_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
-EXTRA_DIST = posix_method.xml
-CLEANFILES = gwrite_posix_method.fh gread_posix_method.fh
+local_array_time_SOURCES = local_array_time.c
+local_array_time_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+local_array_time_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+adios_amr_write_SOURCES = adios_amr_write.c
+adios_amr_write_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+adios_amr_write_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+adios_amr_write_2vars_SOURCES = adios_amr_write_2vars.c
+adios_amr_write_2vars_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+adios_amr_write_2vars_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+adios_staged_read_SOURCES = adios_staged_read.c
+adios_staged_read_LDADD = $(top_builddir)/src/libadiosread.a $(ADIOSREADLIB_LDADD)
+adios_staged_read_LDFLAGS = $(AM_LDFLAGS) $(ADIOSREADLIB_LDFLAGS)
+adios_staged_read_v2_SOURCES = adios_staged_read_v2.c
+adios_staged_read_v2_LDADD = $(top_builddir)/src/libadiosread.a $(ADIOSREADLIB_LDADD)
+adios_staged_read_v2_LDFLAGS = $(AM_LDFLAGS) $(ADIOSREADLIB_LDFLAGS)
+adios_staged_read_2vars_SOURCES = adios_staged_read_2vars.c
+adios_staged_read_2vars_LDADD = $(top_builddir)/src/libadiosread.a $(ADIOSREADLIB_LDADD)
+adios_staged_read_2vars_LDFLAGS = $(AM_LDFLAGS) $(ADIOSREADLIB_LDFLAGS)
+write_read_SOURCES = write_read.c
+write_read_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+write_read_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+write_alternate_SOURCES = write_alternate.c
+write_alternate_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+write_alternate_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+two_groups_SOURCES = two_groups.c
+two_groups_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+two_groups_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+many_vars_SOURCES = many_vars.c
+many_vars_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+many_vars_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+selections_SOURCES = selections.c
+selections_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+selections_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+connect_to_space_subset_SOURCES = connect_to_space_subset.c
+connect_to_space_subset_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
+connect_to_space_subset_LDFLAGS = $(AM_LDFLAGS) $(ADIOSLIB_LDFLAGS)
+EXTRA_DIST = adios_amr_write.xml adios_amr_write_2vars.xml \
+             posix_method.xml local_array_time.xml  \
+             write_alternate.xml write_read.xml
+
+CLEANFILES = gwrite_posix_method.fh gread_posix_method.fh 
 FCLINK = \
 	$(LIBTOOL) --mode=link --tag F77 $(FC) \
 	$(AM_FCFLAGS) $(FCFLAGS) $(LDFLAGS) -o $@
@@ -342,19 +504,19 @@ FCLINK = \
 all: all-am
 
 .SUFFIXES:
-.SUFFIXES: .F90 .lo .o .obj
+.SUFFIXES: .F90 .c .lo .o .obj
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/suite/programs/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  tests/suite/programs/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/suite/programs/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu tests/suite/programs/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -372,16 +534,55 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 clean-checkPROGRAMS:
-	@list='$(check_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@list='$(check_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
+adios_amr_write$(EXEEXT): $(adios_amr_write_OBJECTS) $(adios_amr_write_DEPENDENCIES) 
+	@rm -f adios_amr_write$(EXEEXT)
+	$(adios_amr_write_LINK) $(adios_amr_write_OBJECTS) $(adios_amr_write_LDADD) $(LIBS)
+adios_amr_write_2vars$(EXEEXT): $(adios_amr_write_2vars_OBJECTS) $(adios_amr_write_2vars_DEPENDENCIES) 
+	@rm -f adios_amr_write_2vars$(EXEEXT)
+	$(adios_amr_write_2vars_LINK) $(adios_amr_write_2vars_OBJECTS) $(adios_amr_write_2vars_LDADD) $(LIBS)
+adios_staged_read$(EXEEXT): $(adios_staged_read_OBJECTS) $(adios_staged_read_DEPENDENCIES) 
+	@rm -f adios_staged_read$(EXEEXT)
+	$(adios_staged_read_LINK) $(adios_staged_read_OBJECTS) $(adios_staged_read_LDADD) $(LIBS)
+adios_staged_read_2vars$(EXEEXT): $(adios_staged_read_2vars_OBJECTS) $(adios_staged_read_2vars_DEPENDENCIES) 
+	@rm -f adios_staged_read_2vars$(EXEEXT)
+	$(adios_staged_read_2vars_LINK) $(adios_staged_read_2vars_OBJECTS) $(adios_staged_read_2vars_LDADD) $(LIBS)
+adios_staged_read_v2$(EXEEXT): $(adios_staged_read_v2_OBJECTS) $(adios_staged_read_v2_DEPENDENCIES) 
+	@rm -f adios_staged_read_v2$(EXEEXT)
+	$(adios_staged_read_v2_LINK) $(adios_staged_read_v2_OBJECTS) $(adios_staged_read_v2_LDADD) $(LIBS)
+connect_to_space_subset$(EXEEXT): $(connect_to_space_subset_OBJECTS) $(connect_to_space_subset_DEPENDENCIES) 
+	@rm -f connect_to_space_subset$(EXEEXT)
+	$(connect_to_space_subset_LINK) $(connect_to_space_subset_OBJECTS) $(connect_to_space_subset_LDADD) $(LIBS)
+local_array_time$(EXEEXT): $(local_array_time_OBJECTS) $(local_array_time_DEPENDENCIES) 
+	@rm -f local_array_time$(EXEEXT)
+	$(local_array_time_LINK) $(local_array_time_OBJECTS) $(local_array_time_LDADD) $(LIBS)
+many_vars$(EXEEXT): $(many_vars_OBJECTS) $(many_vars_DEPENDENCIES) 
+	@rm -f many_vars$(EXEEXT)
+	$(many_vars_LINK) $(many_vars_OBJECTS) $(many_vars_LDADD) $(LIBS)
 posix_method$(EXEEXT): $(posix_method_OBJECTS) $(posix_method_DEPENDENCIES) 
 	@rm -f posix_method$(EXEEXT)
-	$(FCLINK) $(posix_method_LDFLAGS) $(posix_method_OBJECTS) $(posix_method_LDADD) $(LIBS)
+	$(posix_method_LINK) $(posix_method_OBJECTS) $(posix_method_LDADD) $(LIBS)
+selections$(EXEEXT): $(selections_OBJECTS) $(selections_DEPENDENCIES) 
+	@rm -f selections$(EXEEXT)
+	$(selections_LINK) $(selections_OBJECTS) $(selections_LDADD) $(LIBS)
+two_groups$(EXEEXT): $(two_groups_OBJECTS) $(two_groups_DEPENDENCIES) 
+	@rm -f two_groups$(EXEEXT)
+	$(two_groups_LINK) $(two_groups_OBJECTS) $(two_groups_LDADD) $(LIBS)
+write_alternate$(EXEEXT): $(write_alternate_OBJECTS) $(write_alternate_DEPENDENCIES) 
+	@rm -f write_alternate$(EXEEXT)
+	$(write_alternate_LINK) $(write_alternate_OBJECTS) $(write_alternate_LDADD) $(LIBS)
+write_read$(EXEEXT): $(write_read_OBJECTS) $(write_read_DEPENDENCIES) 
+	@rm -f write_read$(EXEEXT)
+	$(write_read_LINK) $(write_read_OBJECTS) $(write_read_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -389,6 +590,19 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/adios_amr_write.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/adios_amr_write_2vars.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/adios_staged_read.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/adios_staged_read_2vars.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/adios_staged_read_v2.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/connect_to_space_subset.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/local_array_time.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/many_vars.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/selections.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/two_groups.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/write_alternate.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/write_read.Po at am__quote@
+
 .F90.o:
 	$(PPFCCOMPILE) -c -o $@ $<
 
@@ -398,60 +612,81 @@ distclean-compile:
 .F90.lo:
 	$(LTPPFCCOMPILE) -c -o $@ $<
 
+.c.o:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `$(CYGPATH_W) '$<'`
+
+.c.lo:
+ at am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(LTCOMPILE) -c -o $@ $<
+
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
@@ -459,7 +694,8 @@ distclean-tags:
 check-TESTS: $(TESTS)
 	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
 	srcdir=$(srcdir); export srcdir; \
-	list='$(TESTS)'; \
+	list=' $(TESTS) '; \
+	$(am__tty_colors); \
 	if test -n "$$list"; then \
 	  for tst in $$list; do \
 	    if test -f ./$$tst; then dir=./; \
@@ -468,49 +704,63 @@ check-TESTS: $(TESTS)
 	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
 	      all=`expr $$all + 1`; \
 	      case " $(XFAIL_TESTS) " in \
-	      *" $$tst "*) \
+	      *[\ \	]$$tst[\ \	]*) \
 		xpass=`expr $$xpass + 1`; \
 		failed=`expr $$failed + 1`; \
-		echo "XPASS: $$tst"; \
+		col=$$red; res=XPASS; \
 	      ;; \
 	      *) \
-		echo "PASS: $$tst"; \
+		col=$$grn; res=PASS; \
 	      ;; \
 	      esac; \
 	    elif test $$? -ne 77; then \
 	      all=`expr $$all + 1`; \
 	      case " $(XFAIL_TESTS) " in \
-	      *" $$tst "*) \
+	      *[\ \	]$$tst[\ \	]*) \
 		xfail=`expr $$xfail + 1`; \
-		echo "XFAIL: $$tst"; \
+		col=$$lgn; res=XFAIL; \
 	      ;; \
 	      *) \
 		failed=`expr $$failed + 1`; \
-		echo "FAIL: $$tst"; \
+		col=$$red; res=FAIL; \
 	      ;; \
 	      esac; \
 	    else \
 	      skip=`expr $$skip + 1`; \
-	      echo "SKIP: $$tst"; \
+	      col=$$blu; res=SKIP; \
 	    fi; \
+	    echo "$${col}$$res$${std}: $$tst"; \
 	  done; \
+	  if test "$$all" -eq 1; then \
+	    tests="test"; \
+	    All=""; \
+	  else \
+	    tests="tests"; \
+	    All="All "; \
+	  fi; \
 	  if test "$$failed" -eq 0; then \
 	    if test "$$xfail" -eq 0; then \
-	      banner="All $$all tests passed"; \
+	      banner="$$All$$all $$tests passed"; \
 	    else \
-	      banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+	      if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+	      banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
 	    fi; \
 	  else \
 	    if test "$$xpass" -eq 0; then \
-	      banner="$$failed of $$all tests failed"; \
+	      banner="$$failed of $$all $$tests failed"; \
 	    else \
-	      banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+	      if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+	      banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
 	    fi; \
 	  fi; \
 	  dashes="$$banner"; \
 	  skipped=""; \
 	  if test "$$skip" -ne 0; then \
-	    skipped="($$skip tests were not run)"; \
+	    if test "$$skip" -eq 1; then \
+	      skipped="($$skip test was not run)"; \
+	    else \
+	      skipped="($$skip tests were not run)"; \
+	    fi; \
 	    test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
 	      dashes="$$skipped"; \
 	  fi; \
@@ -521,38 +771,45 @@ check-TESTS: $(TESTS)
 	      dashes="$$report"; \
 	  fi; \
 	  dashes=`echo "$$dashes" | sed s/./=/g`; \
-	  echo "$$dashes"; \
+	  if test "$$failed" -eq 0; then \
+	    echo "$$grn$$dashes"; \
+	  else \
+	    echo "$$red$$dashes"; \
+	  fi; \
 	  echo "$$banner"; \
 	  test -z "$$skipped" || echo "$$skipped"; \
 	  test -z "$$report" || echo "$$report"; \
-	  echo "$$dashes"; \
+	  echo "$$dashes$$std"; \
 	  test "$$failed" -eq 0; \
 	else :; fi
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -583,6 +840,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -593,9 +851,10 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \
 	mostlyclean-am
 
 distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -603,21 +862,42 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
 	-rm -f Makefile
 maintainer-clean-am: distclean-am maintainer-clean-generic
 
@@ -634,23 +914,39 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
+
+.MAKE: check-am install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
 	clean-checkPROGRAMS clean-generic clean-libtool ctags \
 	distclean distclean-compile distclean-generic \
 	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	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-compile \
 	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
-	tags uninstall uninstall-am uninstall-info-am
+	tags uninstall uninstall-am
 
 posix_method.o: gwrite_posix_method.fh 
 gwrite_posix_method.fh: posix_method.xml
 	$(top_srcdir)/utils/gpp/gpp.py posix_method.xml
+adios_amr_write.o: adios_amr_write.c
+adios_amr_write_2vars.o: adios_amr_write_2vars.c
+adios_staged_read.o: adios_staged_read.c
+adios_staged_read_v2.o: adios_staged_read_v2.c
+adios_staged_read_2vars.o: adios_staged_read_2vars.c
+write_read.o: write_read.c
+write_alternate.o: write_alternate.c
+two_groups.o: two_groups.c
+many_vars.o: many_vars.c
+selections.o: selections.c
+connect_to_space_subset.o: connect_to_space_subset.c
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/tests/suite/programs/adios_amr_write.c b/tests/suite/programs/adios_amr_write.c
new file mode 100644
index 0000000..a8f055d
--- /dev/null
+++ b/tests/suite/programs/adios_amr_write.c
@@ -0,0 +1,101 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: write a global array from N processors using MPI_AGGREGATE.
+ *
+ * How to run: mpirun -np <N> adios_amr_write
+ * Output: adios_amr_write.bp
+ * ADIOS config file: adios_amr_write.xml
+ *
+*/
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+#include "public/adios.h"
+int main (int argc, char ** argv) 
+{
+    char        filename [256];
+    int         rank, size, i, pattern, npe_1, npe_2;
+    int         l1, l2, o1, o2, g1, g2; 
+    double      t1, t2;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+
+    /* ADIOS variables declarations for matching gwrite_temperature.ch */
+    int         adios_err;
+    uint64_t    adios_groupsize, adios_totalsize;
+    int64_t     adios_handle;
+
+    MPI_Init (&argc, &argv);
+
+    if (argc != 2)
+    {
+        printf ("Invalid command line arguments.\n");
+        exit (1);
+    }
+
+    pattern = atoi (argv[1]);
+
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    g1 = 32;
+    g2 = 16;
+
+    if (pattern == 1)
+    {
+        l1 = 1;
+        l2 = g2;
+    }
+    else if (pattern == 2)
+    {
+        /* 4x4 array */
+        l1 = 4;
+        l2 = 4;
+    }
+    else
+    {
+        printf ("wrong argument.\n");
+    }
+
+    npe_1 = g1 / l1;
+    npe_2 = g2 / l2;
+
+    o1 = (rank / npe_2) * l1;
+    o2 = (rank % npe_2) * l2;
+
+    double t[l1*l2];
+
+    for (i = 0; i < l1 * l2; i++)
+    {
+        t[i] = o1 * g2 + o2 + (i / l2) * g2 + i % l2;
+    }
+
+    strcpy (filename, "adios_amr_write.bp");
+
+    adios_init ("adios_amr_write.xml");
+
+    adios_open (&adios_handle, "temperature", filename, "w", &comm);
+
+    adios_groupsize = 4  * 8\
+                    + 8 * l1 * l2;
+    adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);
+    adios_write (adios_handle, "l1", &l1);
+    adios_write (adios_handle, "l2", &l2);
+    adios_write (adios_handle, "o1", &o1);
+    adios_write (adios_handle, "o2", &o2);
+    adios_write (adios_handle, "g1", &g1);
+    adios_write (adios_handle, "g2", &g2);
+    adios_write (adios_handle, "temperature", t);
+
+    adios_close (adios_handle);
+
+    adios_finalize (rank);
+
+    MPI_Finalize ();
+
+    return 0;
+}
diff --git a/tests/suite/programs/adios_amr_write.xml b/tests/suite/programs/adios_amr_write.xml
new file mode 100644
index 0000000..c194905
--- /dev/null
+++ b/tests/suite/programs/adios_amr_write.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<adios-config host-language="C">
+    <adios-group name="temperature" coordination-communicator="comm" stats="On">
+    <var name="g1" type="integer"/>
+    <var name="g2" type="integer"/>
+    <var name="o1" type="integer"/>
+    <var name="o2" type="integer"/>
+    <var name="l1" type="integer"/>
+    <var name="l2" type="integer"/>
+    <global-bounds dimensions="g1,g2" offsets="o1,o2">
+       <var name="temperature" gwrite="t" type="double" dimensions="l1,l2"/>
+    </global-bounds>
+    <attribute name="description" path="/temperature" value="Global array written from 'size' processes" type="string"/>
+</adios-group>
+
+<method group="temperature" method="MPI_AMR">stripe_count=1;stripe_size=10485760;num_aggregators=8;merging_pgs=0</method>
+
+<buffer size-MB="100" allocate-time="now"/>
+
+</adios-config>
+
diff --git a/tests/suite/programs/adios_amr_write_2vars.c b/tests/suite/programs/adios_amr_write_2vars.c
new file mode 100644
index 0000000..f57cacf
--- /dev/null
+++ b/tests/suite/programs/adios_amr_write_2vars.c
@@ -0,0 +1,105 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C Example: write a global array from N processors using MPI_AGGREGATE.
+ *
+ * How to run: mpirun -np <N> adios_amr_write
+ * Output: adios_amr_write.bp
+ * ADIOS config file: adios_amr_write.xml
+ *
+*/
+#include <stdio.h>
+#include <string.h>
+#include "mpi.h"
+#include "public/adios.h"
+int main (int argc, char ** argv) 
+{
+    char        filename [256];
+    int         rank, size, i, pattern, npe_1, npe_2;
+    int         l1, l2, o1, o2, g1, g2; 
+    double      t1, t2;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+
+    /* ADIOS variables declarations for matching gwrite_temperature.ch */
+    int         adios_err;
+    uint64_t    adios_groupsize, adios_totalsize;
+    int64_t     adios_handle;
+
+    MPI_Init (&argc, &argv);
+
+    if (argc != 2)
+    {
+        printf ("Invalid command line arguments.\n");
+        exit (1);
+    }
+
+    pattern = atoi (argv[1]);
+
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    g1 = 32;
+    g2 = 16;
+
+    if (pattern == 1)
+    {
+        l1 = 1;
+        l2 = g2;
+    }
+    else if (pattern == 2)
+    {
+        /* 4x4 array */
+        l1 = 4;
+        l2 = 4;
+    }
+    else
+    {
+        printf ("wrong argument.\n");
+    }
+
+    npe_1 = g1 / l1;
+    npe_2 = g2 / l2;
+
+    o1 = (rank / npe_2) * l1;
+    o2 = (rank % npe_2) * l2;
+
+    double t[l1*l2];
+    int p[l1*l2];
+
+    for (i = 0; i < l1 * l2; i++)
+    {
+        t[i] = o1 * g2 + o2 + (i / l2) * g2 + i % l2;
+        p[i] = 1000 + t[i];  
+    }
+
+    strcpy (filename, "adios_amr_write_2vars.bp");
+
+    adios_init ("adios_amr_write_2vars.xml");
+
+    adios_open (&adios_handle, "temperature", filename, "w", &comm);
+
+    adios_groupsize = 4  * 8\
+                    + 8 * l1 * l2
+                    + 4 * l1 * l2;
+    adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);
+    adios_write (adios_handle, "l1", &l1);
+    adios_write (adios_handle, "l2", &l2);
+    adios_write (adios_handle, "o1", &o1);
+    adios_write (adios_handle, "o2", &o2);
+    adios_write (adios_handle, "g1", &g1);
+    adios_write (adios_handle, "g2", &g2);
+    adios_write (adios_handle, "temperature", t);
+    adios_write (adios_handle, "pressure", p);
+
+    adios_close (adios_handle);
+
+    adios_finalize (rank);
+
+    MPI_Finalize ();
+
+    return 0;
+}
diff --git a/tests/suite/programs/adios_amr_write_2vars.xml b/tests/suite/programs/adios_amr_write_2vars.xml
new file mode 100644
index 0000000..9017a3c
--- /dev/null
+++ b/tests/suite/programs/adios_amr_write_2vars.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<adios-config host-language="C">
+    <adios-group name="temperature" coordination-communicator="comm" stats="On">
+    <var name="g1" type="integer"/>
+    <var name="g2" type="integer"/>
+    <var name="o1" type="integer"/>
+    <var name="o2" type="integer"/>
+    <var name="l1" type="integer"/>
+    <var name="l2" type="integer"/>
+    <global-bounds dimensions="g1,g2" offsets="o1,o2">
+       <var name="temperature" gwrite="t" type="double" dimensions="l1,l2"/>
+       <var name="pressure" gwrite="p" type="integer" dimensions="l1,l2"/>
+    </global-bounds>
+    <attribute name="description" path="/temperature" value="Global array written from 'size' processes" type="string"/>
+</adios-group>
+
+<method group="temperature" method="MPI_AMR">stripe_count=1;stripe_size=10485760;num_aggregators=8;merging_pgs=0</method>
+
+<buffer size-MB="100" allocate-time="now"/>
+
+</adios-config>
+
diff --git a/tests/suite/programs/adios_staged_read.c b/tests/suite/programs/adios_staged_read.c
new file mode 100644
index 0000000..875b67f
--- /dev/null
+++ b/tests/suite/programs/adios_staged_read.c
@@ -0,0 +1,190 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* This code is used to test staged-read method.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define ADIOS_USE_READ_API_1
+#include "public/adios_read.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+enum pattern 
+{
+    PATTERN_1 = 1,
+    PATTERN_2,
+    PATTERN_3,
+    PATTERN_4,
+    PATTERN_5
+};
+
+int main (int argc, char ** argv) 
+{
+    char filename [256];
+    int rank, size, i, j, NX, pattern;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    void * data = NULL, * data1 = NULL, * data2 = NULL;
+    uint64_t start[2], count[2], bytes_read = 0, slice_size;
+
+    MPI_Init (&argc, &argv);
+
+    if (argc != 2)
+    {
+        printf ("Invalid command line arguments.\n");
+        exit (1);
+    }
+
+    pattern = atoi (argv[1]);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    /* set the read method to staged read */
+    adios_set_read_method (ADIOS_READ_METHOD_BP_AGGREGATE);
+
+    ADIOS_FILE * f = adios_fopen ("adios_amr_write.bp", comm);
+
+    if (!f)
+    {
+        printf ("%s\n", adios_errmsg());
+        return -1;
+    }
+
+    ADIOS_GROUP * g = adios_gopen (f, "temperature");
+    if (!g)
+    {
+        printf ("%s\n", adios_errmsg());
+        return -1;
+    }
+
+    ADIOS_VARINFO * v = adios_inq_var (g, "temperature");
+
+    switch (pattern)
+    {
+        case PATTERN_1:
+            slice_size = v->dims[0]/size;
+
+            start[0] = rank * slice_size;
+            count[0] = slice_size;
+            if (rank == size - 1)
+            {
+                slice_size = slice_size + v->dims[0] % size;
+            }
+
+            start[1] = 0;
+            count[1] = v->dims[1];
+
+            data = malloc (slice_size * v->dims[1] * sizeof (double));
+
+            break;
+        case PATTERN_2:
+            start[0] = 0;
+            count[0] = v->dims[0];
+
+            slice_size = v->dims[1]/size;
+
+            start[1] = slice_size * rank;
+            if (rank == size - 1)
+            {
+                slice_size = slice_size + v->dims[1] % size;
+            }
+            count[1] = slice_size;
+
+            data = malloc (slice_size * v->dims[0] * sizeof (double));
+
+            break;
+        case PATTERN_3:
+            start[0] = 0;
+            count[0] = 4;
+
+            slice_size = 3;
+
+            start[1] = 2 + slice_size * rank;
+            count[1] = slice_size;
+
+            data = malloc (slice_size * count[0] * sizeof (double));
+
+            break;
+        case PATTERN_4:
+            start[0] = 0;
+            count[0] = 32;
+
+            slice_size = 3;
+
+            start[1] = 2 + slice_size * rank;
+            count[1] = slice_size;
+
+            data = malloc (slice_size * count[0] * sizeof (double));
+
+            break;
+        case PATTERN_5:
+            start[0] = 0;
+            count[0] = 32;
+
+            slice_size = 3;
+
+            start[1] = 2 + slice_size * rank;
+            count[1] = slice_size;
+
+            data = malloc (slice_size * count[0] * sizeof (double));
+
+            break;
+        default:
+            printf ("wrong pattern value\n");
+    }
+
+    assert (data);
+    bytes_read = adios_read_var (g, "temperature", start, count, data);
+
+    adios_gclose (g);
+
+    adios_fclose (f);
+
+    if (pattern != PATTERN_5)
+    {
+        if (rank == 0)
+        {
+            for (i = 0; i < count[0]; i++)
+            {
+                for (j = 0; j < count[1]; j++)
+                {
+                    printf (" %7.5g", * ((double *)data + i * count[1] + j));
+                }
+
+                printf ("\n");
+            }
+        }
+    }
+    else
+    {
+        if (rank == 1)
+        {
+            for (i = 0; i < count[0]; i++)
+            {
+                for (j = 0; j < count[1]; j++)
+                {
+                    printf (" %7.5g", * ((double *)data + i * count[1] + j));
+                }
+
+                printf ("\n");
+            }
+        }
+    }
+
+    free (data);
+    adios_free_varinfo (v);
+
+    MPI_Finalize ();
+
+    return 0;
+}
diff --git a/tests/suite/programs/adios_staged_read_2vars.c b/tests/suite/programs/adios_staged_read_2vars.c
new file mode 100644
index 0000000..d8e4169
--- /dev/null
+++ b/tests/suite/programs/adios_staged_read_2vars.c
@@ -0,0 +1,272 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* This code is used to test staged-read method.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#define ADIOS_USE_READ_API_1
+#include "public/adios_read.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+enum pattern 
+{
+    PATTERN_1 = 1,
+    PATTERN_2,
+    PATTERN_3,
+    PATTERN_4,
+    PATTERN_5
+};
+
+int main (int argc, char ** argv) 
+{
+    char filename [256];
+    int rank, size, i, j, NX, pattern;
+    MPI_Comm comm = MPI_COMM_WORLD;
+    void * data1 = NULL, * data2 = NULL;
+    uint64_t start1[2], count1[2], bytes_read = 0, slice_size;
+    uint64_t start2[2], count2[2];
+
+    MPI_Init (&argc, &argv);
+
+    if (argc != 2)
+    {
+        printf ("Invalid command line arguments.\n");
+        exit (1);
+    }
+
+    pattern = atoi (argv[1]);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    /* set the read method to staged read */
+    adios_set_read_method (ADIOS_READ_METHOD_BP_AGGREGATE);
+
+    ADIOS_FILE * f = adios_fopen ("adios_amr_write_2vars.bp", comm);
+
+    if (!f)
+    {
+        printf ("%s\n", adios_errmsg());
+        return -1;
+    }
+
+    ADIOS_GROUP * g = adios_gopen (f, "temperature");
+    if (!g)
+    {
+        printf ("%s\n", adios_errmsg());
+        return -1;
+    }
+
+    ADIOS_VARINFO * v1 = adios_inq_var (g, "temperature");
+    ADIOS_VARINFO * v2 = adios_inq_var (g, "pressure");
+
+    switch (pattern)
+    {
+        case PATTERN_1:
+            /* temperature */
+            slice_size = v1->dims[0]/size;
+
+            start1[0] = rank * slice_size;
+            count1[0] = slice_size;
+            if (rank == size - 1)
+            {
+                slice_size = slice_size + v1->dims[0] % size;
+            }
+
+            start1[1] = 0;
+            count1[1] = v1->dims[1];
+
+            /* pressure */
+            slice_size = v2->dims[0]/size;
+
+            start2[0] = rank * slice_size;
+            count2[0] = slice_size;
+            if (rank == size - 1)
+            {
+                slice_size = slice_size + v2->dims[0] % size;
+            }
+
+            start2[1] = 0;
+            count2[1] = v2->dims[1];
+
+            break;
+        case PATTERN_2:
+            /* temperature */
+            start1[0] = 0;
+            count1[0] = v1->dims[0];
+
+            slice_size = v1->dims[1]/size;
+
+            start1[1] = slice_size * rank;
+            if (rank == size - 1)
+            {
+                slice_size = slice_size + v1->dims[1] % size;
+            }
+            count1[1] = slice_size;
+
+            /* pressure */
+            start2[0] = 0;
+            count2[0] = v2->dims[0];
+
+            slice_size = v2->dims[1]/size;
+
+            start2[1] = slice_size * rank;
+            if (rank == size - 1)
+            {
+                slice_size = slice_size + v2->dims[1] % size;
+            }
+            count2[1] = slice_size;
+
+            break;
+        case PATTERN_3:
+            /* temperature */
+            start1[0] = 0;
+            count1[0] = 4;
+
+            slice_size = 3;
+
+            start1[1] = 2 + slice_size * rank;
+            count1[1] = slice_size;
+
+            /* pressure */
+            start2[0] = 0;
+            count2[0] = 4;
+
+            slice_size = 3;
+
+            start2[1] = 2 + slice_size * rank;
+            count2[1] = slice_size;
+
+            break;
+        case PATTERN_4:
+            /* temperature */
+            start1[0] = 0;
+            count1[0] = 32;
+
+            slice_size = 3;
+
+            start1[1] = 2 + slice_size * rank;
+            count1[1] = slice_size;
+
+            /* pressure */
+            start2[0] = 0;
+            count2[0] = 32;
+
+            slice_size = 3;
+
+            start2[1] = 2 + slice_size * rank;
+            count2[1] = slice_size;
+
+            break;
+        case PATTERN_5:
+            /* temperature */
+            start1[0] = 0;
+            count1[0] = 32;
+
+            slice_size = 3;
+
+            start1[1] = 2 + slice_size * rank;
+            count1[1] = slice_size;
+
+            /* pressure */
+            start2[0] = 0;
+            count2[0] = 32;
+
+            slice_size = 3;
+
+            start2[1] = 2 + slice_size * rank;
+            count2[1] = slice_size;
+
+            break;
+        default:
+            printf ("wrong pattern value\n");
+    }
+
+    data1 = malloc (count1[0] * count1[1] * sizeof (double));
+    data2 = malloc (count2[0] * count2[1] * sizeof (int));
+    assert (data1);
+    assert (data2);
+
+    adios_read_var (g, "temperature", start1, count1, data1);
+    adios_read_var (g, "pressure", start2, count2, data2);
+
+    adios_gclose (g);
+
+    adios_fclose (f);
+
+    if (pattern != PATTERN_5)
+    {
+        if (rank == 0)
+        {
+            for (i = 0; i < count1[0]; i++)
+            {
+                for (j = 0; j < count1[1]; j++)
+                {
+                    printf (" %7.5g", * ((double *)data1 + i * count1[1] + j));
+                }
+
+                printf ("\n");
+            }
+
+            printf ("\n");
+
+            for (i = 0; i < count2[0]; i++)
+            {
+                for (j = 0; j < count2[1]; j++)
+                {
+                    printf (" %7d", * ((int *)data2 + i * count2[1] + j));
+                }
+
+                printf ("\n");
+            }
+        }
+    }
+    else
+    {
+        if (rank == 1)
+        {
+            for (i = 0; i < count1[0]; i++)
+            {
+                for (j = 0; j < count1[1]; j++)
+                {
+                    printf (" %7.5g", * ((double *)data1 + i * count1[1] + j));
+                }
+
+                printf ("\n");
+            }
+
+            printf ("\n");
+
+            for (i = 0; i < count2[0]; i++)
+            {
+                for (j = 0; j < count2[1]; j++)
+                {
+                    printf (" %7d", * ((int *)data2 + i * count2[1] + j));
+                }
+
+                printf ("\n");
+            }
+
+        }
+    }
+
+    free (data1);
+    free (data2);
+    adios_free_varinfo (v1);
+    adios_free_varinfo (v2);
+
+    MPI_Finalize ();
+
+    return 0;
+}
diff --git a/tests/suite/programs/adios_staged_read_v2.c b/tests/suite/programs/adios_staged_read_v2.c
new file mode 100644
index 0000000..71cf206
--- /dev/null
+++ b/tests/suite/programs/adios_staged_read_v2.c
@@ -0,0 +1,187 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* This code is used to test staged-read method.
+*/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "mpi.h"
+
+#include "public/adios_read.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+enum pattern 
+{
+    PATTERN_1 = 1,
+    PATTERN_2,
+    PATTERN_3,
+    PATTERN_4,
+    PATTERN_5
+};
+
+int main (int argc, char ** argv) 
+{
+    char filename [256];
+    int rank, size, i, j, NX, pattern, err;
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    void * data = NULL, * data1 = NULL, * data2 = NULL;
+    uint64_t start[2], count[2], bytes_read = 0, slice_size;
+    ADIOS_SELECTION *sel;
+    ADIOS_FILE * f;
+    ADIOS_VARINFO * vi;
+
+    MPI_Init (&argc, &argv);
+
+    if (argc != 2)
+    {
+        printf ("Invalid command line arguments.\n");
+        exit (1);
+    }
+
+    pattern = atoi (argv[1]);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    err = adios_read_init_method(ADIOS_READ_METHOD_BP_AGGREGATE, comm, "verbose=2");
+
+    f = adios_read_open_file ("adios_amr_write.bp", ADIOS_READ_METHOD_BP_AGGREGATE, comm);
+    if (!f)
+    {
+        printf ("Error at opening file: %s\n", adios_errmsg());
+        return 1;
+    }
+
+
+    ADIOS_VARINFO * v = adios_inq_var (f, "temperature");
+    switch (pattern)
+    {
+        case PATTERN_1:
+            slice_size = v->dims[0]/size;
+
+            start[0] = rank * slice_size;
+            count[0] = slice_size;
+            if (rank == size - 1)
+            {
+                slice_size = slice_size + v->dims[0] % size;
+            }
+
+            start[1] = 0;
+            count[1] = v->dims[1];
+
+            data = malloc (slice_size * v->dims[1] * sizeof (double));
+
+            break;
+        case PATTERN_2:
+            start[0] = 0;
+            count[0] = v->dims[0];
+
+            slice_size = v->dims[1]/size;
+
+            start[1] = slice_size * rank;
+            if (rank == size - 1)
+            {
+                slice_size = slice_size + v->dims[1] % size;
+            }
+            count[1] = slice_size;
+
+            data = malloc (slice_size * v->dims[0] * sizeof (double));
+
+            break;
+        case PATTERN_3:
+            start[0] = 0;
+            count[0] = 4;
+
+            slice_size = 3;
+
+            start[1] = 2 + slice_size * rank;
+            count[1] = slice_size;
+
+            data = malloc (slice_size * count[0] * sizeof (double));
+
+            break;
+        case PATTERN_4:
+            start[0] = 0;
+            count[0] = 32;
+
+            slice_size = 3;
+
+            start[1] = 2 + slice_size * rank;
+            count[1] = slice_size;
+
+            data = malloc (slice_size * count[0] * sizeof (double));
+
+            break;
+        case PATTERN_5:
+            start[0] = 0;
+            count[0] = 32;
+
+            slice_size = 3;
+
+            start[1] = 2 + slice_size * rank;
+            count[1] = slice_size;
+
+            data = malloc (slice_size * count[0] * sizeof (double));
+
+            break;
+        default:
+            printf ("wrong pattern value\n");
+    }
+
+    assert (data);
+
+    sel = adios_selection_boundingbox (2, start, count);
+    adios_schedule_read (f, sel, "temperature", 0, 1, data);
+    adios_perform_reads (f, 1);
+    adios_selection_delete (sel);
+
+    adios_read_close(f);
+
+
+    if (pattern != PATTERN_5)
+    {
+        if (rank == 0)
+        {
+            for (i = 0; i < count[0]; i++)
+            {
+                for (j = 0; j < count[1]; j++)
+                {
+                    printf (" %7.5g", * ((double *)data + i * count[1] + j));
+                }
+
+                printf ("\n");
+            }
+        }
+    }
+    else
+    {
+        if (rank == 1)
+        {
+            for (i = 0; i < count[0]; i++)
+            {
+                for (j = 0; j < count[1]; j++)
+                {
+                    printf (" %7.5g", * ((double *)data + i * count[1] + j));
+                }
+
+                printf ("\n");
+            }
+        }
+    }
+
+    free (data);
+    adios_free_varinfo (v);
+
+    adios_read_finalize_method (ADIOS_READ_METHOD_BP_AGGREGATE);
+    MPI_Finalize ();
+
+    return 0;
+}
diff --git a/tests/suite/programs/connect_to_space_subset.c b/tests/suite/programs/connect_to_space_subset.c
new file mode 100644
index 0000000..33bc97e
--- /dev/null
+++ b/tests/suite/programs/connect_to_space_subset.c
@@ -0,0 +1,175 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C test: 
+ *  Connect to staging server from a subset of processes, write data and close.
+ *
+ * How to run: mpirun -np <N> connect_to_space_subset <M>
+ * where 1 <= M <= N
+ * Output: exit code 0 = OK, != 0 on error
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <errno.h>
+#include "mpi.h"
+#include "public/adios.h"
+#include "public/adios_read.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+#define log(...) fprintf (stderr, "[rank=%3.3d, line %d]: ", wrank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+#define printE(...) fprintf (stderr, "[rank=%3.3d, line %d]: ERROR: ", wrank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+
+static const int NSTEPS = 5;
+static const char FILENAME[] = "connect.bp";
+#define VALUE(rank, step) (rank * 100 + step)
+#define VALUE0(step) (step)
+
+/* Variables to write */
+int  *a1;
+
+static const int ldim1 = 7;
+int gdim1;
+int offs1;
+
+MPI_Comm   wcomm = MPI_COMM_WORLD;
+MPI_Comm   subcomm;
+int wrank, subrank;
+int wsize, subsize;
+
+int64_t    m_adios_group;
+
+
+void alloc_vars()
+{
+    int n;
+
+    gdim1 = subsize*ldim1;
+
+    offs1 = subrank*ldim1;
+
+    n = ldim1;
+    a1  = (int*) malloc (n * sizeof(int));
+}
+
+void set_vars(int step)
+{
+    int n, i;
+    int v = VALUE(subrank, step);
+
+    n = ldim1;
+    for (i=0; i<n; i++) a1[i] = v;
+}
+
+void fini_vars()
+{
+    free (a1);
+}
+
+void Usage()
+{
+    printf("Usage: mpirun -np <N> connect_to_space_subset <M>\n"
+            "    <N>:   Number of processes\n"
+            "    <M>:   Number of processes connecting to staging server\n"
+            "           1 <= M <= N\n");
+}
+
+
+int write_file (int step);
+
+int main (int argc, char ** argv) 
+{
+    int err,i,M; 
+    int iconnect;
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (wcomm, &wrank);
+    MPI_Comm_size (wcomm, &wsize);
+
+    if (argc < 2) { Usage(); return 1; }
+    errno = 0;
+    M = strtol (argv[1], NULL, 10);
+    if (errno || M < 1 || M > wsize) { 
+        printE("Invalid 1st argument %s\n", argv[1]); Usage(); return 1;
+    }
+
+    iconnect = (wrank >= wsize-M); // connect to server from ranks N-M, N-M+1, ..., N 
+    MPI_Comm_split (wcomm, iconnect, wrank+M-wsize, &subcomm);  
+    MPI_Comm_rank (subcomm, &subrank);
+    MPI_Comm_size (subcomm, &subsize);
+    if (iconnect) {
+        if (subsize != M) {
+            printE ("Something wrong with communicator split: N=%d, M=%d, splitted size=%d\n",
+                     wsize, M, subsize);
+            return 2;
+        }
+        log ("connect as subrank %d\n", subrank);
+    }
+
+    alloc_vars();
+    adios_read_init_method(ADIOS_READ_METHOD_DATASPACES, wcomm, "verbose=4");
+    adios_init_noxml ();
+    adios_allocate_buffer (ADIOS_BUFFER_ALLOC_NOW, 1);
+
+    if (iconnect) 
+    {
+        adios_declare_group (&m_adios_group, "connect", "iter", adios_flag_yes);
+        adios_select_method (m_adios_group, "DATASPACES", "verbose=4", "");
+        adios_define_var (m_adios_group, "ldim1", "", adios_integer, 0, 0, 0);
+        adios_define_var (m_adios_group, "gdim1", "", adios_integer, 0, 0, 0);
+        adios_define_var (m_adios_group, "offs1", "", adios_integer, 0, 0, 0);
+        adios_define_var (m_adios_group, "a1", "", adios_integer, 
+                                         "ldim1", "gdim1", "offs1");
+    
+        for (i=0; i<NSTEPS; i++) {
+            if (!err) {
+                set_vars (i);
+                err = write_file (i); 
+            }
+        }
+    }
+    log ("done with work, sync with others...\n");
+    MPI_Barrier (wcomm);
+    log ("call adios_finalize...\n");
+    adios_finalize (wrank);
+    log ("call adios_read_finalize_method...\n");
+    adios_read_finalize_method (ADIOS_READ_METHOD_DATASPACES);
+    fini_vars();
+    MPI_Finalize ();
+    return err;
+}
+
+
+int write_file (int step) 
+{
+    int64_t       fh;
+    uint64_t       groupsize=0, totalsize;
+
+    log ("Write step %d to %s\n", step, FILENAME);
+    adios_open (&fh, "connect", FILENAME, (step ? "a" : "w"), &subcomm);
+    
+    groupsize  = 3 * sizeof(int);                           // dimensions 
+    groupsize += ldim1 * sizeof(int);                       // 1D 
+
+    adios_group_size (fh, groupsize, &totalsize);
+
+    adios_write (fh, "gdim1", &gdim1);
+    adios_write (fh, "ldim1", &ldim1);
+    adios_write (fh, "offs1", &offs1);
+    adios_write (fh, "a1", a1);
+
+    adios_close (fh);
+    MPI_Barrier (subcomm);
+    return 0;
+}
+
+
diff --git a/tests/suite/programs/local_array_time.c b/tests/suite/programs/local_array_time.c
new file mode 100644
index 0000000..64bcb32
--- /dev/null
+++ b/tests/suite/programs/local_array_time.c
@@ -0,0 +1,173 @@
+/*
+
+   Simple cosine and sine 1D arrays over time from
+   a single process.
+   Test: can we read back the timed 2D arrays?
+
+*/
+
+/* Include other header files */
+#include <stdio.h>
+#include <math.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <time.h>
+#include <fcntl.h>
+
+/* ADIOS include files */
+//#include "mpi.h"
+#include "public/adios.h"
+
+/* ------------------ Global variables (for main.c only) ------------------ */
+// Simulation Variables
+//---------------------
+char basedatapath[256] ;        // data output files' starting path (without varname)
+char baseimgpath[256] ;         // image output files' starting path (without varname)
+char outpath1[256] ;         	// data output files' starting path (can be extended with subdirs, names, indexes)
+char outpath2[256] ;         	// image output files' starting path (can be extended with subdirs, names, indexes)
+char title[256];            	// Title of the (single) plot
+char subtitle[256];         	// subtitle of the (single) plot
+char xname[256];            	// force to plot this as X axis string
+char varname [100];            	// variable name
+char vardirpath[256];          	// variable path for a variable name
+char txtpath[256];            	// text path for a text file to be registered
+char datapath[256];            	// data path for a data file to be registered
+char longvarname[256];
+
+// Utility variable to create directories
+int res0 = 0;
+
+/* ------------------------------ Prototypes ------------------------------ */
+// Print out raw data files (Here simple ASCII files, later BP files)
+static int print_data_1D(float timestep, int npoints, float *x, float *y, int output_xml);
+
+/* --------------------------------- Main --------------------------------- */
+int main( int argc, char ** argv)
+{
+    char        filename [256];
+    MPI_Comm    comm = MPI_COMM_WORLD;
+    int         rank, size;
+    /* ADIOS variables declarations for matching gwrite_schema.ch */
+    int         adios_err;
+    uint64_t    adios_groupsize, adios_totalsize;
+    int64_t     adios_handle;
+    float       tmax = 10.0;
+    float       dt = 0.5;  // run from 0.0 increasing with 'dt' up to 'tmax'
+    int         i;
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    adios_init ("local_array_time.xml");
+    strcpy(filename, "local_array_time.bp");
+
+
+    // Declare and Initialize essential variables
+    int num_points = 37;
+    float angles[num_points];
+    float cos_of_angles[num_points];
+    float sin_of_angles[num_points];
+    float pi;
+
+    // Obtain pi once for all
+    pi = 4.0*atan(1.0);
+
+    // Initialize angles in degrees
+    float angle_degree = 0;
+    for (i=0; i<num_points; i++) {
+        angles[i] = pi * angle_degree/180.0;
+        angle_degree = angle_degree + 10.0;
+    }
+
+    //  Scan over time
+    float timestep = 0.0;
+    for (timestep = 0.0; timestep <= tmax; timestep = timestep + dt) {
+
+        if (timestep == 0.0) {
+            printf("\n\n\nopen file\n\n\n");
+            adios_open (&adios_handle, "schema", filename, "w", &comm);
+        } else {
+            adios_open (&adios_handle, "schema", filename, "a", &comm);
+        }
+
+        for (i=0; i<num_points; i++) {
+            cos_of_angles[i] = cos(angles[i]*timestep);
+            sin_of_angles[i] = sin(angles[i]*timestep);
+        }
+
+        adios_groupsize = 4 + 4 \
+                + 4*num_points \
+                + 4*num_points;
+        if (timestep == 0 && rank == 0) {
+            adios_groupsize += 4 + 4 + 4*num_points;
+        }
+        adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);
+
+        adios_write (adios_handle, "num_points", &num_points);
+        adios_write (adios_handle, "t", &timestep);
+        if (timestep == 0 && rank == 0) {
+            adios_write (adios_handle, "tmax", &tmax);
+            adios_write (adios_handle, "dt", &dt);
+            adios_write (adios_handle, "angles", angles);
+        }
+        adios_write (adios_handle, "cos", cos_of_angles);
+        adios_write (adios_handle, "sin", sin_of_angles);
+
+        adios_close (adios_handle);
+
+        // Write out raw data
+        print_data_1D(timestep, num_points, angles, sin_of_angles, 0);
+    }
+   
+    MPI_Barrier (comm);
+
+    adios_finalize (rank);
+
+    MPI_Finalize ();
+
+    return 0;
+}
+
+/**
+  Print out a 1D array into ascii or xlm files
+  ascii format 1: "X Y"
+ */
+static int print_data_1D(float timestep, int npoints, float *x, float *y, int output_xml) {
+    char fn[256];
+    FILE *f;
+    int i;
+    char xstr[128], ystr[128];
+    char *xname = "rad";
+    char *yname = "sin(rad)";
+
+    snprintf(fn, 256, "local_array_time.%g.txt", timestep);
+    printf ("Write file %s\n", fn);
+
+    if ((f = fopen(fn,"w")) == NULL) {
+        fprintf(stderr, "Error at opening for writing file %s: %s\n",
+                fn, strerror(errno));
+        return 1;
+    }
+
+    if (output_xml == 1) {
+        fprintf(f, "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n");
+        fprintf(f, "<plot xname=\"%s\" yname=\"%s\">\n", xname, yname);
+        for (i=0; i<npoints; i++) {
+            sprintf( xstr, "%g", x[i] );
+            sprintf( ystr, "%g", y[i] );
+            fprintf(f,"  <point> <X>%s</X>  <Y>%s</Y> </point>\n", xstr, ystr);
+        }
+        fprintf(f, "</plot>\n");
+    } else if (output_xml == 0){
+        for (i=0; i<npoints; i++) {
+            fprintf(f, "%g %g\n", x[i], y[i]);
+        }
+    }
+
+    fclose(f);
+    return 0;
+}
+
diff --git a/tests/suite/programs/local_array_time.xml b/tests/suite/programs/local_array_time.xml
new file mode 100644
index 0000000..57c45ea
--- /dev/null
+++ b/tests/suite/programs/local_array_time.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0"?>
+<adios-config host-language="C">
+    <adios-group name="schema" coordination-communicator="comm" time-index="iter">
+    <var name="num_points" type="integer"/>
+    <var name="tmax"       type="float"/>
+    <var name="dt"         type="float"/>
+    <var name="angles" gwrite="anglevalues" type="float" dimensions="num_points"/>
+    <var name="t"   gwrite="timestep" type="float" dimensions="iter"/>
+    <var name="cos" gwrite="cos_of_anglevalues" type="float" dimensions="iter,num_points"/>
+    <var name="sin" gwrite="sin_of_anglevalues" type="float" dimensions="iter,num_points"/>
+    <attribute name="description" path="/" 
+        value="File to test if ADIOS can read a local array over time" 
+        type="string"/>
+</adios-group>
+<method group="schema" method="MPI"/>
+<buffer size-MB="1" allocate-time="now"/>
+</adios-config>
diff --git a/tests/suite/programs/many_vars.c b/tests/suite/programs/many_vars.c
new file mode 100644
index 0000000..1400f93
--- /dev/null
+++ b/tests/suite/programs/many_vars.c
@@ -0,0 +1,418 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C test: 
+ *  Write a huge number of variables
+ *  Then read them all and check if they are correct. 
+ *
+ * How to run: mpirun -np <N> many_vars <nvars> <blocks per process> <steps>
+ * Output: many_vars.bp
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <errno.h>
+#include "mpi.h"
+#include "public/adios.h"
+#include "public/adios_read.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+#define log(...) fprintf (stderr, "[rank=%3.3d, line %d]: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+#define printE(...) fprintf (stderr, "[rank=%3.3d, line %d]: ERROR: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+
+int NVARS = 1;
+int NBLOCKS = 1;
+int NSTEPS = 1;
+static const char FILENAME[] = "many_vars.bp";
+#define VALUE(rank, step, block) (step * 10000 + 10*rank + block)
+
+/* Variables to write */
+int  *a2;
+
+static const int ldim1 = 5;
+static const int ldim2 = 5;
+int gdim1, gdim2;
+int offs1, offs2;
+
+int64_t       m_adios_group;
+
+/* Variables to read */
+int  *r2;
+
+MPI_Comm    comm = MPI_COMM_WORLD;
+int rank;
+int size;
+char ** varnames;
+
+void alloc_vars()
+{
+    int n,i;
+
+    n = ldim1 * ldim2;
+    a2  = (int*) malloc (n * sizeof(int));
+    r2  = (int*) malloc (n * sizeof(int));
+    varnames = (char**) malloc (NVARS * sizeof(char*));
+    for (i=0; i<NVARS; i++) {
+        varnames[i] = (char*) malloc (16);
+    }
+
+    /* make varnames like v001,v002,.. */
+    int digit=1, d=10;
+    while (NVARS/d > 0) {
+        d *= 10;
+        digit++;
+    }
+
+    char fmt[16];
+    sprintf (fmt, "v%%%d.%dd",digit,digit);
+    printf ("ftm=[%s]\n", fmt);
+    for (i=0; i<NVARS; i++) {
+        //sprintf(varnames[i], "v%-*d", digit, i);
+        sprintf(varnames[i], fmt, i);
+    }
+    printf ("varname[0]=%s\n", varnames[0]);
+    printf ("varname[%d]=%s\n", NVARS-1, varnames[NVARS-1]);
+}
+
+void set_gdim()
+{
+    gdim1 = size*ldim1;
+    gdim2 = NBLOCKS*ldim2;
+}
+
+void set_vars(int step, int block)
+{
+    int n, i;
+    int v = VALUE(rank, step, block);
+
+    offs1 = rank*ldim1;
+    offs2 = block*ldim2;
+
+    n = ldim1 * ldim2;
+    for (i=0; i<n; i++) a2[i] = v;
+}
+
+void fini_vars()
+{
+    int i;
+    free (a2);
+    free (r2);
+    for (i=0; i<NVARS; i++) {
+        free(varnames[i]);
+    }
+    free(varnames);
+}
+
+void Usage() 
+{
+    printf("Usage: many_vars <nvars> <nblocks> <nsteps>\n" 
+            "    <nvars>:   Number of variables to generate\n"
+            "    <nblocks>: Number of blocks per process to write\n"
+            "    <nsteps>:  Number of write cycles (to same file)\n");
+}
+
+void define_vars ();
+int write_file (int step);
+int read_file ();
+
+int main (int argc, char ** argv) 
+{
+    int err,i ; 
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    if (argc < 2) { Usage(); return 1; }
+
+    errno = 0;
+    i = strtol (argv[1], NULL, 10);
+    if (errno || i < 1) { printf("Invalid 1st argument %s\n", argv[1]); Usage(); return 1;}
+    NVARS = i;
+
+    if (argc > 2) {
+        i = strtol (argv[2], NULL, 10);
+        if (errno || i < 1) { printf("Invalid 2nd argument %s\n", argv[2]); Usage(); return 1;}
+        NBLOCKS = i;
+    }
+
+    if (argc > 3) {
+        i = strtol (argv[3], NULL, 10);
+        if (errno || i < 1) { printf("Invalid 3rd argument %s\n", argv[3]); Usage(); return 1;}
+        NSTEPS = i;
+    }
+
+    alloc_vars();
+    adios_init_noxml ();
+    adios_allocate_buffer (ADIOS_BUFFER_ALLOC_NOW, 10);
+    err = adios_read_init_method(ADIOS_READ_METHOD_BP, comm, "verbose=2");
+    if (err) {
+        printE ("%s\n", adios_errmsg());
+    }
+
+    adios_declare_group (&m_adios_group, "multiblock", "iter", adios_flag_yes);
+    adios_select_method (m_adios_group, "MPI", "", "");
+
+
+    define_vars();
+    set_gdim();
+    
+    for (i=0; i<NSTEPS; i++) {
+        if (!err) {
+            err = write_file (i); 
+        }
+    }
+
+    //if (!err)
+    //    err = read_file (); 
+
+    adios_read_finalize_method (ADIOS_READ_METHOD_BP);
+    adios_finalize (rank);
+    fini_vars();
+    MPI_Finalize ();
+    return err;
+}
+
+void define_vars ()
+{
+    int i, block;
+
+    adios_define_var (m_adios_group, "ldim1", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "ldim2", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "gdim1", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "gdim2", "", adios_integer, 0, 0, 0);
+
+    for (block=0; block<NBLOCKS; block++) {
+        adios_define_var (m_adios_group, "offs1", "", adios_integer, 0, 0, 0);
+        adios_define_var (m_adios_group, "offs2", "", adios_integer, 0, 0, 0);
+
+        for (i=0; i<NVARS; i++) {
+            adios_define_var (m_adios_group, varnames[i], "", adios_integer, 
+                    "iter,ldim1,ldim2",
+                    "gdim1,gdim2",
+                    "offs1,offs2");
+        }
+    }
+}
+
+int write_file (int step) 
+{
+    int64_t       fh;
+    uint64_t       groupsize=0, totalsize;
+    int           block, v, i;
+
+    log ("Write step %d to %s\n", step, FILENAME);
+    adios_open (&fh, "multiblock", FILENAME, (step ? "a" : "w"), &comm);
+    
+    groupsize  = (4 + NBLOCKS*2) * sizeof(int);             // dimensions 
+    groupsize += NVARS * NBLOCKS * ldim1 * ldim2 * sizeof(int);     // 2D  blocks
+    //groupsize +=1024;
+
+    adios_group_size (fh, groupsize, &totalsize);
+    log ("  groupsize %lld, totalsize %lld\n", groupsize, totalsize);
+
+    adios_write (fh, "gdim1", &gdim1);
+    adios_write (fh, "gdim2", &gdim2);
+    adios_write (fh, "ldim1", &ldim1);
+    adios_write (fh, "ldim2", &ldim2);
+
+    for (block=0; block<NBLOCKS; block++) {
+        v = VALUE(rank, step, block);
+        log ("  Write block %d, value %d to %s\n", block, v, FILENAME);
+        set_vars (step, block);
+
+        adios_write (fh, "offs1", &offs1);
+        adios_write (fh, "offs2", &offs2);
+
+        for (i=0; i<NVARS; i++) {
+            adios_write (fh, varnames[i], a2);
+        }
+    }
+
+    adios_close (fh);
+    MPI_Barrier (comm);
+    return 0;
+}
+
+#if 0
+#define CHECK_VARINFO(VARNAME, NDIM, NSTEPS) \
+    vi = adios_inq_var (f, VARNAME); \
+    if (vi == NULL) { \
+        printE ("No such variable " VARNAME "\n"); \
+        err = 101; \
+        goto endread; \
+    } \
+    if (vi->ndim != NDIM) { \
+        printE ("Variable " VARNAME " has %d dimensions, but expected %d\n", vi->ndim, NDIM); \
+        err = 102; \
+        goto endread; \
+    } \
+    if (vi->nsteps != NSTEPS) { \
+        printE ("Variable " VARNAME " has %d steps, but expected %d\n", vi->nsteps, NSTEPS); \
+        err = 103; \
+        /*goto endread; */\
+    } \
+    adios_free_varinfo (vi);
+
+#define CHECK_SCALAR(VARNAME, VAR, VALUE, STEP) \
+    if (VAR != VALUE) { \
+        printE (#VARNAME " step %d: wrote %d but read %d\n",STEP,VALUE,VAR);\
+        err = 104; \
+        /*goto endread;*/\
+    }
+
+#define CHECK_ARRAY(VARNAME,A,N,VALUE,STEP,i) \
+    for (i=0;i<N;i++) \
+        if (A[i] != VALUE) { \
+            printE (#VARNAME "[%d] step %d: wrote %d but read %d\n",i,STEP,VALUE,A[i]);\
+            err = 104; \
+            /*goto endread;*/\
+            break; \
+        }
+
+void reset_readvars()
+{
+    int n;
+    
+    n = ldim1 * ldim2;
+    memset (r2,  -1, n*sizeof(int));
+}
+
+int read_file ()
+{
+    ADIOS_SELECTION *sel2;
+    ADIOS_FILE * f;
+    ADIOS_VARINFO * vi;
+    int err=0,v,v0,i,n;
+    int nsteps_a, nsteps_b, nsteps_c;
+    int iMacro; // loop variable in macros
+
+    uint64_t start[3] = {offs1,offs2,offs3};
+    uint64_t count[3] = {ldim1,ldim2,ldim3};
+    uint64_t ndim;
+    
+    reset_readvars();
+
+    log ("Read and check data in %s\n", FILENAME);
+    f = adios_read_open_file (FILENAME, ADIOS_READ_METHOD_BP, comm);
+    if (f == NULL) {
+        printE ("Error at opening file: %s\n", rank, adios_errmsg());
+        return 1;
+    }
+
+    sel0 = adios_selection_boundingbox (0, start, count); 
+    sel1 = adios_selection_boundingbox (1, start, count); 
+    sel2 = adios_selection_boundingbox (2, start, count); 
+    sel3 = adios_selection_boundingbox (3, start, count); 
+
+    log ("  Check variable definitions... %s\n", FILENAME);
+    nsteps_a = NSTEPS / 2 + NSTEPS % 2;
+    nsteps_b = NSTEPS / 2;
+    nsteps_c = NSTEPS;
+
+    CHECK_VARINFO("a0", 0, nsteps_a)
+    CHECK_VARINFO("b0", 0, nsteps_b)
+    CHECK_VARINFO("c0", 0, nsteps_c)
+    CHECK_VARINFO("at0", 0, nsteps_a)
+    CHECK_VARINFO("bt0", 0, nsteps_b)
+    CHECK_VARINFO("ct0", 0, nsteps_c)
+    CHECK_VARINFO("a1", 1, nsteps_a)
+    CHECK_VARINFO("b1", 1, nsteps_b)
+    CHECK_VARINFO("c1", 1, nsteps_c)
+    CHECK_VARINFO("at1", 1, nsteps_a)
+    CHECK_VARINFO("bt1", 1, nsteps_b)
+    CHECK_VARINFO("ct1", 1, nsteps_c)
+    CHECK_VARINFO("a2", 2, nsteps_a)
+    CHECK_VARINFO("b2", 2, nsteps_b)
+    CHECK_VARINFO("c2", 2, nsteps_c)
+    CHECK_VARINFO("a3", 3, nsteps_a)
+    CHECK_VARINFO("b3", 3, nsteps_b)
+    CHECK_VARINFO("c3", 3, nsteps_c)
+
+    log ("  Check variables c0,ct0,c1,ct1,c2,c3, steps=%d...\n",nsteps_c);
+    for (i=0; i<nsteps_c; i++) {
+        v = VALUE(rank,i);
+        v0 = VALUE0(i);
+        log ("    Step %d value %d\n", i, v);
+
+        adios_schedule_read (f, sel0, "c0",  i, 1, &r0);
+        adios_schedule_read (f, sel0, "ct0", i, 1, &rt0);
+        adios_schedule_read (f, sel1, "c1",  i, 1, r1);
+        adios_schedule_read (f, sel1, "ct1", i, 1, rt1);
+        adios_schedule_read (f, sel2, "c2",  i, 1, r2);
+        adios_schedule_read (f, sel3, "c3",  i, 1, r3);
+        adios_perform_reads (f, 1);
+
+        CHECK_SCALAR (c0,  r0,  v0, i) // scalar is from writer rank 0, not this rank!
+        CHECK_SCALAR (ct0, rt0, v0, i) // so value is v0 at step 'i', not v
+        CHECK_ARRAY (c1,  r1,  ldim1, v, i, iMacro)
+        CHECK_ARRAY (ct1, rt1, ldim1, v, i, iMacro)
+        CHECK_ARRAY (c2,  r2,  ldim1*ldim2, v, i, iMacro)
+        CHECK_ARRAY (c3,  r3,  ldim1*ldim2*ldim3, v, i, iMacro)
+    } 
+
+    log ("  Check variables a0,at0,a1,at1,a2,a3, steps=%d...\n",nsteps_a);
+    for (i=0; i<nsteps_a; i++) {
+        v = VALUE(rank,i*2);
+        v0 = VALUE0(i*2);
+        log ("    Step %d value %d\n", i, v);
+
+        adios_schedule_read (f, sel0, "a0",  i, 1, &r0);
+        adios_schedule_read (f, sel0, "at0", i, 1, &rt0);
+        adios_schedule_read (f, sel1, "a1",  i, 1, r1);
+        adios_schedule_read (f, sel1, "at1", i, 1, rt1);
+        adios_schedule_read (f, sel2, "a2",  i, 1, r2);
+        adios_schedule_read (f, sel3, "a3",  i, 1, r3);
+        adios_perform_reads (f, 1);
+
+        CHECK_SCALAR (a0,  r0,  v0, i)
+        CHECK_SCALAR (at0, rt0, v0, i)
+        CHECK_ARRAY (a1,  r1,  ldim1, v, i, iMacro)
+        CHECK_ARRAY (at1, rt1, ldim1, v, i, iMacro)
+        CHECK_ARRAY (a2,  r2,  ldim1*ldim2, v, i, iMacro)
+        CHECK_ARRAY (a3,  r3,  ldim1*ldim2*ldim3, v, i, iMacro)
+    } 
+
+    log ("  Check variables b0,bt0,b1,bt1,b2,b3, steps=%d...\n",nsteps_b);
+    for (i=0; i<nsteps_b; i++) {
+        v = VALUE(rank,i*2)+1;
+        v0 = VALUE0(i*2)+1;
+        log ("    Step %d value %d\n", i, v);
+
+        adios_schedule_read (f, sel0, "b0",  i, 1, &r0);
+        adios_schedule_read (f, sel0, "bt0", i, 1, &rt0);
+        adios_schedule_read (f, sel1, "b1",  i, 1, r1);
+        adios_schedule_read (f, sel1, "bt1", i, 1, rt1);
+        adios_schedule_read (f, sel2, "b2",  i, 1, r2);
+        adios_schedule_read (f, sel3, "b3",  i, 1, r3);
+        adios_perform_reads (f, 1);
+
+        CHECK_SCALAR (b0,  r0,  v0, i)
+        CHECK_SCALAR (bt0, rt0, v0, i)
+        CHECK_ARRAY (b1,  r1,  ldim1, v, i, iMacro)
+        CHECK_ARRAY (bt1, rt1, ldim1, v, i, iMacro)
+        CHECK_ARRAY (b2,  r2,  ldim1*ldim2, v, i, iMacro)
+        CHECK_ARRAY (b3,  r3,  ldim1*ldim2*ldim3, v, i, iMacro)
+    } 
+
+endread:
+
+    adios_selection_delete (sel0);
+    adios_selection_delete (sel1);
+    adios_selection_delete (sel2);
+    adios_selection_delete (sel3);
+
+    adios_read_close(f);
+    MPI_Barrier (comm);
+    return err;
+}
+#endif
diff --git a/tests/suite/programs/selections.c b/tests/suite/programs/selections.c
new file mode 100644
index 0000000..de5a5fd
--- /dev/null
+++ b/tests/suite/programs/selections.c
@@ -0,0 +1,486 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C test: 
+ *  Write some variables and then 
+ *  read them using different selections
+ *
+ * How to run: mpirun -np <N> selections
+ * Output: selections.bp
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include <errno.h>
+#include "mpi.h"
+#include "public/adios.h"
+#include "public/adios_read.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+//#define DEBUG_PRINTS
+
+#define log(...) fprintf (stderr, "[rank=%3.3d, line %d]: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+#define printE(...) fprintf (stderr, "[rank=%3.3d, line %d]: ERROR: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+
+static const int NSTEPS = 5;
+static const char FILENAME[] = "selections.bp";
+#define VALUE1D(rank,step,i) (100*(rank)+10*(step)+i)
+#define VALUE2D(rank,step,i,j) (1000*(rank)+100*(step)+10*(i)+j)
+#define VALUE3D(rank,step,i,j,k) (10000*(rank)+1000*(step)+100*(i)+10*(j)+k)
+
+/* Variables to write */
+int a0;
+int  *a1;
+int  *a2;
+int  *a3;
+
+/* Variables to read */
+int r0;
+int  *r1, *r2, *r3;
+
+static const int ldim1 = 3;
+static const int ldim2 = 5;
+static const int ldim3 = 7;
+int gdim1, gdim2, gdim3;
+int offs1, offs2, offs3;
+
+MPI_Comm    comm = MPI_COMM_WORLD;
+int         rank;
+int         size;
+int64_t     m_adios_group;
+enum ADIOS_READ_METHOD read_method = ADIOS_READ_METHOD_BP;
+
+void alloc_vars()
+{
+    int n;
+
+    gdim1 = size*ldim1;
+    gdim2 = ldim2;
+    gdim3 = ldim3;
+
+    offs1 = rank*ldim1;
+    offs2 = 0;
+    offs3 = 0;
+
+    n = ldim1;
+    a1  = (int*) malloc (n * sizeof(int));
+    r1  = (int*) malloc (n * sizeof(int));
+
+    n = ldim1 * ldim2;
+    a2  = (int*) malloc (n * sizeof(int));
+    r2  = (int*) malloc (n * sizeof(int));
+
+    n = ldim1 * ldim2 * ldim3;
+    a3  = (int*) malloc (n * sizeof(int));
+    r3  = (int*) malloc (n * sizeof(int));
+}
+
+void set_vars(int step)
+{
+    int i, j, k;
+
+    a0 = VALUE1D(rank,step,0);
+
+    for (i=0; i<ldim1; i++) {
+        a1[i] = VALUE1D(rank,step,i);
+        for (j=0; j<ldim2; j++) {
+            a2[i*ldim2+j] = VALUE2D(rank,step,i,j);
+            for (k=0; k<ldim3; k++) {
+                a3[i*ldim2*ldim3+j*ldim3+k] = VALUE3D(rank,step,i,j,k);
+            }
+        }
+    }
+}
+
+void fini_vars()
+{
+    free (a1);
+    free (r1);
+    free (a2);
+    free (r2);
+    free (a3);
+    free (r3);
+}
+
+
+void define_vars();
+int write_file (int step);
+int read_points ();
+//int read_writeblocks ();
+
+void Usage() 
+{
+    printf("Usage: selections <method> [w|r]\n"
+            "    <method>:  Method, 0: file, 1: staging\n"
+            "    w: do write only\n"
+            "    r: do read only\n");
+}   
+
+int main (int argc, char ** argv) 
+{
+    int err, step ; 
+    int do_write = 1;
+    int do_read = 1;
+    int m = 0;
+    char write_method[16];
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    if (argc > 1) { 
+        m = strtol (argv[1], NULL, 10);
+        if (errno) { printf("Invalid 1st argument %s\n", argv[1]); Usage(); return 1;}
+    }
+    if (argc > 2) { 
+        if (argv[2][0] == 'w' || argv[2][0] == 'W') {
+            do_read = 0;
+        } else if (argv[2][0] == 'r' || argv[2][0] == 'R') {
+            do_write = 0;
+        } else {
+            printE ("Invalid command line argument %s. Allowed ones:\n"
+                    " w: do write only\n"
+                    " r: do read only\n", argv[2]);
+            MPI_Finalize ();
+            return 1;
+        }
+    }
+
+    if (m==0) {
+        read_method = ADIOS_READ_METHOD_BP;
+        strcpy(write_method,"MPI");
+    } else {
+        read_method = ADIOS_READ_METHOD_DATASPACES;
+        strcpy(write_method,"DATASPACES");
+    }
+
+    
+    log ("Writing: %s method=%s\n"
+         "Reading: %s method=%d\n", 
+        (do_write ? "yes" : "no"), write_method,
+        (do_read ? "yes" : "no"), read_method);
+
+    alloc_vars();
+    if (do_write) {
+        adios_init_noxml ();
+        adios_allocate_buffer (ADIOS_BUFFER_ALLOC_NOW, 10);
+    }
+    if (do_read) {
+        err = adios_read_init_method(read_method, comm, "verbose=2");
+        if (err) {
+            printE ("%s\n", adios_errmsg());
+        }
+    }
+
+    
+    if (do_write) {
+        adios_declare_group (&m_adios_group, "selections", "iter", adios_flag_yes);
+        adios_select_method (m_adios_group, write_method, "verbose=2", "");
+
+        define_vars();
+
+        for (step=0; step<NSTEPS; step++) {
+            if (!err) {
+                set_vars (step);
+                err = write_file (step); 
+                sleep(1);
+            }
+        }
+    }
+
+    if (!err && do_read)
+        err = read_points (); 
+
+    //if (!err && do_read)
+    //    err = read_writerblocks (); 
+
+    if (do_read) {
+        adios_read_finalize_method (read_method);
+    }
+    fini_vars();
+    if (do_write) {
+        adios_finalize (rank);
+    }
+    MPI_Finalize ();
+    return err;
+}
+
+
+void define_vars ()
+{
+    int i;
+
+    adios_define_var (m_adios_group, "ldim1", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "ldim2", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "ldim3", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "gdim1", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "gdim2", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "gdim3", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "offs1", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "offs2", "", adios_integer, 0, 0, 0);
+    adios_define_var (m_adios_group, "offs3", "", adios_integer, 0, 0, 0);
+
+    adios_define_var (m_adios_group, "a0", "", adios_integer, 0, 0, 0);
+
+    adios_define_var (m_adios_group, "a1", "", adios_integer,
+            "ldim1", "gdim1", "offs1");
+
+    adios_define_var (m_adios_group, "a2", "", adios_integer,
+            "ldim1,ldim2", "gdim1,gdim2", "offs1,offs2");
+
+    adios_define_var (m_adios_group, "a3", "", adios_integer,
+            "ldim1,ldim2,ldim3", "gdim1,gdim2,gdim3", "offs1,offs2,offs3");
+}
+
+int write_file (int step) 
+{
+    int64_t       fh;
+    uint64_t       groupsize=0, totalsize;
+
+    log ("Write step %d to %s\n", step, FILENAME);
+    adios_open (&fh, "selections", FILENAME, (step ? "a" : "w"), &comm);
+    
+    groupsize  = 9 * sizeof(int);                           // dimensions 
+    groupsize += 3 * sizeof(int);                           // scalars 
+    groupsize += 3 * ldim1 * sizeof(int);                   // 1D 
+    groupsize += 3 * ldim1 * ldim2 * sizeof(int);           // 2D 
+    groupsize += 3 * ldim1 * ldim2 * ldim3 * sizeof(int);   // 3D
+
+    adios_group_size (fh, groupsize, &totalsize);
+
+    adios_write (fh, "gdim1", &gdim1);
+    adios_write (fh, "gdim2", &gdim2);
+    adios_write (fh, "gdim3", &gdim3);
+    adios_write (fh, "ldim1", &ldim1);
+    adios_write (fh, "ldim2", &ldim2);
+    adios_write (fh, "ldim3", &ldim3);
+    adios_write (fh, "offs1", &offs1);
+    adios_write (fh, "offs2", &offs2);
+    adios_write (fh, "offs3", &offs3);
+
+    adios_write (fh, "a0", &a0);
+    adios_write (fh, "a1", a1);
+    adios_write (fh, "a2", a2);
+    adios_write (fh, "a3", a3);
+
+    adios_close (fh);
+    MPI_Barrier (comm);
+    return 0;
+}
+
+void reset_readvars()
+{
+    int n;
+    
+    r0  = -1;
+
+    n = ldim1;
+    memset (r1,  -1, n*sizeof(int));
+
+    n = ldim1 * ldim2;
+    memset (r2,  -1, n*sizeof(int));
+
+    n = ldim1 * ldim2 * ldim3;
+    memset (r3,  -1, n*sizeof(int));
+}
+
+int read_points ()
+{
+    ADIOS_SELECTION *sel0,*sel1,*sel2,*sel3;
+    ADIOS_FILE * f;
+    ADIOS_VARINFO * vi;
+    int err=0,n,n1, i,j,k;
+    int nsteps_a, nsteps_b, nsteps_c;
+    int v; 
+
+    uint64_t *pts1;
+    uint64_t *pts2;
+    uint64_t *pts3;
+    uint64_t start[3] = {offs1,offs2,offs3};
+    uint64_t count[3] = {ldim1,ldim2,ldim3};
+    
+    pts1 = (uint64_t*) malloc (1*sizeof(uint64_t)*ldim1);
+    pts2 = (uint64_t*) malloc (2*sizeof(uint64_t)*ldim1*ldim2);
+    pts3 = (uint64_t*) malloc (3*sizeof(uint64_t)*ldim1*ldim2*ldim3);
+
+    for (i=0; i<ldim1; i++) 
+    {
+        pts1[i] = offs1 + i;
+        for (j=0; j<ldim2; j++) 
+        {
+            pts2[i*2*ldim2 + 2*j]   = offs1 + i;
+            pts2[i*2*ldim2 + 2*j+1] = j; 
+            for (k=0; k<ldim3; k++) 
+            {
+                pts3[i*3*ldim2*ldim3+j*3*ldim3+3*k]   = offs1 + i;
+                pts3[i*3*ldim2*ldim3+j*3*ldim3+3*k+1] = j;
+                pts3[i*3*ldim2*ldim3+j*3*ldim3+3*k+2] = k;
+            }
+        }
+    }
+
+    //Force error on very last point: pts3[3*ldim1*ldim2*ldim3-1] = 0;
+
+    reset_readvars();
+
+    log ("Read and check data in %s using point selections\n", FILENAME);
+    f = adios_read_open_stream (FILENAME, read_method, comm,
+                                ADIOS_LOCKMODE_CURRENT, 0.0);
+    if (f == NULL) {
+        printE ("Error at opening file: %s\n", rank, adios_errmsg());
+        return 1;
+    }
+
+    sel1 = adios_selection_points (1, ldim1, pts1); 
+    sel2 = adios_selection_points (2, ldim1*ldim2, pts2); 
+    sel3 = adios_selection_points (3, ldim1*ldim2*ldim3, pts3); 
+
+#ifdef DEBUG_PRINTS
+    fprintf(stderr, "1D selection: {");
+    for (i=0; i<ldim1; i++) {
+        fprintf (stderr, "%d ", i, i, pts1[i]);
+    }
+    fprintf(stderr, "}\n");
+
+    fprintf(stderr, "2D selection :\n");
+    for (i=0; i<ldim1; i++) {
+        fprintf (stderr, "i=%d, idx=%2d- = ", i, i*2*ldim2);
+        for (j=0; j<ldim2; j++) {
+            n = i*2*ldim2+2*j;
+            fprintf (stderr, "{%d,%d} ", pts2[n], pts2[n+1]); 
+        }
+        fprintf(stderr, "\n");
+    }
+
+    fprintf(stderr, "3D selection :\n");
+    for (i=0; i<ldim1; i++) {
+        for (j=0; j<ldim2; j++) {
+            fprintf (stderr, "i=%d, j=%d, idx=%3d- = ", i, j, i*3*ldim2*ldim3+j*3*ldim3); 
+            for (k=0; k<ldim3; k++) {
+                n = i*3*ldim2*ldim3+j*3*ldim3+3*k;
+                fprintf (stderr, "{%d,%d,%d} ", pts3[n], pts3[n+1], pts3[n+2]); 
+            }
+            fprintf(stderr, "\n");
+        }
+    }
+#endif
+
+    n1=0;
+    while (n1 < NSTEPS && adios_errno != err_end_of_stream) {
+        n1++;
+        log ("  Step %d\n", f->current_step);
+
+
+        log ("  Check 1D variable a1...\n");
+        adios_schedule_read (f, sel1, "a1",  0, 1, r1);
+        adios_perform_reads (f, 1);
+
+#ifdef DEBUG_PRINTS
+        fprintf(stderr, "1D result: {");
+        for (i=0; i<ldim1; i++) {
+            fprintf (stderr, "%d ", i, i, r1[i]);
+        }
+        fprintf(stderr, "}\n");
+#endif
+
+        for (i=0; i<ldim1; i++) {
+            v = VALUE1D(rank,f->current_step,i);
+            if (r1[i] != v) {
+                printE ("Error: a1[%d]=%d  !=  read=%d\n", i, v, r1[i]); 
+                //goto endread;
+            }
+        }
+
+
+
+        log ("  Check 2D variable a2...\n");
+        adios_schedule_read (f, sel2, "a2",  0, 1, r2);
+        adios_perform_reads (f, 1);
+
+#ifdef DEBUG_PRINTS
+        fprintf(stderr, "2D result :\n");
+        n = 0;
+        for (i=0; i<ldim1; i++) {
+            fprintf (stderr, "row=%2d- = {", i);
+            for (j=0; j<ldim2; j++) {
+                fprintf (stderr, "%d ", r2[n]); 
+                n++;
+            }
+            fprintf(stderr, "}\n");
+        }
+#endif
+
+        n = 0;
+        for (i=0; i<ldim1; i++) {
+            for (j=0; j<ldim2; j++) {
+                v = VALUE2D(rank,f->current_step,i,j);
+                if (v != r2[n]) {
+                    printE ("Error: a2[%d,%d]=%d  !=  read=%d\n", i, j, v, r2[n]); 
+                    //goto endread;
+                }
+                n++;
+            }
+        }
+
+
+
+
+        log ("  Check 3D variable a3...\n");
+        adios_schedule_read (f, sel3, "a3",  0, 1, r3);
+        adios_perform_reads (f, 1);
+
+#ifdef DEBUG_PRINTS
+        fprintf(stderr, "3D selection :\n");
+        n=0;
+        for (i=0; i<ldim1; i++) {
+            for (j=0; j<ldim2; j++) {
+                fprintf (stderr, "[%d,%d] = {", i, j); 
+                for (k=0; k<ldim3; k++) {
+                    fprintf (stderr, "%d ", r3[n]); 
+                    n++;
+                }
+                fprintf(stderr, "}\n");
+            }
+        }
+#endif
+        n = 0;
+        for (i=0; i<ldim1; i++) {
+            for (j=0; j<ldim2; j++) {
+                for (k=0; k<ldim3; k++) {
+                    v = VALUE3D(rank,f->current_step,i,j,k);
+                    if (v != r3[n]) {
+                        printE ("Error: a3[%d,%d,%d]=%d  !=  read=%d\n", i, j, k, v, r3[n]); 
+                        //goto endread;
+                    }
+                    n++;
+                }
+            }
+        }
+
+        if (n1 < NSTEPS)
+        {
+            adios_advance_step (f, 0, -1.0);
+        }
+    }
+
+
+endread:
+
+    adios_selection_delete (sel1);
+    adios_selection_delete (sel2);
+    adios_selection_delete (sel3);
+
+    adios_read_close(f);
+    MPI_Barrier (comm);
+    return err;
+}
+
diff --git a/tests/suite/programs/two_groups.c b/tests/suite/programs/two_groups.c
new file mode 100644
index 0000000..8292f8d
--- /dev/null
+++ b/tests/suite/programs/two_groups.c
@@ -0,0 +1,287 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C test: 
+ *  Write two groups at alternative steps, different variables (a vs b) 
+ *  Then read them all and check if they are correct. 
+ *
+ * How to run: mpirun -np <N> write_alternate
+ * Output: write_alternate.bp
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include "mpi.h"
+#include "public/adios.h"
+#include "public/adios_read.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+#define log(...) fprintf (stderr, "[rank=%3.3d, line %d]: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+#define printE(...) fprintf (stderr, "[rank=%3.3d, line %d]: ERROR: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+
+static const char FILENAME[] = "two_groups.bp";
+#define VALUE(rank, step) (rank * 100 + step)
+#define VALUE0(step) (step)
+
+/* Variables to write */
+int a0;
+
+/* Variables to read */
+int ra, rb, rc;
+
+MPI_Comm    comm = MPI_COMM_WORLD;
+int rank;
+int size;
+
+int write_group (int i);
+int read_file ();
+int read_by_group ();
+
+int main (int argc, char ** argv) 
+{
+    int err,i ; 
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    adios_init ("two_groups.xml");
+    err = adios_read_init_method(ADIOS_READ_METHOD_BP, comm, "verbose=2");
+    if (err) {
+        printE ("%s\n", adios_errmsg());
+    }
+
+    for (i=0; i<2; i++) { 
+        if (!err) {
+            a0 = i;
+            err = write_group (i); 
+        }
+    }
+
+    if (!err)
+        err = read_file (); 
+
+    if (!err)
+        err = read_by_group ();
+
+    adios_finalize (rank);
+    MPI_Finalize ();
+    return err;
+}
+
+
+int write_group (int step)
+{
+    int64_t       fh;
+    uint64_t       groupsize=0, totalsize;
+
+    log ("Write group %d to %s\n", step, FILENAME);
+    adios_open (&fh, (step==1 ? "g2" : "g1"), FILENAME, (step==0 ? "w" : "a"), &comm);
+    
+    groupsize  = sizeof(int);  // a scalar only
+
+    adios_group_size (fh, groupsize, &totalsize);
+    if (step == 0) {
+        adios_write (fh, "a0", &a0);
+    } else if (step == 1) {
+        adios_write (fh, "b0", &a0);
+    } else {
+        adios_write (fh, "c0", &a0);
+    }
+
+    adios_close (fh);
+    MPI_Barrier (comm);
+    return 0;
+}
+
+
+#define CHECK_VARINFO(VARNAME, NDIM, NSTEPS) \
+    vi = adios_inq_var (f, VARNAME); \
+    if (vi == NULL) { \
+        printE ("No such variable " VARNAME "\n"); \
+        err = 101; \
+        goto endread; \
+    } \
+    if (vi->ndim != NDIM) { \
+        printE ("Variable " VARNAME " has %d dimensions, but expected %d\n", vi->ndim, NDIM); \
+        err = 102; \
+        goto endread; \
+    } \
+    if (vi->nsteps != NSTEPS) { \
+        printE ("Variable " VARNAME " has %d steps, but expected %d\n", vi->nsteps, NSTEPS); \
+        err = 103; \
+        /*goto endread; */\
+    } \
+    adios_free_varinfo (vi);
+
+#define CHECK_ATTR(ATTRNAME, VAL) \
+    vi = adios_get_attr (f, ATTRNAME, atype, asize); \
+    if (vi == NULL) { \
+        printE ("No such variable " VARNAME "\n"); \
+        err = 101; \
+        goto endread; \
+    } \
+    if (vi->ndim != NDIM) { \
+        printE ("Variable " VARNAME " has %d dimensions, but expected %d\n", vi->ndim, NDIM); \
+        err = 102; \
+        goto endread; \
+    } \
+    if (vi->nsteps != NSTEPS) { \
+        printE ("Variable " VARNAME " has %d steps, but expected %d\n", vi->nsteps, NSTEPS); \
+        err = 103; \
+        /*goto endread; */\
+    } \
+    adios_free_varinfo (vi);
+
+#define CHECK_SCALAR(VARNAME, VAR, VALUE, STEP) \
+    if (VAR != VALUE) { \
+        printE (#VARNAME " step %d: wrote %d but read %d\n",STEP,VALUE,VAR);\
+        err = 104; \
+        /*goto endread;*/\
+    }
+
+#define CHECK_ARRAY(VARNAME,A,N,VALUE,STEP,i) \
+    for (i=0;i<N;i++) \
+        if (A[i] != VALUE) { \
+            printE (#VARNAME "[%d] step %d: wrote %d but read %d\n",i,STEP,VALUE,A[i]);\
+            err = 104; \
+            /*goto endread;*/\
+            break; \
+        }
+
+void reset_readvars()
+{
+    ra  = -1;
+    rb  = -1;
+    rc  = -1;
+}
+
+int read_file ()
+{
+    ADIOS_SELECTION *sel0;
+    ADIOS_FILE * f;
+    ADIOS_VARINFO * vi;
+    int err=0,i;
+
+    uint64_t start[3] = {0,0,0};
+    uint64_t count[3] = {1,1,1};
+    uint64_t ndim;
+    
+    reset_readvars();
+
+    log ("Read and check data in %s\n", FILENAME);
+    f = adios_read_open_file (FILENAME, ADIOS_READ_METHOD_BP, comm);
+    if (f == NULL) {
+        printE ("Error at opening file: %s\n", rank, adios_errmsg());
+        return 1;
+    }
+
+    sel0 = adios_selection_boundingbox (0, start, count); 
+
+    log ("  Check variable definitions... %s\n", FILENAME);
+
+    CHECK_VARINFO("a0", 0, 1)
+    CHECK_VARINFO("b0", 0, 1)
+    //CHECK_VARINFO("c0", 0, 1)
+
+    log ("  Check variables a0,b0...\n");
+    adios_schedule_read (f, sel0, "a0",  0, 1, &ra);
+    adios_schedule_read (f, sel0, "b0",  0, 1, &rb);
+    //adios_schedule_read (f, sel0, "c0",  0, 1, &rc);
+    adios_perform_reads (f, 1);
+
+    CHECK_SCALAR (a0,  ra,  0, i)
+    CHECK_SCALAR (b0,  rb,  1, i)
+    //CHECK_SCALAR (c0,  rc,  2, i)
+
+
+endread:
+
+    adios_selection_delete (sel0);
+
+    adios_read_close(f);
+    MPI_Barrier (comm);
+    return err;
+}
+
+
+int read_by_group ()
+{
+    ADIOS_SELECTION *sel0;
+    ADIOS_FILE * f;
+    ADIOS_VARINFO * vi;
+    int err=0,i;
+
+    uint64_t start[3] = {0,0,0};
+    uint64_t count[3] = {1,1,1};
+    uint64_t ndim;
+    
+    reset_readvars();
+
+    log ("Read and check data in %s\n", FILENAME);
+    f = adios_read_open_file (FILENAME, ADIOS_READ_METHOD_BP, comm);
+    if (f == NULL) {
+        printE ("Error at opening file: %s\n", rank, adios_errmsg());
+        return 1;
+    }
+
+    sel0 = adios_selection_boundingbox (0, start, count); 
+
+    log ("  Limit view to first group only\n");
+    err = adios_group_view (f, 0);
+    if (err) {
+        printE ("Error in adios_group_view: %s\n", rank, adios_errmsg());
+        goto endread;
+    }
+
+    log ("  Check variable definitions... %s\n", FILENAME);
+
+    CHECK_VARINFO("a0", 0, 1)
+    //CHECK_VARINFO("c0", 0, 1)
+
+    log ("  Check variables a0...\n");
+    adios_schedule_read (f, sel0, "a0",  0, 1, &ra);
+    //adios_schedule_read (f, sel0, "c0",  0, 1, &rc);
+    adios_perform_reads (f, 1);
+
+    CHECK_SCALAR (a0,  ra,  0, i)
+    //CHECK_SCALAR (c0,  rc,  2, i)
+
+
+    log ("  Limit view to second group only\n");
+    err = adios_group_view (f, 1);
+    if (err) {
+        printE ("Error in adios_group_view: %s\n", rank, adios_errmsg());
+        goto endread;
+    }
+
+    log ("  Check variable definitions... %s\n", FILENAME);
+
+    CHECK_VARINFO("b0", 0, 1)
+
+    log ("  Check variables b0...\n");
+    adios_schedule_read (f, sel0, "b0",  0, 1, &rb);
+    adios_perform_reads (f, 1);
+
+    CHECK_SCALAR (b0,  rb,  1, i)
+
+endread:
+
+    adios_selection_delete (sel0);
+
+    adios_read_close(f);
+    MPI_Barrier (comm);
+    return err;
+}
+
+
+
diff --git a/tests/suite/programs/write_alternate.c b/tests/suite/programs/write_alternate.c
new file mode 100644
index 0000000..9a4eab2
--- /dev/null
+++ b/tests/suite/programs/write_alternate.c
@@ -0,0 +1,525 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C test: 
+ *  Write a* and b* variables at alternative steps, while c* at every step.
+ *  Then read them all and check if they are correct. 
+ *
+ * How to run: mpirun -np <N> write_alternate
+ * Output: write_alternate.bp
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include "mpi.h"
+#include "public/adios.h"
+#include "public/adios_read.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+#define log(...) fprintf (stderr, "[rank=%3.3d, line %d]: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+#define printE(...) fprintf (stderr, "[rank=%3.3d, line %d]: ERROR: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+
+static const int NSTEPS = 5;
+static const char FILENAME[] = "write_alternate.bp";
+#define VALUE(rank, step) (rank * 100 + step)
+#define VALUE0(step) (step)
+
+/* Variables to write */
+int a0;
+int  *a1;
+int  *a2;
+int  *a3;
+
+/* Variables to read */
+int r0, rt0;
+int  *r1, *rt1, *r2, *r3;
+
+static const int ldim1 = 7;
+static const int ldim2 = 5;
+static const int ldim3 = 3;
+int gdim1, gdim2, gdim3;
+int offs1, offs2, offs3;
+
+MPI_Comm    comm = MPI_COMM_WORLD;
+int rank;
+int size;
+
+void alloc_vars()
+{
+    int n;
+
+    gdim1 = size*ldim1;
+    gdim2 = ldim2;
+    gdim3 = ldim3;
+
+    offs1 = rank*ldim1;
+    offs2 = 0;
+    offs3 = 0;
+
+    n = ldim1;
+    a1  = (int*) malloc (n * sizeof(int));
+    r1  = (int*) malloc (n * sizeof(int));
+    rt1 = (int*) malloc (n * sizeof(int));
+
+    n = ldim1 * ldim2;
+    a2  = (int*) malloc (n * sizeof(int));
+    r2  = (int*) malloc (n * sizeof(int));
+
+    n = ldim1 * ldim2 * ldim3;
+    a3  = (int*) malloc (n * sizeof(int));
+    r3  = (int*) malloc (n * sizeof(int));
+}
+
+void set_vars(int step)
+{
+    int n, i;
+    int v = VALUE(rank, step);
+
+    a0 = v;
+
+    n = ldim1;
+    for (i=0; i<n; i++) a1[i] = v;
+
+    n = ldim1 * ldim2;
+    for (i=0; i<n; i++) a2[i] = v;
+
+    n = ldim1 * ldim2 * ldim3;
+    for (i=0; i<n; i++) a3[i] = v;
+}
+
+void fini_vars()
+{
+    free (a1);
+    free (r1);
+    free (rt1);
+    free (a2);
+    free (r2);
+    free (a3);
+    free (r3);
+}
+
+
+int write_file (int step);
+int read_file ();
+
+int main (int argc, char ** argv) 
+{
+    int err,i ; 
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    alloc_vars();
+    adios_init ("write_alternate.xml");
+    err = adios_read_init_method(ADIOS_READ_METHOD_BP, comm, "verbose=2");
+    if (err) {
+        printE ("%s\n", adios_errmsg());
+    }
+
+    
+    for (i=0; i<NSTEPS; i++) {
+        if (!err) {
+            set_vars (i);
+            err = write_file (i); 
+        }
+    }
+
+    if (!err)
+        err = read_file (); 
+
+    if (!err)
+        err = read_stream (); 
+
+    adios_finalize (rank);
+    fini_vars();
+    MPI_Finalize ();
+    return err;
+}
+
+
+int write_file (int step) 
+{
+    int64_t       fh;
+    uint64_t       groupsize=0, totalsize;
+
+    log ("Write step %d to %s\n", step, FILENAME);
+    adios_open (&fh, "abc", FILENAME, (step ? "a" : "w"), &comm);
+    
+    groupsize  = 9 * sizeof(int);                           // dimensions 
+    groupsize += 3 * sizeof(int);                           // scalars 
+    groupsize += 3 * ldim1 * sizeof(int);                   // 1D 
+    groupsize += 3 * ldim1 * ldim2 * sizeof(int);           // 2D 
+    groupsize += 3 * ldim1 * ldim2 * ldim3 * sizeof(int);   // 3D
+
+    adios_group_size (fh, groupsize, &totalsize);
+
+    adios_write (fh, "gdim1", &gdim1);
+    adios_write (fh, "gdim2", &gdim2);
+    adios_write (fh, "gdim3", &gdim3);
+    adios_write (fh, "ldim1", &ldim1);
+    adios_write (fh, "ldim2", &ldim2);
+    adios_write (fh, "ldim3", &ldim3);
+    adios_write (fh, "offs1", &offs1);
+    adios_write (fh, "offs2", &offs2);
+    adios_write (fh, "offs3", &offs3);
+
+    if (step % 2 == 0) {
+        adios_write (fh, "a0", &a0);
+        adios_write (fh, "at0", &a0);
+        adios_write (fh, "a1", a1);
+        adios_write (fh, "at1", a1);
+        adios_write (fh, "a2", a2);
+        adios_write (fh, "a3", a3);
+    } else {
+        adios_write (fh, "b0", &a0);
+        adios_write (fh, "bt0", &a0);
+        adios_write (fh, "b1", a1);
+        adios_write (fh, "bt1", a1);
+        adios_write (fh, "b2", a2);
+        adios_write (fh, "b3", a3);
+    }
+    adios_write (fh, "c0", &a0);
+    adios_write (fh, "ct0", &a0);
+    adios_write (fh, "c1", a1);
+    adios_write (fh, "ct1", a1);
+    adios_write (fh, "c2", a2);
+    adios_write (fh, "c3", a3);
+
+    adios_close (fh);
+    MPI_Barrier (comm);
+    return 0;
+}
+
+
+#define CHECK_VARINFO(VARNAME, NDIM, NSTEPS) \
+    vi = adios_inq_var (f, VARNAME); \
+    if (vi == NULL) { \
+        printE ("No such variable " VARNAME "\n"); \
+        err = 101; \
+        goto endread; \
+    } \
+    if (vi->ndim != NDIM) { \
+        printE ("Variable " VARNAME " has %d dimensions, but expected %d\n", vi->ndim, NDIM); \
+        err = 102; \
+        goto endread; \
+    } \
+    if (vi->nsteps != NSTEPS) { \
+        printE ("Variable " VARNAME " has %d steps, but expected %d\n", vi->nsteps, NSTEPS); \
+        err = 103; \
+        /*goto endread; */\
+    } \
+    adios_free_varinfo (vi);
+
+#define CHECK_SCALAR(VARNAME, VAR, VALUE, STEP) \
+    if (VAR != VALUE) { \
+        printE (#VARNAME " step %d: wrote %d but read %d\n",STEP,VALUE,VAR);\
+        err = 104; \
+        /*goto endread;*/\
+    }
+
+#define CHECK_ARRAY(VARNAME,A,N,VALUE,STEP,i) \
+    for (i=0;i<N;i++) \
+        if (A[i] != VALUE) { \
+            printE (#VARNAME "[%d] step %d: wrote %d but read %d\n",i,STEP,VALUE,A[i]);\
+            err = 104; \
+            /*goto endread;*/\
+            break; \
+        }
+
+void reset_readvars()
+{
+    int n;
+    
+    r0  = -1;
+    rt0 = -1;
+
+    n = ldim1;
+    memset (r1,  -1, n*sizeof(int));
+    memset (rt1, -1, n*sizeof(int));
+
+    n = ldim1 * ldim2;
+    memset (r2,  -1, n*sizeof(int));
+
+    n = ldim1 * ldim2 * ldim3;
+    memset (r3,  -1, n*sizeof(int));
+}
+
+int read_file ()
+{
+    ADIOS_SELECTION *sel0,*sel1,*sel2,*sel3;
+    ADIOS_FILE * f;
+    ADIOS_VARINFO * vi;
+    int err=0,v,v0,i,n;
+    int nsteps_a, nsteps_b, nsteps_c;
+    int iMacro; // loop variable in macros
+
+    uint64_t start[3] = {offs1,offs2,offs3};
+    uint64_t count[3] = {ldim1,ldim2,ldim3};
+    uint64_t ndim;
+    
+    reset_readvars();
+
+    log ("Read and check data in %s\n", FILENAME);
+    f = adios_read_open_file (FILENAME, ADIOS_READ_METHOD_BP, comm);
+    if (f == NULL) {
+        printE ("Error at opening file: %s\n", rank, adios_errmsg());
+        return 1;
+    }
+
+    sel0 = adios_selection_boundingbox (0, start, count); 
+    sel1 = adios_selection_boundingbox (1, start, count); 
+    sel2 = adios_selection_boundingbox (2, start, count); 
+    sel3 = adios_selection_boundingbox (3, start, count); 
+
+    log ("  Check variable definitions... %s\n", FILENAME);
+    nsteps_a = NSTEPS / 2 + NSTEPS % 2;
+    nsteps_b = NSTEPS / 2;
+    nsteps_c = NSTEPS;
+
+    CHECK_VARINFO("a0", 0, nsteps_a)
+    CHECK_VARINFO("b0", 0, nsteps_b)
+    CHECK_VARINFO("c0", 0, nsteps_c)
+    CHECK_VARINFO("at0", 0, nsteps_a)
+    CHECK_VARINFO("bt0", 0, nsteps_b)
+    CHECK_VARINFO("ct0", 0, nsteps_c)
+    CHECK_VARINFO("a1", 1, nsteps_a)
+    CHECK_VARINFO("b1", 1, nsteps_b)
+    CHECK_VARINFO("c1", 1, nsteps_c)
+    CHECK_VARINFO("at1", 1, nsteps_a)
+    CHECK_VARINFO("bt1", 1, nsteps_b)
+    CHECK_VARINFO("ct1", 1, nsteps_c)
+    CHECK_VARINFO("a2", 2, nsteps_a)
+    CHECK_VARINFO("b2", 2, nsteps_b)
+    CHECK_VARINFO("c2", 2, nsteps_c)
+    CHECK_VARINFO("a3", 3, nsteps_a)
+    CHECK_VARINFO("b3", 3, nsteps_b)
+    CHECK_VARINFO("c3", 3, nsteps_c)
+
+    log ("  Check variables c0,ct0,c1,ct1,c2,c3, steps=%d...\n",nsteps_c);
+    for (i=0; i<nsteps_c; i++) {
+        v = VALUE(rank,i);
+        v0 = VALUE0(i);
+        log ("    Step %d value %d\n", i, v);
+
+        adios_schedule_read (f, sel0, "c0",  i, 1, &r0);
+        adios_schedule_read (f, sel0, "ct0", i, 1, &rt0);
+        adios_schedule_read (f, sel1, "c1",  i, 1, r1);
+        adios_schedule_read (f, sel1, "ct1", i, 1, rt1);
+        adios_schedule_read (f, sel2, "c2",  i, 1, r2);
+        adios_schedule_read (f, sel3, "c3",  i, 1, r3);
+        adios_perform_reads (f, 1);
+
+        CHECK_SCALAR (c0,  r0,  v0, i) // scalar is from writer rank 0, not this rank!
+        CHECK_SCALAR (ct0, rt0, v0, i) // so value is v0 at step 'i', not v
+        CHECK_ARRAY (c1,  r1,  ldim1, v, i, iMacro)
+        CHECK_ARRAY (ct1, rt1, ldim1, v, i, iMacro)
+        CHECK_ARRAY (c2,  r2,  ldim1*ldim2, v, i, iMacro)
+        CHECK_ARRAY (c3,  r3,  ldim1*ldim2*ldim3, v, i, iMacro)
+    } 
+
+    log ("  Check variables a0,at0,a1,at1,a2,a3, steps=%d...\n",nsteps_a);
+    for (i=0; i<nsteps_a; i++) {
+        v = VALUE(rank,i*2);
+        v0 = VALUE0(i*2);
+        log ("    Step %d value %d\n", i, v);
+
+        adios_schedule_read (f, sel0, "a0",  i, 1, &r0);
+        adios_schedule_read (f, sel0, "at0", i, 1, &rt0);
+        adios_schedule_read (f, sel1, "a1",  i, 1, r1);
+        adios_schedule_read (f, sel1, "at1", i, 1, rt1);
+        adios_schedule_read (f, sel2, "a2",  i, 1, r2);
+        adios_schedule_read (f, sel3, "a3",  i, 1, r3);
+        adios_perform_reads (f, 1);
+
+        CHECK_SCALAR (a0,  r0,  v0, i)
+        CHECK_SCALAR (at0, rt0, v0, i)
+        CHECK_ARRAY (a1,  r1,  ldim1, v, i, iMacro)
+        CHECK_ARRAY (at1, rt1, ldim1, v, i, iMacro)
+        CHECK_ARRAY (a2,  r2,  ldim1*ldim2, v, i, iMacro)
+        CHECK_ARRAY (a3,  r3,  ldim1*ldim2*ldim3, v, i, iMacro)
+    } 
+
+    log ("  Check variables b0,bt0,b1,bt1,b2,b3, steps=%d...\n",nsteps_b);
+    for (i=0; i<nsteps_b; i++) {
+        v = VALUE(rank,i*2)+1;
+        v0 = VALUE0(i*2)+1;
+        log ("    Step %d value %d\n", i, v);
+
+        adios_schedule_read (f, sel0, "b0",  i, 1, &r0);
+        adios_schedule_read (f, sel0, "bt0", i, 1, &rt0);
+        adios_schedule_read (f, sel1, "b1",  i, 1, r1);
+        adios_schedule_read (f, sel1, "bt1", i, 1, rt1);
+        adios_schedule_read (f, sel2, "b2",  i, 1, r2);
+        adios_schedule_read (f, sel3, "b3",  i, 1, r3);
+        adios_perform_reads (f, 1);
+
+        CHECK_SCALAR (b0,  r0,  v0, i)
+        CHECK_SCALAR (bt0, rt0, v0, i)
+        CHECK_ARRAY (b1,  r1,  ldim1, v, i, iMacro)
+        CHECK_ARRAY (bt1, rt1, ldim1, v, i, iMacro)
+        CHECK_ARRAY (b2,  r2,  ldim1*ldim2, v, i, iMacro)
+        CHECK_ARRAY (b3,  r3,  ldim1*ldim2*ldim3, v, i, iMacro)
+    } 
+
+endread:
+
+    adios_selection_delete (sel0);
+    adios_selection_delete (sel1);
+    adios_selection_delete (sel2);
+    adios_selection_delete (sel3);
+
+    adios_read_close(f);
+    MPI_Barrier (comm);
+    return err;
+}
+
+
+
+
+
+int read_stream ()
+{
+    ADIOS_SELECTION *sel0,*sel1,*sel2,*sel3;
+    ADIOS_FILE * f;
+    ADIOS_VARINFO * vi;
+    int err=0,v,v0,i,n;
+    int nsteps_a, nsteps_b, nsteps_c;
+    int iMacro; // loop variable in macros
+
+    uint64_t start[3] = {offs1,offs2,offs3};
+    uint64_t count[3] = {ldim1,ldim2,ldim3};
+    uint64_t ndim;
+    
+    reset_readvars();
+
+    log ("Read as stream and check data in %s\n", FILENAME);
+    f = adios_read_open_stream (FILENAME, ADIOS_READ_METHOD_BP, comm,
+                                ADIOS_LOCKMODE_NONE, 0.0);
+    if (f == NULL) {
+        printE ("Error at opening file as stream: %s\n", rank, adios_errmsg());
+        return 1;
+    }
+
+    sel0 = adios_selection_boundingbox (0, start, count); 
+    sel1 = adios_selection_boundingbox (1, start, count); 
+    sel2 = adios_selection_boundingbox (2, start, count); 
+    sel3 = adios_selection_boundingbox (3, start, count); 
+
+    n = 0;
+    while (n < NSTEPS && adios_errno != err_end_of_stream) {
+        log ("  Step %d\n", n);
+
+        log ("    Check variable definitions... %s\n", FILENAME);
+        if (n%2 == 0) {
+            CHECK_VARINFO("a0", 0, 1)
+            CHECK_VARINFO("at0", 0, 1)
+            CHECK_VARINFO("a1", 1, 1)
+            CHECK_VARINFO("at1", 1, 1)
+            CHECK_VARINFO("a2", 2, 1)
+            CHECK_VARINFO("a3", 3, 1)
+        } else {
+            CHECK_VARINFO("b0", 0, 1)
+            CHECK_VARINFO("bt0", 0, 1)
+            CHECK_VARINFO("b1", 1, 1)
+            CHECK_VARINFO("bt1", 1, 1)
+            CHECK_VARINFO("b2", 2, 1)
+            CHECK_VARINFO("b3", 3, 1)
+        }
+        CHECK_VARINFO("c0", 0, 1)
+        CHECK_VARINFO("ct0", 0, 1)
+        CHECK_VARINFO("c1", 1, 1)
+        CHECK_VARINFO("ct1", 1, 1)
+        CHECK_VARINFO("c2", 2, 1)
+        CHECK_VARINFO("c3", 3, 1)
+
+
+        v = VALUE(rank,n);
+        v0 = VALUE0(n);
+        log ("    Check variables c0,ct0,c1,ct1,c2,c3... Step %d value %d\n", n, v);
+
+        adios_schedule_read (f, sel0, "c0",  0, 1, &r0);
+        adios_schedule_read (f, sel0, "ct0", 0, 1, &rt0);
+        adios_schedule_read (f, sel1, "c1",  0, 1, r1);
+        adios_schedule_read (f, sel1, "ct1", 0, 1, rt1);
+        adios_schedule_read (f, sel2, "c2",  0, 1, r2);
+        adios_schedule_read (f, sel3, "c3",  0, 1, r3);
+        adios_perform_reads (f, 1);
+
+        CHECK_SCALAR (c0,  r0,  v0, n) // scalar is from writer rank 0, not this rank!
+        CHECK_SCALAR (ct0, rt0, v0, n) // so value is v0 at 'n', not v
+        CHECK_ARRAY (c1,  r1,  ldim1, v, n, iMacro)
+        CHECK_ARRAY (ct1, rt1, ldim1, v, n, iMacro)
+        CHECK_ARRAY (c2,  r2,  ldim1*ldim2, v, n, iMacro)
+        CHECK_ARRAY (c3,  r3,  ldim1*ldim2*ldim3, v, n, iMacro)
+
+
+        if (n%2 == 0) {
+            v = VALUE(rank,n);
+            v0 = VALUE0(n);
+            log ("    Check variables a0,at0,a1,at1,a2,a3... Step %d value %d\n", n, v);
+
+            adios_schedule_read (f, sel0, "a0",  0, 1, &r0);
+            adios_schedule_read (f, sel0, "at0", 0, 1, &rt0);
+            adios_schedule_read (f, sel1, "a1",  0, 1, r1);
+            adios_schedule_read (f, sel1, "at1", 0, 1, rt1);
+            adios_schedule_read (f, sel2, "a2",  0, 1, r2);
+            adios_schedule_read (f, sel3, "a3",  0, 1, r3);
+            adios_perform_reads (f, 1);
+
+            CHECK_SCALAR (a0,  r0,  v0, n)
+            CHECK_SCALAR (at0, rt0, v0, n)
+            CHECK_ARRAY (a1,  r1,  ldim1, v, n, iMacro)
+            CHECK_ARRAY (at1, rt1, ldim1, v, n, iMacro)
+            CHECK_ARRAY (a2,  r2,  ldim1*ldim2, v, n, iMacro)
+            CHECK_ARRAY (a3,  r3,  ldim1*ldim2*ldim3, v, n, iMacro)
+        }
+
+
+        if (n%2 == 1) {
+            v = VALUE(rank,n);
+            v0 = VALUE0(n);
+            log ("    Check variables b0,bt0,b1,bt1,b2,b3... Step %d value %d\n", n, v);
+
+            adios_schedule_read (f, sel0, "b0",  0, 1, &r0);
+            adios_schedule_read (f, sel0, "bt0", 0, 1, &rt0);
+            adios_schedule_read (f, sel1, "b1",  0, 1, r1);
+            adios_schedule_read (f, sel1, "bt1", 0, 1, rt1);
+            adios_schedule_read (f, sel2, "b2",  0, 1, r2);
+            adios_schedule_read (f, sel3, "b3",  0, 1, r3);
+            adios_perform_reads (f, 1);
+
+            CHECK_SCALAR (b0,  r0,  v0, n)
+            CHECK_SCALAR (bt0, rt0, v0, n)
+            CHECK_ARRAY (b1,  r1,  ldim1, v, n, iMacro)
+            CHECK_ARRAY (bt1, rt1, ldim1, v, n, iMacro)
+            CHECK_ARRAY (b2,  r2,  ldim1*ldim2, v, n, iMacro)
+            CHECK_ARRAY (b3,  r3,  ldim1*ldim2*ldim3, v, n, iMacro)
+        }
+
+        if (adios_advance_step (f, 0, 0.0) >= 0)
+            n = f->current_step;
+        else
+            n++; //just to end the loop
+    } 
+
+endread:
+
+    adios_selection_delete (sel0);
+    adios_selection_delete (sel1);
+    adios_selection_delete (sel2);
+    adios_selection_delete (sel3);
+
+    adios_read_close(f);
+    MPI_Barrier (comm);
+    return err;
+}
diff --git a/tests/suite/programs/write_alternate.xml b/tests/suite/programs/write_alternate.xml
new file mode 100644
index 0000000..bdad58b
--- /dev/null
+++ b/tests/suite/programs/write_alternate.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0"?>
+<adios-config host-language="C">
+
+    <adios-group name="abc" coordination-communicator="comm" time-index="tidx">
+        <!-- dimension variables (scalars) -->
+        <var name="gdim1" path="/dimensions" type="integer"/>
+        <var name="gdim2" path="/dimensions" type="integer"/>
+        <var name="gdim3" path="/dimensions" type="integer"/>
+        <var name="ldim1" path="/dimensions" type="integer"/>
+        <var name="ldim2" path="/dimensions" type="integer"/>
+        <var name="ldim3" path="/dimensions" type="integer"/>
+        <var name="offs1" path="/dimensions" type="integer"/>
+        <var name="offs2" path="/dimensions" type="integer"/>
+        <var name="offs3" path="/dimensions" type="integer"/>
+
+        <!-- Scalars -->
+        <var name="a0"  type="integer"/>
+        <var name="b0"  type="integer"/>
+        <var name="c0"  type="integer"/>
+
+        <!-- Scalars over time -->
+        <var name="at0" dimensions="tidx" type="integer"/>
+        <var name="bt0" dimensions="tidx" type="integer"/>
+        <var name="ct0" dimensions="tidx" type="integer"/>
+
+        <!-- 1D Arrays -->
+        <global-bounds dimensions="gdim1" offsets="offs1">
+            <var name="a1" dimensions="ldim1" type="integer"/>
+            <var name="b1" dimensions="ldim1" type="integer"/>
+            <var name="c1" dimensions="ldim1" type="integer"/>
+        </global-bounds>
+
+        <!-- 1D Arrays over time -->
+        <global-bounds dimensions="gdim1" offsets="offs1">
+            <var name="at1" dimensions="tidx,ldim1" type="integer"/>
+            <var name="bt1" dimensions="tidx,ldim1" type="integer"/>
+            <var name="ct1" dimensions="tidx,ldim1" type="integer"/>
+        </global-bounds>
+
+        <!-- 2D Arrays -->
+        <global-bounds dimensions="gdim1,gdim2" offsets="offs1,offs2">
+            <var name="a2" dimensions="ldim1,ldim2" type="integer"/>
+            <var name="b2" dimensions="ldim1,ldim2" type="integer"/>
+            <var name="c2" dimensions="ldim1,ldim2" type="integer"/>
+        </global-bounds>
+
+        <!-- 3D Arrays -->
+        <global-bounds dimensions="gdim1,gdim2,gdim3" offsets="offs1,offs2,offs3">
+            <var name="a3" dimensions="ldim1,ldim2,ldim3" type="integer"/>
+            <var name="b3" dimensions="ldim1,ldim2,ldim3" type="integer"/>
+            <var name="c3" dimensions="ldim1,ldim2,ldim3" type="integer"/>
+        </global-bounds>
+
+    </adios-group>
+
+<method group="abc" method="MPI"/>
+
+<buffer size-MB="20" allocate-time="now"/>
+
+</adios-config>
+
diff --git a/tests/suite/programs/write_read.c b/tests/suite/programs/write_read.c
new file mode 100644
index 0000000..a7c4606
--- /dev/null
+++ b/tests/suite/programs/write_read.c
@@ -0,0 +1,852 @@
+/* 
+ * ADIOS is freely available under the terms of the BSD license described
+ * in the COPYING file in the top level directory of this source distribution.
+ *
+ * Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+ */
+
+/* ADIOS C test: write then read adios files 
+ *
+ * How to run: mpirun -np <N> write_read
+ * Output: write_read.bp
+ *
+ */
+#include <stdio.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include "mpi.h"
+#include "public/adios.h"
+#include "public/adios_read.h"
+
+#ifdef DMALLOC
+#include "dmalloc.h"
+#endif
+
+#define log(...) fprintf (stderr, "[rank=%3.3d, line %d]: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+#define printE(...) fprintf (stderr, "[rank=%3.3d, line %d]: ERROR: ", rank, __LINE__); fprintf (stderr, __VA_ARGS__); fflush(stderr);
+
+typedef struct complex {
+    float r;
+    float i;
+} complex;
+
+typedef struct double_complex {
+    double r;
+    double i;
+} double_complex;
+
+/* Variables to write */
+int8_t   scalar_byte    = -100;
+int16_t  scalar_short   = -10000;
+int32_t  scalar_int     = -1000000000;
+int64_t  scalar_long    = -1000000000000L;
+uint8_t  scalar_ubyte   = 100;
+uint16_t scalar_ushort  = 10000;
+uint32_t scalar_uint    = 1000000000;
+uint64_t scalar_ulong   = 1000000000000L;
+float    scalar_float   = 3.14159265358979323846; 
+double   scalar_double  = 2.7182818284590452353602874713526625L;
+char *   scalar_string  = "ADIOS example string";
+complex  scalar_complex;
+double_complex scalar_double_complex;
+
+int8_t   *a1_byte,    *a2_byte,    *a3_byte,    *a6_byte;
+int16_t  *a1_short,   *a2_short,   *a3_short,   *a6_short;
+int32_t  *a1_int,     *a2_int,     *a3_int,     *a6_int;
+int64_t  *a1_long,    *a2_long,    *a3_long,    *a6_long;
+uint8_t  *a1_ubyte,   *a2_ubyte,   *a3_ubyte,   *a6_ubyte;
+uint16_t *a1_ushort,  *a2_ushort,  *a3_ushort,  *a6_ushort;
+uint32_t *a1_uint,    *a2_uint,    *a3_uint,    *a6_uint;
+uint64_t *a1_ulong,   *a2_ulong,   *a3_ulong,   *a6_ulong;
+float    *a1_float,   *a2_float,   *a3_float,   *a6_float;
+double   *a1_double,  *a2_double,  *a3_double,  *a6_double;
+complex  *a1_complex, *a2_complex, *a3_complex, *a6_complex;
+double_complex *a1_double_complex, *a2_double_complex, *a3_double_complex, *a6_double_complex;
+
+/* Variables to read */
+int8_t   *r1_byte,    *r2_byte,    *r3_byte,    *r6_byte;
+int16_t  *r1_short,   *r2_short,   *r3_short,   *r6_short;
+int32_t  *r1_int,     *r2_int,     *r3_int,     *r6_int;
+int64_t  *r1_long,    *r2_long,    *r3_long,    *r6_long;
+uint8_t  *r1_ubyte,   *r2_ubyte,   *r3_ubyte,   *r6_ubyte;
+uint16_t *r1_ushort,  *r2_ushort,  *r3_ushort,  *r6_ushort;
+uint32_t *r1_uint,    *r2_uint,    *r3_uint,    *r6_uint;
+uint64_t *r1_ulong,   *r2_ulong,   *r3_ulong,   *r6_ulong;
+float    *r1_float,   *r2_float,   *r3_float,   *r6_float;
+double   *r1_double,  *r2_double,  *r3_double,  *r6_double;
+complex  *r1_complex, *r2_complex, *r3_complex, *r6_complex;
+double_complex *r1_double_complex, *r2_double_complex, *r3_double_complex, *r6_double_complex;
+
+int ldim1 = 7;
+int ldim2 = 5;
+int ldim3 = 3;
+int ldim4 = 2;
+int ldim5 = 4;
+int ldim6 = 9;
+int gdim1, gdim2, gdim3, gdim4, gdim5, gdim6;
+int offs1, offs2, offs3, offs4, offs5, offs6;
+
+MPI_Comm    comm = MPI_COMM_WORLD;
+int rank;
+int size;
+
+void init_vars()
+{
+    int n, i;
+    int v = rank%256;
+    scalar_complex.r = 8.0;
+    scalar_complex.i = 9.0;
+    scalar_double_complex.r = 10.0;
+    scalar_double_complex.i = 11.0;
+
+    gdim1 = size*ldim1;
+    gdim2 = ldim2;
+    gdim3 = ldim3;
+    gdim4 = ldim4;
+    gdim5 = ldim5;
+    gdim6 = ldim6;
+
+    offs1 = rank*ldim1;
+    offs2 = 0;
+    offs3 = 0;
+    offs4 = 0;
+    offs5 = 0;
+    offs6 = 0;
+
+    n = ldim1;
+    a1_byte           = (int8_t*)   malloc (n * sizeof(int8_t));
+    a1_short          = (int16_t*)  malloc (n * sizeof(int16_t));
+    a1_int            = (int32_t*)  malloc (n * sizeof(int32_t));
+    a1_long           = (int64_t*)  malloc (n * sizeof(int64_t));
+    a1_ubyte          = (uint8_t*)  malloc (n * sizeof(uint8_t));
+    a1_ushort         = (uint16_t*) malloc (n * sizeof(uint16_t));
+    a1_uint           = (uint32_t*) malloc (n * sizeof(uint32_t));
+    a1_ulong          = (uint64_t*) malloc (n * sizeof(uint64_t));
+    a1_float          = (float*)    malloc (n * sizeof(float));
+    a1_double         = (double*)   malloc (n * sizeof(double));
+    a1_complex        = (complex*)  malloc (n * sizeof(complex));
+    a1_double_complex = (double_complex*) malloc (n * sizeof(double_complex));
+
+    r1_byte           = (int8_t*)   malloc (n * sizeof(int8_t));
+    r1_short          = (int16_t*)  malloc (n * sizeof(int16_t));
+    r1_int            = (int32_t*)  malloc (n * sizeof(int32_t));
+    r1_long           = (int64_t*)  malloc (n * sizeof(int64_t));
+    r1_ubyte          = (uint8_t*)  malloc (n * sizeof(uint8_t));
+    r1_ushort         = (uint16_t*) malloc (n * sizeof(uint16_t));
+    r1_uint           = (uint32_t*) malloc (n * sizeof(uint32_t));
+    r1_ulong          = (uint64_t*) malloc (n * sizeof(uint64_t));
+    r1_float          = (float*)    malloc (n * sizeof(float));
+    r1_double         = (double*)   malloc (n * sizeof(double));
+    r1_complex        = (complex*)  malloc (n * sizeof(complex));
+    r1_double_complex = (double_complex*) malloc (n * sizeof(double_complex));
+
+    for (i=0; i<n; i++)    a1_byte[i]   = rank % 256;
+    for (i=0; i<n; i++)    a1_short[i]  = rank % 65536;
+    for (i=0; i<n; i++)    a1_int[i]    = rank;
+    for (i=0; i<n; i++)    a1_long[i]   = rank;
+    for (i=0; i<n; i++)    a1_ubyte[i]  = rank % 256;
+    for (i=0; i<n; i++)    a1_ushort[i] = rank % 65536;
+    for (i=0; i<n; i++)    a1_uint[i]   = rank;
+    for (i=0; i<n; i++)    a1_ulong[i]  = rank;
+    for (i=0; i<n; i++)    a1_float[i]  = rank;
+    for (i=0; i<n; i++)    a1_double[i] = rank;
+    for (i=0; i<n; i++)    a1_complex[i].r = rank;
+    for (i=0; i<n; i++)    a1_complex[i].i = rank;
+    for (i=0; i<n; i++)    a1_double_complex[i].r = rank;
+    for (i=0; i<n; i++)    a1_double_complex[i].i = rank;
+
+    n = ldim1 * ldim2;
+    a2_byte           = (int8_t*)   malloc (n * sizeof(int8_t));
+    a2_short          = (int16_t*)  malloc (n * sizeof(int16_t));
+    a2_int            = (int32_t*)  malloc (n * sizeof(int32_t));
+    a2_long           = (int64_t*)  malloc (n * sizeof(int64_t));
+    a2_ubyte          = (uint8_t*)  malloc (n * sizeof(uint8_t));
+    a2_ushort         = (uint16_t*) malloc (n * sizeof(uint16_t));
+    a2_uint           = (uint32_t*) malloc (n * sizeof(uint32_t));
+    a2_ulong          = (uint64_t*) malloc (n * sizeof(uint64_t));
+    a2_float          = (float*)    malloc (n * sizeof(float));
+    a2_double         = (double*)   malloc (n * sizeof(double));
+    a2_complex        = (complex*)  malloc (n * sizeof(complex));
+    a2_double_complex = (double_complex*) malloc (n * sizeof(double_complex));
+
+    r2_byte           = (int8_t*)   malloc (n * sizeof(int8_t));
+    r2_short          = (int16_t*)  malloc (n * sizeof(int16_t));
+    r2_int            = (int32_t*)  malloc (n * sizeof(int32_t));
+    r2_long           = (int64_t*)  malloc (n * sizeof(int64_t));
+    r2_ubyte          = (uint8_t*)  malloc (n * sizeof(uint8_t));
+    r2_ushort         = (uint16_t*) malloc (n * sizeof(uint16_t));
+    r2_uint           = (uint32_t*) malloc (n * sizeof(uint32_t));
+    r2_ulong          = (uint64_t*) malloc (n * sizeof(uint64_t));
+    r2_float          = (float*)    malloc (n * sizeof(float));
+    r2_double         = (double*)   malloc (n * sizeof(double));
+    r2_complex        = (complex*)  malloc (n * sizeof(complex));
+    r2_double_complex = (double_complex*) malloc (n * sizeof(double_complex));
+
+    for (i=0; i<n; i++)    a2_byte[i]   = rank % 256;
+    for (i=0; i<n; i++)    a2_short[i]  = rank % 65536;
+    for (i=0; i<n; i++)    a2_int[i]    = rank;
+    for (i=0; i<n; i++)    a2_long[i]   = rank;
+    for (i=0; i<n; i++)    a2_ubyte[i]  = rank % 256;
+    for (i=0; i<n; i++)    a2_ushort[i] = rank % 65536;
+    for (i=0; i<n; i++)    a2_uint[i]   = rank;
+    for (i=0; i<n; i++)    a2_ulong[i]  = rank;
+    for (i=0; i<n; i++)    a2_float[i]  = rank;
+    for (i=0; i<n; i++)    a2_double[i] = rank;
+    for (i=0; i<n; i++)    a2_complex[i].r = rank;
+    for (i=0; i<n; i++)    a2_complex[i].i = rank;
+    for (i=0; i<n; i++)    a2_double_complex[i].r = rank;
+    for (i=0; i<n; i++)    a2_double_complex[i].i = rank;
+
+    n = ldim1 * ldim2 * ldim3;
+    a3_byte           = (int8_t*)   malloc (n * sizeof(int8_t));
+    a3_short          = (int16_t*)  malloc (n * sizeof(int16_t));
+    a3_int            = (int32_t*)  malloc (n * sizeof(int32_t));
+    a3_long           = (int64_t*)  malloc (n * sizeof(int64_t));
+    a3_ubyte          = (uint8_t*)  malloc (n * sizeof(uint8_t));
+    a3_ushort         = (uint16_t*) malloc (n * sizeof(uint16_t));
+    a3_uint           = (uint32_t*) malloc (n * sizeof(uint32_t));
+    a3_ulong          = (uint64_t*) malloc (n * sizeof(uint64_t));
+    a3_float          = (float*)    malloc (n * sizeof(float));
+    a3_double         = (double*)   malloc (n * sizeof(double));
+    a3_complex        = (complex*)  malloc (n * sizeof(complex));
+    a3_double_complex = (double_complex*) malloc (n * sizeof(double_complex));
+
+    r3_byte           = (int8_t*)   malloc (n * sizeof(int8_t));
+    r3_short          = (int16_t*)  malloc (n * sizeof(int16_t));
+    r3_int            = (int32_t*)  malloc (n * sizeof(int32_t));
+    r3_long           = (int64_t*)  malloc (n * sizeof(int64_t));
+    r3_ubyte          = (uint8_t*)  malloc (n * sizeof(uint8_t));
+    r3_ushort         = (uint16_t*) malloc (n * sizeof(uint16_t));
+    r3_uint           = (uint32_t*) malloc (n * sizeof(uint32_t));
+    r3_ulong          = (uint64_t*) malloc (n * sizeof(uint64_t));
+    r3_float          = (float*)    malloc (n * sizeof(float));
+    r3_double         = (double*)   malloc (n * sizeof(double));
+    r3_complex        = (complex*)  malloc (n * sizeof(complex));
+    r3_double_complex = (double_complex*) malloc (n * sizeof(double_complex));
+
+    for (i=0; i<n; i++)    a3_byte[i]   = rank % 256;
+    for (i=0; i<n; i++)    a3_short[i]  = rank % 65536;
+    for (i=0; i<n; i++)    a3_int[i]    = rank;
+    for (i=0; i<n; i++)    a3_long[i]   = rank;
+    for (i=0; i<n; i++)    a3_ubyte[i]  = rank % 256;
+    for (i=0; i<n; i++)    a3_ushort[i] = rank % 65536;
+    for (i=0; i<n; i++)    a3_uint[i]   = rank;
+    for (i=0; i<n; i++)    a3_ulong[i]  = rank;
+    for (i=0; i<n; i++)    a3_float[i]  = rank;
+    for (i=0; i<n; i++)    a3_double[i] = rank;
+    for (i=0; i<n; i++)    a3_complex[i].r = rank;
+    for (i=0; i<n; i++)    a3_complex[i].i = rank;
+    for (i=0; i<n; i++)    a3_double_complex[i].r = rank;
+    for (i=0; i<n; i++)    a3_double_complex[i].i = rank;
+
+    n = ldim1 * ldim2 * ldim3 * ldim4 * ldim5 * ldim6;
+    a6_byte           = (int8_t*)   malloc (n * sizeof(int8_t));
+    a6_short          = (int16_t*)  malloc (n * sizeof(int16_t));
+    a6_int            = (int32_t*)  malloc (n * sizeof(int32_t));
+    a6_long           = (int64_t*)  malloc (n * sizeof(int64_t));
+    a6_ubyte          = (uint8_t*)  malloc (n * sizeof(uint8_t));
+    a6_ushort         = (uint16_t*) malloc (n * sizeof(uint16_t));
+    a6_uint           = (uint32_t*) malloc (n * sizeof(uint32_t));
+    a6_ulong          = (uint64_t*) malloc (n * sizeof(uint64_t));
+    a6_float          = (float*)    malloc (n * sizeof(float));
+    a6_double         = (double*)   malloc (n * sizeof(double));
+    a6_complex        = (complex*)  malloc (n * sizeof(complex));
+    a6_double_complex = (double_complex*) malloc (n * sizeof(double_complex));
+
+    r6_byte           = (int8_t*)   malloc (n * sizeof(int8_t));
+    r6_short          = (int16_t*)  malloc (n * sizeof(int16_t));
+    r6_int            = (int32_t*)  malloc (n * sizeof(int32_t));
+    r6_long           = (int64_t*)  malloc (n * sizeof(int64_t));
+    r6_ubyte          = (uint8_t*)  malloc (n * sizeof(uint8_t));
+    r6_ushort         = (uint16_t*) malloc (n * sizeof(uint16_t));
+    r6_uint           = (uint32_t*) malloc (n * sizeof(uint32_t));
+    r6_ulong          = (uint64_t*) malloc (n * sizeof(uint64_t));
+    r6_float          = (float*)    malloc (n * sizeof(float));
+    r6_double         = (double*)   malloc (n * sizeof(double));
+    r6_complex        = (complex*)  malloc (n * sizeof(complex));
+    r6_double_complex = (double_complex*) malloc (n * sizeof(double_complex));
+
+    for (i=0; i<n; i++)    a6_byte[i]   = rank % 256;
+    for (i=0; i<n; i++)    a6_short[i]  = rank % 65536;
+    for (i=0; i<n; i++)    a6_int[i]    = rank;
+    for (i=0; i<n; i++)    a6_long[i]   = rank;
+    for (i=0; i<n; i++)    a6_ubyte[i]  = rank % 256;
+    for (i=0; i<n; i++)    a6_ushort[i] = rank % 65536;
+    for (i=0; i<n; i++)    a6_uint[i]   = rank;
+    for (i=0; i<n; i++)    a6_ulong[i]  = rank;
+    for (i=0; i<n; i++)    a6_float[i]  = rank;
+    for (i=0; i<n; i++)    a6_double[i] = rank;
+    for (i=0; i<n; i++)    a6_complex[i].r = rank;
+    for (i=0; i<n; i++)    a6_complex[i].i = rank;
+    for (i=0; i<n; i++)    a6_double_complex[i].r = rank;
+    for (i=0; i<n; i++)    a6_double_complex[i].i = rank;
+
+}
+
+void fini_vars()
+{
+    free (a1_byte);
+    free (a1_short);
+    free (a1_int);
+    free (a1_long);
+    free (a1_ubyte);
+    free (a1_ushort);
+    free (a1_uint);
+    free (a1_ulong);
+    free (a1_float);
+    free (a1_double);
+    free (a1_complex);
+    free (a1_double_complex);
+
+    free (a2_byte);
+    free (a2_short);
+    free (a2_int);
+    free (a2_long);
+    free (a2_ubyte);
+    free (a2_ushort);
+    free (a2_uint);
+    free (a2_ulong);
+    free (a2_float);
+    free (a2_double);
+    free (a2_complex);
+    free (a2_double_complex);
+
+    free (a3_byte);
+    free (a3_short);
+    free (a3_int);
+    free (a3_long);
+    free (a3_ubyte);
+    free (a3_ushort);
+    free (a3_uint);
+    free (a3_ulong);
+    free (a3_float);
+    free (a3_double);
+    free (a3_complex);
+    free (a3_double_complex);
+
+    free (a6_byte);
+    free (a6_short);
+    free (a6_int);
+    free (a6_long);
+    free (a6_ubyte);
+    free (a6_ushort);
+    free (a6_uint);
+    free (a6_ulong);
+    free (a6_float);
+    free (a6_double);
+    free (a6_complex);
+    free (a6_double_complex);
+
+    free (r1_byte);
+    free (r1_short);
+    free (r1_int);
+    free (r1_long);
+    free (r1_ubyte);
+    free (r1_ushort);
+    free (r1_uint);
+    free (r1_ulong);
+    free (r1_float);
+    free (r1_double);
+    free (r1_complex);
+    free (r1_double_complex);
+
+    free (r2_byte);
+    free (r2_short);
+    free (r2_int);
+    free (r2_long);
+    free (r2_ubyte);
+    free (r2_ushort);
+    free (r2_uint);
+    free (r2_ulong);
+    free (r2_float);
+    free (r2_double);
+    free (r2_complex);
+    free (r2_double_complex);
+
+    free (r3_byte);
+    free (r3_short);
+    free (r3_int);
+    free (r3_long);
+    free (r3_ubyte);
+    free (r3_ushort);
+    free (r3_uint);
+    free (r3_ulong);
+    free (r3_float);
+    free (r3_double);
+    free (r3_complex);
+    free (r3_double_complex);
+
+    free (r6_byte);
+    free (r6_short);
+    free (r6_int);
+    free (r6_long);
+    free (r6_ubyte);
+    free (r6_ushort);
+    free (r6_uint);
+    free (r6_ulong);
+    free (r6_float);
+    free (r6_double);
+    free (r6_complex);
+    free (r6_double_complex);
+}
+
+
+int write_file (char *fname);
+int read_file (char *fname);
+
+int main (int argc, char ** argv) 
+{
+    int err; 
+
+    MPI_Init (&argc, &argv);
+    MPI_Comm_rank (comm, &rank);
+    MPI_Comm_size (comm, &size);
+
+    init_vars();
+    adios_init ("write_read.xml");
+    err = adios_read_init_method(ADIOS_READ_METHOD_BP, comm, "verbose=2");
+    if (err) {
+        printE ("%s\n", adios_errmsg());
+    }
+
+    if (!err)
+        err = write_file ("write_read_1.bp"); 
+    if (!err)
+        err = read_file ("write_read_1.bp"); 
+    if (!err)
+        err = write_file ("write_read_2.bp"); 
+    if (!err)
+        err = read_file ("write_read_2.bp"); 
+    adios_finalize (rank);
+    fini_vars();
+    MPI_Finalize ();
+    return err;
+}
+
+
+int write_file (char *fname) 
+{
+    int64_t       fh;
+    uint64_t       groupsize=0, totalsize;
+    int64_t       s;
+
+    log ("Write data to %s\n", fname);
+    adios_open (&fh, "alltypes", fname, "w", &comm);
+    
+    s = 1+2+4+8 + 1+2+4+8 + 4+8 + 8+16; // sizeof different types
+    groupsize  = 18*4;                       // dimensions 
+    groupsize += s + strlen(scalar_string);  // scalars 
+    groupsize += s * ldim1;                  // 1D 
+    groupsize += s * ldim1 * ldim2;          // 2D 
+    groupsize += s * ldim1 * ldim2 * ldim3;  // 3D
+    groupsize += s * ldim1 * ldim2 * ldim3 * ldim4 * ldim5 * ldim6; // 6D
+    adios_group_size (fh, groupsize, &totalsize);
+    adios_write (fh, "gdim1", &gdim1);
+    adios_write (fh, "gdim2", &gdim2);
+    adios_write (fh, "gdim3", &gdim3);
+    adios_write (fh, "gdim4", &gdim4);
+    adios_write (fh, "gdim5", &gdim5);
+    adios_write (fh, "gdim6", &gdim6);
+    adios_write (fh, "ldim1", &ldim1);
+    adios_write (fh, "ldim2", &ldim2);
+    adios_write (fh, "ldim3", &ldim3);
+    adios_write (fh, "ldim4", &ldim4);
+    adios_write (fh, "ldim5", &ldim5);
+    adios_write (fh, "ldim6", &ldim6);
+    adios_write (fh, "offs1", &offs1);
+    adios_write (fh, "offs2", &offs2);
+    adios_write (fh, "offs3", &offs3);
+    adios_write (fh, "offs4", &offs4);
+    adios_write (fh, "offs5", &offs5);
+    adios_write (fh, "offs6", &offs6);
+    adios_write (fh, "scalar_byte", &scalar_byte);
+    adios_write (fh, "scalar_short", &scalar_short);
+    adios_write (fh, "scalar_int", &scalar_int);
+    adios_write (fh, "scalar_long", &scalar_long);
+    adios_write (fh, "scalar_ubyte", &scalar_ubyte);
+    adios_write (fh, "scalar_ushort", &scalar_ushort);
+    adios_write (fh, "scalar_uint", &scalar_uint);
+    adios_write (fh, "scalar_ulong", &scalar_ulong);
+    adios_write (fh, "scalar_float", &scalar_float);
+    adios_write (fh, "scalar_double", &scalar_double);
+    adios_write (fh, "scalar_string", scalar_string);
+    adios_write (fh, "scalar_complex", &scalar_complex);
+    adios_write (fh, "scalar_double_complex", &scalar_double_complex);
+    adios_write (fh, "a1_byte", a1_byte);
+    adios_write (fh, "a1_short", a1_short);
+    adios_write (fh, "a1_int", a1_int);
+    adios_write (fh, "a1_long", a1_long);
+    adios_write (fh, "a1_ubyte", a1_ubyte);
+    adios_write (fh, "a1_ushort", a1_ushort);
+    adios_write (fh, "a1_uint", a1_uint);
+    adios_write (fh, "a1_ulong", a1_ulong);
+    adios_write (fh, "a1_float", a1_float);
+    adios_write (fh, "a1_double", a1_double);
+    adios_write (fh, "a1_complex", a1_complex);
+    adios_write (fh, "a1_double_complex", a1_double_complex);
+    adios_write (fh, "a2_byte", a2_byte);
+    adios_write (fh, "a2_short", a2_short);
+    adios_write (fh, "a2_int", a2_int);
+    adios_write (fh, "a2_long", a2_long);
+    adios_write (fh, "a2_ubyte", a2_ubyte);
+    adios_write (fh, "a2_ushort", a2_ushort);
+    adios_write (fh, "a2_uint", a2_uint);
+    adios_write (fh, "a2_ulong", a2_ulong);
+    adios_write (fh, "a2_float", a2_float);
+    adios_write (fh, "a2_double", a2_double);
+    adios_write (fh, "a2_complex", a2_complex);
+    adios_write (fh, "a2_double_complex", a2_double_complex);
+    adios_write (fh, "a3_byte", a3_byte);
+    adios_write (fh, "a3_short", a3_short);
+    adios_write (fh, "a3_int", a3_int);
+    adios_write (fh, "a3_long", a3_long);
+    adios_write (fh, "a3_ubyte", a3_ubyte);
+    adios_write (fh, "a3_ushort", a3_ushort);
+    adios_write (fh, "a3_uint", a3_uint);
+    adios_write (fh, "a3_ulong", a3_ulong);
+    adios_write (fh, "a3_float", a3_float);
+    adios_write (fh, "a3_double", a3_double);
+    adios_write (fh, "a3_complex", a3_complex);
+    adios_write (fh, "a3_double_complex", a3_double_complex);
+    adios_write (fh, "a6_byte", a6_byte);
+    adios_write (fh, "a6_short", a6_short);
+    adios_write (fh, "a6_int", a6_int);
+    adios_write (fh, "a6_long", a6_long);
+    adios_write (fh, "a6_ubyte", a6_ubyte);
+    adios_write (fh, "a6_ushort", a6_ushort);
+    adios_write (fh, "a6_uint", a6_uint);
+    adios_write (fh, "a6_ulong", a6_ulong);
+    adios_write (fh, "a6_float", a6_float);
+    adios_write (fh, "a6_double", a6_double);
+    adios_write (fh, "a6_complex", a6_complex);
+    adios_write (fh, "a6_double_complex", a6_double_complex);
+
+    adios_close (fh);
+    MPI_Barrier (comm);
+    return 0;
+}
+
+
+#define GET_SCALAR(VARNAME) \
+    vi = adios_inq_var (f, VARNAME); \
+    if (vi == NULL) { \
+        printE ("No such variable %s\n", VARNAME); \
+        err = 101; \
+        goto endread; \
+    } \
+
+#define CHECK_SCALAR(VARNAME,VAR,TYPE) \
+    GET_SCALAR(VARNAME) \
+    if (*(TYPE*)vi->value != VAR) { \
+        printE ("Scalar %s as read from file != as written\n", VARNAME); \
+        err = 102; \
+        goto endread; \
+    } \
+    adios_free_varinfo (vi);
+
+#define CHECK_ARRAY(A,R) \
+    for (i=0;i<n;i++) \
+        if (A[i] != R[i]) { \
+            printE ("Variable " #A " does not equal in written and read values at position %d\n", i);\
+            err = 103; \
+            goto endread;\
+        }
+
+void reset_rarrays()
+{
+    int n;
+    
+    n = ldim1;
+    memset (r1_byte,    -1, n*sizeof(int8_t));
+    memset (r1_short,   -1, n*sizeof(int16_t));
+    memset (r1_int,     -1, n*sizeof(int32_t));
+    memset (r1_long,    -1, n*sizeof(int64_t));
+    memset (r1_ubyte,   -1, n*sizeof(uint8_t));
+    memset (r1_ushort,  -1, n*sizeof(uint16_t));
+    memset (r1_uint,    -1, n*sizeof(uint32_t));
+    memset (r1_ulong,   -1, n*sizeof(uint64_t));
+    memset (r1_float,   -1, n*sizeof(float));
+    memset (r1_double,  -1, n*sizeof(double));
+    memset (r1_complex, -1, n*sizeof(complex));
+    memset (r1_double_complex, -1, n*sizeof(double_complex));
+
+    n = ldim1 * ldim2;
+    memset (r2_byte,    -1, n*sizeof(int8_t));
+    memset (r2_short,   -1, n*sizeof(int16_t));
+    memset (r2_int,     -1, n*sizeof(int32_t));
+    memset (r2_long,    -1, n*sizeof(int64_t));
+    memset (r2_ubyte,   -1, n*sizeof(uint8_t));
+    memset (r2_ushort,  -1, n*sizeof(uint16_t));
+    memset (r2_uint,    -1, n*sizeof(uint32_t));
+    memset (r2_ulong,   -1, n*sizeof(uint64_t));
+    memset (r2_float,   -1, n*sizeof(float));
+    memset (r2_double,  -1, n*sizeof(double));
+    memset (r2_complex, -1, n*sizeof(complex));
+    memset (r2_double_complex, -1, n*sizeof(double_complex));
+
+    n = ldim1 * ldim2 * ldim3;
+    memset (r3_byte,    -1, n*sizeof(int8_t));
+    memset (r3_short,   -1, n*sizeof(int16_t));
+    memset (r3_int,     -1, n*sizeof(int32_t));
+    memset (r3_long,    -1, n*sizeof(int64_t));
+    memset (r3_ubyte,   -1, n*sizeof(uint8_t));
+    memset (r3_ushort,  -1, n*sizeof(uint16_t));
+    memset (r3_uint,    -1, n*sizeof(uint32_t));
+    memset (r3_ulong,   -1, n*sizeof(uint64_t));
+    memset (r3_float,   -1, n*sizeof(float));
+    memset (r3_double,  -1, n*sizeof(double));
+    memset (r3_complex, -1, n*sizeof(complex));
+    memset (r3_double_complex, -1, n*sizeof(double_complex));
+
+    n = ldim1 * ldim2 * ldim3 * ldim4 * ldim5 * ldim6;
+    memset (r6_byte,    -1, n*sizeof(int8_t));
+    memset (r6_short,   -1, n*sizeof(int16_t));
+    memset (r6_int,     -1, n*sizeof(int32_t));
+    memset (r6_long,    -1, n*sizeof(int64_t));
+    memset (r6_ubyte,   -1, n*sizeof(uint8_t));
+    memset (r6_ushort,  -1, n*sizeof(uint16_t));
+    memset (r6_uint,    -1, n*sizeof(uint32_t));
+    memset (r6_ulong,   -1, n*sizeof(uint64_t));
+    memset (r6_float,   -1, n*sizeof(float));
+    memset (r6_double,  -1, n*sizeof(double));
+    memset (r6_complex, -1, n*sizeof(complex));
+    memset (r6_double_complex, -1, n*sizeof(double_complex));
+}
+
+int read_file (char *fname)
+{
+    ADIOS_SELECTION *sel;
+    ADIOS_FILE * f;
+    ADIOS_VARINFO * vi;
+    int err=0,i,n;
+
+    uint64_t start[6] = {offs1,offs2,offs3,offs4,offs5,offs6};
+    uint64_t count[6] = {ldim1,ldim2,ldim3,ldim4,ldim5,ldim6};
+    uint64_t ndim;
+    
+    reset_rarrays();
+
+    log ("Read and check data in %s\n", fname);
+    f = adios_read_open_file (fname, ADIOS_READ_METHOD_BP, comm);
+    if (f == NULL) {
+        printE ("Error at opening file: %s\n", rank, adios_errmsg());
+        return 1;
+    }
+
+    log ("  Scalars... %s\n", fname);
+    CHECK_SCALAR ("/scalars/scalar_byte",   scalar_byte,  int8_t)
+    CHECK_SCALAR ("/scalars/scalar_short",  scalar_short, int16_t)
+    CHECK_SCALAR ("/scalars/scalar_int",    scalar_int,   int32_t)
+    CHECK_SCALAR ("/scalars/scalar_long",   scalar_long,  int64_t)
+    CHECK_SCALAR ("/scalars/scalar_ubyte",  scalar_ubyte,  uint8_t)
+    CHECK_SCALAR ("/scalars/scalar_ushort", scalar_ushort, uint16_t)
+    CHECK_SCALAR ("/scalars/scalar_uint",   scalar_uint,   uint32_t)
+    CHECK_SCALAR ("/scalars/scalar_ulong",  scalar_ulong,  uint64_t)
+    CHECK_SCALAR ("/scalars/scalar_float",  scalar_float,   float)
+    CHECK_SCALAR ("/scalars/scalar_double", scalar_double,  double)
+    GET_SCALAR ("/scalars/scalar_complex")
+    if (((complex*)vi->value)->r != scalar_complex.r ||
+        ((complex*)vi->value)->i != scalar_complex.i) {
+        printE ("Scalar scalar_complex as read from file != as written\n"); 
+        err = 102; 
+        goto endread;
+    }
+    adios_free_varinfo (vi);
+    GET_SCALAR ("/scalars/scalar_double_complex")
+    if (((double_complex*)vi->value)->r != scalar_double_complex.r ||
+        ((double_complex*)vi->value)->i != scalar_double_complex.i) {
+        printE ("Scalar scalar_double_complex as read from file != as written\n"); 
+        err = 102; 
+        goto endread;
+    }
+    adios_free_varinfo (vi);
+    GET_SCALAR ("/scalars/scalar_string")
+    if (strcmp((char*)vi->value, scalar_string)) {
+        printE ("Scalar scalar_string as read from file != as written: [%s] and [%s]\n",
+            (char*)vi->value, scalar_string); 
+        err = 102; 
+        goto endread;
+    }
+    adios_free_varinfo (vi);
+
+    log ("  1D arrays... %s\n", fname);
+    n = ldim1;
+    sel = adios_selection_boundingbox (1, start, count); 
+    adios_schedule_read (f, sel, "1D/a1_byte", 0, 1, r1_byte);
+    adios_schedule_read (f, sel, "1D/a1_short", 0, 1, r1_short);
+    adios_schedule_read (f, sel, "1D/a1_int", 0, 1, r1_int);
+    adios_schedule_read (f, sel, "1D/a1_long", 0, 1, r1_long);
+    adios_schedule_read (f, sel, "1D/a1_ubyte", 0, 1, r1_ubyte);
+    adios_schedule_read (f, sel, "1D/a1_ushort", 0, 1, r1_ushort);
+    adios_schedule_read (f, sel, "1D/a1_uint", 0, 1, r1_uint);
+    adios_schedule_read (f, sel, "1D/a1_ulong", 0, 1, r1_ulong);
+    adios_schedule_read (f, sel, "1D/a1_float", 0, 1, r1_float);
+    adios_schedule_read (f, sel, "1D/a1_double", 0, 1, r1_double);
+    adios_schedule_read (f, sel, "1D/a1_complex", 0, 1, r1_complex);
+    adios_schedule_read (f, sel, "1D/a1_double_complex", 0, 1, r1_double_complex);
+    adios_perform_reads (f, 1);
+    adios_selection_delete (sel);
+
+    CHECK_ARRAY (a1_byte,   r1_byte)
+    CHECK_ARRAY (a1_short,  r1_short)
+    CHECK_ARRAY (a1_int,    r1_int)
+    CHECK_ARRAY (a1_long,   r1_long)
+    CHECK_ARRAY (a1_ubyte,  r1_ubyte)
+    CHECK_ARRAY (a1_ushort, r1_ushort)
+    CHECK_ARRAY (a1_uint,   r1_uint)
+    CHECK_ARRAY (a1_ulong,  r1_ulong)
+    CHECK_ARRAY (a1_float,  r1_float)
+    CHECK_ARRAY (a1_double, r1_double)
+    for (i=0;i<n;i++)
+        if (r1_complex[i].r != a1_complex[i].r ||
+            r1_complex[i].i != a1_complex[i].i) {
+              printE ("Variable a1_complex does not equal in written and read values at position %d\n",i);
+              err = 103; 
+              goto endread;
+        }
+    for (i=0;i<n;i++)
+        if (r1_double_complex[i].r != a1_double_complex[i].r ||
+            r1_double_complex[i].i != a1_double_complex[i].i) {
+              printE ("Variable a1_double_complex does not equal in written and read values at position %d\n",i);
+              err = 103; 
+              goto endread;
+        }
+
+    log ("  2D arrays... %s\n", fname);
+    n = ldim1 * ldim2;
+    sel = adios_selection_boundingbox (2, start, count); 
+    adios_schedule_read (f, sel, "2D/a2_byte", 0, 1, r2_byte);
+    adios_schedule_read (f, sel, "2D/a2_short", 0, 1, r2_short);
+    adios_schedule_read (f, sel, "2D/a2_int", 0, 1, r2_int);
+    adios_schedule_read (f, sel, "2D/a2_long", 0, 1, r2_long);
+    adios_schedule_read (f, sel, "2D/a2_ubyte", 0, 1, r2_ubyte);
+    adios_schedule_read (f, sel, "2D/a2_ushort", 0, 1, r2_ushort);
+    adios_schedule_read (f, sel, "2D/a2_uint", 0, 1, r2_uint);
+    adios_schedule_read (f, sel, "2D/a2_ulong", 0, 1, r2_ulong);
+    adios_schedule_read (f, sel, "2D/a2_float", 0, 1, r2_float);
+    adios_schedule_read (f, sel, "2D/a2_double", 0, 1, r2_double);
+    adios_schedule_read (f, sel, "2D/a2_complex", 0, 1, r2_complex);
+    adios_schedule_read (f, sel, "2D/a2_double_complex", 0, 1, r2_double_complex);
+    adios_perform_reads (f, 1);
+    adios_selection_delete (sel);
+
+    CHECK_ARRAY (a2_byte,   r2_byte)
+    CHECK_ARRAY (a2_short,  r2_short)
+    CHECK_ARRAY (a2_int,    r2_int)
+    CHECK_ARRAY (a2_long,   r2_long)
+    CHECK_ARRAY (a2_ubyte,  r2_ubyte)
+    CHECK_ARRAY (a2_ushort, r2_ushort)
+    CHECK_ARRAY (a2_uint,   r2_uint)
+    CHECK_ARRAY (a2_ulong,  r2_ulong)
+    CHECK_ARRAY (a2_float,  r2_float)
+    CHECK_ARRAY (a2_double, r2_double)
+    for (i=0;i<n;i++)
+        if (r2_complex[i].r != a2_complex[i].r ||
+            r2_complex[i].i != a2_complex[i].i) {
+              printE ("Variable a2_complex does not equal in written and read values at position %d\n",i);
+              err = 103; 
+              goto endread;
+        }
+    for (i=0;i<n;i++)
+        if (r2_double_complex[i].r != a2_double_complex[i].r ||
+            r2_double_complex[i].i != a2_double_complex[i].i) {
+              printE ("Variable a2_double_complex does not equal in written and read values at position %d\n",i);
+              err = 103; 
+              goto endread;
+        }
+
+
+    log ("  3D arrays... %s\n", fname);
+    n = ldim1 * ldim2 * ldim3;
+    sel = adios_selection_boundingbox (3, start, count); 
+    adios_schedule_read (f, sel, "3D/a3_byte", 0, 1, r3_byte);
+    adios_schedule_read (f, sel, "3D/a3_short", 0, 1, r3_short);
+    adios_schedule_read (f, sel, "3D/a3_int", 0, 1, r3_int);
+    adios_schedule_read (f, sel, "3D/a3_long", 0, 1, r3_long);
+    adios_schedule_read (f, sel, "3D/a3_ubyte", 0, 1, r3_ubyte);
+    adios_schedule_read (f, sel, "3D/a3_ushort", 0, 1, r3_ushort);
+    adios_schedule_read (f, sel, "3D/a3_uint", 0, 1, r3_uint);
+    adios_schedule_read (f, sel, "3D/a3_ulong", 0, 1, r3_ulong);
+    adios_schedule_read (f, sel, "3D/a3_float", 0, 1, r3_float);
+    adios_schedule_read (f, sel, "3D/a3_double", 0, 1, r3_double);
+    adios_schedule_read (f, sel, "3D/a3_complex", 0, 1, r3_complex);
+    adios_schedule_read (f, sel, "3D/a3_double_complex", 0, 1, r3_double_complex);
+    adios_perform_reads (f, 1);
+    adios_selection_delete (sel);
+
+    CHECK_ARRAY (a3_byte,   r3_byte)
+    CHECK_ARRAY (a3_short,  r3_short)
+    CHECK_ARRAY (a3_int,    r3_int)
+    CHECK_ARRAY (a3_long,   r3_long)
+    CHECK_ARRAY (a3_ubyte,  r3_ubyte)
+    CHECK_ARRAY (a3_ushort, r3_ushort)
+    CHECK_ARRAY (a3_uint,   r3_uint)
+    CHECK_ARRAY (a3_ulong,  r3_ulong)
+    CHECK_ARRAY (a3_float,  r3_float)
+    CHECK_ARRAY (a3_double, r3_double)
+    for (i=0;i<n;i++)
+        if (r3_complex[i].r != a3_complex[i].r ||
+            r3_complex[i].i != a3_complex[i].i) {
+              printE ("Variable a3_complex does not equal in written and read values at position %d\n",i);
+              err = 103; 
+              goto endread;
+        }
+    for (i=0;i<n;i++)
+        if (r3_double_complex[i].r != a3_double_complex[i].r ||
+            r3_double_complex[i].i != a3_double_complex[i].i) {
+              printE ("Variable a3_double_complex does not equal in written and read values at position %d\n",i);
+              err = 103; 
+              goto endread;
+        }
+
+
+    log ("  6D arrays... %s\n", fname);
+    n = ldim1 * ldim2 * ldim3 * ldim4 * ldim5 * ldim6;
+    sel = adios_selection_boundingbox (6, start, count); 
+    adios_schedule_read (f, sel, "6D/a6_byte", 0, 1, r6_byte);
+    adios_schedule_read (f, sel, "6D/a6_short", 0, 1, r6_short);
+    adios_schedule_read (f, sel, "6D/a6_int", 0, 1, r6_int);
+    adios_schedule_read (f, sel, "6D/a6_long", 0, 1, r6_long);
+    adios_schedule_read (f, sel, "6D/a6_ubyte", 0, 1, r6_ubyte);
+    adios_schedule_read (f, sel, "6D/a6_ushort", 0, 1, r6_ushort);
+    adios_schedule_read (f, sel, "6D/a6_uint", 0, 1, r6_uint);
+    adios_schedule_read (f, sel, "6D/a6_ulong", 0, 1, r6_ulong);
+    adios_schedule_read (f, sel, "6D/a6_float", 0, 1, r6_float);
+    adios_schedule_read (f, sel, "6D/a6_double", 0, 1, r6_double);
+    adios_schedule_read (f, sel, "6D/a6_complex", 0, 1, r6_complex);
+    adios_schedule_read (f, sel, "6D/a6_double_complex", 0, 1, r6_double_complex);
+    adios_perform_reads (f, 1);
+    adios_selection_delete (sel);
+
+    CHECK_ARRAY (a6_byte,   r6_byte)
+    CHECK_ARRAY (a6_short,  r6_short)
+    CHECK_ARRAY (a6_int,    r6_int)
+    CHECK_ARRAY (a6_long,   r6_long)
+    CHECK_ARRAY (a6_ubyte,  r6_ubyte)
+    CHECK_ARRAY (a6_ushort, r6_ushort)
+    CHECK_ARRAY (a6_uint,   r6_uint)
+    CHECK_ARRAY (a6_ulong,  r6_ulong)
+    CHECK_ARRAY (a6_float,  r6_float)
+    CHECK_ARRAY (a6_double, r6_double)
+    for (i=0;i<n;i++)
+        if (r6_complex[i].r != a6_complex[i].r ||
+            r6_complex[i].i != a6_complex[i].i) {
+              printE ("Variable a6_complex does not equal in written and read values at position %d\n",i);
+              err = 103; 
+              goto endread;
+        }
+    for (i=0;i<n;i++)
+        if (r6_double_complex[i].r != a6_double_complex[i].r ||
+            r6_double_complex[i].i != a6_double_complex[i].i) {
+              printE ("Variable a6_double_complex does not equal in written and read values at position %d\n",i);
+              err = 103; 
+              goto endread;
+        }
+
+
+endread:
+    adios_read_close(f);
+    MPI_Barrier (comm);
+    return err;
+}
diff --git a/tests/suite/programs/write_read.xml b/tests/suite/programs/write_read.xml
new file mode 100644
index 0000000..e1a11ed
--- /dev/null
+++ b/tests/suite/programs/write_read.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0"?>
+<adios-config host-language="C">
+
+    <adios-group name="alltypes" coordination-communicator="comm">
+        <!-- dimension variables (scalars) -->
+        <var name="gdim1" path="/dimensions" type="integer"/>
+        <var name="gdim2" path="/dimensions" type="integer"/>
+        <var name="gdim3" path="/dimensions" type="integer"/>
+        <var name="gdim4" path="/dimensions" type="integer"/>
+        <var name="gdim5" path="/dimensions" type="integer"/>
+        <var name="gdim6" path="/dimensions" type="integer"/>
+        <var name="ldim1" path="/dimensions" type="integer"/>
+        <var name="ldim2" path="/dimensions" type="integer"/>
+        <var name="ldim3" path="/dimensions" type="integer"/>
+        <var name="ldim4" path="/dimensions" type="integer"/>
+        <var name="ldim5" path="/dimensions" type="integer"/>
+        <var name="ldim6" path="/dimensions" type="integer"/>
+        <var name="offs1" path="/dimensions" type="integer"/>
+        <var name="offs2" path="/dimensions" type="integer"/>
+        <var name="offs3" path="/dimensions" type="integer"/>
+        <var name="offs4" path="/dimensions" type="integer"/>
+        <var name="offs5" path="/dimensions" type="integer"/>
+        <var name="offs6" path="/dimensions" type="integer"/>
+
+        <!-- Scalars -->
+        <var name="scalar_byte"            path="/scalars" type="byte"/>
+        <var name="scalar_short"           path="/scalars" type="short"/>
+        <var name="scalar_int"             path="/scalars" type="integer"/>
+        <var name="scalar_long"            path="/scalars" type="long"/>
+        <var name="scalar_ubyte"           path="/scalars" type="unsigned byte"/>
+        <var name="scalar_ushort"          path="/scalars" type="unsigned short"/>
+        <var name="scalar_uint"            path="/scalars" type="unsigned integer"/>
+        <var name="scalar_ulong"           path="/scalars" type="unsigned long"/>
+        <var name="scalar_float"           path="/scalars" type="float"/>
+        <var name="scalar_double"          path="/scalars" type="double"/>
+        <var name="scalar_string"          path="/scalars" type="string"/>
+        <var name="scalar_complex"         path="/scalars" type="complex"/>
+        <var name="scalar_double_complex"  path="/scalars" type="double complex"/>
+
+        <!-- 1D Arrays -->
+        <global-bounds dimensions="gdim1" offsets="offs1">
+            <var name="a1_byte"            path="/1D" dimensions="ldim1" type="byte"/>
+            <var name="a1_short"           path="/1D" dimensions="ldim1" type="short"/>
+            <var name="a1_int"             path="/1D" dimensions="ldim1" type="integer"/>
+            <var name="a1_long"            path="/1D" dimensions="ldim1" type="long"/>
+            <var name="a1_ubyte"           path="/1D" dimensions="ldim1" type="unsigned byte"/>
+            <var name="a1_ushort"          path="/1D" dimensions="ldim1" type="unsigned short"/>
+            <var name="a1_uint"            path="/1D" dimensions="ldim1" type="unsigned integer"/>
+            <var name="a1_ulong"           path="/1D" dimensions="ldim1" type="unsigned long"/>
+            <var name="a1_float"           path="/1D" dimensions="ldim1" type="float"/>
+            <var name="a1_double"          path="/1D" dimensions="ldim1" type="double"/>
+            <var name="a1_complex"         path="/1D" dimensions="ldim1" type="complex"/>
+            <var name="a1_double_complex"  path="/1D" dimensions="ldim1" type="double complex"/>
+        </global-bounds>
+
+        <!-- 2D Arrays -->
+        <global-bounds dimensions="gdim1,gdim2" offsets="offs1,offs2">
+            <var name="a2_byte"            path="/2D" dimensions="ldim1,ldim2" type="byte"/>
+            <var name="a2_short"           path="/2D" dimensions="ldim1,ldim2" type="short"/>
+            <var name="a2_int"             path="/2D" dimensions="ldim1,ldim2" type="integer"/>
+            <var name="a2_long"            path="/2D" dimensions="ldim1,ldim2" type="long"/>
+            <var name="a2_ubyte"           path="/2D" dimensions="ldim1,ldim2" type="unsigned byte"/>
+            <var name="a2_ushort"          path="/2D" dimensions="ldim1,ldim2" type="unsigned short"/>
+            <var name="a2_uint"            path="/2D" dimensions="ldim1,ldim2" type="unsigned integer"/>
+            <var name="a2_ulong"           path="/2D" dimensions="ldim1,ldim2" type="unsigned long"/>
+            <var name="a2_float"           path="/2D" dimensions="ldim1,ldim2" type="float"/>
+            <var name="a2_double"          path="/2D" dimensions="ldim1,ldim2" type="double"/>
+            <var name="a2_complex"         path="/2D" dimensions="ldim1,ldim2" type="complex"/>
+            <var name="a2_double_complex"  path="/2D" dimensions="ldim1,ldim2" type="double complex"/>
+        </global-bounds>
+
+        <!-- 3D Arrays -->
+        <global-bounds dimensions="gdim1,gdim2,gdim3" offsets="offs1,offs2,offs3">
+            <var name="a3_byte"            path="/3D" type="byte"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_short"           path="/3D" type="short"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_int"             path="/3D" type="integer"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_long"            path="/3D" type="long"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_ubyte"           path="/3D" type="unsigned byte"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_ushort"          path="/3D" type="unsigned short"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_uint"            path="/3D" type="unsigned integer"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_ulong"           path="/3D" type="unsigned long"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_float"           path="/3D" type="float"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_double"          path="/3D" type="double"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_complex"         path="/3D" type="complex"
+                 dimensions="ldim1,ldim2,ldim3"/>
+            <var name="a3_double_complex"  path="/3D" type="double complex"
+                 dimensions="ldim1,ldim2,ldim3"/>
+        </global-bounds>
+
+        <!-- 6D Arrays -->
+        <global-bounds dimensions="gdim1,gdim2,gdim3,gdim4,gdim5,gdim6" 
+                       offsets="offs1,offs2,offs3,offs4,offs5,offs6">
+            <var name="a6_byte"            path="/6D" type="byte"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_short"           path="/6D" type="short"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_int"             path="/6D" type="integer"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_long"            path="/6D" type="long"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_ubyte"           path="/6D" type="unsigned byte"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_ushort"          path="/6D" type="unsigned short"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_uint"            path="/6D" type="unsigned integer"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_ulong"           path="/6D" type="unsigned long"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_float"           path="/6D" type="float"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_double"          path="/6D" type="double"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_complex"         path="/6D" type="complex"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+            <var name="a6_double_complex"  path="/6D" type="double complex"
+                 dimensions="ldim1,ldim2,ldim3,ldim4,ldim5,ldim6"/>
+        </global-bounds>
+
+    </adios-group>
+
+<method group="alltypes" method="MPI"/>
+
+<buffer size-MB="20" allocate-time="now"/>
+
+</adios-config>
+
diff --git a/tests/suite/reference/amr_write_read_1.txt b/tests/suite/reference/amr_write_read_1.txt
new file mode 100644
index 0000000..4bbd4bb
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_1.txt
@@ -0,0 +1,8 @@
+       0       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15
+      16      17      18      19      20      21      22      23      24      25      26      27      28      29      30      31
+      32      33      34      35      36      37      38      39      40      41      42      43      44      45      46      47
+      48      49      50      51      52      53      54      55      56      57      58      59      60      61      62      63
+      64      65      66      67      68      69      70      71      72      73      74      75      76      77      78      79
+      80      81      82      83      84      85      86      87      88      89      90      91      92      93      94      95
+      96      97      98      99     100     101     102     103     104     105     106     107     108     109     110     111
+     112     113     114     115     116     117     118     119     120     121     122     123     124     125     126     127
diff --git a/tests/suite/reference/amr_write_read_2.txt b/tests/suite/reference/amr_write_read_2.txt
new file mode 100644
index 0000000..d9b250e
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_2.txt
@@ -0,0 +1,32 @@
+       0       1       2       3
+      16      17      18      19
+      32      33      34      35
+      48      49      50      51
+      64      65      66      67
+      80      81      82      83
+      96      97      98      99
+     112     113     114     115
+     128     129     130     131
+     144     145     146     147
+     160     161     162     163
+     176     177     178     179
+     192     193     194     195
+     208     209     210     211
+     224     225     226     227
+     240     241     242     243
+     256     257     258     259
+     272     273     274     275
+     288     289     290     291
+     304     305     306     307
+     320     321     322     323
+     336     337     338     339
+     352     353     354     355
+     368     369     370     371
+     384     385     386     387
+     400     401     402     403
+     416     417     418     419
+     432     433     434     435
+     448     449     450     451
+     464     465     466     467
+     480     481     482     483
+     496     497     498     499
diff --git a/tests/suite/reference/amr_write_read_2vars_1.txt b/tests/suite/reference/amr_write_read_2vars_1.txt
new file mode 100644
index 0000000..654bdb3
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_2vars_1.txt
@@ -0,0 +1,16 @@
+       0       1       2       3       4       5       6       7       8       9      10      11      12      13      14      15
+      16      17      18      19      20      21      22      23      24      25      26      27      28      29      30      31
+      32      33      34      35      36      37      38      39      40      41      42      43      44      45      46      47
+      48      49      50      51      52      53      54      55      56      57      58      59      60      61      62      63
+      64      65      66      67      68      69      70      71      72      73      74      75      76      77      78      79
+      80      81      82      83      84      85      86      87      88      89      90      91      92      93      94      95
+      96      97      98      99     100     101     102     103     104     105     106     107     108     109     110     111
+     112     113     114     115     116     117     118     119     120     121     122     123     124     125     126     127
+    1000    1001    1002    1003    1004    1005    1006    1007    1008    1009    1010    1011    1012    1013    1014    1015
+    1016    1017    1018    1019    1020    1021    1022    1023    1024    1025    1026    1027    1028    1029    1030    1031
+    1032    1033    1034    1035    1036    1037    1038    1039    1040    1041    1042    1043    1044    1045    1046    1047
+    1048    1049    1050    1051    1052    1053    1054    1055    1056    1057    1058    1059    1060    1061    1062    1063
+    1064    1065    1066    1067    1068    1069    1070    1071    1072    1073    1074    1075    1076    1077    1078    1079
+    1080    1081    1082    1083    1084    1085    1086    1087    1088    1089    1090    1091    1092    1093    1094    1095
+    1096    1097    1098    1099    1100    1101    1102    1103    1104    1105    1106    1107    1108    1109    1110    1111
+    1112    1113    1114    1115    1116    1117    1118    1119    1120    1121    1122    1123    1124    1125    1126    1127
diff --git a/tests/suite/reference/amr_write_read_2vars_2.txt b/tests/suite/reference/amr_write_read_2vars_2.txt
new file mode 100644
index 0000000..9087152
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_2vars_2.txt
@@ -0,0 +1,64 @@
+       0       1       2       3
+      16      17      18      19
+      32      33      34      35
+      48      49      50      51
+      64      65      66      67
+      80      81      82      83
+      96      97      98      99
+     112     113     114     115
+     128     129     130     131
+     144     145     146     147
+     160     161     162     163
+     176     177     178     179
+     192     193     194     195
+     208     209     210     211
+     224     225     226     227
+     240     241     242     243
+     256     257     258     259
+     272     273     274     275
+     288     289     290     291
+     304     305     306     307
+     320     321     322     323
+     336     337     338     339
+     352     353     354     355
+     368     369     370     371
+     384     385     386     387
+     400     401     402     403
+     416     417     418     419
+     432     433     434     435
+     448     449     450     451
+     464     465     466     467
+     480     481     482     483
+     496     497     498     499
+    1000    1001    1002    1003
+    1016    1017    1018    1019
+    1032    1033    1034    1035
+    1048    1049    1050    1051
+    1064    1065    1066    1067
+    1080    1081    1082    1083
+    1096    1097    1098    1099
+    1112    1113    1114    1115
+    1128    1129    1130    1131
+    1144    1145    1146    1147
+    1160    1161    1162    1163
+    1176    1177    1178    1179
+    1192    1193    1194    1195
+    1208    1209    1210    1211
+    1224    1225    1226    1227
+    1240    1241    1242    1243
+    1256    1257    1258    1259
+    1272    1273    1274    1275
+    1288    1289    1290    1291
+    1304    1305    1306    1307
+    1320    1321    1322    1323
+    1336    1337    1338    1339
+    1352    1353    1354    1355
+    1368    1369    1370    1371
+    1384    1385    1386    1387
+    1400    1401    1402    1403
+    1416    1417    1418    1419
+    1432    1433    1434    1435
+    1448    1449    1450    1451
+    1464    1465    1466    1467
+    1480    1481    1482    1483
+    1496    1497    1498    1499
diff --git a/tests/suite/reference/amr_write_read_2vars_3.txt b/tests/suite/reference/amr_write_read_2vars_3.txt
new file mode 100644
index 0000000..e8a0651
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_2vars_3.txt
@@ -0,0 +1,8 @@
+       2       3       4
+      18      19      20
+      34      35      36
+      50      51      52
+    1002    1003    1004
+    1018    1019    1020
+    1034    1035    1036
+    1050    1051    1052
diff --git a/tests/suite/reference/amr_write_read_2vars_4.txt b/tests/suite/reference/amr_write_read_2vars_4.txt
new file mode 100644
index 0000000..9077912
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_2vars_4.txt
@@ -0,0 +1,64 @@
+       2       3       4
+      18      19      20
+      34      35      36
+      50      51      52
+      66      67      68
+      82      83      84
+      98      99     100
+     114     115     116
+     130     131     132
+     146     147     148
+     162     163     164
+     178     179     180
+     194     195     196
+     210     211     212
+     226     227     228
+     242     243     244
+     258     259     260
+     274     275     276
+     290     291     292
+     306     307     308
+     322     323     324
+     338     339     340
+     354     355     356
+     370     371     372
+     386     387     388
+     402     403     404
+     418     419     420
+     434     435     436
+     450     451     452
+     466     467     468
+     482     483     484
+     498     499     500
+    1002    1003    1004
+    1018    1019    1020
+    1034    1035    1036
+    1050    1051    1052
+    1066    1067    1068
+    1082    1083    1084
+    1098    1099    1100
+    1114    1115    1116
+    1130    1131    1132
+    1146    1147    1148
+    1162    1163    1164
+    1178    1179    1180
+    1194    1195    1196
+    1210    1211    1212
+    1226    1227    1228
+    1242    1243    1244
+    1258    1259    1260
+    1274    1275    1276
+    1290    1291    1292
+    1306    1307    1308
+    1322    1323    1324
+    1338    1339    1340
+    1354    1355    1356
+    1370    1371    1372
+    1386    1387    1388
+    1402    1403    1404
+    1418    1419    1420
+    1434    1435    1436
+    1450    1451    1452
+    1466    1467    1468
+    1482    1483    1484
+    1498    1499    1500
diff --git a/tests/suite/reference/amr_write_read_2vars_5.txt b/tests/suite/reference/amr_write_read_2vars_5.txt
new file mode 100644
index 0000000..5b19053
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_2vars_5.txt
@@ -0,0 +1,64 @@
+       5       6       7
+      21      22      23
+      37      38      39
+      53      54      55
+      69      70      71
+      85      86      87
+     101     102     103
+     117     118     119
+     133     134     135
+     149     150     151
+     165     166     167
+     181     182     183
+     197     198     199
+     213     214     215
+     229     230     231
+     245     246     247
+     261     262     263
+     277     278     279
+     293     294     295
+     309     310     311
+     325     326     327
+     341     342     343
+     357     358     359
+     373     374     375
+     389     390     391
+     405     406     407
+     421     422     423
+     437     438     439
+     453     454     455
+     469     470     471
+     485     486     487
+     501     502     503
+    1005    1006    1007
+    1021    1022    1023
+    1037    1038    1039
+    1053    1054    1055
+    1069    1070    1071
+    1085    1086    1087
+    1101    1102    1103
+    1117    1118    1119
+    1133    1134    1135
+    1149    1150    1151
+    1165    1166    1167
+    1181    1182    1183
+    1197    1198    1199
+    1213    1214    1215
+    1229    1230    1231
+    1245    1246    1247
+    1261    1262    1263
+    1277    1278    1279
+    1293    1294    1295
+    1309    1310    1311
+    1325    1326    1327
+    1341    1342    1343
+    1357    1358    1359
+    1373    1374    1375
+    1389    1390    1391
+    1405    1406    1407
+    1421    1422    1423
+    1437    1438    1439
+    1453    1454    1455
+    1469    1470    1471
+    1485    1486    1487
+    1501    1502    1503
diff --git a/tests/suite/reference/amr_write_read_3.txt b/tests/suite/reference/amr_write_read_3.txt
new file mode 100644
index 0000000..0144baf
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_3.txt
@@ -0,0 +1,4 @@
+       2       3       4
+      18      19      20
+      34      35      36
+      50      51      52
diff --git a/tests/suite/reference/amr_write_read_4.txt b/tests/suite/reference/amr_write_read_4.txt
new file mode 100644
index 0000000..5bb3657
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_4.txt
@@ -0,0 +1,32 @@
+       2       3       4
+      18      19      20
+      34      35      36
+      50      51      52
+      66      67      68
+      82      83      84
+      98      99     100
+     114     115     116
+     130     131     132
+     146     147     148
+     162     163     164
+     178     179     180
+     194     195     196
+     210     211     212
+     226     227     228
+     242     243     244
+     258     259     260
+     274     275     276
+     290     291     292
+     306     307     308
+     322     323     324
+     338     339     340
+     354     355     356
+     370     371     372
+     386     387     388
+     402     403     404
+     418     419     420
+     434     435     436
+     450     451     452
+     466     467     468
+     482     483     484
+     498     499     500
diff --git a/tests/suite/reference/amr_write_read_5.txt b/tests/suite/reference/amr_write_read_5.txt
new file mode 100644
index 0000000..e4641f2
--- /dev/null
+++ b/tests/suite/reference/amr_write_read_5.txt
@@ -0,0 +1,32 @@
+       5       6       7
+      21      22      23
+      37      38      39
+      53      54      55
+      69      70      71
+      85      86      87
+     101     102     103
+     117     118     119
+     133     134     135
+     149     150     151
+     165     166     167
+     181     182     183
+     197     198     199
+     213     214     215
+     229     230     231
+     245     246     247
+     261     262     263
+     277     278     279
+     293     294     295
+     309     310     311
+     325     326     327
+     341     342     343
+     357     358     359
+     373     374     375
+     389     390     391
+     405     406     407
+     421     422     423
+     437     438     439
+     453     454     455
+     469     470     471
+     485     486     487
+     501     502     503
diff --git a/tests/suite/reference/arrays_bpls.txt b/tests/suite/reference/arrays_bpls.txt
index abaebd2..5f22fa3 100644
--- a/tests/suite/reference/arrays_bpls.txt
+++ b/tests/suite/reference/arrays_bpls.txt
@@ -2,13 +2,12 @@ File info:
   of groups:     1
   of variables:  4
   of attributes: 0
-  time steps:    1 starting from 1
+  time steps:    0 - 0
   file size:     43 KB
   bp version:    513
   statistics:    Min / Max / Avg / Std_dev
 
-Group arrays:
-  integer    /NX                  scalar = 10 
-  integer    /NY                  scalar = 100 
-  double     /var_double_2Darray  {10, 100} = 0 / 49.99 / 24.995 / 14.4338 
-  integer    /var_int_1Darray     {10} = 0 / 49 / 24.5 / 14.4309 
+  integer  /NX                  scalar = 10 
+  integer  /NY                  scalar = 100 
+  double   /var_double_2Darray  {10, 100} = 0 / 49.99 / 24.995 / 14.4338 
+  integer  /var_int_1Darray     {10} = 0 / 49 / 24.5 / 14.4309 
diff --git a/tests/suite/reference/attributes_bpls.txt b/tests/suite/reference/attributes_bpls.txt
index 1844d0c..168af3c 100644
--- a/tests/suite/reference/attributes_bpls.txt
+++ b/tests/suite/reference/attributes_bpls.txt
@@ -2,19 +2,18 @@ File info:
   of groups:     1
   of variables:  6
   of attributes: 4
-  time steps:    1 starting from 1
+  time steps:    0 - 0
   file size:     6 KB
   bp version:    513
   statistics:    Min / Max / Avg / Std_dev
 
-Group temperature:
-  integer    /NX                            scalar = 10 
-  integer    /size                          scalar = 5 
-  integer    /rank                          scalar = 0 
-  double     /mean                          scalar = 4.5 
-  string     /date                          scalar = "Nov, 2009"
-  double     /temperature                   {5, 10} = 0 / 49 / 24.5 / 14.4309 
-  integer    /temperature/number of levels  attr   = 1 
-  string     /temperature/description       attr   = "Global array written from 'size' processes"
-  double     /temperature/mean value        attr   = 4.5 
-  string     /temperature/date of coding    attr   = "Nov, 2009"
+  integer  /NX                            scalar = 10 
+  integer  /size                          scalar = 5 
+  integer  /rank                          scalar = 0 
+  double   /mean                          scalar = 4.5 
+  string   /date                          scalar = "Nov, 2009"
+  double   /temperature                   {5, 10} = 0 / 49 / 24.5 / 14.4309 
+  integer  /temperature/number of levels  attr   = 1 
+  string   /temperature/description       attr   = "Global array written from 'size' processes"
+  double   /temperature/mean value        attr   = 4.5 
+  string   /temperature/date of coding    attr   = "Nov, 2009"
diff --git a/tests/suite/reference/global_array_bpls.txt b/tests/suite/reference/global_array_bpls.txt
index 01c2012..f691fa5 100644
--- a/tests/suite/reference/global_array_bpls.txt
+++ b/tests/suite/reference/global_array_bpls.txt
@@ -1,16 +1,7 @@
-File info:
-  of groups:     1
-  of variables:  4
-  of attributes: 1
-  time steps:    1 starting from 1
-  file size:     6 KB
-  bp version:    513
-  statistics:    Min / Max / Avg / Std_dev
-
-  integer    /NX                       scalar = 10 
-  integer    /size                     scalar = 7 
-  integer    /rank                     scalar = 0 
-  double     /temperature              {7, 10} = 0 / 69 / 34.5 / 20.2052 
+  integer  /NX                       scalar = 10 
+  integer  /size                     scalar = 7 
+  integer  /rank                     scalar = 0 
+  double   /temperature              {7, 10} = 0 / 69 / 34.5 / 20.2052 
     (0,0)    0 1 2 3 4 5 6 7 8 9 
     (1,0)    10 11 12 13 14 15 16 17 18 19 
     (2,0)    20 21 22 23 24 25 26 27 28 29 
@@ -19,4 +10,4 @@ File info:
     (5,0)    50 51 52 53 54 55 56 57 58 59 
     (6,0)    60 61 62 63 64 65 66 67 68 69 
 
-  string     /temperature/description  attr   = "Global array written from 'size' processes"
+  string   /temperature/description  attr   = "Global array written from 'size' processes"
diff --git a/tests/suite/reference/global_array_no_xml_bpls.txt b/tests/suite/reference/global_array_no_xml_bpls.txt
index 121f2ad..8fe7347 100644
--- a/tests/suite/reference/global_array_no_xml_bpls.txt
+++ b/tests/suite/reference/global_array_no_xml_bpls.txt
@@ -2,15 +2,15 @@ File info:
   of groups:     1
   of variables:  4
   of attributes: 0
-  time steps:    1 starting from 1
-  file size:     24 KB
+  time steps:    0 - 0
+  file size:     25 KB
   bp version:    513
   statistics:    Min / Max / Avg / Std_dev
 
-  integer    /NX             scalar = 100 
-  integer    /Global_bounds  scalar = 2100 
-  integer    /Offsets        scalar = 0 
-  double     /temperature    {2100} = 0 / 2099 / 1049.5 / 606.218 
+  integer  /NX             scalar = 100 
+  integer  /Global_bounds  scalar = 2100 
+  integer  /Offsets        scalar = 0 
+  double   /temperature    {2100} = 0 / 2099 / 1049.5 / 606.218 
     (0)    0 1 2 3 4 5 6 7 8 9 
     (10)    10 11 12 13 14 15 16 17 18 19 
     (20)    20 21 22 23 24 25 26 27 28 29 
diff --git a/tests/suite/reference/global_array_no_xml_f_bpls.txt b/tests/suite/reference/global_array_no_xml_f_bpls.txt
new file mode 100644
index 0000000..be1cfdc
--- /dev/null
+++ b/tests/suite/reference/global_array_no_xml_f_bpls.txt
@@ -0,0 +1,28 @@
+File info:
+  of groups:     1
+  of variables:  4
+  of attributes: 0
+  time steps:    0 - 0
+  file size:     8 KB
+  bp version:    513
+  statistics:    Min / Max / Avg / Std_dev
+
+  integer  /NX           scalar = 10 
+  integer  /G            scalar = 140 
+  integer  /O            scalar = 0 
+  double   /temperature  {140} = 0 / 139 / 69.5 / 40.4135 
+    (0)    0 1 2 3 4 5 6 7 8 9 
+    (10)    10 11 12 13 14 15 16 17 18 19 
+    (20)    20 21 22 23 24 25 26 27 28 29 
+    (30)    30 31 32 33 34 35 36 37 38 39 
+    (40)    40 41 42 43 44 45 46 47 48 49 
+    (50)    50 51 52 53 54 55 56 57 58 59 
+    (60)    60 61 62 63 64 65 66 67 68 69 
+    (70)    70 71 72 73 74 75 76 77 78 79 
+    (80)    80 81 82 83 84 85 86 87 88 89 
+    (90)    90 91 92 93 94 95 96 97 98 99 
+    (100)    100 101 102 103 104 105 106 107 108 109 
+    (110)    110 111 112 113 114 115 116 117 118 119 
+    (120)    120 121 122 123 124 125 126 127 128 129 
+    (130)    130 131 132 133 134 135 136 137 138 139 
+
diff --git a/tests/suite/reference/global_array_time_bpls.txt b/tests/suite/reference/global_array_time_bpls.txt
index d83ba92..33c2c21 100644
--- a/tests/suite/reference/global_array_time_bpls.txt
+++ b/tests/suite/reference/global_array_time_bpls.txt
@@ -1,17 +1,7 @@
-File info:
-  of groups:     1
-  of variables:  6
-  of attributes: 1
-  time steps:    13 starting from 1
-  file size:     153 KB
-  bp version:    513
-  statistics:    Min / Max / Avg / Std_dev
-
-Group restart:
-  integer    /NX                       scalar = 10 
-  integer    /NY                       scalar = 1 
-  integer    /size                     scalar = 9 
-  integer    /rank                     scalar = 0 
-  double     /temperature              {13, 9, 10} = 100 / 1389 / 744.5 / 375.067 
-  double     /pressure                 {13, 9, 1} = 1000 / 13008 / 7004 / 3741.66 
-  string     /temperature/description  attr   = "Global array written from 'size' processes over several timesteps"
+  integer  /NX                       13*scalar = 10 / 10 / 10 / 0 
+  integer  /NY                       13*scalar = 1 / 1 / 1 / 0 
+  integer  /size                     13*scalar = 9 / 9 / 9 / 0 
+  integer  /rank                     13*scalar = 0 / 8 / 4 / 2.58199 
+  double   /temperature              13*{9, 10} = 100 / 1389 / 744.5 / 375.067 
+  double   /pressure                 13*{9, 1} = 1000 / 13008 / 7004 / 3741.66 
+  string   /temperature/description  attr   = "Global array written from 'size' processes over several timesteps"
diff --git a/tests/suite/reference/global_array_no_xml_bpls.txt b/tests/suite/reference/no_xml_write_byid_bpls.txt
similarity index 97%
copy from tests/suite/reference/global_array_no_xml_bpls.txt
copy to tests/suite/reference/no_xml_write_byid_bpls.txt
index 121f2ad..4b2602d 100644
--- a/tests/suite/reference/global_array_no_xml_bpls.txt
+++ b/tests/suite/reference/no_xml_write_byid_bpls.txt
@@ -1,16 +1,13 @@
 File info:
   of groups:     1
-  of variables:  4
+  of variables:  1
   of attributes: 0
-  time steps:    1 starting from 1
-  file size:     24 KB
+  time steps:    0 - 0
+  file size:     22 KB
   bp version:    513
   statistics:    Min / Max / Avg / Std_dev
 
-  integer    /NX             scalar = 100 
-  integer    /Global_bounds  scalar = 2100 
-  integer    /Offsets        scalar = 0 
-  double     /temperature    {2100} = 0 / 2099 / 1049.5 / 606.218 
+  double   /temperature  {2100} = 0 / 2099 / 1049.5 / 606.218 
     (0)    0 1 2 3 4 5 6 7 8 9 
     (10)    10 11 12 13 14 15 16 17 18 19 
     (20)    20 21 22 23 24 25 26 27 28 29 
diff --git a/tests/suite/reference/no_xml_write_byid_f_bpls.txt b/tests/suite/reference/no_xml_write_byid_f_bpls.txt
new file mode 100644
index 0000000..d518efa
--- /dev/null
+++ b/tests/suite/reference/no_xml_write_byid_f_bpls.txt
@@ -0,0 +1,25 @@
+File info:
+  of groups:     1
+  of variables:  1
+  of attributes: 0
+  time steps:    0 - 0
+  file size:     5 KB
+  bp version:    513
+  statistics:    Min / Max / Avg / Std_dev
+
+  double   /temperature  {140} = 0 / 139 / 69.5 / 40.4135 
+    (0)    0 1 2 3 4 5 6 7 8 9 
+    (10)    10 11 12 13 14 15 16 17 18 19 
+    (20)    20 21 22 23 24 25 26 27 28 29 
+    (30)    30 31 32 33 34 35 36 37 38 39 
+    (40)    40 41 42 43 44 45 46 47 48 49 
+    (50)    50 51 52 53 54 55 56 57 58 59 
+    (60)    60 61 62 63 64 65 66 67 68 69 
+    (70)    70 71 72 73 74 75 76 77 78 79 
+    (80)    80 81 82 83 84 85 86 87 88 89 
+    (90)    90 91 92 93 94 95 96 97 98 99 
+    (100)    100 101 102 103 104 105 106 107 108 109 
+    (110)    110 111 112 113 114 115 116 117 118 119 
+    (120)    120 121 122 123 124 125 126 127 128 129 
+    (130)    130 131 132 133 134 135 136 137 138 139 
+
diff --git a/tests/suite/reference/no_xml_write_byid_read.txt b/tests/suite/reference/no_xml_write_byid_read.txt
new file mode 100644
index 0000000..add857e
--- /dev/null
+++ b/tests/suite/reference/no_xml_write_byid_read.txt
@@ -0,0 +1,213 @@
+ ======== Rank 0 ========== 
+[0000]        0      1      2      3      4      5      6      7      8      9
+[0010]       10     11     12     13     14     15     16     17     18     19
+[0020]       20     21     22     23     24     25     26     27     28     29
+[0030]       30     31     32     33     34     35     36     37     38     39
+[0040]       40     41     42     43     44     45     46     47     48     49
+[0050]       50     51     52     53     54     55     56     57     58     59
+[0060]       60     61     62     63     64     65     66     67     68     69
+[0070]       70     71     72     73     74     75     76     77     78     79
+[0080]       80     81     82     83     84     85     86     87     88     89
+[0090]       90     91     92     93     94     95     96     97     98     99
+[0100]      100    101    102    103    104    105    106    107    108    109
+[0110]      110    111    112    113    114    115    116    117    118    119
+[0120]      120    121    122    123    124    125    126    127    128    129
+[0130]      130    131    132    133    134    135    136    137    138    139
+[0140]      140    141    142    143    144    145    146    147    148    149
+[0150]      150    151    152    153    154    155    156    157    158    159
+[0160]      160    161    162    163    164    165    166    167    168    169
+[0170]      170    171    172    173    174    175    176    177    178    179
+[0180]      180    181    182    183    184    185    186    187    188    189
+[0190]      190    191    192    193    194    195    196    197    198    199
+[0200]      200    201    202    203    204    205    206    207    208    209
+[0210]      210    211    212    213    214    215    216    217    218    219
+[0220]      220    221    222    223    224    225    226    227    228    229
+[0230]      230    231    232    233    234    235    236    237    238    239
+[0240]      240    241    242    243    244    245    246    247    248    249
+[0250]      250    251    252    253    254    255    256    257    258    259
+[0260]      260    261    262    263    264    265    266    267    268    269
+[0270]      270    271    272    273    274    275    276    277    278    279
+[0280]      280    281    282    283    284    285    286    287    288    289
+[0290]      290    291    292    293    294    295    296    297    298    299
+[0300]      300    301    302    303    304    305    306    307    308    309
+[0310]      310    311    312    313    314    315    316    317    318    319
+[0320]      320    321    322    323    324    325    326    327    328    329
+[0330]      330    331    332    333    334    335    336    337    338    339
+[0340]      340    341    342    343    344    345    346    347    348    349
+[0350]      350    351    352    353    354    355    356    357    358    359
+[0360]      360    361    362    363    364    365    366    367    368    369
+[0370]      370    371    372    373    374    375    376    377    378    379
+[0380]      380    381    382    383    384    385    386    387    388    389
+[0390]      390    391    392    393    394    395    396    397    398    399
+[0400]      400    401    402    403    404    405    406    407    408    409
+[0410]      410    411    412    413    414    415    416    417    418    419
+[0420]      420    421    422    423    424    425    426    427    428    429
+[0430]      430    431    432    433    434    435    436    437    438    439
+[0440]      440    441    442    443    444    445    446    447    448    449
+[0450]      450    451    452    453    454    455    456    457    458    459
+[0460]      460    461    462    463    464    465    466    467    468    469
+[0470]      470    471    472    473    474    475    476    477    478    479
+[0480]      480    481    482    483    484    485    486    487    488    489
+[0490]      490    491    492    493    494    495    496    497    498    499
+[0500]      500    501    502    503    504    505    506    507    508    509
+[0510]      510    511    512    513    514    515    516    517    518    519
+[0520]      520    521    522    523    524    525    526    527    528    529
+[0530]      530    531    532    533    534    535    536    537    538    539
+[0540]      540    541    542    543    544    545    546    547    548    549
+[0550]      550    551    552    553    554    555    556    557    558    559
+[0560]      560    561    562    563    564    565    566    567    568    569
+[0570]      570    571    572    573    574    575    576    577    578    579
+[0580]      580    581    582    583    584    585    586    587    588    589
+[0590]      590    591    592    593    594    595    596    597    598    599
+[0600]      600    601    602    603    604    605    606    607    608    609
+[0610]      610    611    612    613    614    615    616    617    618    619
+[0620]      620    621    622    623    624    625    626    627    628    629
+[0630]      630    631    632    633    634    635    636    637    638    639
+[0640]      640    641    642    643    644    645    646    647    648    649
+[0650]      650    651    652    653    654    655    656    657    658    659
+[0660]      660    661    662    663    664    665    666    667    668    669
+[0670]      670    671    672    673    674    675    676    677    678    679
+[0680]      680    681    682    683    684    685    686    687    688    689
+[0690]      690    691    692    693    694    695    696    697    698    699
+ ======== Rank 1 ========== 
+[0700]      700    701    702    703    704    705    706    707    708    709
+[0710]      710    711    712    713    714    715    716    717    718    719
+[0720]      720    721    722    723    724    725    726    727    728    729
+[0730]      730    731    732    733    734    735    736    737    738    739
+[0740]      740    741    742    743    744    745    746    747    748    749
+[0750]      750    751    752    753    754    755    756    757    758    759
+[0760]      760    761    762    763    764    765    766    767    768    769
+[0770]      770    771    772    773    774    775    776    777    778    779
+[0780]      780    781    782    783    784    785    786    787    788    789
+[0790]      790    791    792    793    794    795    796    797    798    799
+[0800]      800    801    802    803    804    805    806    807    808    809
+[0810]      810    811    812    813    814    815    816    817    818    819
+[0820]      820    821    822    823    824    825    826    827    828    829
+[0830]      830    831    832    833    834    835    836    837    838    839
+[0840]      840    841    842    843    844    845    846    847    848    849
+[0850]      850    851    852    853    854    855    856    857    858    859
+[0860]      860    861    862    863    864    865    866    867    868    869
+[0870]      870    871    872    873    874    875    876    877    878    879
+[0880]      880    881    882    883    884    885    886    887    888    889
+[0890]      890    891    892    893    894    895    896    897    898    899
+[0900]      900    901    902    903    904    905    906    907    908    909
+[0910]      910    911    912    913    914    915    916    917    918    919
+[0920]      920    921    922    923    924    925    926    927    928    929
+[0930]      930    931    932    933    934    935    936    937    938    939
+[0940]      940    941    942    943    944    945    946    947    948    949
+[0950]      950    951    952    953    954    955    956    957    958    959
+[0960]      960    961    962    963    964    965    966    967    968    969
+[0970]      970    971    972    973    974    975    976    977    978    979
+[0980]      980    981    982    983    984    985    986    987    988    989
+[0990]      990    991    992    993    994    995    996    997    998    999
+[1000]     1000   1001   1002   1003   1004   1005   1006   1007   1008   1009
+[1010]     1010   1011   1012   1013   1014   1015   1016   1017   1018   1019
+[1020]     1020   1021   1022   1023   1024   1025   1026   1027   1028   1029
+[1030]     1030   1031   1032   1033   1034   1035   1036   1037   1038   1039
+[1040]     1040   1041   1042   1043   1044   1045   1046   1047   1048   1049
+[1050]     1050   1051   1052   1053   1054   1055   1056   1057   1058   1059
+[1060]     1060   1061   1062   1063   1064   1065   1066   1067   1068   1069
+[1070]     1070   1071   1072   1073   1074   1075   1076   1077   1078   1079
+[1080]     1080   1081   1082   1083   1084   1085   1086   1087   1088   1089
+[1090]     1090   1091   1092   1093   1094   1095   1096   1097   1098   1099
+[1100]     1100   1101   1102   1103   1104   1105   1106   1107   1108   1109
+[1110]     1110   1111   1112   1113   1114   1115   1116   1117   1118   1119
+[1120]     1120   1121   1122   1123   1124   1125   1126   1127   1128   1129
+[1130]     1130   1131   1132   1133   1134   1135   1136   1137   1138   1139
+[1140]     1140   1141   1142   1143   1144   1145   1146   1147   1148   1149
+[1150]     1150   1151   1152   1153   1154   1155   1156   1157   1158   1159
+[1160]     1160   1161   1162   1163   1164   1165   1166   1167   1168   1169
+[1170]     1170   1171   1172   1173   1174   1175   1176   1177   1178   1179
+[1180]     1180   1181   1182   1183   1184   1185   1186   1187   1188   1189
+[1190]     1190   1191   1192   1193   1194   1195   1196   1197   1198   1199
+[1200]     1200   1201   1202   1203   1204   1205   1206   1207   1208   1209
+[1210]     1210   1211   1212   1213   1214   1215   1216   1217   1218   1219
+[1220]     1220   1221   1222   1223   1224   1225   1226   1227   1228   1229
+[1230]     1230   1231   1232   1233   1234   1235   1236   1237   1238   1239
+[1240]     1240   1241   1242   1243   1244   1245   1246   1247   1248   1249
+[1250]     1250   1251   1252   1253   1254   1255   1256   1257   1258   1259
+[1260]     1260   1261   1262   1263   1264   1265   1266   1267   1268   1269
+[1270]     1270   1271   1272   1273   1274   1275   1276   1277   1278   1279
+[1280]     1280   1281   1282   1283   1284   1285   1286   1287   1288   1289
+[1290]     1290   1291   1292   1293   1294   1295   1296   1297   1298   1299
+[1300]     1300   1301   1302   1303   1304   1305   1306   1307   1308   1309
+[1310]     1310   1311   1312   1313   1314   1315   1316   1317   1318   1319
+[1320]     1320   1321   1322   1323   1324   1325   1326   1327   1328   1329
+[1330]     1330   1331   1332   1333   1334   1335   1336   1337   1338   1339
+[1340]     1340   1341   1342   1343   1344   1345   1346   1347   1348   1349
+[1350]     1350   1351   1352   1353   1354   1355   1356   1357   1358   1359
+[1360]     1360   1361   1362   1363   1364   1365   1366   1367   1368   1369
+[1370]     1370   1371   1372   1373   1374   1375   1376   1377   1378   1379
+[1380]     1380   1381   1382   1383   1384   1385   1386   1387   1388   1389
+[1390]     1390   1391   1392   1393   1394   1395   1396   1397   1398   1399
+ ======== Rank 2 ========== 
+[1400]     1400   1401   1402   1403   1404   1405   1406   1407   1408   1409
+[1410]     1410   1411   1412   1413   1414   1415   1416   1417   1418   1419
+[1420]     1420   1421   1422   1423   1424   1425   1426   1427   1428   1429
+[1430]     1430   1431   1432   1433   1434   1435   1436   1437   1438   1439
+[1440]     1440   1441   1442   1443   1444   1445   1446   1447   1448   1449
+[1450]     1450   1451   1452   1453   1454   1455   1456   1457   1458   1459
+[1460]     1460   1461   1462   1463   1464   1465   1466   1467   1468   1469
+[1470]     1470   1471   1472   1473   1474   1475   1476   1477   1478   1479
+[1480]     1480   1481   1482   1483   1484   1485   1486   1487   1488   1489
+[1490]     1490   1491   1492   1493   1494   1495   1496   1497   1498   1499
+[1500]     1500   1501   1502   1503   1504   1505   1506   1507   1508   1509
+[1510]     1510   1511   1512   1513   1514   1515   1516   1517   1518   1519
+[1520]     1520   1521   1522   1523   1524   1525   1526   1527   1528   1529
+[1530]     1530   1531   1532   1533   1534   1535   1536   1537   1538   1539
+[1540]     1540   1541   1542   1543   1544   1545   1546   1547   1548   1549
+[1550]     1550   1551   1552   1553   1554   1555   1556   1557   1558   1559
+[1560]     1560   1561   1562   1563   1564   1565   1566   1567   1568   1569
+[1570]     1570   1571   1572   1573   1574   1575   1576   1577   1578   1579
+[1580]     1580   1581   1582   1583   1584   1585   1586   1587   1588   1589
+[1590]     1590   1591   1592   1593   1594   1595   1596   1597   1598   1599
+[1600]     1600   1601   1602   1603   1604   1605   1606   1607   1608   1609
+[1610]     1610   1611   1612   1613   1614   1615   1616   1617   1618   1619
+[1620]     1620   1621   1622   1623   1624   1625   1626   1627   1628   1629
+[1630]     1630   1631   1632   1633   1634   1635   1636   1637   1638   1639
+[1640]     1640   1641   1642   1643   1644   1645   1646   1647   1648   1649
+[1650]     1650   1651   1652   1653   1654   1655   1656   1657   1658   1659
+[1660]     1660   1661   1662   1663   1664   1665   1666   1667   1668   1669
+[1670]     1670   1671   1672   1673   1674   1675   1676   1677   1678   1679
+[1680]     1680   1681   1682   1683   1684   1685   1686   1687   1688   1689
+[1690]     1690   1691   1692   1693   1694   1695   1696   1697   1698   1699
+[1700]     1700   1701   1702   1703   1704   1705   1706   1707   1708   1709
+[1710]     1710   1711   1712   1713   1714   1715   1716   1717   1718   1719
+[1720]     1720   1721   1722   1723   1724   1725   1726   1727   1728   1729
+[1730]     1730   1731   1732   1733   1734   1735   1736   1737   1738   1739
+[1740]     1740   1741   1742   1743   1744   1745   1746   1747   1748   1749
+[1750]     1750   1751   1752   1753   1754   1755   1756   1757   1758   1759
+[1760]     1760   1761   1762   1763   1764   1765   1766   1767   1768   1769
+[1770]     1770   1771   1772   1773   1774   1775   1776   1777   1778   1779
+[1780]     1780   1781   1782   1783   1784   1785   1786   1787   1788   1789
+[1790]     1790   1791   1792   1793   1794   1795   1796   1797   1798   1799
+[1800]     1800   1801   1802   1803   1804   1805   1806   1807   1808   1809
+[1810]     1810   1811   1812   1813   1814   1815   1816   1817   1818   1819
+[1820]     1820   1821   1822   1823   1824   1825   1826   1827   1828   1829
+[1830]     1830   1831   1832   1833   1834   1835   1836   1837   1838   1839
+[1840]     1840   1841   1842   1843   1844   1845   1846   1847   1848   1849
+[1850]     1850   1851   1852   1853   1854   1855   1856   1857   1858   1859
+[1860]     1860   1861   1862   1863   1864   1865   1866   1867   1868   1869
+[1870]     1870   1871   1872   1873   1874   1875   1876   1877   1878   1879
+[1880]     1880   1881   1882   1883   1884   1885   1886   1887   1888   1889
+[1890]     1890   1891   1892   1893   1894   1895   1896   1897   1898   1899
+[1900]     1900   1901   1902   1903   1904   1905   1906   1907   1908   1909
+[1910]     1910   1911   1912   1913   1914   1915   1916   1917   1918   1919
+[1920]     1920   1921   1922   1923   1924   1925   1926   1927   1928   1929
+[1930]     1930   1931   1932   1933   1934   1935   1936   1937   1938   1939
+[1940]     1940   1941   1942   1943   1944   1945   1946   1947   1948   1949
+[1950]     1950   1951   1952   1953   1954   1955   1956   1957   1958   1959
+[1960]     1960   1961   1962   1963   1964   1965   1966   1967   1968   1969
+[1970]     1970   1971   1972   1973   1974   1975   1976   1977   1978   1979
+[1980]     1980   1981   1982   1983   1984   1985   1986   1987   1988   1989
+[1990]     1990   1991   1992   1993   1994   1995   1996   1997   1998   1999
+[2000]     2000   2001   2002   2003   2004   2005   2006   2007   2008   2009
+[2010]     2010   2011   2012   2013   2014   2015   2016   2017   2018   2019
+[2020]     2020   2021   2022   2023   2024   2025   2026   2027   2028   2029
+[2030]     2030   2031   2032   2033   2034   2035   2036   2037   2038   2039
+[2040]     2040   2041   2042   2043   2044   2045   2046   2047   2048   2049
+[2050]     2050   2051   2052   2053   2054   2055   2056   2057   2058   2059
+[2060]     2060   2061   2062   2063   2064   2065   2066   2067   2068   2069
+[2070]     2070   2071   2072   2073   2074   2075   2076   2077   2078   2079
+[2080]     2080   2081   2082   2083   2084   2085   2086   2087   2088   2089
+[2090]     2090   2091   2092   2093   2094   2095   2096   2097   2098   2099
diff --git a/tests/suite/reference/scalars_write_bpls.txt b/tests/suite/reference/scalars_write_bpls.txt
index d2d3a3e..b163449 100644
--- a/tests/suite/reference/scalars_write_bpls.txt
+++ b/tests/suite/reference/scalars_write_bpls.txt
@@ -2,22 +2,21 @@ File info:
   of groups:     1
   of variables:  13
   of attributes: 0
-  time steps:    1 starting from 1
+  time steps:    0 - 0
   file size:     4 KB
   bp version:    513
   statistics:    Min / Max / Avg / Std_dev
 
-Group scalars:
-  byte       /var_byte            scalar = -4 
-  short      /var_short           scalar = -3 
-  integer    /var_int             scalar = -2 
-  long long  /var_long            scalar = -1 
-  unsigned byte  /var_ubyte           scalar = 1 
-  unsigned short  /var_ushort          scalar = 2 
-  unsigned integer  /var_uint            scalar = 3 
+  byte                /var_byte            scalar = -4 
+  short               /var_short           scalar = -3 
+  integer             /var_int             scalar = -2 
+  long long           /var_long            scalar = -1 
+  unsigned byte       /var_ubyte           scalar = 1 
+  unsigned short      /var_ushort          scalar = 2 
+  unsigned integer    /var_uint            scalar = 3 
   unsigned long long  /var_ulong           scalar = 4 
-  real       /var_real            scalar = 5 
-  double     /var_double          scalar = 6 
-  string     /var_string          scalar = "ADIOS example"
-  complex    /var_complex         scalar = (8,i9) 
-  double complex  /var_double_complex  scalar = (10,i11)
+  real                /var_real            scalar = 5 
+  double              /var_double          scalar = 6 
+  string              /var_string          scalar = "ADIOS example"
+  complex             /var_complex         scalar = (8,i9) 
+  double complex      /var_double_complex  scalar = (10,i11)
diff --git a/tests/suite/reference/write_read_bpls.txt b/tests/suite/reference/write_read_bpls.txt
new file mode 100644
index 0000000..d57bd52
--- /dev/null
+++ b/tests/suite/reference/write_read_bpls.txt
@@ -0,0 +1,79 @@
+  integer             /dimensions/gdim1               scalar
+  integer             /dimensions/gdim2               scalar
+  integer             /dimensions/gdim3               scalar
+  integer             /dimensions/gdim4               scalar
+  integer             /dimensions/gdim5               scalar
+  integer             /dimensions/gdim6               scalar
+  integer             /dimensions/ldim1               scalar
+  integer             /dimensions/ldim2               scalar
+  integer             /dimensions/ldim3               scalar
+  integer             /dimensions/ldim4               scalar
+  integer             /dimensions/ldim5               scalar
+  integer             /dimensions/ldim6               scalar
+  integer             /dimensions/offs1               scalar
+  integer             /dimensions/offs2               scalar
+  integer             /dimensions/offs3               scalar
+  integer             /dimensions/offs4               scalar
+  integer             /dimensions/offs5               scalar
+  integer             /dimensions/offs6               scalar
+  byte                /scalars/scalar_byte            scalar
+  short               /scalars/scalar_short           scalar
+  integer             /scalars/scalar_int             scalar
+  long long           /scalars/scalar_long            scalar
+  unsigned byte       /scalars/scalar_ubyte           scalar
+  unsigned short      /scalars/scalar_ushort          scalar
+  unsigned integer    /scalars/scalar_uint            scalar
+  unsigned long long  /scalars/scalar_ulong           scalar
+  real                /scalars/scalar_float           scalar
+  double              /scalars/scalar_double          scalar
+  string              /scalars/scalar_string          scalar
+  complex             /scalars/scalar_complex         scalar
+  double complex      /scalars/scalar_double_complex  scalar
+  byte                /1D/a1_byte                     {21}
+  short               /1D/a1_short                    {21}
+  integer             /1D/a1_int                      {21}
+  long long           /1D/a1_long                     {21}
+  unsigned byte       /1D/a1_ubyte                    {21}
+  unsigned short      /1D/a1_ushort                   {21}
+  unsigned integer    /1D/a1_uint                     {21}
+  unsigned long long  /1D/a1_ulong                    {21}
+  real                /1D/a1_float                    {21}
+  double              /1D/a1_double                   {21}
+  complex             /1D/a1_complex                  {21}
+  double complex      /1D/a1_double_complex           {21}
+  byte                /2D/a2_byte                     {21, 5}
+  short               /2D/a2_short                    {21, 5}
+  integer             /2D/a2_int                      {21, 5}
+  long long           /2D/a2_long                     {21, 5}
+  unsigned byte       /2D/a2_ubyte                    {21, 5}
+  unsigned short      /2D/a2_ushort                   {21, 5}
+  unsigned integer    /2D/a2_uint                     {21, 5}
+  unsigned long long  /2D/a2_ulong                    {21, 5}
+  real                /2D/a2_float                    {21, 5}
+  double              /2D/a2_double                   {21, 5}
+  complex             /2D/a2_complex                  {21, 5}
+  double complex      /2D/a2_double_complex           {21, 5}
+  byte                /3D/a3_byte                     {21, 5, 3}
+  short               /3D/a3_short                    {21, 5, 3}
+  integer             /3D/a3_int                      {21, 5, 3}
+  long long           /3D/a3_long                     {21, 5, 3}
+  unsigned byte       /3D/a3_ubyte                    {21, 5, 3}
+  unsigned short      /3D/a3_ushort                   {21, 5, 3}
+  unsigned integer    /3D/a3_uint                     {21, 5, 3}
+  unsigned long long  /3D/a3_ulong                    {21, 5, 3}
+  real                /3D/a3_float                    {21, 5, 3}
+  double              /3D/a3_double                   {21, 5, 3}
+  complex             /3D/a3_complex                  {21, 5, 3}
+  double complex      /3D/a3_double_complex           {21, 5, 3}
+  byte                /6D/a6_byte                     {21, 5, 3, 2, 4, 9}
+  short               /6D/a6_short                    {21, 5, 3, 2, 4, 9}
+  integer             /6D/a6_int                      {21, 5, 3, 2, 4, 9}
+  long long           /6D/a6_long                     {21, 5, 3, 2, 4, 9}
+  unsigned byte       /6D/a6_ubyte                    {21, 5, 3, 2, 4, 9}
+  unsigned short      /6D/a6_ushort                   {21, 5, 3, 2, 4, 9}
+  unsigned integer    /6D/a6_uint                     {21, 5, 3, 2, 4, 9}
+  unsigned long long  /6D/a6_ulong                    {21, 5, 3, 2, 4, 9}
+  real                /6D/a6_float                    {21, 5, 3, 2, 4, 9}
+  double              /6D/a6_double                   {21, 5, 3, 2, 4, 9}
+  complex             /6D/a6_complex                  {21, 5, 3, 2, 4, 9}
+  double complex      /6D/a6_double_complex           {21, 5, 3, 2, 4, 9}
diff --git a/tests/suite/tests/04_global_array.sh b/tests/suite/tests/04_global_array.sh
index f287cd6..74175e0 100755
--- a/tests/suite/tests/04_global_array.sh
+++ b/tests/suite/tests/04_global_array.sh
@@ -33,11 +33,11 @@ if [ ! -f adios_global.bp ]; then
 fi
 
 echo "Check output with bpls"
-$TRUNKDIR/utils/bpls/bpls -lav adios_global.bp -d -n 10  | grep -v endianness > c_bpls.txt
+$TRUNKDIR/utils/bpls/bpls -la adios_global.bp -d -n 10  | grep -v endianness > c_bpls.txt
 diff -q c_bpls.txt $SRCDIR/reference/global_array_bpls.txt
 if [ $? != 0 ]; then
     echo "ERROR: C version of adios_global produced a file different from the reference."
-    echo "Compare \"bpls -lav $PWD/adios_global.bp -d -n 10 | grep -v endianness\" to reference $SRCDIR/reference/global_array_bpls.txt"
+    echo "Compare \"bpls -la $PWD/adios_global.bp -d -n 10 | grep -v endianness\" to reference $SRCDIR/reference/global_array_bpls.txt"
     exit 1
 fi
 
@@ -78,7 +78,7 @@ if [ ! -f adios_global.bp ]; then
 fi
 
 echo "Check output with bpls"
-$TRUNKDIR/utils/bpls/bpls -lav adios_global.bp -d -n 10 | grep -v endianness > f_bpls.txt
+$TRUNKDIR/utils/bpls/bpls -la adios_global.bp -d -n 10 | grep -v endianness > f_bpls.txt
 diff -q f_bpls.txt $SRCDIR/reference/global_array_bpls.txt
 if [ $? != 0 ]; then
     echo "ERROR: Fortran version of adios_global produced a file different from the reference."
diff --git a/tests/suite/tests/05_global_array_time.sh b/tests/suite/tests/05_global_array_time.sh
index af826a3..c07418c 100755
--- a/tests/suite/tests/05_global_array_time.sh
+++ b/tests/suite/tests/05_global_array_time.sh
@@ -32,11 +32,11 @@ if [ ! -f adios_globaltime.bp ]; then
 fi
 
 echo "Check output with bpls"
-$TRUNKDIR/utils/bpls/bpls -lav adios_globaltime.bp | grep -v endianness > c_bpls.txt
+$TRUNKDIR/utils/bpls/bpls -la adios_globaltime.bp | grep -v endianness > c_bpls.txt
 diff -q c_bpls.txt $SRCDIR/reference/global_array_time_bpls.txt
 if [ $? != 0 ]; then
     echo "ERROR: C version of adios_globaltime produced a file different from the reference."
-    echo "Compare \"bpls -lav $PWD/adios_globaltime.bp | grep -v endianness\" to reference $SRCDIR/reference/global_array_time_bpls.txt"
+    echo "Compare \"bpls -la $PWD/adios_globaltime.bp | grep -v endianness\" to reference $SRCDIR/reference/global_array_time_bpls.txt"
     exit 1
 fi
 
@@ -77,11 +77,11 @@ if [ ! -f adios_globaltime.bp ]; then
 fi
 
 echo "Check output with bpls"
-$TRUNKDIR/utils/bpls/bpls -lav adios_globaltime.bp | grep -v endianness > f_bpls.txt
+$TRUNKDIR/utils/bpls/bpls -la adios_globaltime.bp | grep -v endianness > f_bpls.txt
 diff -q f_bpls.txt $SRCDIR/reference/global_array_time_bpls.txt
 if [ $? != 0 ]; then
     echo "ERROR: Fortran version of adios_globaltime produced a file different from the reference."
-    echo "Compare \"bpls -lav $PWD/adios_globaltime.bp | grep -v endianness\" to reference $SRCDIR/reference/global_array_time_bpls.txt"
+    echo "Compare \"bpls -la $PWD/adios_globaltime.bp | grep -v endianness\" to reference $SRCDIR/reference/global_array_time_bpls.txt"
     exit 1
 fi
 
diff --git a/tests/suite/tests/07_global_array_no_xml.sh b/tests/suite/tests/07_global_array_no_xml.sh
index f900573..5df7847 100755
--- a/tests/suite/tests/07_global_array_no_xml.sh
+++ b/tests/suite/tests/07_global_array_no_xml.sh
@@ -66,23 +66,23 @@ fi
 # run the Fortran tests too if available
 
 mv adios_global_no_xml.bp adios_global_no_xml_c.bp
-cp $TRUNKDIR/examples/Fortran/global-array/adios_global adios_global_f
+cp $TRUNKDIR/examples/Fortran/global-array/adios_global_no_xml adios_global_f
 cp $TRUNKDIR/examples/Fortran/global-array/adios_global.xml .
 
 echo "Run Fortran adios_global_f"
 $MPIRUN $NP_MPIRUN $PROCS ./adios_global_f
 EX=$?
-if [ ! -f adios_global.bp ]; then
+if [ ! -f adios_global_no_xml.bp ]; then
     echo "ERROR: Fortran version of adios_global failed. No BP file is created. Exit code=$EX"
     exit 1
 fi
 
 echo "Check output with bpls"
-$TRUNKDIR/utils/bpls/bpls -lav adios_global.bp -d -n 10 | grep -v endianness > f_bpls.txt
-diff -q f_bpls.txt $SRCDIR/reference/global_array_bpls.txt
+$TRUNKDIR/utils/bpls/bpls -lav adios_global_no_xml.bp -d -n 10 | grep -v endianness > f_bpls.txt
+diff -q f_bpls.txt $SRCDIR/reference/global_array_no_xml_f_bpls.txt
 if [ $? != 0 ]; then
     echo "ERROR: Fortran version of adios_global produced a file different from the reference."
-    echo "Compare \"bpls -lav $PWD/adios_global.bp -d -n 10 | grep -v endianness\" to reference $SRCDIR/reference/global_array_bpls.txt"
+    echo "Compare \"bpls -lav $PWD/adios_global_no_xml.bp -d -n 10 | grep -v endianness\" to reference $SRCDIR/reference/global_array_no_xml_f_bpls.txt"
     exit 1
 fi
 
diff --git a/tests/suite/tests/08_amr_write_read.sh b/tests/suite/tests/08_amr_write_read.sh
new file mode 100755
index 0000000..dbab05b
--- /dev/null
+++ b/tests/suite/tests/08_amr_write_read.sh
@@ -0,0 +1,75 @@
+#!/bin/bash
+#
+# Test if staged read method functions correctly
+#
+# Environment variables set by caller:
+# MPIRUN        Run command
+# NP_MPIRUN     Run commands option to set number of processes
+# MAXPROCS      Max number of processes allowed
+# HAVE_FORTRAN  yes or no
+# SRCDIR        Test source dir (.. of this script)
+# TRUNKDIR      ADIOS trunk dir
+
+PROCS=32
+READPROCS=4
+
+if [ $MAXPROCS -lt $PROCS ]; then
+    echo "WARNING: Needs $PROCS processes at least"
+    exit 77  # not failure, just skip
+fi
+
+# copy codes and inputs to .
+cp $SRCDIR/programs/adios_amr_write .
+cp $SRCDIR/programs/adios_amr_write.xml .
+cp $SRCDIR/programs/adios_staged_read .
+cp $SRCDIR/programs/adios_staged_read_v2 .
+
+for ((m=1; m <= 2 ; m++))
+do
+    echo "Run C adios_amr_write"
+    ls -l ./adios_amr_write
+    echo $MPIRUN $NP_MPIRUN $PROCS ./adios_amr_write $m
+    rm -f *.bp
+    $MPIRUN $NP_MPIRUN $PROCS ./adios_amr_write $m
+    EX=$?
+    ls -l ./adios_amr_write.bp
+    if [ ! -f adios_amr_write.bp ]; then
+        echo "ERROR: C version of adios_amr_write failed. No BP file is created. Exit code=$EX"
+        exit 1
+    fi
+
+    echo "Run C adios_staged_read"
+    ls -l ./adios_staged_read
+    export num_aggregators=2
+    export chunk_size=64
+    for ((n=1; n <= 5 ; n++))
+    do
+        echo $MPIRUN $NP_MPIRUN $READPROCS ./adios_staged_read $n
+        $MPIRUN $NP_MPIRUN $READPROCS ./adios_staged_read $n| grep -v aggregator | grep [0-9] > 08_amr_write_read_$n.txt
+        EX=$?
+       echo "Check output with reference"
+       diff -q 08_amr_write_read_$n.txt $SRCDIR/reference/amr_write_read_$n.txt
+       if [ $? != 0 ]; then
+           echo "ERROR: C version of adios_staged_read produced data different from the reference."
+           exit 1
+       fi
+    done
+
+    echo "Run C adios_staged_read_v2"
+    ls -l ./adios_staged_read_v2
+    export num_aggregators=2
+    export chunk_size=64
+    for ((n=1; n <= 5 ; n++))
+    do
+        echo $MPIRUN $NP_MPIRUN $READPROCS ./adios_staged_read_v2 $n
+        $MPIRUN $NP_MPIRUN $READPROCS ./adios_staged_read_v2 $n| grep -v aggregator | grep [0-9] > 08_amr_write_read_$n.txt
+        EX=$?
+       echo "Check output with reference"
+       diff -q 08_amr_write_read_$n.txt $SRCDIR/reference/amr_write_read_$n.txt
+       if [ $? != 0 ]; then
+           echo "ERROR: C version of adios_staged_read_v2 produced data different from the reference."
+           exit 1
+       fi
+    done
+
+done 
diff --git a/tests/suite/tests/09_amr_write_read_2vars.sh b/tests/suite/tests/09_amr_write_read_2vars.sh
new file mode 100755
index 0000000..d173058
--- /dev/null
+++ b/tests/suite/tests/09_amr_write_read_2vars.sh
@@ -0,0 +1,57 @@
+#!/bin/bash
+#
+# Test if staged read method functions correctly
+#
+# Environment variables set by caller:
+# MPIRUN        Run command
+# NP_MPIRUN     Run commands option to set number of processes
+# MAXPROCS      Max number of processes allowed
+# HAVE_FORTRAN  yes or no
+# SRCDIR        Test source dir (.. of this script)
+# TRUNKDIR      ADIOS trunk dir
+
+PROCS=32
+READPROCS=4
+
+if [ $MAXPROCS -lt $PROCS ]; then
+    echo "WARNING: Needs $PROCS processes at least"
+    exit 77  # not failure, just skip
+fi
+
+# copy codes and inputs to .
+cp $SRCDIR/programs/adios_amr_write_2vars .
+cp $SRCDIR/programs/adios_amr_write_2vars.xml .
+cp $SRCDIR/programs/adios_staged_read_2vars .
+
+for ((m=1; m <= 2 ; m++))
+do
+    echo "Run C adios_amr_write_2vars"
+    ls -l ./adios_amr_write_2vars
+    echo $MPIRUN $NP_MPIRUN $PROCS ./adios_amr_write_2vars $m
+    rm -f *.bp
+    $MPIRUN $NP_MPIRUN $PROCS ./adios_amr_write_2vars $m
+    EX=$?
+    ls -l ./adios_amr_write_2vars.bp
+    if [ ! -f adios_amr_write_2vars.bp ]; then
+        echo "ERROR: C version of adios_amr_write_2vars failed. No BP file is created. Exit code=$EX"
+        exit 1
+    fi
+
+    echo "Run C adios_staged_read_2vars"
+    ls -l ./adios_staged_read_2vars
+    export num_aggregators=2
+    export chunk_size=64
+    for ((n=1; n <= 5 ; n++))
+    do
+        echo $MPIRUN $NP_MPIRUN $READPROCS ./adios_staged_read_2vars $n
+        $MPIRUN $NP_MPIRUN $READPROCS ./adios_staged_read_2vars $n| grep -v aggregator | grep [0-9] > 09_amr_write_read_$n.txt
+        EX=$?
+       echo "Check output with reference"
+       diff -q 09_amr_write_read_$n.txt $SRCDIR/reference/amr_write_read_2vars_$n.txt
+       if [ $? != 0 ]; then
+           echo "ERROR: C version of adios_staged_read_2vars produced data different from the reference."
+           exit 1
+       fi
+    done
+
+done 
diff --git a/tests/suite/tests/10_write_read.sh b/tests/suite/tests/10_write_read.sh
new file mode 100755
index 0000000..9d7c63c
--- /dev/null
+++ b/tests/suite/tests/10_write_read.sh
@@ -0,0 +1,58 @@
+#!/bin/bash
+#
+# Test if adios can write-read-write-read correctly
+# Uses ../programs/write_read
+#
+# Environment variables set by caller:
+# MPIRUN        Run command
+# NP_MPIRUN     Run commands option to set number of processes
+# MAXPROCS      Max number of processes allowed
+# HAVE_FORTRAN  yes or no
+# SRCDIR        Test source dir (.. of this script)
+# TRUNKDIR      ADIOS trunk dir
+
+PROCS=3
+
+if [ $MAXPROCS -lt $PROCS ]; then
+    echo "WARNING: Needs $PROCS processes at least"
+    exit 77  # not failure, just skip
+fi
+
+# copy codes and inputs to . 
+cp $SRCDIR/programs/write_read .
+cp $SRCDIR/programs/write_read.xml .
+
+echo "Run write_read"
+$MPIRUN $NP_MPIRUN $PROCS ./write_read
+EX=$?
+if [ ! -f write_read_1.bp ]; then
+    echo "ERROR: write_read failed at creating the 1st BP file, write_read_1.bp. Exit code=$EX"
+    exit 1
+fi
+
+if [ ! -f write_read_2.bp ]; then
+    echo "ERROR: write_read failed at creating the 2nd BP file, write_read_2.bp. Exit code=$EX"
+    exit 1
+fi
+
+if [ $EX != 0 ]; then
+    echo "ERROR: write_read failed with exit code=$EX"
+    exit 1
+fi
+
+echo "Check output with bpls"
+$TRUNKDIR/utils/bpls/bpls write_read_1.bp > c_bpls1.txt
+diff -q c_bpls1.txt $SRCDIR/reference/write_read_bpls.txt
+if [ $? != 0 ]; then
+    echo "ERROR: C version of write_read produced a file different from the reference."
+    echo "Compare \"bpls $PWD/write_read_1.bp\" to reference $SRCDIR/reference/write_read_bpls.txt"
+    exit 1
+fi
+
+$TRUNKDIR/utils/bpls/bpls write_read_2.bp > c_bpls2.txt
+diff -q c_bpls2.txt c_bpls1.txt
+if [ $? != 0 ]; then
+    echo "ERROR: C version of write_read produced two different files in two steps. They should have the same list of variables"
+    echo "Compare \"bpls $PWD/write_read_1.bp\" to \"bpls $PWD/write_read_2.bp\""
+    exit 1
+fi
diff --git a/tests/suite/tests/11_write_alternate.sh b/tests/suite/tests/11_write_alternate.sh
new file mode 100755
index 0000000..f3aed4e
--- /dev/null
+++ b/tests/suite/tests/11_write_alternate.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Test if adios can write variables alternating in multiple steps
+# and then it can read them correctly
+# Uses ../programs/write_alternate
+#
+# Environment variables set by caller:
+# MPIRUN        Run command
+# NP_MPIRUN     Run commands option to set number of processes
+# MAXPROCS      Max number of processes allowed
+# HAVE_FORTRAN  yes or no
+# SRCDIR        Test source dir (.. of this script)
+# TRUNKDIR      ADIOS trunk dir
+
+PROCS=2
+
+if [ $MAXPROCS -lt $PROCS ]; then
+    echo "WARNING: Needs $PROCS processes at least"
+    exit 77  # not failure, just skip
+fi
+
+# copy codes and inputs to . 
+cp $SRCDIR/programs/write_alternate .
+cp $SRCDIR/programs/write_alternate.xml .
+
+echo "Run write_alternate"
+$MPIRUN $NP_MPIRUN $PROCS ./write_alternate
+EX=$?
+if [ ! -f write_alternate.bp ]; then
+    echo "ERROR: write_alternate failed at creating the BP file, write_alternate.bp. Exit code=$EX"
+    exit 1
+fi
+
+if [ $EX != 0 ]; then
+    echo "ERROR: write_alternate failed with exit code=$EX"
+    exit 1
+fi
+
diff --git a/tests/suite/tests/12_selections.sh b/tests/suite/tests/12_selections.sh
new file mode 100755
index 0000000..0b62b5a
--- /dev/null
+++ b/tests/suite/tests/12_selections.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+#
+# Test if adios can read data with points selection
+# Uses ../programs/selections
+#
+# Environment variables set by caller:
+# MPIRUN        Run command
+# NP_MPIRUN     Run commands option to set number of processes
+# MAXPROCS      Max number of processes allowed
+# HAVE_FORTRAN  yes or no
+# SRCDIR        Test source dir (.. of this script)
+# TRUNKDIR      ADIOS trunk dir
+
+PROCS=1
+
+if [ $MAXPROCS -lt $PROCS ]; then
+    echo "WARNING: Needs $PROCS processes at least"
+    exit 77  # not failure, just skip
+fi
+
+# copy codes and inputs to . 
+cp $SRCDIR/programs/selections .
+
+echo "Run selections"
+$MPIRUN $NP_MPIRUN $PROCS ./selections
+EX=$?
+if [ ! -f selections.bp ]; then
+    echo "ERROR: selections failed at creating the BP file, selections.bp. Exit code=$EX"
+    exit 1
+fi
+
+if [ $EX != 0 ]; then
+    echo "ERROR: selections failed with exit code=$EX"
+    exit 1
+fi
+
diff --git a/tests/suite/tests/13_write_byid.sh b/tests/suite/tests/13_write_byid.sh
new file mode 100755
index 0000000..2ba02e3
--- /dev/null
+++ b/tests/suite/tests/13_write_byid.sh
@@ -0,0 +1,88 @@
+#!/bin/bash
+#
+# Test if adios can write and read global arrays over time correctly
+# Uses codes from examples/C/global-array and examples/Fortran/global-array
+#
+# Environment variables set by caller:
+# MPIRUN        Run command
+# NP_MPIRUN     Run commands option to set number of processes
+# MAXPROCS      Max number of processes allowed
+# HAVE_FORTRAN  yes or no
+# SRCDIR        Test source dir (.. of this script)
+# TRUNKDIR      ADIOS trunk dir
+
+PROCS=7
+READPROCS=3
+
+if [ $MAXPROCS -lt $PROCS ]; then
+    echo "WARNING: Needs $PROCS processes at least"
+    exit 77  # not failure, just skip
+fi
+
+# copy codes and inputs to . 
+cp $TRUNKDIR/examples/C/global-array/no_xml_write_byid .
+cp $TRUNKDIR/examples/C/global-array/read_no_xml_write_byid .
+
+echo "Run C no_xml_write_byid"
+ls -l ./no_xml_write_byid
+echo $MPIRUN $NP_MPIRUN $PROCS ./no_xml_write_byid
+$MPIRUN $NP_MPIRUN $PROCS ./no_xml_write_byid
+EX=$?
+if [ ! -f no_xml_write_byid.bp ]; then
+    echo "ERROR: C version of no_xml_write_byid failed. No BP file is created. Exit code=$EX"
+    exit 1
+fi
+
+echo "Check output with bpls"
+$TRUNKDIR/utils/bpls/bpls -lav no_xml_write_byid.bp -d -n 10 | grep -v endianness > c_bpls.txt
+diff -q c_bpls.txt $SRCDIR/reference/no_xml_write_byid_bpls.txt
+if [ $? != 0 ]; then
+    echo "ERROR: C version of no_xml_write_byid produced a file different from the reference."
+    echo "Compare \"bpls -lav $PWD/no_xml_write_byid.bp -d -n 10 | grep -v endianness\" to reference $SRCDIR/reference/no_xml_write_byid_bpls.txt"
+    exit 1
+fi
+
+echo "Run C read_no_xml_write_byid"
+$MPIRUN $NP_MPIRUN $READPROCS ./read_no_xml_write_byid > c_read.txt
+EX=$?
+if [ $? != 0 ]; then
+    echo "ERROR: C version of read_no_xml_write_byid exited with $EX"
+    echo "Check $PWD/c_read.txt"
+    exit 1
+fi
+
+echo "Check output"
+diff -q c_read.txt $SRCDIR/reference/no_xml_write_byid_read.txt
+if [ $? != 0 ]; then
+    echo "ERROR: C version of read_no_xml_write_byid produced a file different from the reference."
+    echo "$PWD/c_read.txt to reference $SRCDIR/reference/no_xml_write_byid_read.txt"
+    exit 1
+fi
+
+
+if [ $HAVE_FORTRAN != yes ]; then
+    exit 0
+fi
+# run the Fortran tests too if available
+
+mv no_xml_write_byid.bp no_xml_write_byid_c.bp
+cp $TRUNKDIR/examples/Fortran/global-array/no_xml_write_byid no_xml_write_byid_f
+
+echo "Run Fortran no_xml_write_byid"
+$MPIRUN $NP_MPIRUN $PROCS ./no_xml_write_byid_f
+EX=$?
+if [ ! -f no_xml_write_byid.bp ]; then
+    echo "ERROR: Fortran version of no_xml_write_byid failed. No BP file is created. Exit code=$EX"
+    exit 1
+fi
+
+echo "Check output with bpls"
+$TRUNKDIR/utils/bpls/bpls -lav no_xml_write_byid.bp -d -n 10 | grep -v endianness > f_bpls.txt
+diff -q f_bpls.txt $SRCDIR/reference/no_xml_write_byid_f_bpls.txt
+if [ $? != 0 ]; then
+    echo "ERROR: Fortran version of no_xml_write_byid produced a file different from the reference."
+    echo "Compare \"bpls -lav $PWD/no_xml_write_byid.bp -d -n 10 | grep -v endianness\" to reference $SRCDIR/reference/no_xml_write_byid_f_bpls.txt"
+    exit 1
+fi
+
+
diff --git a/tools/matlab/Makefile b/tools/matlab/Makefile
deleted file mode 100644
index 5c6f93e..0000000
--- a/tools/matlab/Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-include ../../adios_config.flags
-
-MEXOPTS="-g -DDEBUG"
-default:
-	@echo "ADIOS reader methods for MATLAB"
-	@echo "Have 'mex' compiler in the path and run"
-	@echo "> make matlab"
-
-
-matlab: adiosopenc adiosclosec adiosreadc
-
-adiosopenc:  
-	mex adiosopenc.c ${MEXOPTS} -D_NOMPI  -I. -I../../src -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
-
-adiosreadc: 
-	mex adiosreadc.c ${MEXOPTS} -D_NOMPI -I. -I../../src -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
-
-adiosclosec:
-	mex adiosclosec.c ${MEXOPTS} -D_NOMPI -I. -I../../src -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
-
-#adiosdbgc:
-#	mex adiosdbgc.c ${MEXOPTS} -D_NOMPI -I. -I../../src -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
-
-clean:
-	rm -f *.mexa64 core* *.o 
-
-install:
-	@echo "Install *.m and *.mexa64 into MATLABPATH"
-	@echo "Do not have 'adios' anywhere in the path where you install the files"
-	@echo "otherwise 'help adios' will not work in Matlab"
diff --git a/utils/Makefile.am b/utils/Makefile.am
index e0f4c27..30e6e92 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -8,3 +8,5 @@ endif
 if HAVE_NETCDF
 SUBDIRS +=bp2ncd
 endif
+
+SUBDIRS +=skel
diff --git a/utils/Makefile.in b/utils/Makefile.in
index b378c69..f6c5a64 100644
--- a/utils/Makefile.in
+++ b/utils/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,12 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -41,7 +39,9 @@ host_triplet = @host@
 subdir = utils
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -63,19 +63,51 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = gpp bpdump bp2ascii bpsplit bpls adios_lint bp2bp bp2h5 \
-	bp2ncd
+	bp2ncd skel
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 ADIOSLIB_CFLAGS = @ADIOSLIB_CFLAGS@
 ADIOSLIB_CPPFLAGS = @ADIOSLIB_CPPFLAGS@
@@ -98,32 +130,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -132,72 +164,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -208,11 +215,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -220,7 +227,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -246,26 +256,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -277,30 +280,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
 SUBDIRS = gpp bpdump bp2ascii bpsplit bpls $(am__append_1) \
-	$(am__append_2) $(am__append_3)
+	$(am__append_2) $(am__append_3) skel
 all: all-recursive
 
 .SUFFIXES:
@@ -308,14 +324,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -333,6 +349,7 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
 	-rm -f *.lo
@@ -340,10 +357,6 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
 # To change the values of `make' variables: instead of editing Makefiles,
@@ -351,7 +364,7 @@ uninstall-info-am:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -368,16 +381,15 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -403,16 +415,16 @@ maintainer-clean-recursive:
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -420,14 +432,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -439,81 +451,101 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
@@ -543,6 +575,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -553,8 +586,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -562,18 +594,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
 install-exec-am:
 
+install-html: install-html-recursive
+
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -592,22 +644,25 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am:
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
+	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 installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am
+	maintainer-clean-generic mostlyclean mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \
+	uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/utils/adios_lint/Makefile.am b/utils/adios_lint/Makefile.am
index 5059430..b1cb31d 100644
--- a/utils/adios_lint/Makefile.am
+++ b/utils/adios_lint/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src  -I$(top_builddir)/src/public -I$(top_builddir)/src/core
 
 AUTOMAKE_OPTIONS = no-dependencies
 
diff --git a/utils/adios_lint/Makefile.in b/utils/adios_lint/Makefile.in
index dbfb83e..555473b 100644
--- a/utils/adios_lint/Makefile.in
+++ b/utils/adios_lint/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ bin_PROGRAMS = adios_lint$(EXEEXT)
 subdir = utils/adios_lint
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,8 +62,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_adios_lint_OBJECTS = adios_lint-adios_lint.$(OBJEXT)
 adios_lint_OBJECTS = $(am_adios_lint_OBJECTS)
@@ -71,17 +71,21 @@ am__DEPENDENCIES_1 =
 adios_lint_DEPENDENCIES =  \
 	$(top_builddir)/src/libadios_internal_nompi.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+adios_lint_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(adios_lint_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(adios_lint_SOURCES)
 DIST_SOURCES = $(adios_lint_SOURCES)
 ETAGS = etags
@@ -109,24 +113,24 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 @USE_PARALLEL_COMPILER_TRUE at CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 @USE_PARALLEL_COMPILER_TRUE at CXX = $(MPICXX)
@@ -134,9 +138,9 @@ CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -145,72 +149,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -221,11 +200,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -233,7 +212,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -259,26 +241,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -290,29 +265,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public -I$(top_builddir)/src/core
 AUTOMAKE_OPTIONS = no-dependencies
 adios_lint_SOURCES = adios_lint.c
 adios_lint_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_INT_CFLAGS)
@@ -327,14 +316,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/adios_lint/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/adios_lint/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/adios_lint/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/adios_lint/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -352,37 +341,53 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	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)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@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)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@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
 adios_lint$(EXEEXT): $(adios_lint_OBJECTS) $(adios_lint_DEPENDENCIES) 
 	@rm -f adios_lint$(EXEEXT)
-	$(LINK) $(adios_lint_LDFLAGS) $(adios_lint_OBJECTS) $(adios_lint_LDADD) $(LIBS)
+	$(adios_lint_LINK) $(adios_lint_OBJECTS) $(adios_lint_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -411,82 +416,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -495,7 +503,7 @@ check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -517,6 +525,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -528,7 +537,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -536,18 +545,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -567,19 +596,24 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic clean-libtool ctags distclean distclean-compile \
 	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install-binPROGRAMS 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-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am
+	uninstall-binPROGRAMS
+
 
 # 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 --git a/utils/bp2ascii/Makefile.am b/utils/bp2ascii/Makefile.am
index 9202a1f..17b0738 100644
--- a/utils/bp2ascii/Makefile.am
+++ b/utils/bp2ascii/Makefile.am
@@ -1,9 +1,9 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public -I$(top_builddir)/src/core
 
 AUTOMAKE_OPTIONS = no-dependencies
 
-bin_PROGRAMS = bp2ascii
+noinst_PROGRAMS = bp2ascii
 
 bp2ascii_SOURCES = bp2ascii.c 
 bp2ascii_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_INT_CFLAGS)
diff --git a/utils/bp2ascii/Makefile.in b/utils/bp2ascii/Makefile.in
index 503b85c..b8ce71b 100644
--- a/utils/bp2ascii/Makefile.in
+++ b/utils/bp2ascii/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,11 +34,13 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-bin_PROGRAMS = bp2ascii$(EXEEXT)
+noinst_PROGRAMS = bp2ascii$(EXEEXT)
 subdir = utils/bp2ascii
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,25 +62,28 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
-PROGRAMS = $(bin_PROGRAMS)
+CONFIG_CLEAN_VPATH_FILES =
+PROGRAMS = $(noinst_PROGRAMS)
 am_bp2ascii_OBJECTS = bp2ascii-bp2ascii.$(OBJEXT)
 bp2ascii_OBJECTS = $(am_bp2ascii_OBJECTS)
 am__DEPENDENCIES_1 =
 bp2ascii_DEPENDENCIES = $(top_builddir)/src/libadios_internal_nompi.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+bp2ascii_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(bp2ascii_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(bp2ascii_SOURCES)
 DIST_SOURCES = $(bp2ascii_SOURCES)
 ETAGS = etags
@@ -108,24 +111,24 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 @USE_PARALLEL_COMPILER_TRUE at CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 @USE_PARALLEL_COMPILER_TRUE at CXX = $(MPICXX)
@@ -133,9 +136,9 @@ CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -144,72 +147,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -220,11 +198,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -232,7 +210,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -258,26 +239,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -289,29 +263,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public -I$(top_builddir)/src/core
 AUTOMAKE_OPTIONS = no-dependencies
 bp2ascii_SOURCES = bp2ascii.c 
 bp2ascii_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_INT_CFLAGS)
@@ -326,14 +314,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/bp2ascii/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/bp2ascii/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/bp2ascii/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/bp2ascii/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -351,37 +339,19 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-binPROGRAMS: $(bin_PROGRAMS)
-	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
-
-uninstall-binPROGRAMS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
-
-clean-binPROGRAMS:
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+$(am__aclocal_m4_deps):
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_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
 bp2ascii$(EXEEXT): $(bp2ascii_OBJECTS) $(bp2ascii_DEPENDENCIES) 
 	@rm -f bp2ascii$(EXEEXT)
-	$(LINK) $(bp2ascii_LDFLAGS) $(bp2ascii_OBJECTS) $(bp2ascii_LDADD) $(LIBS)
+	$(bp2ascii_LINK) $(bp2ascii_OBJECTS) $(bp2ascii_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -410,82 +380,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -493,9 +466,6 @@ check-am: all-am
 check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
-	done
 install: install-am
 install-exec: install-exec-am
 install-data: install-data-am
@@ -516,18 +486,20 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
 	@echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
+clean-am: clean-generic clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
 
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -535,18 +507,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
-install-exec-am: install-binPROGRAMS
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
 
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -566,19 +558,23 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am:
 
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
-	clean-generic clean-libtool ctags distclean distclean-compile \
-	distclean-generic distclean-libtool distclean-tags distdir dvi \
-	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libtool clean-noinstPROGRAMS ctags distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-data install-data-am install-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-compile mostlyclean-generic mostlyclean-libtool \
-	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am
+	pdf pdf-am ps ps-am tags uninstall uninstall-am
+
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/utils/bp2bp/Makefile.am b/utils/bp2bp/Makefile.am
index 12c24b7..65eadce 100644
--- a/utils/bp2bp/Makefile.am
+++ b/utils/bp2bp/Makefile.am
@@ -1,12 +1,12 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
 bin_PROGRAMS = bp2bp
 
 bp2bp_SOURCES = bp2bp.c
-bp2bp_CPPFLAGS = $(ADIOSLIB_CPPFLAGS) $(ADIOSLIB_CFLAGS) $(ADIOSLIB_EXTRA_CPPFLAGS) 
+bp2bp_CPPFLAGS = -DADIOS_USE_READ_API_1 $(ADIOSLIB_CPPFLAGS) $(ADIOSLIB_CFLAGS) $(ADIOSLIB_EXTRA_CPPFLAGS) 
 bp2bp_LDFLAGS = $(ADIOSLIB_LDFLAGS) 
 bp2bp_LDADD =  $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
 
diff --git a/utils/bp2bp/Makefile.in b/utils/bp2bp/Makefile.in
index 1921198..db09052 100644
--- a/utils/bp2bp/Makefile.in
+++ b/utils/bp2bp/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ bin_PROGRAMS = bp2bp$(EXEEXT)
 subdir = utils/bp2bp
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,25 +62,29 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_bp2bp_OBJECTS = bp2bp-bp2bp.$(OBJEXT)
 bp2bp_OBJECTS = $(am_bp2bp_OBJECTS)
 am__DEPENDENCIES_1 =
 bp2bp_DEPENDENCIES = $(top_builddir)/src/libadios.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+bp2bp_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(bp2bp_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(bp2bp_SOURCES)
 DIST_SOURCES = $(bp2bp_SOURCES)
 ETAGS = etags
@@ -108,18 +112,12 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 
 #if USE_PARALLEL_COMPILER
 CC = $(MPICC)
@@ -127,15 +125,21 @@ CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = $(MPICXX)
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -144,72 +148,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -220,11 +199,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -232,7 +211,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -258,26 +240,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -289,32 +264,46 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 bp2bp_SOURCES = bp2bp.c
-bp2bp_CPPFLAGS = $(ADIOSLIB_CPPFLAGS) $(ADIOSLIB_CFLAGS) $(ADIOSLIB_EXTRA_CPPFLAGS) 
+bp2bp_CPPFLAGS = -DADIOS_USE_READ_API_1 $(ADIOSLIB_CPPFLAGS) $(ADIOSLIB_CFLAGS) $(ADIOSLIB_EXTRA_CPPFLAGS) 
 bp2bp_LDFLAGS = $(ADIOSLIB_LDFLAGS) 
 bp2bp_LDADD = $(top_builddir)/src/libadios.a $(ADIOSLIB_LDADD)
 all: all-am
@@ -325,14 +314,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/bp2bp/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/bp2bp/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/bp2bp/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/bp2bp/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -350,37 +339,53 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	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)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@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)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@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
 bp2bp$(EXEEXT): $(bp2bp_OBJECTS) $(bp2bp_DEPENDENCIES) 
 	@rm -f bp2bp$(EXEEXT)
-	$(LINK) $(bp2bp_LDFLAGS) $(bp2bp_OBJECTS) $(bp2bp_LDADD) $(LIBS)
+	$(bp2bp_LINK) $(bp2bp_OBJECTS) $(bp2bp_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -409,82 +414,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -493,7 +501,7 @@ check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -515,6 +523,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -526,7 +535,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -534,18 +543,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -565,21 +594,26 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic clean-libtool ctags distclean distclean-compile \
 	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install-binPROGRAMS 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-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am
+	uninstall-binPROGRAMS
 
 #endif
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/utils/bp2bp/bp2bp.c b/utils/bp2bp/bp2bp.c
index 4e18ff0..5d34d78 100644
--- a/utils/bp2bp/bp2bp.c
+++ b/utils/bp2bp/bp2bp.c
@@ -51,13 +51,12 @@
 #endif
 
 MPI_Comm   comm = MPI_COMM_WORLD;
-int 	   gflag = 10;
+int        gflag = 10;
 
 
 #define MAX_DIMS 100
 #define DEBUG 0
 #define PERFORMANCE_CHECK 0
-#define verbose 1
 #define TIMING 100
 
 void checkOverflow(int loc, ADIOS_VARINFO* v, uint64_t* s, uint64_t* c);
@@ -67,661 +66,708 @@ void calcC(uint64_t chunk_size, ADIOS_VARINFO* v, uint64_t* c);
 uint64_t calcChunkSize(uint64_t total_size, uint64_t mne, int np);
 uint64_t checkBound(ADIOS_VARINFO* v, uint64_t* s, uint64_t* c, uint64_t* uc, uint64_t chunk_size);
 void arrCopy(uint64_t* from, uint64_t* to);
+void getbasename (char *path, char **dirname, char **basename);
+int print_data(void *data, int item, enum ADIOS_DATATYPES adiosvartype);
+
 
 int main (int argc, char ** argv) {
-	//For varriable definitions:
-	//gbounds = global bounds string, lbounds = local bounds string, offs = offset string, tstring = temp string to hold temperary stuff
-	char       gbounds[1007], lbounds[1007], offs[1007],tstring[100];
-	//size = number of cores,  gidx = adios group index
-	int        rank, size, gidx, i, j, k, ii;
-	enum       ADIOS_DATATYPES attr_type;
-	//data = pointer to read-in data
-	void       * data = NULL;
-	uint64_t   s[] = {0,0,0,0,0,0,0,0,0,0};  //starting offset
-	uint64_t   c[] = {1,1,1,1,1,1,1,1,1,1};  //chunk block array
-	uint64_t   bytes_read = 0;
-	int        element_size;
-	int64_t    new_adios_group, m_adios_file;
-	uint64_t   var_size;  //portion_bound,
-	uint64_t   adios_groupsize, adios_totalsize;
-	int        err;
-	int        read_buffer;        //possible maximum size you the user would like for each chunk in MB
-	int		   write_buffer = 1536;  //actual buffer size you use in MB
-	int        itime;
-	int        WRITEME=1;
-	uint64_t   chunk_size;   //chunk size in # of elements
-	MPI_Init(&argc,&argv);
-	MPI_Comm_rank(comm,&rank);
-	MPI_Comm_size(comm,&size);
-
-	// timing numbers
-	// we will time:
-	// 0: adios_open, adios_group_size
-	// 1: the total time to read in the data
-	// 2: times around each write (will only work if we do NOT buffer....
-	// 3: the time in the close
-	// 4: fopen, fclose
-	// 5: total time
-	// timers: the total I/O time
-	int        timers = 6;
-	double     start_time[timers], end_time[timers], total_time[timers];
-
-	if (TIMING==100) {
-		for (itime=0;itime<timers;itime++) {
-			start_time[itime] = 0;
-			end_time[itime] = 0;
-			total_time[itime]=0;
-		}
-		//MPI_Barrier(MPI_COMM_WORLD);
-		start_time[5] = MPI_Wtime();
-
-
-	}
-
-	if(rank==0)
-		printf("converting...\n");
-
-	if (argc < 5) {
-		if (rank==0) printf("Usage: %s <BP-file> <ADIOS-file> read_buffer(MB) write_buffer(MB) METHOD (LUSTRE_strip_count) (LUSTRE_strip_size) (LUSTRE_block_size)\n", argv[0]);
-		return 1;
-	}
-
-
-
-	if(TIMING==100)
-		start_time[4] = MPI_Wtime();
-	ADIOS_FILE * f = adios_fopen (argv[1], MPI_COMM_SELF);
-	if(TIMING==100){
-		end_time[4] = MPI_Wtime();
-		total_time[4] = end_time[4]-start_time[4];
-	}
-	adios_init_noxml(); // no xml will be used to write the new adios file
-	read_buffer = atoi(argv[3]);
-	write_buffer = atoi(argv[4]);
-	adios_allocate_buffer (ADIOS_BUFFER_ALLOC_NOW, write_buffer); // allocate MB buffer
-
-
-
-	if (f == NULL) {
-		printf("rank=%d, file cant be opened\n", rank);
-		if (DEBUG) printf ("%s\n", adios_errmsg());
-		return -1;
-	}
-
-
-	for (gidx = 0; gidx < f->groups_count; gidx++) {    //group part
-		adios_groupsize = 0;
-		ADIOS_GROUP * g = adios_gopen (f, f->group_namelist[gidx]);
-
-
-		if (g == NULL) {
-			if (DEBUG) printf ("%s\n", adios_errmsg());
-			printf("rank %d: group cannot be opened.\n", rank);
-			return -1;
-		}
-		/* First create all of the groups */
-		// now I need to create this group in the file that will be written
-
-		adios_declare_group(&new_adios_group,f->group_namelist[gidx],"",adios_flag_yes);
-
-
-		if(strcmp(argv[5],"MPI_LUSTRE")!=0)   //see whether or not the user uses MPI_LUSTRE method
-			adios_select_method (new_adios_group, argv[5], "", "");  //non-MPI_LUSTRE methods... like MPI, POSIX....
-		else{
-			char lustre_pars[1000];
-			strcpy(lustre_pars, "");
-			strcat(lustre_pars, "stripe_count=");
-			sprintf(tstring, "%d", atoi(argv[6]));
-			strcat(lustre_pars, tstring);
-			strcat(lustre_pars, ",stripe_size=");
-			sprintf(tstring, "%d", atoi(argv[7]));
-			strcat(lustre_pars, tstring);
-			strcat(lustre_pars, ",block_size=");
-			sprintf(tstring, "%d", atoi(argv[8]));
-			strcat(lustre_pars, tstring);
-
-			if(rank==0)
-				printf("lustre_pars=%s\n", lustre_pars);
-
-			adios_select_method (new_adios_group, argv[5], lustre_pars, "");  //Use MPI Lustre method
-
-		}
-
-
-
-		// variable definition part
-		for (i = 0; i < g->vars_count; i++) {
-		//for (i = 14; i < 15; i++) { // just for testing 1 variable output....
-			ADIOS_VARINFO * v = adios_inq_var_byid (g, i);
-
-			if (v->ndim == 0) {   // scalars: every process does them the same.
-				adios_define_var(new_adios_group,g->var_namelist[i],"",v->type,0,0,0);
-				err = getTypeInfo( v->type, &element_size);    //element_size is size per element based on its type
-				if(v->type == adios_string){  //special case when the scalar is string.
-					adios_groupsize+= strlen(v->value);
-				}else
-					adios_groupsize+= element_size;
-			} else { // vector variables
-
-				err = getTypeInfo( v->type, &element_size);
-				var_size=1;
-				for (ii=0;ii<v->ndim;ii++) {
-					var_size*=v->dims[ii];
-				}
-				uint64_t total_size = var_size;  //total_size tells you the total number of elements in the current vector variable
-				var_size*=element_size; //var_size tells you the size of the current vector variable in bytess
-
-				//re-initialize the s and c variables
-				for(j=0; j<v->ndim; j++){
-					s[j] = 0;
-					c[j] = 1;
-				}
-
-				//find the approximate chunk_size you would like to use.
-				chunk_size = calcChunkSize(total_size, read_buffer*1024*1024/element_size, size);
-
-				//set the chunk block array with the total size as close to chunk_size as possible
-				calcC(chunk_size, v, c);
-
-				chunk_size = 1;
-				for(ii=0; ii<v->ndim; ii++)			//reset chunk_size based on the created c. Now the chunk_size is exact.
-					chunk_size *= c[ii];
-
-				//current step points to where the process is in processing the vector. First sets with respect to rank.
-				uint64_t current_step = rank*chunk_size;
-
-				//First advance the starting point s by current_step. Of course, you don't do it if the current_step exceeds total_size.
-				if(current_step<total_size)
-					rS(v, s, current_step, rank);
-
-				uint64_t elements_defined = 0;  //First, the number of elements you have defined is 0.
-
-				//You (the process) process your part of the vector when your current_step is smaller than the total_size
-				while(current_step < total_size)
-				{
-					//ts, temporary s, is introduced for the sake of the inner do while loop below. Copy s to ts.
-					uint64_t ts[] = {0,0,0,0,0,0,0,0,0,0};
-					arrCopy(s, ts);
-
-					//for every outer while iteration, you always have the whole chunk_size remained to process.
-					uint64_t remain_chunk = chunk_size;
-					if(current_step+chunk_size>total_size) //except when you are nearing the end of the vector....
-						remain_chunk = total_size-current_step;
-
-					//tc, temporary c, is introduced for the sake of the inner do while loop below. Copy s to tc.
-					uint64_t tc[] = {1,1,1,1,1,1,1,1,1,1};
-					arrCopy(c, tc);
-
-					do{
-						//how much of the remain chunk you wanna process? initially you think you can do all of it....
-						uint64_t used_chunk = remain_chunk;
-
-						//you feel like you should process the vector with tc block size, but given ts, you might go over bound.
-						uint64_t uc[] = {1,1,1,1,1,1,1,1,1,1};
-						//so you verify it by setting a new legit chunck block uc, and getting a new remain_chunk.
-						remain_chunk = checkBound(v, ts, tc, uc, remain_chunk);
-
-						//you check whether or not ts+uc goes over the bound. This is just checking to make sure there's no error.
-						//Thereotically, there should be no problem at all.
-						checkOverflow(0, v, ts, uc);
-
-
-						//the below code fragment simply calculates gbounds, and sets place holders for lbounds and offs.
-						strcpy(gbounds,"");
-						strcpy(lbounds,"");
-						strcpy(offs,"");
-
-						for(j=0; j<v->ndim-1; j++){
-							sprintf(tstring, "%d,", (int)v->dims[j]);
-							strcat(gbounds, tstring);
-							sprintf(tstring, "LIN%d,", j);
-							strcat(lbounds, tstring);
-							sprintf(tstring, "OAK%d,", j);
-							strcat(offs, tstring);
-						}
-
-						sprintf(tstring, "%d", (int)v->dims[v->ndim-1]);
-						strcat(gbounds, tstring);
-						sprintf(tstring, "LIN%d", v->ndim-1);
-						strcat(lbounds, tstring);
-						sprintf(tstring, "OAK%d", v->ndim-1);
-						strcat(offs, tstring);
-
-						//sprintf(tstring, "%d", v->ndim);
-						for(j=0; j<v->ndim; j++){
-							sprintf(tstring, "LIN%d", j);
-							adios_define_var(new_adios_group, tstring, "", adios_unsigned_long, 0, 0, 0);
-							sprintf(tstring, "OAK%d", j);
-							adios_define_var(new_adios_group, tstring, "", adios_unsigned_long, 0, 0, 0);
-						}
-
-						adios_define_var(new_adios_group,g->var_namelist[i],"",v->type,lbounds,gbounds,offs);
-
-
-						if (DEBUG){
-							strcpy(lbounds,"");
-							strcpy(offs,"");
-							for(j=0; j<v->ndim; j++){
-								sprintf(tstring, "%lld,", ts[j]);
-								strcat(offs, tstring);
-								sprintf(tstring, "%lld,", uc[j]);
-								strcat(lbounds, tstring);
-							}
-
-							printf("rank=%d, name=%s, gbounds=%s: lbounds=%s: offs=%s \n",rank,g->var_namelist[i],gbounds, lbounds, offs);
-						}
-
-						used_chunk -= remain_chunk; //you get the actual used_chunk here.
-						elements_defined += used_chunk;
-						if(remain_chunk!=0){
-							rS(v, ts, used_chunk, rank);  //advance ts by used_chunk.
-							for(k=0; k<10; k++)
-								tc[k] = 1;
-							calcC(remain_chunk, v, tc);   //based on the remain_chunk, calculate new tc chunk block remained to process.
-						}
-
-						adios_groupsize+= used_chunk*element_size+2*v->ndim*8;
-
-					}while(remain_chunk!=0);
-
-					current_step += size*chunk_size;  //once a whole chunk_size is processed, advance the current_step in roll-robin manner.
-
-					if(current_step<total_size){   //advance s in the same way.
-						rS(v, s, size*chunk_size, rank);
-					}
-				}
-
-				//beside checkOverflow above, here you check whether or not the total number of elements processed across processes matches
-				//the total number of elements in the original vector.
-				if(DEBUG){
-					uint64_t* sb = (uint64_t *) malloc(sizeof(uint64_t));
-					uint64_t* rb = (uint64_t *) malloc(sizeof(uint64_t));
-					sb[0] = elements_defined;
-					MPI_Reduce(sb,rb,1,MPI_UNSIGNED_LONG_LONG,MPI_SUM,0, comm);
-
-					if(rank==0 && rb[0]!=total_size)
-						printf("some array define mismatch. please use debug mode\n");
-					free(sb); free(rb);
-				}
-			}
-		} // finished declaring all of the variables
-
-
-		// Now we can define the attributes....
-		for (i = 0; i < g->attrs_count; i++) {
-			enum ADIOS_DATATYPES atype;
-			int  asize;
-			void *adata;
-			adios_get_attr_byid (g, i, &atype, &asize, &adata);
-			// if (DEBUG) printf("attribute name=%s\n",g->attr_namelist[i]);
-			adios_define_attribute(new_adios_group,g->attr_namelist[i],"",atype,adata,0);
-		}
-
-
-
-		/*------------------------------ NOW WE WRITE -------------------------------------------- */
-		// Now we have everything declared... now we need to write them out!!!!!!
-		if (WRITEME==1) {
-			// open up the file for writing....
-			if (DEBUG) printf("rank=%d, opening file = %s, with group %s, size=%lld\n",rank,argv[2],f->group_namelist[gidx],adios_groupsize);
-
-			if(TIMING==100)
-				start_time[0] = MPI_Wtime();
-
-			adios_open(&m_adios_file, f->group_namelist[gidx],argv[2],"w",&comm);
-			adios_group_size( m_adios_file, adios_groupsize, &adios_totalsize);
-
-			//get both the total adios_totalsize and total adios_groupsize summed across processes.
-			uint64_t* sb = (uint64_t *) malloc(sizeof(uint64_t));;
-			uint64_t* rb = (uint64_t *) malloc(sizeof(uint64_t));
-			sb[0] = adios_groupsize;
-			MPI_Reduce(sb,rb,1,MPI_UNSIGNED_LONG_LONG,MPI_SUM,0, comm);
-
-			uint64_t* sb2 = (uint64_t *) malloc(sizeof(uint64_t));;
-			uint64_t* rb2 = (uint64_t *) malloc(sizeof(uint64_t));
-			sb2[0] = adios_totalsize;
-			MPI_Reduce(sb2,rb2,1,MPI_UNSIGNED_LONG_LONG,MPI_SUM,0, comm);
-			if(rank==0){
-				printf("total adios_totalsize = %lld\n", *rb2);
-				printf("total adios_groupsize = %lld\n", *rb);
-			}
-			free(sb); free(rb); free(sb2); free(rb2);
-
-			if (TIMING==100) {
-				end_time[0] = MPI_Wtime();
-				total_time[0]+=end_time[0] - start_time[0];    //variable definition time taken
-			}
-
-			// now we have to write out the variables.... since they are all declared now
-			// This will be the place we actually write out the data!!!!!!!!
-			for (i = 0; i < g->vars_count; i++) {
-			//for (i = 14; i < 15;i++) {
-				ADIOS_VARINFO * v = adios_inq_var_byid (g, i);
-				if (v->ndim == 0) {
-
-					if (TIMING==100) {
-						start_time[2] = MPI_Wtime();
-					}
-					adios_write(m_adios_file,g->var_namelist[i],v->value);
-					if (TIMING==100) {
-						end_time[2] = MPI_Wtime();
-						total_time[2]+=end_time[2] - start_time[2];     //IO write time...
-					}
-				} else {
-					for(j=0; j<v->ndim; j++){
-						s[j] = 0;
-						c[j] = 1;
-					}
-					err = getTypeInfo( v->type, &element_size);
-
-					uint64_t total_size = 1;
-					for (ii=0;ii<v->ndim;ii++)
-						total_size*=v->dims[ii];
-
-					chunk_size = calcChunkSize(total_size, read_buffer*1024*1024/element_size, size);
-					calcC(chunk_size, v, c);
-					chunk_size = 1;
-					for(ii=0; ii<v->ndim; ii++)
-						chunk_size *= c[ii];
-
-
-					uint64_t current_step = rank*chunk_size;
-					if(current_step<total_size)
-						rS(v, s, current_step, rank);
-
-					uint64_t elements_written = 0;
-
-					while(current_step < total_size)
-					{
-						uint64_t ts[] = {0,0,0,0,0,0,0,0,0,0};
-						arrCopy(s, ts);
-						uint64_t remain_chunk = chunk_size;
-						if(current_step+chunk_size>total_size)
-							remain_chunk = total_size-current_step;
-						uint64_t tc[] = {1,1,1,1,1,1,1,1,1,1};
-						arrCopy(c, tc);
-
-						do{
-							uint64_t uc[] = {1,1,1,1,1,1,1,1,1,1};
-							uint64_t used_chunk = remain_chunk;
-							remain_chunk = checkBound(v, ts, tc, uc, remain_chunk);
-
-							checkOverflow(1, v, ts, uc);
-
-							used_chunk -= remain_chunk;
-							elements_written += used_chunk;
-
-							//allocated space for data read-in
-							data = (void *) malloc(used_chunk*element_size);
-
-							if (TIMING==100) {
-								start_time[1] = MPI_Wtime();
-							}
-							if(PERFORMANCE_CHECK) printf("rank=%d, read start\n",rank);
-							bytes_read = adios_read_var_byid(g,v->varid,ts,uc,data);
-							if(PERFORMANCE_CHECK) printf("rank=%d, read end\n",rank);
-							if (TIMING==100) {
-								end_time[1] = MPI_Wtime();
-								total_time[1]+=end_time[1] -start_time[1];      //IO read time
-							}
-
-							if (DEBUG)
-								printf ("ADIOS WRITE: rank=%d, name=%s datasize=%d\n",rank,g->var_namelist[i],bytes_read);
-
-
-							if (TIMING==100) {
-								start_time[2] = MPI_Wtime();
-							}
-							if (DEBUG){
-								printf("rank=%d, write ts=",rank);
-								int k;
-								for(k=0; k<v->ndim; k++)
-									printf("%d,", ts[k]);
-								printf("  uc=");
-								for(k=0; k<v->ndim; k++)
-									printf("%d,", uc[k]);
-								printf("\n");
-							}
-
-							//local bounds and offets placeholders are not written out with actual values.
-							if(PERFORMANCE_CHECK) printf("rank=%d, adios write start\n", rank);
-							for(k=0; k<v->ndim; k++){
-								sprintf(tstring, "LIN%d", k);
-								adios_write(m_adios_file, tstring, &uc[k]);
-								sprintf(tstring, "OAK%d", k);
-								adios_write(m_adios_file, tstring, &ts[k]);
-							}
-							adios_write(m_adios_file,g->var_namelist[i],data);
-							if(PERFORMANCE_CHECK) printf("rank=%d, adios write end\n", rank);
-
-
-							if (TIMING==100) {
-								end_time[2] = MPI_Wtime();
-								total_time[2]+=end_time[2] - start_time[2];   //IO write time
-							}
-
-							free(data);
-
-
-							if(remain_chunk!=0){
-								rS(v, ts, used_chunk, rank);
-								for(k=0; k<10; k++)
-									tc[k] = 1;
-								calcC(remain_chunk, v, tc);
-							}
-
-						}while(remain_chunk!=0);
-
-						current_step += size*chunk_size;
-
-						if(current_step<total_size)
-							rS(v, s, size*chunk_size,rank);
-					}
-
-					if(DEBUG){
-						uint64_t* sb = (uint64_t *) malloc(sizeof(uint64_t));;
-						uint64_t* rb = (uint64_t *) malloc(sizeof(uint64_t));
-						sb[0] = elements_written;
-						MPI_Reduce(sb,rb,1,MPI_UNSIGNED_LONG_LONG,MPI_SUM,0, comm);
-						if(rank==0 && rb[0]!=total_size)
-							printf("some array read mismatch. please use debug mode\n");
-						free(sb); free(rb);
-					}
-				}
-			}// end of the writing of the variable..
-			if (TIMING==100) {
-				start_time[3] = MPI_Wtime();
-			}
-			if(PERFORMANCE_CHECK) printf("rank=%d, adios_close start\n", rank);
-			adios_close(m_adios_file);
-			if(PERFORMANCE_CHECK) printf("rank=%d, adios_close end\n", rank);
-			if (TIMING==100) {
-				end_time[3] = MPI_Wtime();
-				total_time[3]+=end_time[3] - start_time[3];
-			}
-			adios_gclose(g);
-		} //end of WRITEME
-	} // end of all of the groups
-
-	if(rank==0)
-		printf("conversion done!\n");
-
-	if(TIMING==100)
-		start_time[4] = MPI_Wtime();
-	adios_fclose(f);
-	if(TIMING==100){
-		end_time[4] = MPI_Wtime();
-		total_time[4] = total_time[4]+end_time[4]-start_time[4];
-	}
-	adios_finalize(rank);
-
-
-	// now, we write out the timing data, for each category, we give max, min, avg, std, all in seconds, across all processes.
-	if(TIMING==100){
-
-		// 0: adios_open, adios_group_size
-		// 1: the total time to read in the data
-		// 2: times around each write (will only work if we do NOT buffer....
-		// 3: the time in the close
-		// 4: fopen, fclose
-		// 5: total time
-		end_time[5] = MPI_Wtime();
-		total_time[5] = end_time[5] - start_time[5];
-
-		double sb[7];
-		sb[0] = total_time[1]; sb[1] = total_time[4];   //read_var, fopen+fclose
-		sb[2] = sb[0]+sb[1];
-		sb[3] = total_time[0]; sb[4] = total_time[2]+total_time[3]; //adios_open+adios_group_size, write+close
-		sb[5] = sb[3]+sb[4];
-		sb[6] = total_time[5]; //total
-
-		double * rb;
-
-		if(rank==0)
-			rb = (double *)malloc(size*7*sizeof(double));
-		//MPI_Barrier(comm);
-		MPI_Gather(sb, 7, MPI_DOUBLE, rb, 7, MPI_DOUBLE, 0, comm);
-
-		if(rank==0){
-			double read_avg1 = 0;
-			double read_avg2 = 0;
-			double tread_avg = 0;
-			double write_avg1 = 0;
-			double write_avg2 = 0;
-			double twrite_avg = 0;
-			double total_avg = 0;
-			for(j=0; j<size; j++){
-				read_avg1 += rb[7*j];
-				read_avg2 += rb[7*j+1];
-				tread_avg += rb[7*j+2];
-				write_avg1 += rb[7*j+3];
-				write_avg2 += rb[7*j+4];
-				twrite_avg += rb[7*j+5];
-				total_avg += rb[7*j+6];
-			}
-			read_avg1 /= size;
-			read_avg2 /= size;
-			tread_avg /= size;
-			write_avg1 /= size;
-			write_avg2 /= size;
-			twrite_avg /= size;
-			total_avg /= size;
-
-			double read1_max = rb[0];
-			double read1_min = rb[0];
-			double read1_std = rb[0]-read_avg1; read1_std *= read1_std;
-
-			double read2_max = rb[1];
-			double read2_min = rb[1];
-			double read2_std = rb[1]-read_avg2; read2_std *= read2_std;
-
-			double tread_max = rb[2];
-			double tread_min = rb[2];
-			double tread_std = rb[2]-tread_avg; tread_std *= tread_std;
-
-			double write1_max = rb[3];
-			double write1_min = rb[3];
-			double write1_std = rb[3]-write_avg1; write1_std *= write1_std;
-
-			double write2_max = rb[4];
-			double write2_min = rb[4];
-			double write2_std = rb[4]-write_avg2; write2_std *= write2_std;
-
-			double twrite_max = rb[5];
-			double twrite_min = rb[5];
-			double twrite_std = rb[5]-twrite_avg; twrite_std *= twrite_std;
-
-			double total_max = rb[6];
-			double total_min = rb[6];
-			double total_std = rb[6]-total_avg; total_std *= total_std;
-
-			for(j=1; j<size; j++){
-				if(rb[7*j]>read1_max)
-					read1_max = rb[7*j];
-				else if(rb[7*j]<read1_min)
-					read1_min = rb[7*j];
-				double std = rb[7*j]-read_avg1; std *= std;
-				read1_std += std;
-
-				if(rb[7*j+1]>read2_max)
-					read2_max = rb[7*j+1];
-				else if(rb[7*j+1]<read2_min)
-					read2_min = rb[7*j+1];
-				std = rb[7*j+1]-read_avg2; std *= std;
-				read2_std += std;
-
-				if(rb[7*j+2]>tread_max)
-					tread_max = rb[7*j+2];
-				else if(rb[7*j+2]<tread_min)
-					tread_min = rb[7*j+2];
-				std = rb[7*j+2]-tread_avg; std *= std;
-				tread_std += std;
-
-				if(rb[7*j+3]>write1_max)
-					write1_max = rb[7*j+3];
-				else if(rb[7*j+3]<write1_min)
-					write1_min = rb[7*j+3];
-				std = rb[7*j+3]-write_avg1; std *= std;
-				write1_std += std;
-
-				if(rb[7*j+4]>write2_max)
-					write2_max = rb[7*j+4];
-				else if(rb[7*j+4]<write2_min)
-					write2_min = rb[7*j+4];
-				std = rb[7*j+4]-write_avg2; std *= std;
-				write2_std += std;
-
-				if(rb[7*j+5]>twrite_max)
-					twrite_max = rb[7*j+5];
-				else if(rb[7*j+5]<twrite_min)
-					twrite_min = rb[7*j+5];
-				std = rb[7*j+5]-twrite_avg; std *= std;
-				twrite_std += std;
-
-				if(rb[7*j+6]>total_max)
-					total_max = rb[7*j+6];
-				else if(rb[7*j+6]<total_min)
-					total_min = rb[7*j+6];
-				std = rb[7*j+6]-total_avg; std *= std;
-				total_std += std;
-			}
-			read1_std /= size;  read1_std = sqrt(read1_std);
-			read2_std /= size;  read2_std = sqrt(read2_std);
-			tread_std /= size;	tread_std = sqrt(tread_std);
-			write1_std /= size; write1_std = sqrt(write1_std);
-			write2_std /= size; write2_std = sqrt(write2_std);
-			twrite_std /= size;	twrite_std = sqrt(twrite_std);
-			total_std /= size; total_std = sqrt(total_std);
-
-			printf("---type---                       max\tmin\tavg\tstd\n");
-			printf("---read_var---                   %lf\t%lf\t%lf\t%lf\n", read1_max, read1_min, read_avg1, read1_std);
-			printf("---fopen+fclose---               %lf\t%lf\t%lf\t%lf\n", read2_max, read2_min, read_avg2, read2_std);
-			printf("---total_read---                 %lf\t%lf\t%lf\t%lf\n", tread_max, tread_min, tread_avg, tread_std);
-			printf("---adios_open+adios_groupsize--- %lf\t%lf\t%lf\t%lf\n", write1_max, write1_min, write_avg1, write1_std);
-			printf("---write+close---                %lf\t%lf\t%lf\t%lf\n", write2_max, write2_min, write_avg2, write2_std);
-			printf("---total_write---                %lf\t%lf\t%lf\t%lf\n", twrite_max, twrite_min, twrite_avg, twrite_std);
-			printf("---total---                      %lf\t%lf\t%lf\t%lf\n", total_max, total_min, total_avg, total_std);
-			free(rb);
-
-		}
-
-	}
-
-	//	if (TIMING==100 && rank==0) {
-	//		printf("------------------------------------------------------------------\n");
-	//		printf("Define variables     = %lf\n",total_time[0]);
-	//		printf("Read   variables     = %lf\n",total_time[1]);
-	//		printf("Write  variables     = %lf\n",total_time[2]);
-	//		printf("Close File for write = %lf\n",total_time[3]);
-	//		printf("Total write time     = %lf\n",total_time[2] + total_time[3]);
-	//		for (itime=0;itime<timers-1;itime++)
-	//			total_time[timers-1]+=total_time[itime];
-	//		printf("Total I/O time       = %lf\n",total_time[timers-1]);
-	//	}
-	MPI_Finalize();
-
-
-	return(0);
+    //For varriable definitions:
+    //gbounds = global bounds string, lbounds = local bounds string, offs = offset string, tstring = temp string to hold temperary stuff
+    char       gbounds[1007], lbounds[1007], offs[1007],tstring[100];
+    //size = number of cores,  gidx = adios group index
+    int        rank, size, gidx, i, j, k, ii;
+    enum       ADIOS_DATATYPES attr_type;
+    //data = pointer to read-in data
+    void       * data = NULL;
+    uint64_t   s[] = {0,0,0,0,0,0,0,0,0,0};  //starting offset
+    uint64_t   c[] = {1,1,1,1,1,1,1,1,1,1};  //chunk block array
+    uint64_t   bytes_read = 0;
+    int        element_size;
+    int64_t    new_adios_group, m_adios_file;
+    uint64_t   var_size;  //portion_bound,
+    uint64_t   adios_groupsize, adios_totalsize;
+    int        err;
+    int        read_buffer;        //possible maximum size you the user would like for each chunk in MB
+    int           write_buffer = 1536;  //actual buffer size you use in MB
+    int        itime;
+    int        WRITEME=1;
+    uint64_t   chunk_size;   //chunk size in # of elements
+    char      *var_path, *var_name; // full path cut into dir path and name
+    MPI_Init(&argc,&argv);
+    MPI_Comm_rank(comm,&rank);
+    MPI_Comm_size(comm,&size);
+
+    // timing numbers
+    // we will time:
+    // 0: adios_open, adios_group_size
+    // 1: the total time to read in the data
+    // 2: times around each write (will only work if we do NOT buffer....
+    // 3: the time in the close
+    // 4: fopen, fclose
+    // 5: total time
+    // timers: the total I/O time
+    int        timers = 6;
+    double     start_time[timers], end_time[timers], total_time[timers];
+
+    if (TIMING==100) {
+        for (itime=0;itime<timers;itime++) {
+            start_time[itime] = 0;
+            end_time[itime] = 0;
+            total_time[itime]=0;
+        }
+        //MPI_Barrier(MPI_COMM_WORLD);
+        start_time[5] = MPI_Wtime();
+    }
+
+    if(rank==0)
+        printf("converting...\n");
+
+    if (argc < 5) {
+        if (rank==0) printf("Usage: %s <BP-file> <ADIOS-file> read_buffer(MB) write_buffer(MB) METHOD (LUSTRE_strip_count) (LUSTRE_strip_size) (LUSTRE_block_size)\n", argv[0]);
+        return 1;
+    }
+
+
+
+    if(TIMING==100)
+        start_time[4] = MPI_Wtime();
+    ADIOS_FILE * f = adios_fopen (argv[1], MPI_COMM_SELF);
+    if(TIMING==100){
+        end_time[4] = MPI_Wtime();
+        total_time[4] = end_time[4]-start_time[4];
+    }
+    adios_init_noxml(); // no xml will be used to write the new adios file
+    read_buffer = atoi(argv[3]);
+    write_buffer = atoi(argv[4]);
+    adios_allocate_buffer (ADIOS_BUFFER_ALLOC_NOW, write_buffer); // allocate MB buffer
+
+
+
+    if (f == NULL) {
+        printf("rank=%d, file cant be opened\n", rank);
+        if (DEBUG) printf ("%s\n", adios_errmsg());
+        return -1;
+    }
+
+
+    for (gidx = 0; gidx < f->groups_count; gidx++) {    //group part
+        adios_groupsize = 0;
+        ADIOS_GROUP * g = adios_gopen (f, f->group_namelist[gidx]);
+
+
+        if (g == NULL) {
+            if (DEBUG) printf ("%s\n", adios_errmsg());
+            printf("rank %d: group cannot be opened.\n", rank);
+            return -1;
+        }
+        /* First create all of the groups */
+        // now I need to create this group in the file that will be written
+
+        adios_declare_group(&new_adios_group,f->group_namelist[gidx],"",adios_flag_yes);
+
+
+        if(strcmp(argv[5],"MPI_LUSTRE")!=0)   //see whether or not the user uses MPI_LUSTRE method
+            adios_select_method (new_adios_group, argv[5], "", "");  //non-MPI_LUSTRE methods... like MPI, POSIX....
+        else{
+            char lustre_pars[1000];
+            strcpy(lustre_pars, "");
+            strcat(lustre_pars, "stripe_count=");
+            sprintf(tstring, "%d", atoi(argv[6]));
+            strcat(lustre_pars, tstring);
+            strcat(lustre_pars, ",stripe_size=");
+            sprintf(tstring, "%d", atoi(argv[7]));
+            strcat(lustre_pars, tstring);
+            strcat(lustre_pars, ",block_size=");
+            sprintf(tstring, "%d", atoi(argv[8]));
+            strcat(lustre_pars, tstring);
+
+            if(rank==0)
+                printf("lustre_pars=%s\n", lustre_pars);
+
+            adios_select_method (new_adios_group, argv[5], lustre_pars, "");  //Use MPI Lustre method
+
+        }
+
+
+
+        // variable definition part
+        for (i = 0; i < g->vars_count; i++) {
+            ADIOS_VARINFO * v = adios_inq_var_byid (g, i);
+            getbasename (g->var_namelist[i], &var_path, &var_name);
+
+            if (v->ndim == 0) 
+            {   
+                // scalars: every process does them the same.
+                adios_define_var(new_adios_group,var_name,var_path,v->type,0,0,0);
+                err = getTypeInfo( v->type, &element_size);    //element_size is size per element based on its type
+                if (v->type == adios_string) {  //special case when the scalar is string.
+                    adios_groupsize += strlen(v->value);
+                } else {
+                    adios_groupsize += element_size;
+                }
+            } 
+            else 
+            { 
+                // vector variables
+                err = getTypeInfo( v->type, &element_size);
+                var_size=1;
+                for (ii=0;ii<v->ndim;ii++) {
+                    var_size*=v->dims[ii];
+                }
+                uint64_t total_size = var_size;  //total_size tells you the total number of elements in the current vector variable
+                var_size*=element_size; //var_size tells you the size of the current vector variable in bytess
+
+                //re-initialize the s and c variables
+                for(j=0; j<v->ndim; j++){
+                    s[j] = 0;
+                    c[j] = 1;
+                }
+
+                //find the approximate chunk_size you would like to use.
+                chunk_size = calcChunkSize(total_size, read_buffer*1024*1024/element_size, size);
+
+                //set the chunk block array with the total size as close to chunk_size as possible
+                calcC(chunk_size, v, c);
+                strcpy(lbounds,"");
+                for(j=0; j<v->ndim; j++){
+                    sprintf(tstring, "%lld,", c[j]);
+                    strcat(lbounds, tstring);
+                }
+                printf("rank=%d, name=%s, chunk_size1=%lld c[]=%s\n",rank,g->var_namelist[i],chunk_size,lbounds);
+
+
+                chunk_size = 1;
+                for(ii=0; ii<v->ndim; ii++)            //reset chunk_size based on the created c. Now the chunk_size is exact.
+                    chunk_size *= c[ii];
+
+                //current step points to where the process is in processing the vector. First sets with respect to rank.
+                uint64_t current_step = rank*chunk_size;
+
+                //First advance the starting point s by current_step. Of course, you don't do it if the current_step exceeds total_size.
+                if(current_step<total_size)
+                    rS(v, s, current_step, rank);
+
+                uint64_t elements_defined = 0;  //First, the number of elements you have defined is 0.
+
+                //You (the process) process your part of the vector when your current_step is smaller than the total_size
+                while(current_step < total_size)
+                {
+                    //ts, temporary s, is introduced for the sake of the inner do while loop below. Copy s to ts.
+                    uint64_t ts[] = {0,0,0,0,0,0,0,0,0,0};
+                    arrCopy(s, ts);
+
+                    //for every outer while iteration, you always have the whole chunk_size remained to process.
+                    uint64_t remain_chunk = chunk_size;
+                    if(current_step+chunk_size>total_size) //except when you are nearing the end of the vector....
+                        remain_chunk = total_size-current_step;
+
+                    //tc, temporary c, is introduced for the sake of the inner do while loop below. Copy s to tc.
+                    uint64_t tc[] = {1,1,1,1,1,1,1,1,1,1};
+                    arrCopy(c, tc);
+
+                    do{
+                        //how much of the remain chunk you wanna process? initially you think you can do all of it....
+                        uint64_t used_chunk = remain_chunk;
+
+                        //you feel like you should process the vector with tc block size, but given ts, you might go over bound.
+                        uint64_t uc[] = {1,1,1,1,1,1,1,1,1,1};
+                        //so you verify it by setting a new legit chunck block uc, and getting a new remain_chunk.
+                        remain_chunk = checkBound(v, ts, tc, uc, remain_chunk);
+
+                        //you check whether or not ts+uc goes over the bound. This is just checking to make sure there's no error.
+                        //Thereotically, there should be no problem at all.
+                        checkOverflow(0, v, ts, uc);
+
+
+                        //the below code fragment simply calculates gbounds, and sets place holders for lbounds and offs.
+                        strcpy(gbounds,"");
+                        strcpy(lbounds,"");
+                        strcpy(offs,"");
+
+                        for(j=0; j<v->ndim-1; j++){
+                            sprintf(tstring, "%d,", (int)v->dims[j]);
+                            strcat(gbounds, tstring);
+                            //sprintf(tstring, "ldim%d_%s,", j, var_name);
+                            sprintf(tstring, "ldim%d,", j);
+                            strcat(lbounds, tstring);
+                            //sprintf(tstring, "offs%d_%s,", j, var_name);
+                            sprintf(tstring, "offs%d,", j);
+                            strcat(offs, tstring);
+                        }
+
+                        sprintf(tstring, "%d", (int)v->dims[v->ndim-1]);
+                        strcat(gbounds, tstring);
+                        //sprintf(tstring, "ldim%d_%s", v->ndim-1, var_name);
+                        sprintf(tstring, "ldim%d", v->ndim-1);
+                        strcat(lbounds, tstring);
+                        //sprintf(tstring, "offs%d_%s", v->ndim-1, var_name);
+                        sprintf(tstring, "offs%d", v->ndim-1);
+                        strcat(offs, tstring);
+
+                        //sprintf(tstring, "%d", v->ndim);
+                        for(j=0; j<v->ndim; j++){
+                            //sprintf(tstring, "ldim%d_%s", j, var_name);
+                            sprintf(tstring, "ldim%d", j);
+                            adios_define_var(new_adios_group, tstring, "bp2bp", adios_unsigned_long, 0, 0, 0);
+                            //sprintf(tstring, "offs%d_%s", j, var_name);
+                            sprintf(tstring, "offs%d", j);
+                            adios_define_var(new_adios_group, tstring, "bp2bp", adios_unsigned_long, 0, 0, 0);
+                        }
+
+                        adios_define_var(new_adios_group,var_name,var_path,v->type,lbounds,gbounds,offs);
+
+
+                        if (DEBUG){
+                            strcpy(lbounds,"");
+                            strcpy(offs,"");
+                            for(j=0; j<v->ndim; j++){
+                                sprintf(tstring, "%lld,", ts[j]);
+                                strcat(offs, tstring);
+                                sprintf(tstring, "%lld,", uc[j]);
+                                strcat(lbounds, tstring);
+                            }
+
+                            printf("rank=%d, name=%s, gbounds=%s: lbounds=%s: offs=%s \n",rank,g->var_namelist[i],gbounds, lbounds, offs);
+                        }
+
+                        used_chunk -= remain_chunk; //you get the actual used_chunk here.
+                        elements_defined += used_chunk;
+                        if(remain_chunk!=0){
+                            rS(v, ts, used_chunk, rank);  //advance ts by used_chunk.
+                            for(k=0; k<10; k++)
+                                tc[k] = 1;
+                            calcC(remain_chunk, v, tc);   //based on the remain_chunk, calculate new tc chunk block remained to process.
+                        }
+
+                        adios_groupsize+= used_chunk*element_size+2*v->ndim*8;
+
+                    }while(remain_chunk!=0);
+
+                    current_step += size*chunk_size;  //once a whole chunk_size is processed, advance the current_step in roll-robin manner.
+
+                    if(current_step<total_size){   //advance s in the same way.
+                        rS(v, s, size*chunk_size, rank);
+                    }
+                }
+
+                //beside checkOverflow above, here you check whether or not the total number of elements processed across processes matches
+                //the total number of elements in the original vector.
+                if(DEBUG){
+                    uint64_t* sb = (uint64_t *) malloc(sizeof(uint64_t));
+                    uint64_t* rb = (uint64_t *) malloc(sizeof(uint64_t));
+                    sb[0] = elements_defined;
+                    MPI_Reduce(sb,rb,1,MPI_UNSIGNED_LONG_LONG,MPI_SUM,0, comm);
+
+                    if(rank==0 && rb[0]!=total_size)
+                        printf("some array define mismatch. please use debug mode\n");
+                    free(sb); free(rb);
+                }
+            }
+            free (var_name);
+            free (var_path);
+        } // finished declaring all of the variables
+
+
+        // Now we can define the attributes....
+        for (i = 0; i < g->attrs_count; i++) {
+            enum ADIOS_DATATYPES atype;
+            int  asize;
+            void *adata;
+            adios_get_attr_byid (g, i, &atype, &asize, &adata);
+            // if (DEBUG) printf("attribute name=%s\n",g->attr_namelist[i]);
+            adios_define_attribute(new_adios_group,g->attr_namelist[i],"",atype,adata,0);
+        }
+
+
+
+        /*------------------------------ NOW WE WRITE -------------------------------------------- */
+        // Now we have everything declared... now we need to write them out!!!!!!
+        if (WRITEME==1) {
+            // open up the file for writing....
+            if (DEBUG) printf("rank=%d, opening file = %s, with group %s, size=%lld\n",rank,argv[2],f->group_namelist[gidx],adios_groupsize);
+
+            if(TIMING==100)
+                start_time[0] = MPI_Wtime();
+
+            adios_open(&m_adios_file, f->group_namelist[gidx],argv[2],"w",&comm);
+            adios_group_size( m_adios_file, adios_groupsize, &adios_totalsize);
+
+            //get both the total adios_totalsize and total adios_groupsize summed across processes.
+            uint64_t* sb = (uint64_t *) malloc(sizeof(uint64_t));;
+            uint64_t* rb = (uint64_t *) malloc(sizeof(uint64_t));
+            sb[0] = adios_groupsize;
+            MPI_Reduce(sb,rb,1,MPI_UNSIGNED_LONG_LONG,MPI_SUM,0, comm);
+
+            uint64_t* sb2 = (uint64_t *) malloc(sizeof(uint64_t));;
+            uint64_t* rb2 = (uint64_t *) malloc(sizeof(uint64_t));
+            sb2[0] = adios_totalsize;
+            MPI_Reduce(sb2,rb2,1,MPI_UNSIGNED_LONG_LONG,MPI_SUM,0, comm);
+            if(rank==0){
+                printf("total adios_totalsize = %lld\n", *rb2);
+                printf("total adios_groupsize = %lld\n", *rb);
+            }
+            free(sb); free(rb); free(sb2); free(rb2);
+
+            if (TIMING==100) {
+                end_time[0] = MPI_Wtime();
+                total_time[0]+=end_time[0] - start_time[0];    //variable definition time taken
+            }
+
+            // now we have to write out the variables.... since they are all declared now
+            // This will be the place we actually write out the data!!!!!!!!
+            for (i = 0; i < g->vars_count; i++) {
+                ADIOS_VARINFO * v = adios_inq_var_byid (g, i);
+                getbasename (g->var_namelist[i], &var_path, &var_name);
+                if (v->ndim == 0) 
+                {
+                    if (DEBUG) {
+                        printf ("ADIOS WRITE SCALAR: rank=%d, name=%s value=",
+                                rank,g->var_namelist[i]);
+                        print_data (v->value, 0, v->type);
+                        printf ("\n");
+                    }
+                    if (TIMING==100) {
+                        start_time[2] = MPI_Wtime();
+                    }
+                    adios_write(m_adios_file,g->var_namelist[i],v->value);
+                    if (TIMING==100) {
+                        end_time[2] = MPI_Wtime();
+                        total_time[2]+=end_time[2] - start_time[2];     //IO write time...
+                    }
+                } 
+                else 
+                {
+                    for(j=0; j<v->ndim; j++){
+                        s[j] = 0;
+                        c[j] = 1;
+                    }
+                    err = getTypeInfo( v->type, &element_size);
+
+                    uint64_t total_size = 1;
+                    for (ii=0;ii<v->ndim;ii++)
+                        total_size*=v->dims[ii];
+
+                    chunk_size = calcChunkSize(total_size, read_buffer*1024*1024/element_size, size);
+                    calcC(chunk_size, v, c);
+                    chunk_size = 1;
+                    for(ii=0; ii<v->ndim; ii++)
+                        chunk_size *= c[ii];
+
+
+                    uint64_t current_step = rank*chunk_size;
+                    if(current_step<total_size)
+                        rS(v, s, current_step, rank);
+
+                    uint64_t elements_written = 0;
+
+                    while(current_step < total_size)
+                    {
+                        uint64_t ts[] = {0,0,0,0,0,0,0,0,0,0};
+                        arrCopy(s, ts);
+                        uint64_t remain_chunk = chunk_size;
+                        if(current_step+chunk_size>total_size)
+                            remain_chunk = total_size-current_step;
+                        uint64_t tc[] = {1,1,1,1,1,1,1,1,1,1};
+                        arrCopy(c, tc);
+
+                        do{
+                            uint64_t uc[] = {1,1,1,1,1,1,1,1,1,1};
+                            uint64_t used_chunk = remain_chunk;
+                            remain_chunk = checkBound(v, ts, tc, uc, remain_chunk);
+
+                            checkOverflow(1, v, ts, uc);
+
+                            used_chunk -= remain_chunk;
+                            elements_written += used_chunk;
+
+                            //allocated space for data read-in
+                            data = (void *) malloc(used_chunk*element_size);
+
+                            if (TIMING==100) {
+                                start_time[1] = MPI_Wtime();
+                            }
+                            if(PERFORMANCE_CHECK) printf("rank=%d, read start\n",rank);
+                            bytes_read = adios_read_var_byid(g,v->varid,ts,uc,data);
+                            if(PERFORMANCE_CHECK) printf("rank=%d, read end\n",rank);
+                            if (TIMING==100) {
+                                end_time[1] = MPI_Wtime();
+                                total_time[1]+=end_time[1] -start_time[1];      //IO read time
+                            }
+
+                            if (DEBUG)
+                                printf ("ADIOS WRITE: rank=%d, name=%s datasize=%lld\n",rank,g->var_namelist[i],bytes_read);
+
+
+                            if (TIMING==100) {
+                                start_time[2] = MPI_Wtime();
+                            }
+                            if (DEBUG){
+                                printf("rank=%d, write ts=",rank);
+                                int k;
+                                for(k=0; k<v->ndim; k++)
+                                    printf("%lld,", ts[k]);
+                                printf("  uc=");
+                                for(k=0; k<v->ndim; k++)
+                                    printf("%lld,", uc[k]);
+                                printf("\n");
+                            }
+
+                            //local bounds and offets placeholders are not written out with actual values.
+                            if(PERFORMANCE_CHECK) printf("rank=%d, adios write start\n", rank);
+                            for(k=0; k<v->ndim; k++){
+                                //sprintf(tstring, "ldim%d_%s", k, var_name);
+                                sprintf(tstring, "ldim%d", k);
+                                if (DEBUG) {
+                                    printf ("ADIOS WRITE DIMENSION: rank=%d, name=%s value=",
+                                            rank,tstring);
+                                    print_data (&uc[k], 0, adios_unsigned_long);
+                                    printf ("\n");
+                                }
+                                adios_write(m_adios_file, tstring, &uc[k]);
+
+                                //sprintf(tstring, "offs%d_%s", k, var_name);
+                                sprintf(tstring, "offs%d", k);
+                                if (DEBUG) {
+                                    printf ("ADIOS WRITE OFFSET: rank=%d, name=%s value=",
+                                            rank,tstring);
+                                    print_data (&ts[k], 0, adios_unsigned_long);
+                                    printf ("\n");
+                                }
+                                adios_write(m_adios_file, tstring, &ts[k]);
+                            }
+                            adios_write(m_adios_file,g->var_namelist[i],data);
+                            if(PERFORMANCE_CHECK) printf("rank=%d, adios write end\n", rank);
+
+
+                            if (TIMING==100) {
+                                end_time[2] = MPI_Wtime();
+                                total_time[2]+=end_time[2] - start_time[2];   //IO write time
+                            }
+
+                            free(data);
+
+
+                            if(remain_chunk!=0){
+                                rS(v, ts, used_chunk, rank);
+                                for(k=0; k<10; k++)
+                                    tc[k] = 1;
+                                calcC(remain_chunk, v, tc);
+                            }
+
+                        }while(remain_chunk!=0);
+
+                        current_step += size*chunk_size;
+
+                        if(current_step<total_size)
+                            rS(v, s, size*chunk_size,rank);
+                    }
+
+                    if(DEBUG){
+                        uint64_t* sb = (uint64_t *) malloc(sizeof(uint64_t));;
+                        uint64_t* rb = (uint64_t *) malloc(sizeof(uint64_t));
+                        sb[0] = elements_written;
+                        MPI_Reduce(sb,rb,1,MPI_UNSIGNED_LONG_LONG,MPI_SUM,0, comm);
+                        if(rank==0 && rb[0]!=total_size)
+                            printf("some array read mismatch. please use debug mode\n");
+                        free(sb); free(rb);
+                    }
+                }
+                free (var_name);
+                free (var_path);
+            }// end of the writing of the variable..
+            if (TIMING==100) {
+                start_time[3] = MPI_Wtime();
+            }
+            if(PERFORMANCE_CHECK) printf("rank=%d, adios_close start\n", rank);
+            adios_close(m_adios_file);
+            if(PERFORMANCE_CHECK) printf("rank=%d, adios_close end\n", rank);
+            if (TIMING==100) {
+                end_time[3] = MPI_Wtime();
+                total_time[3]+=end_time[3] - start_time[3];
+            }
+            adios_gclose(g);
+        } //end of WRITEME
+    } // end of all of the groups
+
+    if(rank==0)
+        printf("conversion done!\n");
+
+    if(TIMING==100)
+        start_time[4] = MPI_Wtime();
+    adios_fclose(f);
+    if(TIMING==100){
+        end_time[4] = MPI_Wtime();
+        total_time[4] = total_time[4]+end_time[4]-start_time[4];
+    }
+    adios_finalize(rank);
+
+
+    // now, we write out the timing data, for each category, we give max, min, avg, std, all in seconds, across all processes.
+    if(TIMING==100){
+
+        // 0: adios_open, adios_group_size
+        // 1: the total time to read in the data
+        // 2: times around each write (will only work if we do NOT buffer....
+        // 3: the time in the close
+        // 4: fopen, fclose
+        // 5: total time
+        end_time[5] = MPI_Wtime();
+        total_time[5] = end_time[5] - start_time[5];
+
+        double sb[7];
+        sb[0] = total_time[1]; sb[1] = total_time[4];   //read_var, fopen+fclose
+        sb[2] = sb[0]+sb[1];
+        sb[3] = total_time[0]; sb[4] = total_time[2]+total_time[3]; //adios_open+adios_group_size, write+close
+        sb[5] = sb[3]+sb[4];
+        sb[6] = total_time[5]; //total
+
+        double * rb;
+
+        if(rank==0)
+            rb = (double *)malloc(size*7*sizeof(double));
+        //MPI_Barrier(comm);
+        MPI_Gather(sb, 7, MPI_DOUBLE, rb, 7, MPI_DOUBLE, 0, comm);
+
+        if(rank==0){
+            double read_avg1 = 0;
+            double read_avg2 = 0;
+            double tread_avg = 0;
+            double write_avg1 = 0;
+            double write_avg2 = 0;
+            double twrite_avg = 0;
+            double total_avg = 0;
+            for(j=0; j<size; j++){
+                read_avg1 += rb[7*j];
+                read_avg2 += rb[7*j+1];
+                tread_avg += rb[7*j+2];
+                write_avg1 += rb[7*j+3];
+                write_avg2 += rb[7*j+4];
+                twrite_avg += rb[7*j+5];
+                total_avg += rb[7*j+6];
+            }
+            read_avg1 /= size;
+            read_avg2 /= size;
+            tread_avg /= size;
+            write_avg1 /= size;
+            write_avg2 /= size;
+            twrite_avg /= size;
+            total_avg /= size;
+
+            double read1_max = rb[0];
+            double read1_min = rb[0];
+            double read1_std = rb[0]-read_avg1; read1_std *= read1_std;
+
+            double read2_max = rb[1];
+            double read2_min = rb[1];
+            double read2_std = rb[1]-read_avg2; read2_std *= read2_std;
+
+            double tread_max = rb[2];
+            double tread_min = rb[2];
+            double tread_std = rb[2]-tread_avg; tread_std *= tread_std;
+
+            double write1_max = rb[3];
+            double write1_min = rb[3];
+            double write1_std = rb[3]-write_avg1; write1_std *= write1_std;
+
+            double write2_max = rb[4];
+            double write2_min = rb[4];
+            double write2_std = rb[4]-write_avg2; write2_std *= write2_std;
+
+            double twrite_max = rb[5];
+            double twrite_min = rb[5];
+            double twrite_std = rb[5]-twrite_avg; twrite_std *= twrite_std;
+
+            double total_max = rb[6];
+            double total_min = rb[6];
+            double total_std = rb[6]-total_avg; total_std *= total_std;
+
+            for(j=1; j<size; j++){
+                if(rb[7*j]>read1_max)
+                    read1_max = rb[7*j];
+                else if(rb[7*j]<read1_min)
+                    read1_min = rb[7*j];
+                double std = rb[7*j]-read_avg1; std *= std;
+                read1_std += std;
+
+                if(rb[7*j+1]>read2_max)
+                    read2_max = rb[7*j+1];
+                else if(rb[7*j+1]<read2_min)
+                    read2_min = rb[7*j+1];
+                std = rb[7*j+1]-read_avg2; std *= std;
+                read2_std += std;
+
+                if(rb[7*j+2]>tread_max)
+                    tread_max = rb[7*j+2];
+                else if(rb[7*j+2]<tread_min)
+                    tread_min = rb[7*j+2];
+                std = rb[7*j+2]-tread_avg; std *= std;
+                tread_std += std;
+
+                if(rb[7*j+3]>write1_max)
+                    write1_max = rb[7*j+3];
+                else if(rb[7*j+3]<write1_min)
+                    write1_min = rb[7*j+3];
+                std = rb[7*j+3]-write_avg1; std *= std;
+                write1_std += std;
+
+                if(rb[7*j+4]>write2_max)
+                    write2_max = rb[7*j+4];
+                else if(rb[7*j+4]<write2_min)
+                    write2_min = rb[7*j+4];
+                std = rb[7*j+4]-write_avg2; std *= std;
+                write2_std += std;
+
+                if(rb[7*j+5]>twrite_max)
+                    twrite_max = rb[7*j+5];
+                else if(rb[7*j+5]<twrite_min)
+                    twrite_min = rb[7*j+5];
+                std = rb[7*j+5]-twrite_avg; std *= std;
+                twrite_std += std;
+
+                if(rb[7*j+6]>total_max)
+                    total_max = rb[7*j+6];
+                else if(rb[7*j+6]<total_min)
+                    total_min = rb[7*j+6];
+                std = rb[7*j+6]-total_avg; std *= std;
+                total_std += std;
+            }
+            read1_std /= size;  read1_std = sqrt(read1_std);
+            read2_std /= size;  read2_std = sqrt(read2_std);
+            tread_std /= size;    tread_std = sqrt(tread_std);
+            write1_std /= size; write1_std = sqrt(write1_std);
+            write2_std /= size; write2_std = sqrt(write2_std);
+            twrite_std /= size;    twrite_std = sqrt(twrite_std);
+            total_std /= size; total_std = sqrt(total_std);
+
+            printf("---type---                       max\tmin\tavg\tstd\n");
+            printf("---read_var---                   %lf\t%lf\t%lf\t%lf\n", read1_max, read1_min, read_avg1, read1_std);
+            printf("---fopen+fclose---               %lf\t%lf\t%lf\t%lf\n", read2_max, read2_min, read_avg2, read2_std);
+            printf("---total_read---                 %lf\t%lf\t%lf\t%lf\n", tread_max, tread_min, tread_avg, tread_std);
+            printf("---adios_open+adios_groupsize--- %lf\t%lf\t%lf\t%lf\n", write1_max, write1_min, write_avg1, write1_std);
+            printf("---write+close---                %lf\t%lf\t%lf\t%lf\n", write2_max, write2_min, write_avg2, write2_std);
+            printf("---total_write---                %lf\t%lf\t%lf\t%lf\n", twrite_max, twrite_min, twrite_avg, twrite_std);
+            printf("---total---                      %lf\t%lf\t%lf\t%lf\n", total_max, total_min, total_avg, total_std);
+            free(rb);
+
+        }
+
+    }
+
+    //    if (TIMING==100 && rank==0) {
+    //        printf("------------------------------------------------------------------\n");
+    //        printf("Define variables     = %lf\n",total_time[0]);
+    //        printf("Read   variables     = %lf\n",total_time[1]);
+    //        printf("Write  variables     = %lf\n",total_time[2]);
+    //        printf("Close File for write = %lf\n",total_time[3]);
+    //        printf("Total write time     = %lf\n",total_time[2] + total_time[3]);
+    //        for (itime=0;itime<timers-1;itime++)
+    //            total_time[timers-1]+=total_time[itime];
+    //        printf("Total I/O time       = %lf\n",total_time[timers-1]);
+    //    }
+    MPI_Finalize();
+
+
+    return(0);
 }
 
 //check whether or not s+c goes over the global bound of v
@@ -732,16 +778,16 @@ int main (int argc, char ** argv) {
 //c (chunk block / local bounds array)
 
 void checkOverflow(int loc, ADIOS_VARINFO* v, uint64_t* s, uint64_t* c) {
-	int j;
-	for(j=0; j<v->ndim; j++){
-		if(s[j]+c[j]>v->dims[j]){
-			if(loc==0)
-				printf("in define: ");
-			else //loc == 1
-				printf("in read/write: ");
-			printf("bound overflow happened. use debug mode\n");
-		}
-	}
+    int j;
+    for(j=0; j<v->ndim; j++){
+        if(s[j]+c[j]>v->dims[j]){
+            if(loc==0)
+                printf("in define: ");
+            else //loc == 1
+                printf("in read/write: ");
+            printf("bound overflow happened. use debug mode\n");
+        }
+    }
 }
 
 //tell you what the size per element is based on the type
@@ -753,60 +799,60 @@ void checkOverflow(int loc, ADIOS_VARINFO* v, uint64_t* s, uint64_t* c) {
 
 int getTypeInfo( enum ADIOS_DATATYPES adiosvartype, int* elemsize){
 
-	switch(adiosvartype) {
-	case adios_unsigned_byte:
-		*elemsize = 1;
-		break;
-	case adios_byte:
-		*elemsize = 1;
-		break;
-	case adios_string:
-		*elemsize = 1;
-		break;
-
-	case adios_unsigned_short:
-		*elemsize = 2;
-		break;
-	case adios_short:
-		*elemsize = 2;
-		break;
-
-	case adios_unsigned_integer:
-		*elemsize = 4;
-		break;
-	case adios_integer:
-		*elemsize = 4;
-		break;
-
-	case adios_unsigned_long:
-		*elemsize = 8;
-		break;
-	case adios_long:
-		*elemsize = 8;
-		break;
-
-	case adios_real:
-		*elemsize = 4;
-		break;
-
-	case adios_double:
-		*elemsize = 8;
-		break;
-
-	case adios_complex:
-		*elemsize = 8;
-		break;
-
-	case adios_double_complex:
-		*elemsize = 16;
-		break;
-
-	case adios_long_double: // do not know how to print
-		//*elemsize = 16;
-	default:
-		return 1;
-	}
-	return 0;
+    switch(adiosvartype) {
+    case adios_unsigned_byte:
+        *elemsize = 1;
+        break;
+    case adios_byte:
+        *elemsize = 1;
+        break;
+    case adios_string:
+        *elemsize = 1;
+        break;
+
+    case adios_unsigned_short:
+        *elemsize = 2;
+        break;
+    case adios_short:
+        *elemsize = 2;
+        break;
+
+    case adios_unsigned_integer:
+        *elemsize = 4;
+        break;
+    case adios_integer:
+        *elemsize = 4;
+        break;
+
+    case adios_unsigned_long:
+        *elemsize = 8;
+        break;
+    case adios_long:
+        *elemsize = 8;
+        break;
+
+    case adios_real:
+        *elemsize = 4;
+        break;
+
+    case adios_double:
+        *elemsize = 8;
+        break;
+
+    case adios_complex:
+        *elemsize = 8;
+        break;
+
+    case adios_double_complex:
+        *elemsize = 16;
+        break;
+
+    case adios_long_double: // do not know how to print
+        //*elemsize = 16;
+    default:
+        return 1;
+    }
+    return 0;
 }
 
 
@@ -820,52 +866,52 @@ int getTypeInfo( enum ADIOS_DATATYPES adiosvartype, int* elemsize){
 
 void rS(ADIOS_VARINFO* v, uint64_t* s, uint64_t by, int rank){
 
-	int q;
-	uint64_t bulk = 1;
+    int q;
+    uint64_t bulk = 1;
 
-	for(q=1; q<v->ndim; q++)
-		bulk *= v->dims[q];
+    for(q=1; q<v->ndim; q++)
+        bulk *= v->dims[q];
 
-	for(q=0; q<v->ndim; q++){
+    for(q=0; q<v->ndim; q++){
 
-		//if(bulk == 0)
-		//break;
+        //if(bulk == 0)
+        //break;
 
-		if(by == 0)
-			break;
+        if(by == 0)
+            break;
 
-		uint64_t inc = by/bulk;
+        uint64_t inc = by/bulk;
 
-		if(inc >= 1){
+        if(inc >= 1){
 
-			if(s[q]+inc<v->dims[q]){
-				s[q] += inc;
-			}else{
-				//s[q-1]++;
+            if(s[q]+inc<v->dims[q]){
+                s[q] += inc;
+            }else{
+                //s[q-1]++;
 
-				uint64_t r = 1;
-				while(1){
-					if(s[q-r]+1 < v->dims[q-r]){
-						s[q-r]++;
-						break;
-					}else{
-						s[q-r] = 0;
-						r++;
-					}
-				}
+                uint64_t r = 1;
+                while(1){
+                    if(s[q-r]+1 < v->dims[q-r]){
+                        s[q-r]++;
+                        break;
+                    }else{
+                        s[q-r] = 0;
+                        r++;
+                    }
+                }
 
-				uint64_t uinc = v->dims[q]-s[q];
-				uint64_t new_inc = inc - uinc;
-				s[q] = new_inc;
-			}
-			by -= inc*bulk;
+                uint64_t uinc = v->dims[q]-s[q];
+                uint64_t new_inc = inc - uinc;
+                s[q] = new_inc;
+            }
+            by -= inc*bulk;
 
-		}
+        }
 
 
-		if(q+1<v->ndim)
-			bulk /= v->dims[q+1];
-	}
+        if(q+1<v->ndim)
+            bulk /= v->dims[q+1];
+    }
 
 }
 
@@ -878,20 +924,20 @@ void rS(ADIOS_VARINFO* v, uint64_t* s, uint64_t by, int rank){
 //c (chunk array block you want to set)
 
 void calcC(uint64_t chunk_size, ADIOS_VARINFO* v, uint64_t* c){
-	int i;
-	uint64_t tot = 1;
-	uint64_t t;
-	for(i=v->ndim-1; i>=0; i--){
-
-		if(v->dims[i]*tot<=chunk_size){
-			c[i] = v->dims[i];
-			tot *= v->dims[i];
-		}else{
-			t = chunk_size/tot;
-			c[i] = t;
-			break;
-		}
-	}
+    int i;
+    uint64_t tot = 1;
+    uint64_t t;
+    for(i=v->ndim-1; i>=0; i--){
+
+        if(v->dims[i]*tot<=chunk_size){
+            c[i] = v->dims[i];
+            tot *= v->dims[i];
+        }else{
+            t = chunk_size/tot;
+            c[i] = t;
+            break;
+        }
+    }
 
 }
 
@@ -906,16 +952,16 @@ void calcC(uint64_t chunk_size, ADIOS_VARINFO* v, uint64_t* c){
 
 uint64_t calcChunkSize(uint64_t total_size, uint64_t mne, int np){
 
-	uint64_t chunk_size = 0;
-	if((total_size/np) <= mne)
-		chunk_size = total_size/np;
-	else
-		chunk_size = mne;
+    uint64_t chunk_size = 0;
+    if((total_size/np) <= mne)
+        chunk_size = total_size/np;
+    else
+        chunk_size = mne;
 
-	if(chunk_size<1)
-		chunk_size = 1;
+    if(chunk_size<1)
+        chunk_size = 1;
 
-	return chunk_size;
+    return chunk_size;
 
 }
 
@@ -932,24 +978,24 @@ uint64_t calcChunkSize(uint64_t total_size, uint64_t mne, int np){
 //remain_chunk (the number of elements still left to process after you process uc block of elements)
 
 uint64_t checkBound(ADIOS_VARINFO* v, uint64_t* s, uint64_t* c, uint64_t* uc, uint64_t chunk_size){
-	int i;
-	uint64_t remain_chunk = chunk_size;
-	int used_chunk = 1;
-	for(i=v->ndim-1;i>=0;i--){
-		if(s[i]+c[i]-1>=v->dims[i]){
-			uc[i] = v->dims[i]-s[i];
-			break;
-		}
-		uc[i] = c[i];
-	}
+    int i;
+    uint64_t remain_chunk = chunk_size;
+    int used_chunk = 1;
+    for(i=v->ndim-1;i>=0;i--){
+        if(s[i]+c[i]-1>=v->dims[i]){
+            uc[i] = v->dims[i]-s[i];
+            break;
+        }
+        uc[i] = c[i];
+    }
 
-	int j;
+    int j;
 
-	for(j=0; j<v->ndim; j++)
-		used_chunk *= uc[j];
-	remain_chunk -= used_chunk;
+    for(j=0; j<v->ndim; j++)
+        used_chunk *= uc[j];
+    remain_chunk -= used_chunk;
 
-	return remain_chunk;
+    return remain_chunk;
 
 }
 
@@ -957,7 +1003,101 @@ uint64_t checkBound(ADIOS_VARINFO* v, uint64_t* s, uint64_t* c, uint64_t* uc, ui
 //copy elements from "from" to "to"
 
 void arrCopy(uint64_t* from, uint64_t* to){
-	int i;
-	for(i=0; i<10; i++)
-		to[i] = from[i];
+    int i;
+    for(i=0; i<10; i++)
+        to[i] = from[i];
+}
+
+
+void getbasename (char *path, char **dirname, char **basename)
+{
+    char *work, *ptr;
+
+    work = strdup(path);
+    if (work[strlen(work)-1] == '/' && strlen(work)>1)
+        work[strlen(work)-1] = '\0';
+
+    ptr = rindex(work, '/');
+    if (ptr && ptr != work) {
+        // found a / and but not the beginning / of a full path
+        ptr[0] = 0;
+        *dirname = strdup(work);
+        ptr[0] = '/';
+        *basename = strdup(ptr+1);
+    } else if (ptr == work) {
+        // found / as the first character 
+        *dirname = strdup("");
+        *basename = strdup(ptr+1);
+    } else {
+        *dirname = NULL; //strdup(".");
+        *basename = strdup(work);
+    }
+    free(work);
 }
+
+
+int print_data(void *data, int item, enum ADIOS_DATATYPES adiosvartype)
+{
+    if (data == NULL) {
+        printf ( "null ");
+        return 0;
+    }
+    // print next data item into vstr
+    switch(adiosvartype) {
+        case adios_unsigned_byte:
+            printf ("%hhu", ((unsigned char *) data)[item]);
+            break;
+        case adios_byte:
+            printf ("%hhd", ((signed char *) data)[item]);
+            break;
+        case adios_string:
+            printf ("\"%s\"", ((char *) data)+item);
+            break;
+
+        case adios_unsigned_short:
+            printf ("%hu", ((unsigned short *) data)[item]);
+            break;
+        case adios_short:
+            printf ("%hd", ((signed short *) data)[item]);
+            break;
+
+        case adios_unsigned_integer: 
+            printf ("%u", ((unsigned int *) data)[item]);
+            break;
+        case adios_integer:    
+            printf ("%d", ((signed int *) data)[item]);
+            break;
+
+        case adios_unsigned_long:
+            printf ("%llu", ((unsigned long long *) data)[item]);
+            break;
+        case adios_long:        
+            printf ("%lld", ((signed long long *) data)[item]);
+            break;
+
+        case adios_real:
+            printf ("%g", ((float *) data)[item]);
+            break;
+
+        case adios_double:
+            printf ("%g", ((double *) data)[item]);
+            break;
+
+
+        case adios_long_double:
+            //printf ("%g ", ((double *) data)[item]);
+            printf ("????????");
+            break;
+
+
+        case adios_complex:
+            printf ("(%g,i%g)", ((float *) data)[2*item], ((float *) data)[2*item+1]);
+            break;
+
+        case adios_double_complex:
+            printf ("(%g,i%g)", ((double *) data)[2*item], ((double *) data)[2*item+1]);
+            break;
+    } // end switch
+    return 0;
+}
+
diff --git a/utils/bp2h5/Makefile.am b/utils/bp2h5/Makefile.am
index c0d9ac8..93c3907 100644
--- a/utils/bp2h5/Makefile.am
+++ b/utils/bp2h5/Makefile.am
@@ -1,19 +1,31 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
 bin_PROGRAMS = bp2h5
 
 bp2h5_SOURCES = bp2h5.c
-bp2h5_CPPFLAGS = -DH5_USE_16_API $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_SEQ_CPPFLAGS) $(ADIOSREADLIB_SEQ_CFLAGS ) $(HDF5_CPPFLAGS)
-bp2h5_LDFLAGS = $(ADIOSREADLIB_SEQ_LDFLAGS)  $(HDF5_LDFLAGS)
-bp2h5_LDADD = $(top_builddir)/src/libadiosread_nompi.a 
 
-bp2h5_LDADD += $(ADIOSREADLIB_SEQ_LDADD) 
-bp2h5_LDADD += $(HDF5_LIBS)
+if USE_PARALLEL_COMPILER
+
+    CC=$(MPICC)
+    CXX=$(MPICXX)
+    bp2h5_CPPFLAGS = -DH5_USE_16_API -DADIOS_USE_READ_API_1 $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS) $(ADIOSREADLIB_CFLAGS) $(HDF5_CPPFLAGS)
+    bp2h5_LDFLAGS = $(ADIOSREADLIB_LDFLAGS)  $(HDF5_LDFLAGS)
+    bp2h5_LDADD = $(top_builddir)/src/libadiosread.a
+    bp2h5_LDADD += $(ADIOSREADLIB_LDADD)
+    bp2h5_LDADD += $(HDF5_LIBS)
+
+else
+
+    bp2h5_CPPFLAGS = -DH5_USE_16_API -DADIOS_USE_READ_API_1 $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_SEQ_CPPFLAGS) $(ADIOSREADLIB_SEQ_CFLAGS) $(HDF5_CPPFLAGS)
+    bp2h5_LDFLAGS = $(ADIOSREADLIB_SEQ_LDFLAGS)  $(HDF5_LDFLAGS)
+    bp2h5_LDADD = $(top_builddir)/src/libadiosread_nompi.a
+    bp2h5_LDADD += $(ADIOSREADLIB_SEQ_LDADD)
+    bp2h5_LDADD += $(HDF5_LIBS)
+
+endif
 
-#CC=$(MPICC)
-#CXX=$(MPICXX)
 
 
diff --git a/utils/bp2h5/Makefile.in b/utils/bp2h5/Makefile.in
index c0f329d..15d657b 100644
--- a/utils/bp2h5/Makefile.in
+++ b/utils/bp2h5/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ bin_PROGRAMS = bp2h5$(EXEEXT)
 subdir = utils/bp2h5
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,25 +62,33 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_bp2h5_OBJECTS = bp2h5-bp2h5.$(OBJEXT)
 bp2h5_OBJECTS = $(am_bp2h5_OBJECTS)
 am__DEPENDENCIES_1 =
-bp2h5_DEPENDENCIES = $(top_builddir)/src/libadiosread_nompi.a \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+ at USE_PARALLEL_COMPILER_FALSE@bp2h5_DEPENDENCIES = $(top_builddir)/src/libadiosread_nompi.a \
+ at USE_PARALLEL_COMPILER_FALSE@	$(am__DEPENDENCIES_1) \
+ at USE_PARALLEL_COMPILER_FALSE@	$(am__DEPENDENCIES_1)
+ at USE_PARALLEL_COMPILER_TRUE@bp2h5_DEPENDENCIES = $(top_builddir)/src/libadiosread.a \
+ at USE_PARALLEL_COMPILER_TRUE@	$(am__DEPENDENCIES_1) \
+ at USE_PARALLEL_COMPILER_TRUE@	$(am__DEPENDENCIES_1)
+bp2h5_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(bp2h5_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(bp2h5_SOURCES)
 DIST_SOURCES = $(bp2h5_SOURCES)
 ETAGS = etags
@@ -108,32 +116,34 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
+ at USE_PARALLEL_COMPILER_TRUE@CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
+ at USE_PARALLEL_COMPILER_TRUE@CXX = $(MPICXX)
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -142,72 +152,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -218,11 +203,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -230,7 +215,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -256,26 +244,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -287,35 +268,54 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 bp2h5_SOURCES = bp2h5.c
-bp2h5_CPPFLAGS = -DH5_USE_16_API $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_SEQ_CPPFLAGS) $(ADIOSREADLIB_SEQ_CFLAGS ) $(HDF5_CPPFLAGS)
-bp2h5_LDFLAGS = $(ADIOSREADLIB_SEQ_LDFLAGS)  $(HDF5_LDFLAGS)
-bp2h5_LDADD = $(top_builddir)/src/libadiosread_nompi.a \
-	$(ADIOSREADLIB_SEQ_LDADD) $(HDF5_LIBS)
+ at USE_PARALLEL_COMPILER_FALSE@bp2h5_CPPFLAGS = -DH5_USE_16_API -DADIOS_USE_READ_API_1 $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_SEQ_CPPFLAGS) $(ADIOSREADLIB_SEQ_CFLAGS) $(HDF5_CPPFLAGS)
+ at USE_PARALLEL_COMPILER_TRUE@bp2h5_CPPFLAGS = -DH5_USE_16_API -DADIOS_USE_READ_API_1 $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_CPPFLAGS) $(ADIOSREADLIB_CFLAGS) $(HDF5_CPPFLAGS)
+ at USE_PARALLEL_COMPILER_FALSE@bp2h5_LDFLAGS = $(ADIOSREADLIB_SEQ_LDFLAGS)  $(HDF5_LDFLAGS)
+ at USE_PARALLEL_COMPILER_TRUE@bp2h5_LDFLAGS = $(ADIOSREADLIB_LDFLAGS)  $(HDF5_LDFLAGS)
+ at USE_PARALLEL_COMPILER_FALSE@bp2h5_LDADD = $(top_builddir)/src/libadiosread_nompi.a \
+ at USE_PARALLEL_COMPILER_FALSE@	$(ADIOSREADLIB_SEQ_LDADD) \
+ at USE_PARALLEL_COMPILER_FALSE@	$(HDF5_LIBS)
+ at USE_PARALLEL_COMPILER_TRUE@bp2h5_LDADD = $(top_builddir)/src/libadiosread.a \
+ at USE_PARALLEL_COMPILER_TRUE@	$(ADIOSREADLIB_LDADD) $(HDF5_LIBS)
 all: all-am
 
 .SUFFIXES:
@@ -324,14 +324,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/bp2h5/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/bp2h5/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/bp2h5/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/bp2h5/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -349,37 +349,53 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	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)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@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)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@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
 bp2h5$(EXEEXT): $(bp2h5_OBJECTS) $(bp2h5_DEPENDENCIES) 
 	@rm -f bp2h5$(EXEEXT)
-	$(LINK) $(bp2h5_LDFLAGS) $(bp2h5_OBJECTS) $(bp2h5_LDADD) $(LIBS)
+	$(bp2h5_LINK) $(bp2h5_OBJECTS) $(bp2h5_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -408,82 +424,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -492,7 +511,7 @@ check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -514,6 +533,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -525,7 +545,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -533,18 +553,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -564,23 +604,25 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic clean-libtool ctags distclean distclean-compile \
 	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install-binPROGRAMS 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-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am
+	uninstall-binPROGRAMS
 
 
-#CC=$(MPICC)
-#CXX=$(MPICXX)
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/utils/bp2h5/bp2h5.c b/utils/bp2h5/bp2h5.c
index 9fdf363..bdbc42e 100644
--- a/utils/bp2h5/bp2h5.c
+++ b/utils/bp2h5/bp2h5.c
@@ -63,6 +63,21 @@ hid_t       HDF5_FILE;
 #define DEBUG 0
 #define verbose 1
 
+/* Support for complex types */
+typedef struct {
+    float re;   /*real part*/
+    float im;   /*imaginary part*/
+} complex_real_t;
+
+typedef struct {
+    double re;   /*real part*/
+    double im;   /*imaginary part*/
+} complex_double_t;
+
+hid_t complex_real_id, complex_double_id;
+
+
+
 
 int  istart[MAX_DIMS], icount[MAX_DIMS], ndimsspecified=0;
 
@@ -103,6 +118,14 @@ int main (int argc, char ** argv)
     ADIOS_FILE * f = adios_fopen (argv[1], comm_dummy);
     HDF5_FILE = H5Fcreate(argv[2],H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
 
+    /* create the complex types for HDF5 */
+    complex_real_id = H5Tcreate (H5T_COMPOUND, sizeof (complex_real_t));
+    H5Tinsert (complex_real_id, "real", HOFFSET(complex_real_t,re), H5T_NATIVE_FLOAT);
+    H5Tinsert (complex_real_id, "imaginary", HOFFSET(complex_real_t,im), H5T_NATIVE_FLOAT);
+
+    complex_double_id = H5Tcreate (H5T_COMPOUND, sizeof (complex_double_t));
+    H5Tinsert (complex_double_id, "real", HOFFSET(complex_double_t,re), H5T_NATIVE_DOUBLE);
+    H5Tinsert (complex_double_id, "imaginary", HOFFSET(complex_double_t,im), H5T_NATIVE_DOUBLE);
 
     if (f == NULL) {
         if (DEBUG) printf ("%s\n", adios_errmsg());
@@ -604,9 +627,12 @@ int bp_getH5TypeId(enum ADIOS_DATATYPES type, hid_t* h5_type_id)
             *h5_type_id = H5Tcopy(H5T_NATIVE_INT64);
             break;
         case adios_complex:
+            *h5_type_id = H5Tcopy(complex_real_id);
+            break;
         case adios_double_complex:
-            fprintf(stderr, "Error in mapping ADIOS Data Types to HDF5: complex not supported yet.\n");
-            status = -1;
+            *h5_type_id = H5Tcopy(complex_double_id);
+            //fprintf(stderr, "Error in mapping ADIOS Data Types to HDF5: complex not supported yet.\n");
+            //status = -1;
             break;
         case adios_unknown:
         default:
diff --git a/utils/bp2ncd/Makefile.am b/utils/bp2ncd/Makefile.am
index 37ff99a..07c555b 100644
--- a/utils/bp2ncd/Makefile.am
+++ b/utils/bp2ncd/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public -I$(top_builddir)/src/core
 
 AUTOMAKE_OPTIONS = no-dependencies
 
diff --git a/utils/bp2ncd/Makefile.in b/utils/bp2ncd/Makefile.in
index 84121f4..6d980a1 100644
--- a/utils/bp2ncd/Makefile.in
+++ b/utils/bp2ncd/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ bin_PROGRAMS = bp2ncd$(EXEEXT)
 subdir = utils/bp2ncd
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,8 +62,8 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_bp2ncd_OBJECTS = bp2ncd-bp2ncd.$(OBJEXT)
 bp2ncd_OBJECTS = $(am_bp2ncd_OBJECTS)
@@ -73,17 +73,21 @@ am__DEPENDENCIES_1 =
 @USE_PARALLEL_COMPILER_TRUE at bp2ncd_DEPENDENCIES =  \
 @USE_PARALLEL_COMPILER_TRUE@	$(top_builddir)/src/libadios.a \
 @USE_PARALLEL_COMPILER_TRUE@	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+bp2ncd_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(bp2ncd_CFLAGS) $(CFLAGS) \
+	$(bp2ncd_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(bp2ncd_SOURCES)
 DIST_SOURCES = $(bp2ncd_SOURCES)
 ETAGS = etags
@@ -111,24 +115,24 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 @USE_PARALLEL_COMPILER_TRUE at CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 @USE_PARALLEL_COMPILER_TRUE at CXX = $(MPICXX)
@@ -136,9 +140,9 @@ CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -147,72 +151,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -223,11 +202,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -235,7 +214,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -261,26 +243,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -292,29 +267,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public -I$(top_builddir)/src/core
 AUTOMAKE_OPTIONS = no-dependencies
 bp2ncd_SOURCES = bp2ncd.c
 @USE_PARALLEL_COMPILER_FALSE at bp2ncd_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_INT_CFLAGS)
@@ -334,14 +323,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/bp2ncd/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/bp2ncd/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/bp2ncd/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/bp2ncd/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -359,37 +348,53 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	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)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@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)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@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
 bp2ncd$(EXEEXT): $(bp2ncd_OBJECTS) $(bp2ncd_DEPENDENCIES) 
 	@rm -f bp2ncd$(EXEEXT)
-	$(LINK) $(bp2ncd_LDFLAGS) $(bp2ncd_OBJECTS) $(bp2ncd_LDADD) $(LIBS)
+	$(bp2ncd_LINK) $(bp2ncd_OBJECTS) $(bp2ncd_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -418,82 +423,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -502,7 +510,7 @@ check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -524,6 +532,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -535,7 +544,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -543,18 +552,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -574,19 +603,24 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic clean-libtool ctags distclean distclean-compile \
 	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install-binPROGRAMS 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-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am
+	uninstall-binPROGRAMS
+
 
 # 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 --git a/utils/bpdump/Makefile.am b/utils/bpdump/Makefile.am
index 2f639fb..dd46a8b 100644
--- a/utils/bpdump/Makefile.am
+++ b/utils/bpdump/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public -I$(top_builddir)/src/core
 
 AUTOMAKE_OPTIONS = no-dependencies
 
diff --git a/utils/bpdump/Makefile.in b/utils/bpdump/Makefile.in
index cb9ae8a..bc3ebb5 100644
--- a/utils/bpdump/Makefile.in
+++ b/utils/bpdump/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ bin_PROGRAMS = bpdump$(EXEEXT)
 subdir = utils/bpdump
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,25 +62,29 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_bpdump_OBJECTS = bpdump-bpdump.$(OBJEXT)
 bpdump_OBJECTS = $(am_bpdump_OBJECTS)
 am__DEPENDENCIES_1 =
 bpdump_DEPENDENCIES = $(top_builddir)/src/libadios_internal_nompi.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+bpdump_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(bpdump_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(bpdump_SOURCES)
 DIST_SOURCES = $(bpdump_SOURCES)
 ETAGS = etags
@@ -108,24 +112,24 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 @USE_PARALLEL_COMPILER_TRUE at CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 @USE_PARALLEL_COMPILER_TRUE at CXX = $(MPICXX)
@@ -133,9 +137,9 @@ CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -144,72 +148,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -220,11 +199,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -232,7 +211,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -258,26 +240,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -289,29 +264,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public -I$(top_builddir)/src/core
 AUTOMAKE_OPTIONS = no-dependencies
 bpdump_SOURCES = bpdump.c
 bpdump_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_INT_CFLAGS)
@@ -326,14 +315,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/bpdump/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/bpdump/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/bpdump/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/bpdump/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -351,37 +340,53 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	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)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@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)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@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
 bpdump$(EXEEXT): $(bpdump_OBJECTS) $(bpdump_DEPENDENCIES) 
 	@rm -f bpdump$(EXEEXT)
-	$(LINK) $(bpdump_LDFLAGS) $(bpdump_OBJECTS) $(bpdump_LDADD) $(LIBS)
+	$(bpdump_LINK) $(bpdump_OBJECTS) $(bpdump_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -410,82 +415,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -494,7 +502,7 @@ check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -516,6 +524,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -527,7 +536,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -535,18 +544,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -566,19 +595,24 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic clean-libtool ctags distclean distclean-compile \
 	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install-binPROGRAMS 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-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am
+	uninstall-binPROGRAMS
+
 
 # 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 --git a/utils/bpdump/bpdump.c b/utils/bpdump/bpdump.c
index 4101b58..b0b7a64 100644
--- a/utils/bpdump/bpdump.c
+++ b/utils/bpdump/bpdump.c
@@ -458,7 +458,7 @@ const char * value_to_string_ptr (enum ADIOS_DATATYPES type, void * data, uint64
         case adios_complex:
         {
             float * p = (float *) data;
-            sprintf (s, "(%f %f)", p [element * 2 + 0]
+            sprintf (s, "(%g %g)", p [element * 2 + 0]
                                  , p [element * 2 + 1]
                     );
             break;
diff --git a/utils/bpls/Makefile.am b/utils/bpls/Makefile.am
index f6e137e..f770ded 100644
--- a/utils/bpls/Makefile.am
+++ b/utils/bpls/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public
 
 AUTOMAKE_OPTIONS = no-dependencies
 
diff --git a/utils/bpls/Makefile.in b/utils/bpls/Makefile.in
index c3fbaf1..9164fec 100644
--- a/utils/bpls/Makefile.in
+++ b/utils/bpls/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ bin_PROGRAMS = bpls$(EXEEXT)
 subdir = utils/bpls
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,25 +62,29 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_bpls_OBJECTS = bpls-bpls.$(OBJEXT)
 bpls_OBJECTS = $(am_bpls_OBJECTS)
 am__DEPENDENCIES_1 =
 bpls_DEPENDENCIES = $(top_builddir)/src/libadiosread_nompi.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+bpls_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(bpls_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(bpls_SOURCES)
 DIST_SOURCES = $(bpls_SOURCES)
 ETAGS = etags
@@ -108,32 +112,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -142,72 +146,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -218,11 +197,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -230,7 +209,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -256,26 +238,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -287,29 +262,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public
 AUTOMAKE_OPTIONS = no-dependencies
 bpls_SOURCES = bpls.c 
 bpls_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSREADLIB_SEQ_CPPFLAGS) $(ADIOSREADLIB_SEQ_CFLAGS)
@@ -325,14 +314,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/bpls/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/bpls/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/bpls/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/bpls/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -350,37 +339,53 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	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)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@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)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@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
 bpls$(EXEEXT): $(bpls_OBJECTS) $(bpls_DEPENDENCIES) 
 	@rm -f bpls$(EXEEXT)
-	$(LINK) $(bpls_LDFLAGS) $(bpls_OBJECTS) $(bpls_LDADD) $(LIBS)
+	$(bpls_LINK) $(bpls_OBJECTS) $(bpls_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -409,82 +414,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -493,7 +501,7 @@ check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -515,6 +523,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -526,7 +535,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -534,18 +543,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -565,22 +594,27 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic clean-libtool ctags distclean distclean-compile \
 	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install-binPROGRAMS 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-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am
+	uninstall-binPROGRAMS
 
 #CC=$(MPICC)
 #CXX=$(MPICXX)
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/utils/bpls/bpls.c b/utils/bpls/bpls.c
index 2ab1329..71c276a 100644
--- a/utils/bpls/bpls.c
+++ b/utils/bpls/bpls.c
@@ -65,6 +65,7 @@ bool timestep;
 bool noindex;              // do no print array indices with data
 bool printByteAsChar;      // print 8 bit integer arrays as string
 bool plot;                 // dump histogram related information
+bool hidden_attrs;         // show hidden attrs in BP file
 
 // other global variables
 char *prgname; /* argv[0] */
@@ -89,7 +90,7 @@ struct option options[] = {
     {"start",                required_argument,    NULL,    's'}, 
     {"count",                required_argument,    NULL,    'c'}, 
     {"noindex",              no_argument,          NULL,    'y'},
-    {"sort",                 no_argument,          NULL,    'r'},
+//    {"sort",                 no_argument,          NULL,    'r'},
     {"timestep",             no_argument,          NULL,    't'},
     {"attrs",                no_argument,          NULL,    'a'},
     {"attrsonly",            no_argument,          NULL,    'A'},
@@ -97,6 +98,7 @@ struct option options[] = {
     {"string",               no_argument,          NULL,    'S'},
     {"columns",              required_argument,    NULL,    'n'}, 
     {"format",               required_argument,    NULL,    'f'}, 
+    {"hidden_attrs",         no_argument,          &hidden_attrs,    true}, 
     //    {"time",                 required_argument,    NULL,    't'}, 
     {NULL,                   0,                    NULL,    0}
 };
@@ -117,7 +119,9 @@ void display_help() {
             "                               min/max values of arrays (no overhead to get them!)\n"
             "  --attrs     | -a           List/match attributes too\n"
             "  --attrsonly | -A           List attributes only\n"
+            /*
             "  --sort      | -r           Sort names before listing\n"
+            */
             "  --timestep  | -t           Print values of timestep elements\n"
             "  --group     | -g <mask>    List/dump groups matching the mask only\n"
             "  --dump      | -d           Dump matched variables/attributes\n"
@@ -139,6 +143,7 @@ void display_help() {
             "  --columns   | -n \"cols\"    Number of data elements per row to print\n"
             "  --format    | -f \"str\"     Format string to use for one data item in print\n"
             "                               instead of the default. E.g. \"%%6.3f\"\n"
+            "  --hidden_attrs             Show hidden ADIOS attributes in the file\n"
             /*
                "  --time    | -t N [M]      # print data for timesteps N..M only (or only N)\n"
                "                              default is to print all available timesteps\n"
@@ -200,7 +205,7 @@ int main( int argc, char *argv[] ) {
                 display_help();
                 return 0;
             case 'r':
-                sortnames = true;
+                //sortnames = true;
                 break;
             case 'l':
                 longopt = true;
@@ -252,6 +257,10 @@ int main( int argc, char *argv[] ) {
                    break;
                  */
 
+            //case 200:
+            //    hidden_attrs = true;
+            //    break;
+
             case 1:
                 /* This means a field is unknown, or could be multiple arg or bad arg*/
                 /*
@@ -353,6 +362,7 @@ void init_globals(void) {
     //timeto               = -1;
     use_regexp           = false;
     plot                 = false;
+    hidden_attrs         = false;
     formatgiven          = false;
     printByteAsChar      = false;
     for (i=0; i<MAX_DIMS; i++) {
@@ -402,13 +412,13 @@ void printSettings(void) {
         printf("      -f : dump using printf format \"%s\"\n", format);
     if (output_xml)
         printf("      -x : output data in XML format\n");
+    if (hidden_attrs)
+        printf("         : show hidden attributes in the file\n");
 }
 
-    void bpexit(int code, ADIOS_FILE *fp, ADIOS_GROUP *gp) {
-        if (gp > 0)
-            adios_gclose (gp);
+    void bpexit(int code, ADIOS_FILE *fp) {
         if (fp > 0)
-            adios_fclose (fp);
+            adios_read_close (fp);
         exit(code);
     }
 
@@ -433,266 +443,347 @@ void print_file_size(uint64_t size)
 int print_data_hist(ADIOS_VARINFO * vi, char * varname);
 int print_data_characteristics(void * min, void * max, double * avg, double * std_dev, enum ADIOS_DATATYPES adiosvartype, bool allowformat);
 
-int doList(const char *path) {
-    //int     ntsteps;
+int     nVarsMatched=0;
 
-    ADIOS_FILE  *fp;
-    ADIOS_GROUP *gp; // reused for each group
+int doList_group (ADIOS_FILE *fp)
+{
     ADIOS_VARINFO *vi; 
+    ADIOS_VARINFO **vis; 
     enum ADIOS_DATATYPES vartype;
-    int     grpid, i, j, n;             // loop vars
+    int     i, j, n;             // loop vars
     int     status;
     int     attrsize;                       // info about one attribute
     int     mpi_comm_dummy=0;
     bool    matches;
-    int     len, maxlen;
-    int     nVarsMatched=0;
-    int     nGroupsMatched=0;
+    int     len, maxlen, maxtypelen;
     int     retval;
     char  **names;  // vars and attrs together, sorted or unsorted
     bool   *isVar;  // true for each var, false for each attr
     int     nNames; // number of vars + attrs
     void   *value;  // scalar value is returned by get_attr
+    bool    timed;  // variable has multiple timesteps
 
-    if (verbose>1) printf("\nADIOS BP open: read header info from %s\n", path);
 
-    // open the BP file
-    fp = adios_fopen (path, mpi_comm_dummy); 
-    if (fp == NULL) {
-        fprintf(stderr, "Error: %s\n", adios_errmsg());
-        bpexit(7, 0, 0);
+    if (attrsonly)
+        nNames = fp->nattrs;
+    else if (listattrs)
+        nNames = fp->nvars + fp->nattrs;
+    else 
+        nNames = fp->nvars;
+
+    /*
+       if (sortnames) {
+       if (!attrsonly)
+       qsort(gp->var_namelist, gp->vars_count, sizeof(char *), cmpstringp);
+       if (listattrs)
+       qsort(gp->attr_namelist, gp->attrs_count, sizeof(char *), cmpstringp);
+       }
+     */
+
+    names = (char **) malloc (nNames * sizeof (char*)); // store only pointers
+    isVar = (bool *) malloc (nNames * sizeof (bool));
+    vis   = (ADIOS_VARINFO **) malloc (nNames * sizeof (ADIOS_VARINFO*));
+    if (names == NULL || isVar == NULL || vis == NULL) {
+        fprintf(stderr, "Error: could not allocate char* and bool arrays of %d elements\n", nNames);
+        return 5;
     }
+    mergeLists(fp->nvars, fp->var_namelist, fp->nattrs, fp->attr_namelist, names, isVar);
 
-    // get number of groups, variables, timesteps, and attributes 
-    // all parameters are integers, 
-    // besides the last parameter, which is an array of strings for holding the list of group names
-    //ntsteps = fp->tidx_stop - fp->tidx_start + 1;
-    if (verbose) {
-        printf ("File info:\n");
-        printf ("  of groups:     %d\n", fp->groups_count);
-        printf ("  of variables:  %d\n", fp->vars_count);
-        printf ("  of attributes: %d\n", fp->attrs_count);
-        printf ("  time steps:    %d starting from %d\n", fp->ntimesteps, fp->tidx_start);
-        print_file_size(fp->file_size);
-        printf ("  bp version:    %d\n", fp->version);
-        printf ("  endianness:    %s\n", (fp->endianness ? "Big Endian" : "Little Endian"));
-        if (longopt) 
-            printf ("  statistics:    Min / Max / Avg / Std_dev\n");
-        printf ("\n");
+    // calculate max length of variable names in the first round
+    maxlen = 4;
+    for (n=0; n<nNames; n++) {
+        len = strlen(names[n]);
+        if (len > maxlen) maxlen = len;
     }
 
-
-    // each group has to be handled separately
-    for (grpid=0; grpid < fp->groups_count; grpid++) {
-        if (!grpMatchesMask(fp->group_namelist[grpid]))
-            continue;
-        nGroupsMatched++;
-        if (!dump) fprintf(outf, "Group %s:\n", fp->group_namelist[grpid]);
-        gp = adios_gopen_byid (fp, grpid);
-        if (gp == NULL) {
-            fprintf(stderr, "Error: %s\n", adios_errmsg());
-            bpexit(8, fp, 0);
+    // Get VARINFO's and attr types and calculate max length of type names 
+    maxtypelen = 7;
+    for (n=0; n<nNames; n++) {
+        if (isVar[n])  {
+            vis[n] = adios_inq_var (fp, names[n]);
+            if (!vis[n]) {
+                fprintf(stderr, "Error: %s\n", adios_errmsg());
+            }
+            vartype = vis[n]->type;
+        } else {
+            retval = adios_get_attr (fp, names[n], &vartype, &attrsize, &value);
+            if (retval) {
+                fprintf(stderr, "Error: %s\n", adios_errmsg());
+            }
         }
+        len = strlen(adios_type_to_string(vartype));
+        if (len > maxtypelen) maxtypelen = len;
+    }
 
-        if (sortnames) {
-            if (!attrsonly)
-                qsort(gp->var_namelist, gp->vars_count, sizeof(char *), cmpstringp);
-            if (listattrs)
-                qsort(gp->attr_namelist, gp->attrs_count, sizeof(char *), cmpstringp);
+    /* VARIABLES */
+    for (n=0; n<nNames; n++) {
+        matches = false;
+        if (isVar[n])  {
+            vi = vis[n];
+            vartype = vi->type;
+            //timed = adios_read_bp_is_var_timed(fp, vi->varid);
+            timed = (vi->nsteps > 1);
+        } else {
+            retval = adios_get_attr (fp, names[n], &vartype, &attrsize, &value);
+            if (retval) {
+                fprintf(stderr, "Error: %s\n", adios_errmsg());
+            }
         }
 
-        if (attrsonly)
-            nNames = gp->attrs_count;
-        else if (listattrs)
-            nNames = gp->vars_count + gp->attrs_count;
-        else 
-            nNames = gp->vars_count;
-        names = (char **) malloc (nNames * sizeof (char*)); // store only pointers
-        isVar = (bool *) malloc (nNames * sizeof (bool));
-        if (names == NULL || isVar == NULL) {
-            fprintf(stderr, "Error: could not allocate char* and bool arrays of %d elements\n", nNames);
-            return 5;
-        }
-        mergeLists(gp->vars_count, gp->var_namelist, gp->attrs_count, gp->attr_namelist,
-                names, isVar);
-
-        // calculate max length of variable names in the first round
-        maxlen = 4;
-        for (n=0; n<nNames; n++) {
-            len = strlen(names[n]);
-            if (len > maxlen) maxlen = len;
-        }
+        matches = matchesAMask(names[n]);
 
-        /* VARIABLES */
-        for (n=0; n<nNames; n++) {
-            matches = false;
-            if (isVar[n])  {
-                vi = adios_inq_var (gp, names[n]);
-                if (!vi) {
-                    fprintf(stderr, "Error: %s\n", adios_errmsg());
-                }
-                vartype = vi->type;
-            } else {
-                retval = adios_get_attr (gp, names[n], &vartype, &attrsize, &value);
-                if (retval) {
-                    fprintf(stderr, "Error: %s\n", adios_errmsg());
-                }
-            }
+        if (matches) {
+            nVarsMatched++;
 
-            matches = matchesAMask(names[n]);
-
-            if (matches) {
-                nVarsMatched++;
-                // print definition of variable
-                fprintf(outf,"%c %-*s  %-*s", commentchar, 9, adios_type_to_string(vartype), maxlen, names[n]); 
-                if (!isVar[n]) {
-                    // list (and print) attribute
-                    if (readattrs || dump) {
-                        fprintf(outf,"  attr   = ");
-                        print_data(value, 0, vartype, false); 
-                        fprintf(outf,"\n");
-                        matches = false; // already printed
-                    } else {
-                        fprintf(outf,"  attr\n");
-                    }
-                } else if (!vi) { 
-                    // after error
-                    fprintf(outf, "\n");
-                } else if (vi->ndim > 0) {
-                    // array
-                    //fprintf(outf,"  {%s%d", (vi->timedim==0 ? "T-": ""),vi->dims[0]);
-                    fprintf(outf,"  {%lld", vi->dims[0]);
+            // print definition of variable
+            fprintf(outf,"%c %-*s  %-*s", commentchar, maxtypelen, 
+                    adios_type_to_string(vartype), maxlen, names[n]); 
+            if (!isVar[n]) {
+                // list (and print) attribute
+                if (readattrs || dump) {
+                    fprintf(outf,"  attr   = ");
+                    print_data(value, 0, vartype, false); 
+                    fprintf(outf,"\n");
+                    matches = false; // already printed
+                } else {
+                    fprintf(outf,"  attr\n");
+                }
+            } else if (!vi) { 
+                // after error
+                fprintf(outf, "\n");
+            } else if (vi->ndim > 0 || timed) {
+                // array
+                //fprintf(outf,"  {%s%d", (vi->timedim==0 ? "T-": ""),vi->dims[0]);
+
+                fprintf(outf,"  ");
+                if (timed) 
+                    fprintf(outf, "%d*", vi->nsteps);
+                if (vi->ndim > 0) {
+                    fprintf(outf,"{%lld", vi->dims[0]);
                     for (j=1; j < vi->ndim; j++) {
                         fprintf(outf,", %lld", vi->dims[j]);
                     }
                     fprintf(outf,"}");
+                } else {
+                    fprintf(outf,"scalar");
+                }
 
-                    if (vi->hist && plot) {
-                        print_data_hist(vi, &names[n][1]);
-                    }
+                if (longopt || plot) {
+                    status = adios_inq_var_stat (fp, vi, timestep && timed, 0);
+                }
 
-                    if (longopt && vi->gmin && vi->gmax) {
+                if (plot && vi->statistics && vi->statistics->histogram) {
+                    print_data_hist(vi, &names[n][1]);
+                }
 
-                        if(timestep == false || (vi->timedim < 0)) {    
 
-                            fprintf(outf," = ");
-                            print_data(vi->gmin, 0, vartype, false); 
+                if (longopt && vi->statistics) {
 
-                            fprintf(outf,"/ ");
-                            print_data(vi->gmax, 0, vartype, false); 
+                    if(timestep == false || timed == false ) {
 
-                            if(vartype == adios_complex || vartype == adios_double_complex) {
+                        fprintf(outf," = ");
+                        print_data(vi->statistics->min, 0, vartype, false); 
 
-                                fprintf(outf,"/ ");
-                                print_data(vi->gavg, 0, adios_double_complex, false);
-                            } else {
+                        fprintf(outf,"/ ");
+                        print_data(vi->statistics->max, 0, vartype, false); 
 
-                                fprintf(outf,"/ ");
-                                print_data(vi->gavg, 0, adios_double, false);
-                            }
+                        if(vartype == adios_complex || vartype == adios_double_complex) {
 
-                            if(vartype == adios_complex || vartype == adios_double_complex) {
+                            fprintf(outf,"/ ");
+                            print_data(vi->statistics->avg, 0, adios_double_complex, false);
+                        } else {
 
-                                fprintf(outf,"/ ");
-                                print_data(vi->gstd_dev, 0, adios_double_complex, false);
-                            } else {
+                            fprintf(outf,"/ ");
+                            print_data(vi->statistics->avg, 0, adios_double, false);
+                        }
 
-                                fprintf(outf,"/ ");
-                                print_data(vi->gstd_dev, 0, adios_double, false);
-                            }
+                        if(vartype == adios_complex || vartype == adios_double_complex) {
 
-                            //fprintf(outf," {MIN / MAX / AVG / STD_DEV} ");
+                            fprintf(outf,"/ ");
+                            print_data(vi->statistics->std_dev, 0, adios_double_complex, false);
                         } else {
-                            int time_start = 0, time_end = vi->dims[0];
-
-                            if (start != NULL) {
-                                if (istart[0] >= 0)
-                                    time_start = istart[0];
-                                else
-                                    time_start = vi->dims[0] - 1 + istart[0];
-                            }
-
-                            if (count != NULL) {
-                                if(icount[0] > 0)
-                                    time_end = time_start + icount[0];
-                                else
-                                    time_end = vi->dims[0] + icount[0] + 1;
-                            }
-
-                            if (time_start < 0 || time_start >= vi->dims[0]) {
-                                fprintf (stderr, "Error when reading variable %s. errno=%d : Variable (id=%d) has no data at %d time step\n", names[n], 15, vi->varid, time_start);
-                                return 15;
-                            }
-
-                            if (time_end < 0 || time_end > vi->dims[0]) {
-                                fprintf (stderr, "Error when reading variable %s. errno=%d : Variable (id=%d) has no data at %d time step\n", names[n], 15, vi->varid, time_end);
-                                return 15;
-                            }
-
-                            static char *indent_char = " ";
-                            int indent_len=11;
-
-                            /* Start - Print the headers of statistics first */
-                            fprintf(outf, "\n%-*s", indent_len+7, indent_char);
-                            fprintf(outf, "%10s  ", "MIN");
-                            fprintf(outf, "%10s  ", "MAX");
-                            fprintf(outf, "%10s  ", "AVG");
-                            fprintf(outf, "%10s  ", "STD DEV");
-
-                            /* End - Print the headers of statistics first */
-
-                            void *min, *max, *avg, *std_dev;
-                            enum ADIOS_DATATYPES vt = vartype;
-                            if (vi->type == adios_complex || vi->type == adios_double_complex)
-                                vt = adios_double;
-                            fprintf(outf, "\n%-*sglobal:", indent_len, indent_char);
-                            print_data_characteristics(vi->gmin, vi->gmax, vi->gavg, vi->gstd_dev, vt, false);
-
-                            for(i = time_start; i < time_end; i++) {
-                                min = max = avg = std_dev = 0;
-                                if (vi->maxs && vi->maxs[i]) max = vi->maxs[i];
-                                if (vi->mins && vi->mins[i]) min = vi->mins[i];
-                                if (vi->avgs && vi->avgs[i]) avg = vi->avgs[i];
-                                if (vi->std_devs && vi->std_devs[i]) std_dev = vi->std_devs[i];
-
-                                // Align the output, previous lines has atleast (maxlen + strlen(names[n])) characters
-                                // Better way to printf N spaces?
-                                fprintf(outf, "\n%-*st%-5d:", indent_len, indent_char, i);
-                                print_data_characteristics(min, max, avg, std_dev, vt, false);
-                            }
-                            fprintf(outf, "\n");
+
+                            fprintf(outf,"/ ");
+                            print_data(vi->statistics->std_dev, 0, adios_double, false);
                         }
+
+                        //fprintf(outf," {MIN / MAX / AVG / STD_DEV} ");
+                    } else {
+                        int time_start = 0, time_end = vi->nsteps;
+
+                        if (start != NULL) {
+                            if (istart[0] >= 0)
+                                time_start = istart[0];
+                            else
+                                time_start = vi->nsteps - 1 + istart[0];
+                        }
+
+                        if (count != NULL) {
+                            if(icount[0] > 0)
+                                time_end = time_start + icount[0];
+                            else
+                                time_end = vi->nsteps + icount[0] + 1;
+                        }
+
+                        if (time_start < 0 || time_start >= vi->nsteps) {
+                            fprintf (stderr, "Error when reading variable %s. errno=%d : Variable (id=%d) has no data at %d time step\n", names[n], 15, vi->varid, time_start);
+                            bpexit(15,fp);
+                        }
+
+                        if (time_end < 0 || time_end > vi->nsteps) {
+                            fprintf (stderr, "Error when reading variable %s. errno=%d : Variable (id=%d) has no data at %d time step\n", names[n], 15, vi->varid, time_end);
+                            bpexit(16,fp);
+                        }
+
+                        static char *indent_char = " ";
+                        int indent_len=11;
+
+                        /* Start - Print the headers of statistics first */
+                        fprintf(outf, "\n%-*s", indent_len+7, indent_char);
+                        fprintf(outf, "%10s  ", "MIN");
+                        fprintf(outf, "%10s  ", "MAX");
+                        fprintf(outf, "%10s  ", "AVG");
+                        fprintf(outf, "%10s  ", "STD DEV");
+
+                        /* End - Print the headers of statistics first */
+
+                        void *min, *max, *avg, *std_dev;
+                        enum ADIOS_DATATYPES vt = vartype;
+                        struct ADIOS_STAT_STEP *s = vi->statistics->steps;
+                        if (vi->type == adios_complex || vi->type == adios_double_complex)
+                            vt = adios_double;
+                        fprintf(outf, "\n%-*sglobal:", indent_len, indent_char);
+                        print_data_characteristics (vi->statistics->min, 
+                                vi->statistics->max, 
+                                vi->statistics->avg, 
+                                vi->statistics->std_dev, 
+                                vt, false);
+
+                        for(i = time_start; i < time_end; i++) {
+                            min = max = avg = std_dev = 0;
+                            if (s->maxs && s->maxs[i]) max = s->maxs[i];
+                            if (s->mins && s->mins[i]) min = s->mins[i];
+                            if (s->avgs && s->avgs[i]) avg = s->avgs[i];
+                            if (s->std_devs && s->std_devs[i]) std_dev = s->std_devs[i];
+
+                            // Align the output, previous lines has atleast (maxlen + strlen(names[n])) characters
+                            // Better way to printf N spaces?
+                            fprintf(outf, "\n%-*st%-5d:", indent_len, indent_char, i);
+                            print_data_characteristics(min, max, avg, std_dev, vt, false);
+                        }
+                        fprintf(outf, "\n");
                     }
-                    fprintf(outf,"\n");
-                } else {
-                    // scalar
-                    fprintf(outf,"  scalar");
-                    if (longopt && vi->value) {
-                        fprintf(outf," = ");
-                        print_data(vi->value, 0, vartype, false); 
-                        matches = false; // already printed
-                    }
-                    fprintf(outf,"\n");
+                } // longopt && vi->statistics 
+                fprintf(outf,"\n");
+            } else {
+                // scalar
+                fprintf(outf,"  scalar");
+                if (longopt && vi->value) {
+                    fprintf(outf," = ");
+                    print_data(vi->value, 0, vartype, false); 
+                    matches = false; // already printed
                 }
-            }
-
-            if (matches && dump) {
-                // print variable content 
-                if (isVar[n])
-                    retval = readVar(gp, vi, names[n]);
-                if (retval && retval != 10) // do not return after unsupported type
-                    return retval;
                 fprintf(outf,"\n");
             }
+        }
 
+        if (matches && dump) {
+            // print variable content 
             if (isVar[n])
-                adios_free_varinfo(vi);
-            else
-                free(value);
+                retval = readVar(fp, vi, names[n], timed);
+            if (retval && retval != 10) // do not return after unsupported type
+                return retval;
+            fprintf(outf,"\n");
+        }
+
+        //if (isVar[n])
+        //    adios_free_varinfo(vi);
+        //else
+        if (!isVar[n])
+            free(value);
+    }
+    /* Free ADIOS_VARINFOs */
+    for (n=0; n<nNames; n++) {
+        if (isVar[n])  {
+            adios_free_varinfo(vis[n]);
         }
-        adios_gclose (gp);
-        free(names);
-        free(isVar);
+    }
+    free(names);
+    free(isVar);
+    return 0;
+}                
+
+
+int doList(const char *path) {
+    ADIOS_FILE  *fp;
+    int     grpid;     // loop vars
+    int     status;
+    int     mpi_comm_dummy=0;
+    int     nGroupsMatched=0;
+    int     nGroups; // number of groups
+    char  **group_namelist;
+    char    init_params[128];
+
+    if (verbose>1) printf("\nADIOS BP open: read header info from %s\n", path);
+
+    // initialize BP reader
+    strcpy (init_params, "verbose=2");
+    if (hidden_attrs)
+        strcat (init_params, ";show_hidden_attrs");
+    status = adios_read_init_method (ADIOS_READ_METHOD_BP, mpi_comm_dummy, init_params);
+    if (status) {
+        fprintf(stderr, "Error: %s\n", adios_errmsg());
+        bpexit(6, 0);
+    }
+
+    // open the BP file
+    fp = adios_read_open_file (path, ADIOS_READ_METHOD_BP, mpi_comm_dummy); 
+    if (fp == NULL) {
+        fprintf(stderr, "Error: %s\n", adios_errmsg());
+        bpexit(7, 0);
+    }
+
+    // get number of groups
+    nGroups = adios_get_grouplist (fp, &group_namelist);
+
+    //, variables, timesteps, and attributes 
+    // all parameters are integers, 
+    // besides the last parameter, which is an array of strings for holding the list of group names
+    //ntsteps = fp->tidx_stop - fp->tidx_start + 1;
+    if (verbose) {
+        printf ("File info:\n");
+        printf ("  of groups:     %d\n", nGroups);
+        printf ("  of variables:  %d\n", fp->nvars);
+        printf ("  of attributes: %d\n", fp->nattrs);
+        printf ("  time steps:    %d - %d\n", fp->current_step, fp->last_step);
+        print_file_size(fp->file_size);
+        printf ("  bp version:    %d\n", fp->version);
+        printf ("  endianness:    %s\n", (fp->endianness ? "Big Endian" : "Little Endian"));
+        if (longopt) 
+            printf ("  statistics:    Min / Max / Avg / Std_dev\n");
+        printf ("\n");
+    }
+
+
+    if (grpmask) {
+        // each group has to be handled separately
+        for (grpid=0; grpid < nGroups; grpid++) {
+            if (!grpMatchesMask(group_namelist[grpid]))
+                continue;
+            nGroupsMatched++;
+            if (!dump) fprintf(outf, "Group %s:\n", group_namelist[grpid]);
+            status = adios_group_view (fp, grpid);
+            if (status) {
+                fprintf(stderr, "Error: %s\n", adios_errmsg());
+                bpexit(8, fp);
+            }
+
+            doList_group (fp);
+
+            adios_group_view (fp, -1); // reset full view (for next group view)
+        }
+    } else {
+        doList_group (fp);
     }
 
     if (grpmask != NULL && nGroupsMatched == 0) {
@@ -703,9 +794,11 @@ int doList(const char *path) {
         fprintf(stderr, "\nError: None of the variables matched any name/regexp you provided\n");
         return 4;
     }
-    adios_fclose (fp);
+    adios_read_close (fp);
     return 0;
-}                
+}
+
+
 
 int print_data_hist(ADIOS_VARINFO * vi, char * varname)
 {
@@ -713,6 +806,7 @@ int print_data_hist(ADIOS_VARINFO * vi, char * varname)
     int i;
     char xtics[512], str[512];
     FILE * out_hist, * out_plot;
+    struct ADIOS_HIST *h = vi->statistics->histogram;
 
     memcpy(hist_file,  varname, strlen(varname) + 1);    
     strcat(hist_file, ".hist");
@@ -734,21 +828,21 @@ int print_data_hist(ADIOS_VARINFO * vi, char * varname)
 
     xtics[0] = '\0';
     strcat(xtics, "set xtics offset start axis (");
-    for (i = 0; i <= vi->hist->num_breaks; i++)
+    for (i = 0; i <= h->num_breaks; i++)
     {
         if (i == 0)
         {
-            fprintf(out_hist, "-Inf %.2lf %u\n", vi->hist->breaks[i], vi->hist->gfrequencies[i]);
+            fprintf(out_hist, "-Inf %.2lf %u\n", h->breaks[i], h->gfrequencies[i]);
             sprintf(str, "\"-Inf\" pos(%d)", i); 
         }
-        else if (i < vi->hist->num_breaks)
+        else if (i < h->num_breaks)
         {
-            fprintf(out_hist, "%.2lf %.2lf %u\n", vi->hist->breaks[i - 1], vi->hist->breaks[i], vi->hist->gfrequencies[i]);
-            sprintf(str, ", \"%.2lf\" pos(%d)", vi->hist->breaks[i - 1], i); 
+            fprintf(out_hist, "%.2lf %.2lf %u\n", h->breaks[i - 1], h->breaks[i], h->gfrequencies[i]);
+            sprintf(str, ", \"%.2lf\" pos(%d)", h->breaks[i - 1], i); 
         }
         else     
         {
-            fprintf(out_hist, "%.2lf Inf %u\n", vi->hist->breaks[i], vi->hist->gfrequencies[i]);
+            fprintf(out_hist, "%.2lf Inf %u\n", h->breaks[i], h->gfrequencies[i]);
             sprintf(str, ", \"Inf\" pos(%d)", i); 
         }
         strcat(xtics, str);
@@ -872,11 +966,13 @@ int getTypeInfo( enum ADIOS_DATATYPES adiosvartype, int* elemsize)
 /** Read data of a variable and print 
  * Return: 0: ok, != 0 on error
  */
-int readVar(ADIOS_GROUP *gp, ADIOS_VARINFO *vi, const char * name)
+int readVar(ADIOS_FILE *fp, ADIOS_VARINFO *vi, const char * name, bool timed)
 {
     int i,j;
     uint64_t start_t[MAX_DIMS], count_t[MAX_DIMS]; // processed <0 values in start/count
     uint64_t s[MAX_DIMS], c[MAX_DIMS]; // for block reading of smaller chunks
+    int tdims;               // number of dimensions including time
+    int tidx;                // 0 or 1 to account for time dimension
     uint64_t nelems;         // number of elements to read
     int elemsize;            // size in bytes of one element
     uint64_t st, ct;
@@ -885,8 +981,9 @@ int readVar(ADIOS_GROUP *gp, ADIOS_VARINFO *vi, const char * name)
     int  maxreadn;          // max number of elements to read once up to a limit (10MB of data)
     int  actualreadn;       // our decision how much to read at once
     int  readn[MAX_DIMS];   // how big chunk to read in in each dimension?
-    int64_t bytes_read;     // retval from adios_get_var()
+    int  status;            
     bool incdim;            // used in incremental reading in
+    ADIOS_SELECTION * sel;  // boundnig box to read
 
     if (getTypeInfo(vi->type, &elemsize)) {
         fprintf(stderr, "Adios type %d (%s) not supported in bpls. var=%s\n", 
@@ -898,31 +995,58 @@ int readVar(ADIOS_GROUP *gp, ADIOS_VARINFO *vi, const char * name)
     // transfer start and count arrays to format dependent arrays
 
     nelems = 1;
+    tidx = 0;
+
+    if (timed) {
+        if (istart[0] < 0)  // negative index means last-|index|
+            st = vi->nsteps+istart[0];
+        else
+            st = istart[0];
+        if (icount[0] < 0)  // negative index means last-|index|+1-start
+            ct = vi->nsteps+icount[0]+1-st;
+        else
+            ct = icount[0];
+
+        if (verbose>2) 
+            printf("    j=0, st=%llu ct=%llu\n", st, ct);
+
+        start_t[0] = st;
+        count_t[0] = ct;
+        nelems *= ct;
+        if (verbose>1) 
+            printf("    s[0]=%llu, c[0]=%llu, n=%llu\n", 
+                    start_t[0], count_t[0], nelems);
+        
+        tidx = 1;
+    }
+    tdims = vi->ndim + tidx;
+
     for (j=0; j<vi->ndim; j++) {
-        if (istart[j] < 0)  // negative index means last-|index|
-            st = vi->dims[j]+istart[j];
+        if (istart[j+tidx] < 0)  // negative index means last-|index|
+            st = vi->dims[j]+istart[j+tidx];
         else
-            st = istart[j];
-        if (icount[j] < 0)  // negative index means last-|index|+1-start
-            ct = vi->dims[j]+icount[j]+1-st;
+            st = istart[j+tidx];
+        if (icount[j+tidx] < 0)  // negative index means last-|index|+1-start
+            ct = vi->dims[j]+icount[j+tidx]+1-st;
         else
-            ct = icount[j];
+            ct = icount[j+tidx];
 
         if (verbose>2) 
-            printf("    j=%d, st=%llu ct=%llu\n", j, st, ct);
+            printf("    j=%d, st=%llu ct=%llu\n", j+tidx, st, ct);
 
-        start_t[j] = st;
-        count_t[j] = ct;
+        start_t[j+tidx] = st;
+        count_t[j+tidx] = ct;
         nelems *= ct;
         if (verbose>1) 
-            printf("    s[%d]=%llu, c[%d]=%llu, n=%llu\n", j, start_t[j], j, count_t[j], nelems);
+            printf("    s[%d]=%llu, c[%d]=%llu, n=%llu\n", 
+                    j+tidx, start_t[j+tidx], j+tidx, count_t[j+tidx], nelems);
     }
 
     if (verbose>1) {
         printf(" total size of data to read = %llu\n", nelems*elemsize);
     }
 
-    print_slice_info(vi->ndim, vi->dims, start_t, count_t);
+    print_slice_info(vi->ndim, vi->dims, timed, vi->nsteps, start_t, count_t);
 
     maxreadn = MAX_BUFFERSIZE/elemsize;
     if (nelems < maxreadn)
@@ -946,7 +1070,7 @@ int readVar(ADIOS_GROUP *gp, ADIOS_VARINFO *vi, const char * name)
     if (verbose>1) printf("Read size strategy:\n");
     sum = (uint64_t) 1;
     actualreadn = (uint64_t) 1;
-    for (i=vi->ndim-1; i>=0; i--) {
+    for (i=tdims-1; i>=0; i--) {
         if (sum >= (uint64_t) maxreadn) {
             readn[i] = 1;
         } else {
@@ -963,7 +1087,7 @@ int readVar(ADIOS_GROUP *gp, ADIOS_VARINFO *vi, const char * name)
 
 
     // init s and c
-    for (j=0; j<vi->ndim; j++) {
+    for (j=0; j<tdims; j++) {
         s[j]=start_t[j];
         c[j]=readn[j];
     }
@@ -974,34 +1098,46 @@ int readVar(ADIOS_GROUP *gp, ADIOS_VARINFO *vi, const char * name)
 
         // how many elements do we read in next?
         actualreadn = 1;
-        for (j=0; j<vi->ndim; j++) 
+        for (j=0; j<tdims; j++) 
             actualreadn *= c[j];
 
         if (verbose>2) {
             printf("adios_read_var name=%s ", name);
-            PRINT_DIMS("  start", s, vi->ndim, j); 
-            PRINT_DIMS("  count", c, vi->ndim, j); 
+            PRINT_DIMS("  start", s, tdims, j); 
+            PRINT_DIMS("  count", c, tdims, j); 
             printf("  read %d elems\n", actualreadn);
         }
 
         // read a slice finally
-        bytes_read = adios_read_var_byid (gp, vi->varid, s, c, data); 
+        sel = adios_selection_boundingbox (vi->ndim, s+tidx, c+tidx);
+        if (timed) {
+            status = adios_schedule_read_byid (fp, sel, vi->varid, s[0], c[0], data); 
+        } else {
+            status = adios_schedule_read_byid (fp, sel, vi->varid, 0, 1, data); 
+        }
 
-        if (bytes_read < 0) {
+        if (status < 0) {
+            fprintf(stderr, "Error when scheduling variable %s for reading. errno=%d : %s \n", name, adios_errno, adios_errmsg());
+            free(data);
+            return 11;
+        }
+
+        status = adios_perform_reads (fp, 1); // blocking read performed here
+        if (status < 0) {
             fprintf(stderr, "Error when reading variable %s. errno=%d : %s \n", name, adios_errno, adios_errmsg());
             free(data);
             return 11;
         }
 
-        if (verbose>2) printf("  read %lld bytes\n", bytes_read);
+        //if (verbose>2) printf("  read %lld bytes\n", bytes_read);
 
         // print slice
-        print_dataset(data, vi->type, s, c, vi->ndim, vi->dims); 
+        print_dataset(data, vi->type, s, c, tdims); 
 
         // prepare for next read
         sum += actualreadn;
         incdim=true; // largest dim should be increased 
-        for (j=vi->ndim-1; j>=0; j--) {
+        for (j=tdims-1; j>=0; j--) {
             if (incdim) {
                 if (s[j]+c[j] == start_t[j]+count_t[j]) {
                     // reached the end of this dimension
@@ -1120,19 +1256,25 @@ void print_stop() {
 
 static int nextcol=0;  // column index to start with (can have lines split in two calls)
 
-void print_slice_info(int ndim, uint64_t *dims, uint64_t *s, uint64_t *c)
+void print_slice_info(int ndim, uint64_t *dims, int timed, int nsteps, uint64_t *s, uint64_t *c)
 {
     // print the slice info in indexing is on and 
     // not the complete variable is read
     int i;
     bool isaslice = false;
+    int tidx = (timed == true);
+    int tdim = ndim + tidx;
+    if (timed) {
+        if (c[0] < nsteps) 
+            isaslice = true;
+    }
     for (i=0; i<ndim; i++) {
-        if (c[i] < dims[i])
+        if (c[i+tidx] < dims[i])
             isaslice = true;
     }
     if (isaslice) {
         fprintf(outf,"%c   slice (%lld:%lld", commentchar, s[0], s[0]+c[0]-1);
-        for (i=1; i<ndim; i++) {
+        for (i=1; i<tdim; i++) {
             fprintf(outf,", %lld:%lld", s[i], s[i]+c[i]-1);
         }
         fprintf(outf,")\n");
@@ -1367,7 +1509,7 @@ int print_data(void *data, int item, enum ADIOS_DATATYPES adiosvartype, bool all
 }
 
 int print_dataset(void *data, enum ADIOS_DATATYPES adiosvartype, 
-        uint64_t *s, uint64_t *c, int ndim, uint64_t *dims)
+        uint64_t *s, uint64_t *c, int tdims)
 {
     int i,item, steps;
     char idxstr[128], vstr[128], buf[16];
@@ -1376,7 +1518,7 @@ int print_dataset(void *data, enum ADIOS_DATATYPES adiosvartype,
 
     // init current indices
     steps = 1;
-    for (i=0; i<ndim; i++) {
+    for (i=0; i<tdims; i++) {
         ids[i] = s[i];
         steps *= c[i];
     }
@@ -1388,9 +1530,9 @@ int print_dataset(void *data, enum ADIOS_DATATYPES adiosvartype,
         // print indices if needed into idxstr;
         idxstr[0] = '\0'; // empty idx string
         if (nextcol == 0) {
-            if (!noindex && ndim > 0) {
+            if (!noindex && tdims > 0) {
                 sprintf(idxstr,"    (%lld",ids[0]);
-                for (i=1; i<ndim; i++) {
+                for (i=1; i<tdims; i++) {
                     sprintf(buf,",%lld",ids[i]);
                     strcat(idxstr, buf);
                 }
@@ -1402,12 +1544,12 @@ int print_dataset(void *data, enum ADIOS_DATATYPES adiosvartype,
         fprintf(outf, "%s", idxstr);
         if (printByteAsChar && (adiosvartype == adios_byte || adiosvartype == adios_unsigned_byte)) {
             /* special case: k-D byte array printed as (k-1)D array of strings */
-            if (ndim == 0) {
+            if (tdims == 0) {
                 print_data_as_string(data, steps, adiosvartype);
             } else {
-                print_data_as_string(data+item, c[ndim-1], adiosvartype); // print data of last dim as string
-                item += c[ndim-1]-1; // will be ++-ed once below
-                ids[ndim-1] = s[ndim-1]+c[ndim-1]-1; // will be rolled below
+                print_data_as_string(data+item, c[tdims-1], adiosvartype); // print data of last dim as string
+                item += c[tdims-1]-1; // will be ++-ed once below
+                ids[tdims-1] = s[tdims-1]+c[tdims-1]-1; // will be rolled below
             }
             nextcol = ncols-1; // force new line, will be ++-ed once below
         } else {
@@ -1424,7 +1566,7 @@ int print_dataset(void *data, enum ADIOS_DATATYPES adiosvartype,
         // increment indices
         item++;
         roll = true;
-        for (i=ndim-1; i>=0; i--) {
+        for (i=tdims-1; i>=0; i--) {
             if (roll) {
                 if (ids[i] == s[i]+c[i]-1 ) {
                     // last index in this dimension, roll upward
diff --git a/utils/bpls/bpls.h b/utils/bpls/bpls.h
index 5ba5664..46f526d 100644
--- a/utils/bpls/bpls.h
+++ b/utils/bpls/bpls.h
@@ -36,14 +36,14 @@ int compile_regexp_masks(void);
 void printSettings(void);
 int  doList(const char *path);
 void mergeLists(int nV, char **listV, int nA, char **listA, char **mlist, bool *isVar);
-int  readVar(ADIOS_GROUP *gp, ADIOS_VARINFO *vi, const char *naQWme);
+int  readVar(ADIOS_FILE *fp, ADIOS_VARINFO *vi, const char *name, bool timed);
 int cmpstringp(const void *p1, const void *p2);
 bool grpMatchesMask(char *name);
 bool matchesAMask(char *name);
 int  print_start(const char *fname);
-void print_slice_info(int ndim, uint64_t *dims, uint64_t *s, uint64_t *c);
+void print_slice_info(int ndim, uint64_t *dims, int timed, int nsteps, uint64_t *s, uint64_t *c);
 int print_data(void *data, int item, enum ADIOS_DATATYPES adiosvartype, bool allowformat);
 int print_dataset(void *data, enum ADIOS_DATATYPES adiosvartype, 
-               uint64_t *s, uint64_t *c, int ndims, uint64_t *dims);  
+               uint64_t *s, uint64_t *c, int tdims);  
 void print_endline(void);
 void print_stop(void);
diff --git a/utils/bpsplit/Makefile.am b/utils/bpsplit/Makefile.am
index bb7556c..094038c 100644
--- a/utils/bpsplit/Makefile.am
+++ b/utils/bpsplit/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = $(all_includes)
-INCLUDES += -I$(top_builddir)/src
+INCLUDES += -I$(top_builddir)/src -I$(top_builddir)/src/public -I$(top_builddir)/src/core
 
 AUTOMAKE_OPTIONS = no-dependencies
 
diff --git a/utils/bpsplit/Makefile.in b/utils/bpsplit/Makefile.in
index 9f9e1c0..db8328b 100644
--- a/utils/bpsplit/Makefile.in
+++ b/utils/bpsplit/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ bin_PROGRAMS = bpsplit$(EXEEXT) bpappend$(EXEEXT) bpgettime$(EXEEXT)
 subdir = utils/bpsplit
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,34 +62,44 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
 am__installdirs = "$(DESTDIR)$(bindir)"
-binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(bin_PROGRAMS)
 am_bpappend_OBJECTS = bpappend-bpappend.$(OBJEXT)
 bpappend_OBJECTS = $(am_bpappend_OBJECTS)
 am__DEPENDENCIES_1 =
 bpappend_DEPENDENCIES = $(top_builddir)/src/libadios_internal_nompi.a \
 	$(am__DEPENDENCIES_1)
+bpappend_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(bpappend_LDFLAGS) \
+	$(LDFLAGS) -o $@
 am_bpgettime_OBJECTS = bpgettime-bpgettime.$(OBJEXT)
 bpgettime_OBJECTS = $(am_bpgettime_OBJECTS)
 bpgettime_DEPENDENCIES =  \
 	$(top_builddir)/src/libadios_internal_nompi.a \
 	$(am__DEPENDENCIES_1)
+bpgettime_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(bpgettime_LDFLAGS) $(LDFLAGS) -o $@
 am_bpsplit_OBJECTS = bpsplit-bpsplit.$(OBJEXT)
 bpsplit_OBJECTS = $(am_bpsplit_OBJECTS)
 bpsplit_DEPENDENCIES = $(top_builddir)/src/libadios_internal_nompi.a \
 	$(am__DEPENDENCIES_1)
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
+bpsplit_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(bpsplit_LDFLAGS) \
+	$(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
 depcomp =
 am__depfiles_maybe =
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \
-	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
-	$(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 CCLD = $(CC)
-LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
-	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+	--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+	$(LDFLAGS) -o $@
 SOURCES = $(bpappend_SOURCES) $(bpgettime_SOURCES) $(bpsplit_SOURCES)
 DIST_SOURCES = $(bpappend_SOURCES) $(bpgettime_SOURCES) \
 	$(bpsplit_SOURCES)
@@ -118,24 +128,24 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 @USE_PARALLEL_COMPILER_TRUE at CC = $(MPICC)
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 @USE_PARALLEL_COMPILER_TRUE at CXX = $(MPICXX)
@@ -143,9 +153,9 @@ CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -154,72 +164,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -230,11 +215,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -242,7 +227,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -268,26 +256,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -299,29 +280,43 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-INCLUDES = $(all_includes) -I$(top_builddir)/src
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+INCLUDES = $(all_includes) -I$(top_builddir)/src \
+	-I$(top_builddir)/src/public -I$(top_builddir)/src/core
 AUTOMAKE_OPTIONS = no-dependencies
 bpsplit_SOURCES = bpsplit.c
 bpsplit_CPPFLAGS = $(ADIOSLIB_EXTRA_CPPFLAGS) $(ADIOSLIB_INT_CPPFLAGS) $(ADIOSLIB_INT_CFLAGS)
@@ -346,14 +341,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/bpsplit/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/bpsplit/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/bpsplit/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/bpsplit/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -371,43 +366,59 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-binPROGRAMS: $(bin_PROGRAMS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(bin_PROGRAMS)'; for p in $$list; do \
-	  p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  if test -f $$p \
-	     || test -f $$p1 \
-	  ; then \
-	    f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
-	   echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	   $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \
-	  else :; fi; \
-	done
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	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)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@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)'; for p in $$list; do \
-	  f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
-	  echo " rm -f $$p $$f"; \
-	  rm -f $$p $$f ; \
-	done
+	@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
 bpappend$(EXEEXT): $(bpappend_OBJECTS) $(bpappend_DEPENDENCIES) 
 	@rm -f bpappend$(EXEEXT)
-	$(LINK) $(bpappend_LDFLAGS) $(bpappend_OBJECTS) $(bpappend_LDADD) $(LIBS)
+	$(bpappend_LINK) $(bpappend_OBJECTS) $(bpappend_LDADD) $(LIBS)
 bpgettime$(EXEEXT): $(bpgettime_OBJECTS) $(bpgettime_DEPENDENCIES) 
 	@rm -f bpgettime$(EXEEXT)
-	$(LINK) $(bpgettime_LDFLAGS) $(bpgettime_OBJECTS) $(bpgettime_LDADD) $(LIBS)
+	$(bpgettime_LINK) $(bpgettime_OBJECTS) $(bpgettime_LDADD) $(LIBS)
 bpsplit$(EXEEXT): $(bpsplit_OBJECTS) $(bpsplit_DEPENDENCIES) 
 	@rm -f bpsplit$(EXEEXT)
-	$(LINK) $(bpsplit_LDFLAGS) $(bpsplit_OBJECTS) $(bpsplit_LDADD) $(LIBS)
+	$(bpsplit_LINK) $(bpsplit_OBJECTS) $(bpsplit_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT)
@@ -448,82 +459,85 @@ mostlyclean-libtool:
 clean-libtool:
 	-rm -rf .libs _libs
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
-
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -532,7 +546,7 @@ check: check-am
 all-am: Makefile $(PROGRAMS)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -554,6 +568,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -565,7 +580,7 @@ clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
 distclean: distclean-am
 	-rm -f Makefile
 distclean-am: clean-am distclean-compile distclean-generic \
-	distclean-libtool distclean-tags
+	distclean-tags
 
 dvi: dvi-am
 
@@ -573,18 +588,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am: install-binPROGRAMS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -604,19 +639,24 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-info-am
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
 	clean-generic clean-libtool ctags distclean distclean-compile \
 	distclean-generic distclean-libtool distclean-tags distdir dvi \
 	dvi-am html html-am info info-am install install-am \
-	install-binPROGRAMS install-data install-data-am install-exec \
-	install-exec-am install-info install-info-am install-man \
+	install-binPROGRAMS 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-compile mostlyclean-generic mostlyclean-libtool \
 	pdf pdf-am ps ps-am tags uninstall uninstall-am \
-	uninstall-binPROGRAMS uninstall-info-am
+	uninstall-binPROGRAMS
+
 
 # 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 --git a/utils/gpp/Makefile.am b/utils/gpp/Makefile.am
index 5331e12..3084eae 100644
--- a/utils/gpp/Makefile.am
+++ b/utils/gpp/Makefile.am
@@ -1,2 +1,2 @@
-dist_bin_SCRIPTS = gpp.py xmlparser.py gpp_types.py
+dist_bin_SCRIPTS = gpp.py ad_config.py type_mapper.py
 
diff --git a/utils/gpp/Makefile.in b/utils/gpp/Makefile.in
index 21d24ca..81f4c12 100644
--- a/utils/gpp/Makefile.in
+++ b/utils/gpp/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -40,7 +38,9 @@ subdir = utils/gpp
 DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,8 +62,29 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = 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__installdirs = "$(DESTDIR)$(bindir)"
-dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 SCRIPTS = $(dist_bin_SCRIPTS)
 SOURCES =
 DIST_SOURCES =
@@ -90,32 +111,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -124,72 +145,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -200,11 +196,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -212,7 +208,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -238,26 +237,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -269,29 +261,42 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-dist_bin_SCRIPTS = gpp.py xmlparser.py gpp_types.py
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+dist_bin_SCRIPTS = gpp.py ad_config.py type_mapper.py
 all: all-am
 
 .SUFFIXES:
@@ -299,14 +304,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/gpp/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/gpp/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/gpp/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/gpp/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -324,35 +329,47 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
 install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
 	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(dist_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 \
-	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-	    echo " $(dist_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	    $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
-	  else :; fi; \
-	done
+	  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-dist_binSCRIPTS:
 	@$(NORMAL_UNINSTALL)
-	@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+	@list='$(dist_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
 
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
-
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
 tags: TAGS
 TAGS:
 
@@ -361,29 +378,32 @@ CTAGS:
 
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
@@ -392,7 +412,7 @@ check: check-am
 all-am: Makefile $(SCRIPTS)
 installdirs:
 	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -414,6 +434,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -424,7 +445,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -432,18 +453,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
 install-data-am:
 
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
 install-exec-am: install-dist_binSCRIPTS
 
+install-html: install-html-am
+
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -462,18 +503,22 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-dist_binSCRIPTS uninstall-info-am
+uninstall-am: uninstall-dist_binSCRIPTS
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am 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-dist_binSCRIPTS \
-	install-exec install-exec-am install-info install-info-am \
-	install-man install-strip installcheck installcheck-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 uninstall uninstall-am uninstall-dist_binSCRIPTS \
-	uninstall-info-am
+	ps ps-am uninstall uninstall-am uninstall-dist_binSCRIPTS
+
 
 # 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 --git a/utils/gpp/ad_config.py b/utils/gpp/ad_config.py
new file mode 100755
index 0000000..577be79
--- /dev/null
+++ b/utils/gpp/ad_config.py
@@ -0,0 +1,195 @@
+import xml.dom.minidom
+import type_mapper
+
+class adiosConfig:
+
+    def __init__ (self, config_file_name):
+
+        self.config_file_name = config_file_name
+
+        #This would be a good time to parse the file...
+        doc = xml.dom.minidom.parse (config_file_name)
+        nodes = doc.childNodes
+        if (nodes.length != 1):
+            print 'malformed adios config file, should contain only a single adios-config element'
+            raise SystemExit
+        self.config_node = nodes[0]
+
+        # for each of the groups, instantiate an adiosGroup object, and store in self.adios_groups
+        self.adios_groups = []
+        self.methods = []
+        self.buffer = None
+    
+        for node in self.config_node.getElementsByTagName ('adios-group'):
+            self.adios_groups.append (adiosGroup (node) )
+
+        for node in self.config_node.getElementsByTagName ('method'):
+            self.methods.append (method (node) )
+
+        for node in self.config_node.getElementsByTagName ('buffer'):
+            # there should be only one of these... this code ignores all but the last one.
+            self.buffer = buffer (node)
+
+        # We are currently ignoring any analysis declarations
+
+
+    def get_filename (self):
+        return self.config_file_name
+
+    def get_groups (self):
+        return self.adios_groups
+
+    def get_buffer (self):
+        #return the buffer info
+        print 'get_buffer is not yet implemented'
+
+    def get_host_language (self):
+        return self.config_node.getAttribute ('host-language')
+
+
+class adiosGroup:
+
+    def __init__ (self, group_node):
+        self.group_node = group_node
+
+        self.time_index = self.group_node.getAttribute ('time-index')
+
+        self.vars = []
+        self.vardict = {}
+        self.vars_and_gwrites_and_attrs = []
+
+        self.attrs = []
+        self.attrdict = {}
+
+        for node in self.group_node.childNodes:
+            if node.localName == 'var':
+                newvar = var (node, self, self.time_index)
+                self.vars.append (newvar)
+                self.vardict [newvar.get_name()] = newvar
+                self.vars_and_gwrites_and_attrs.append (newvar)
+            #elif node.localName == 'attribute':
+                #handle attribute
+
+            elif node.localName == 'gwrite':
+                self.vars_and_gwrites_and_attrs.append (gwrite (node) )
+
+            elif node.localName == 'global-bounds':
+                for gb_node in node.childNodes:
+                    if gb_node.localName == 'var':
+                        newvar = var (gb_node, self, self.time_index)
+                        self.vars.append (newvar)
+                        self.vardict [newvar.get_name()] = newvar
+                        self.vars_and_gwrites_and_attrs.append (newvar)
+                    elif gb_node.localName == 'gwrite':
+                        self.vars_and_gwrites_and_attrs.append (gwrite (node) )
+            
+            elif node.localName == 'attribute':
+                newattr = attr (node)
+                self.attrs.append (newattr)
+                self.attrdict [newattr.get_name()] = newattr
+                self.vars_and_gwrites_and_attrs.append (newattr)
+
+
+    # Returns the name of the group
+    def get_name (self):
+        return self.group_node.getAttribute ('name')
+
+    # Returns a list of var objects for all of the variables in the group
+    def get_vars (self):
+        return self.vars
+
+    # Returns the variable from this group with the specified name, or None
+    def get_var (self, varname):
+        if self.vardict.has_key (varname):
+            return self.vardict [varname]
+
+        return None
+
+
+    # Returns a list containing all of the vars and gwrites and attributes in the same order
+    # as was specified in the xml
+    def get_ordered_contents (self):
+        return self.vars_and_gwrites_and_attrs
+
+
+class gwrite:
+    def __init__(self, gwrite_node):
+        self.gwrite_text = gwrite_node.getAttribute ('src')
+
+    def get_src (self):
+        return self.gwrite_text
+
+
+class method:
+    def __init__ (self, method_node):
+        self.method_node = method_node
+
+
+class buffer:
+    def __init__ (self, buffer_node):
+        self.buffer_node = buffer_node
+
+
+class var:
+
+    def __init__ (self, var_node, group, time_index=None, global_bounds_node=None):
+        self.var_node = var_node
+        self.group = group
+        self.time_index = time_index
+        self.global_bounds_node = global_bounds_node
+
+    def get_name (self):
+        name = self.var_node.getAttribute ('name')
+        return name
+
+    def get_gwrite (self):
+        gw = self.var_node.getAttribute ('gwrite')
+
+        if (gw == ''):
+            gw = self.get_name()
+    
+        return gw
+
+    def get_group (self):
+        return self.group
+
+    def get_c_type (self):
+        return type_mapper.get_c_type (self.var_node.getAttribute ('type') )
+
+    def get_type (self):
+        return self.var_node.getAttribute ('type')
+
+    def get_dimensions (self):
+        if (self.var_node.getAttribute ('dimensions') == ''):
+            return None
+        else:
+            # place the dimensions in a list and remove the time-index if it is there.
+            dims = filter (lambda x : x != self.time_index, self.var_node.getAttribute ('dimensions').split(',') )
+            cleandims = []
+            for d in dims:
+
+                if d.isdigit():
+                    cleandims.append (d)
+                    continue
+
+                # Here we need to translate the variable name for this dimension (if it's a var) into the gwrite 
+                # for that variable
+                dim_var = self.get_group().get_var (d)				
+                if dim_var != None:
+                    d = dim_var.get_gwrite()
+
+                cleandims.append (d)
+            return cleandims
+
+    def is_scalar (self):
+        return self.get_dimensions() == None
+
+
+class attr:
+
+    def __init__ (self, attr_node):
+        self.attr_node = attr_node
+
+    def get_name (self):
+        return self.attr_node.getAttribute ('name')
+
diff --git a/utils/gpp/gpp.py b/utils/gpp/gpp.py
index 00caa64..af27848 100755
--- a/utils/gpp/gpp.py
+++ b/utils/gpp/gpp.py
@@ -1,19 +1,13 @@
 #!/usr/bin/env python
-import os
+
 import sys
-import xml.dom.minidom
-import dircache
-import xmlparser 
-from time import sleep
+import os
 
-currentdir=os.curdir
-def callback(arg, dirname,fnames):
-    for filename in fnames: #os.listdir(dirname):
-        if(filename.endswith(".F90") or filename.endswith(".f90") or filename.endswith(".F95")
-            or filename.endswith(".f95") or filename.endswith(".c")):
-           arg.append(filename)
+import ad_config
+import type_mapper
 
 
+# checkXML attempts to call adios_lint to verify that adios will accept the xml file as valid
 def checkXML (config_file, path):
     if path == '':
         adios_lint = 'adios_lint '
@@ -30,38 +24,243 @@ def checkXML (config_file, path):
         return 'failure'
 
 
-def main(argv=None):
+def get_c_groupsize_code (group):
+    groupsize_code_string = ''
+    groupsize_code_string += 'adios_groupsize = '
+    for v in group.get_vars():
+        if v.is_scalar():
+            if v.get_type() != 'string':
+                groupsize_code_string += ('%d' % type_mapper.get_size (v.get_type() ) + ' \\\n                + ')
+            else:
+                groupsize_code_string += ('strlen(' + v.get_gwrite() + ')' + ' \\\n                + ')
+        else:
+            groupsize_code_string += ('%d * ' % type_mapper.get_size (v.get_type() ) )
+
+            for d in v.get_dimensions():
+                # need to check whether this is the timestep
+                groupsize_code_string += '(' + d + ') * '
+
+            groupsize_code_string = groupsize_code_string.rstrip ('* ')
+
+            groupsize_code_string += (' \\\n                + ')
+
+    # remove the final +\, and add the ;
+    groupsize_code_string = groupsize_code_string.rstrip('+\\\n ') + ';'
+
+    groupsize_code_string += '\nadios_group_size (adios_handle, adios_groupsize, &adios_totalsize);'
+
+    return groupsize_code_string;
+
+
+def get_fortran_groupsize_code (group):
+    groupsize_code_string = ''
+    groupsize_code_string += 'adios_groupsize = '
+    for v in group.get_vars():
+        if (v.is_scalar() ):
+            groupsize_code_string += ('%d' % type_mapper.get_size (v.get_type() ) + ' &\n                + ')
+        else:
+            groupsize_code_string += ('%d * ' % type_mapper.get_size (v.get_type() ) )
+
+            for d in v.get_dimensions():
+                # need to check whether this is the timestep
+                groupsize_code_string += '(' + d + ') * '
+
+            groupsize_code_string = groupsize_code_string.rstrip ('* ')
+
+            groupsize_code_string += (' &\n                + ')
+
+    # remove the final &+
+    groupsize_code_string = groupsize_code_string.rstrip('+\n &') 
+
+    groupsize_code_string += '\ncall adios_group_size (adios_handle, adios_groupsize, adios_totalsize, adios_err)'
+
+    return groupsize_code_string;
+
+
+def get_fortran_write_statements (group):
+
+    statements = ""
+
+    for item in group.get_ordered_contents():
+
+        if item.__class__.__name__ == 'gwrite':
+            statements += '\n' + item.get_src() 
+            continue
+
+        if item.__class__.__name__ == 'attr':
+            # Ignore the attributes for now
+            continue
+
+        # Otherwise, the item must be a variable
+        var = item
+
+        statements += '\ncall adios_write (adios_handle, "' + var.get_name() + '", ' + var.get_gwrite() + ', adios_err)'
+
+    statements += '\n'
+    return statements
+
+
+
+def get_c_write_statements (group):
+
+    statements = ""
+
+    for item in group.get_ordered_contents():
+
+        if item.__class__.__name__ == 'gwrite':
+            statements += '\n' + item.get_src() 
+            continue
+
+        if item.__class__.__name__ == 'attr':
+            # Ignore the attributes for now
+            continue
+
+        # Otherwise, the item must be a variable
+        var = item
+
+        # The tricky bit here is deciding whether we need the & before the variable name.
+        # We omit it in two cases: 1) the variable type is string, or 2) the variable is not a scalar
+        if (var.get_c_type() == 'string' or var.get_dimensions() != None):
+            var_prefix = ''
+        else:
+            var_prefix = '&'
+
+        statements += '\nadios_write (adios_handle, "' + var.get_name() + '", ' + var_prefix + var.get_gwrite() + ');'
+
+    statements += '\n'
+    return statements
+
+
+def get_fortran_read_statements (group):
+
+    statements = ""
+    # Make a selection to capture writes done by the corresponding process in the writing application
+    statements += 'call adios_selection_writeblock (s, rank)\n'
 
+    for var in group.get_vars():
+        if var.get_dimensions() == None:
+            continue
+
+        statements += 'call adios_schedule_read (fp, s, "' + var.get_name() + '", 1, 1, ' + var.get_gwrite() + ', adios_err)\n'
+
+    statements += '\ncall adios_perform_reads (fp, adios_err)\n'
+    statements += 'call adios_selection_delete (s)\n'
+    return statements
+
+
+def get_c_read_statements (group):
+
+    statements = ""
+    # Make a selection to capture writes done by the corresponding process in the writing application
+    statements += 's = adios_selection_writeblock (rank);\n'
+    #statements += 'uint64_t counts[64];\n'
+
+    for var in group.get_vars():
+        if var.get_dimensions() == None:
+            continue
+
+        # The tricky bit here is deciding whether we need the & before the variable name.
+        # We omit it in two cases: 1) the variable type is string, or 2) the variable is not a scalar
+        if (var.get_c_type() == 'string' or var.get_dimensions() != None):
+            var_prefix = ''
+        else:
+            var_prefix = '&'
+
+        statements += 'adios_schedule_read (fp, s, "' + var.get_name() + '", 1, 1, ' + var_prefix + var.get_gwrite() + ');\n'
+
+    statements += 'adios_perform_reads (fp, 1);\n'
+    statements += 'adios_selection_delete (s);\n'
+    return statements
+
+
+
+def generate_fortran (config):
+
+    # Output a gwrite_*.fh file for each group in the config
+    for group in config.get_groups():
+        # Open file - the filename is gwrite_<group>.fh
+        gwfile = open ('gwrite_' + group.get_name() + '.fh', 'w')
+
+        # Set groupsize
+        gwfile.write (get_fortran_groupsize_code (group) )
+
+        # Write vars
+        gwfile.write (get_fortran_write_statements (group) )
+
+        # Close file
+        gwfile.close()
+
+    # Output a gread_*.fh file for each group in the config
+    for group in config.get_groups():
+        # Open file - the filename is gread_<group>.fh
+        grfile = open ('gread_' + group.get_name() + '.fh', 'w')
+
+        # Read vars
+        grfile.write (get_fortran_read_statements (group) )
+
+        # Close file
+        grfile.close()
+
+
+def generate_c (config):
+    #print "c"
+
+    # Output a gwrite_*.ch file for each group in the config
+    for group in config.get_groups():
+        # Open file - the filename is gwrite_<group>.ch
+        gwfile = open ('gwrite_' + group.get_name() + '.ch', 'w')
+
+        # Set groupsize
+        gwfile.write (get_c_groupsize_code (group) )
+
+        # Write vars
+        gwfile.write (get_c_write_statements (group) )
+
+        # Close ch file
+        gwfile.close()
+
+    # Output a gread_*.ch file for each group in the config
+    for group in config.get_groups():
+        # Open file - the filename is gread_<group>.ch
+        grfile = open ('gread_' + group.get_name() + '.ch', 'w')
+
+        # Read vars
+        grfile.write (get_c_read_statements (group) )
+
+        # Close ch file
+        grfile.close()
+
+
+def main (argv=None):
+  
+    # Must be called with one argument, the name of the xml file
     if len (sys.argv) != 2:
         print 'Usage: gpp.py <config file>\n'
         return 1
 
-    check_val = checkXML (sys.argv[1], os.path.dirname(sys.argv[0])) 
+
+    # If possible, run adios_lint to catch malformed config files
+    check_val = checkXML (sys.argv[1], os.path.dirname(sys.argv[0]))
     if check_val != 'success':
         return 1
 
-    global vardict
-    vardict = xmlparser.getVarlistFromXML(sys.argv[1])
-    for fname in vardict:
-        #line=xmlparser.sizestr[fname]
-        line = ""
-        if(xmlparser.language_group_dict[fname]==1):
-           wfile= open("gwrite_"+fname+".fh","w") 
-           rfile= open("gread_"+fname+".fh","w")
-	   rfile.write("adios_groupsize = 0\n"); 
-	   rfile.write("adios_totalsize = 0\n"); 
-        elif(xmlparser.language_group_dict[fname]==2):
-           wfile= open("gwrite_"+fname+".ch","w") 
-           rfile= open("gread_"+fname+".ch","w")
-	   rfile.write("adios_groupsize = 0;\n"); 
-	   rfile.write("adios_totalsize = 0;\n"); 
-        wfile.write(line); 
-        rfile.write(line); 
-        linerw = vardict[fname]
-        wfile.write(linerw[0])
-        rfile.write(linerw[1]) 
-        wfile.close()
-        rfile.close() 
-
-if __name__=="__main__":
-   main()
+
+    # The ad_config object provides all relevant info from the XML file
+    config = ad_config.adiosConfig (sys.argv[1])
+
+
+    # Now just call the generator for the specified language
+    lang = config.get_host_language().lower()
+    if lang == 'fortran':
+        generate_fortran (config)
+    elif lang == 'c' or lang == 'cpp':
+        generate_c (config)
+    else:
+        print "Fatal: Language unknown or unspecified"
+        raise SystemExit
+
+
+
+if __name__ == "__main__":
+    main()
+
diff --git a/utils/gpp/gpp_types.py b/utils/gpp/gpp_types.py
deleted file mode 100644
index 2b1ce42..0000000
--- a/utils/gpp/gpp_types.py
+++ /dev/null
@@ -1,45 +0,0 @@
-import sys
-import os
-
-adios_size={}
-adios_size["byte"]=1
-adios_size["integer*1"]=1
-
-adios_size["short"]=2
-adios_size["integer*2"]=2
-
-adios_size["integer"]=4
-adios_size["integer*4"]=4
-
-adios_size["string"]=1
-adios_size["long"]=8
-adios_size["integer*8"]=8
-
-adios_size["unsigned byte"]=1
-adios_size["unsigned integer*1"]=1
-
-adios_size["unsigned short"]=2
-adios_size["unsigned integer*2"]=2
-
-adios_size["unsigned integer"]=4
-adios_size["unsigned integer*4"]=4
-
-adios_size["unsigned long"]=8
-adios_size["unsigned integer*8"]=8
-
-adios_size["real"]=4
-adios_size["real*4"]=4
-adios_size["float"]=4
-
-adios_size["unsigned real"]=4
-adios_size["unsigned real*4"]=4
-adios_size["unsigned float"]=4
-
-adios_size["real*8"]=8
-adios_size["double"]=8
-
-adios_size["unsigned real*8"]=8
-adios_size["unsigned double"]=8
-
-adios_size["complex"]=8
-adios_size["double complex"]=16
diff --git a/utils/gpp/type_mapper.py b/utils/gpp/type_mapper.py
new file mode 100755
index 0000000..97b9db3
--- /dev/null
+++ b/utils/gpp/type_mapper.py
@@ -0,0 +1,108 @@
+
+
+c_types = {
+    'string' : 'string',
+    'byte' : 'unsigned char',
+    'integer*1' : 'char',
+    'short' : 'short',
+    'integer*2' : 'short',
+    'integer' : 'int',
+    'integer*4' : 'int',
+    'long' : 'long',
+    'integer*8' : 'long',
+    'unsigned byte' : 'unsigned byte',
+    'unsigned integer*1' : 'unsigned byte',
+    'unsigned short' : 'unsigned short',
+    'unsigned integer*2' : 'unsigned short',
+    'unsigned integer' : 'unsigned integer',
+    'unsigned integer*4' : 'unsigned integer',
+    'unsigned long' : 'unsigned long',
+    'unsigned integer*8' : 'unsigned long',
+    'float' : 'float',
+    'real' : 'float',
+    'real*4' : 'float',
+    'unsigned float' : 'unsigned float',
+    'unsigned real' : 'unsigned float',
+    'unsigned real*4' : 'unsigned float',
+    'double' : 'double',
+    'real*8' : 'double',
+    'unsigned double' : 'unsigned double',
+    'unsigned real*8' : 'unsigned double',
+    'complex' : 'complex',
+    'double complex' : 'double complex'
+}
+
+fortran_types = {
+    'string' : 'string',
+    'byte' : 'integer*1',
+    'integer*1' : 'integer*1',
+    'short' : 'integer*2',
+    'integer*2' : 'integer*2',
+    'integer' : 'integer*4',
+    'integer*4' : 'integer*4',
+    'long' : 'integer*8',
+    'integer*8' : 'integer*8',
+    'unsigned byte' : 'unsigned integer*1',
+    'unsigned integer*1' : 'unsigned integer*1',
+    'unsigned short' : 'unsigned integer*2',
+    'unsigned integer*2' : 'unsigned integer*2',
+    'unsigned integer' : 'unsigned integer*4',
+    'unsigned integer*4' : 'unsigned integer*4',
+    'unsigned long' : 'unsigned integer*8',
+    'unsigned integer*8' : 'unsigned integer*8',
+    'float' : 'real*4',
+    'real' : 'real*4',
+    'real*4' : 'real*4',
+    'unsigned float' : 'unsigned real*4',
+    'unsigned real' : 'unsigned real*4',
+    'unsigned real*4' : 'unsigned real*4',
+    'double' : 'real*8',
+    'real*8' : 'real*8',
+    'unsigned double' : 'unsigned real*8',
+    'unsigned real*8' : 'unsigned real*8',
+    'complex' : 'complex',
+    'double complex' : 'double complex'
+}
+
+type_sizes = {
+    'string' : 1,
+    'byte' : 1,
+    'integer*1' : 1,
+    'short' : 2,
+    'integer*2' : 2,
+    'integer' : 4,
+    'integer*4' : 4,
+    'long' : 8,
+    'integer*8' : 8,
+    'unsigned byte' : 1,
+    'unsigned integer*1' : 1,
+    'unsigned short' : 2,
+    'unsigned integer*2' : 2,
+    'unsigned integer' : 4,
+    'unsigned integer*4' : 4,
+    'unsigned long' : 8,
+    'unsigned integer*8' : 8,
+    'float' : 4,
+    'real' : 4,
+    'real*4' : 4,
+    'unsigned float' : 4,
+    'unsigned real' : 4,
+    'unsigned real*4' : 4,
+    'double' : 8,
+    'real*8' : 8,
+    'unsigned double' : 8,
+    'unsigned real*8' : 8,
+    'complex' : 8,
+    'double complex' : 16
+}
+
+def get_c_type (parsed_type):
+    return c_types [parsed_type]
+
+def get_fortran_type (parsed_type):
+    return fortran_types [parsed_type]
+
+def get_size (parsed_type):
+    return type_sizes [parsed_type]
+
+
diff --git a/utils/gpp/xmlparser.py b/utils/gpp/xmlparser.py
deleted file mode 100644
index 7c15b4f..0000000
--- a/utils/gpp/xmlparser.py
+++ /dev/null
@@ -1,335 +0,0 @@
-#!/usr/bin/env python
-import sys
-import os
-import xml.dom.minidom
-import gpp_types 
-from time import sleep
-
-sizeformular=[]
-sizestr={}
-getsize=gpp_types.adios_size
-var_size_dict={}
-
-def processvar(node,language_sw,coord_comm,coord_var,time_var):
-    global sizeformular
-    global var_gname_dict 
-    global var_size_dict 
-    line=""
-    liner=""
-    linew=""
-    linerw={}
-########################################################          
-# Modified Code: Case Insensitive
-########################################################          
-    attkeys=node.attributes.keys()
-    varname=""
-    typename="" 
-    pathname="" 
-    dimsname=""
-    gwname=""
-    grname=""
-    readyn = True 
-    for akey in attkeys:
-        akeystr=str(akey).lower()
-        if(akeystr=="dimensions"):
-           dimsname=node.attributes[akey].value
-        elif(akeystr=="type"):
-           typename=node.attributes[akey].value
-        elif(akeystr=="path"):
-           pathname=node.attributes[akey].value
-        elif(akeystr=="name"):
-           varname=node.attributes[akey].value
-        elif(akeystr=="gwrite"):
-           gwname=node.attributes[akey].value
-        elif(akeystr=="gread"):
-           grname=node.attributes[akey].value
-        elif(akeystr=="read"):
-           if(node.attributes[akey].value=='no'):
-              readyn = False
-    if(varname=="" or typename==""):
-       print "Warning: empty varname or type for adiosgroup: "+node.nodeName
-    if(gwname==""):
-       gwname=varname
-    if(grname==""):
-       grname=varname
-    for c in grname:
-       if (c == '+' or c == '-' or c == '*' or c == '/' or c == '^' or c == '**'):
-          readyn = False
-    if(var_gname_dict.has_key(varname)):
-       if(pathname!="" and pathname[len(pathname)-1]!='/'):
-          varname=pathname+'/'+varname
-       var_gname_dict[varname] = gwname 
-    else:
-       var_gname_dict[varname] = gwname 
-
-# Add var-size-mapping   
-    line="" 
-    if (dimsname==""):
-       if (typename=="string"):
-           if (language_sw==1):
-               line="len_trim("+gwname+")" 
-               liner="len("+grname+")" 
-           else:        
-               line="strlen("+gwname+")" 
-               # FIXME: we do not know how much space do we have in the 
-               #  variable when reading a string into it. 
-               #  we just give a stupidly big number (2GB) here and if the
-               #  space allocated is less then what is read in,
-               #  that is considered to be the responsibility of the programmer
-               liner="2147483648" 
-       else:
-           line=str(getsize[typename])
-           if (readyn==True):
-                liner=line 
-    else:
-       str_varsize=str(getsize[typename])
-       dimsarr=dimsname.split(',');
-       for dimsele in dimsarr:
-         if(dimsele==dimsarr[0]):
-            if(dimsele.isdigit()):
-               line=str_varsize+' * '+'('+dimsele+')'
-            elif(var_gname_dict.has_key(dimsele)):
-               line=str_varsize+' * '+'('+var_gname_dict[dimsele]+')'
-            else:
-               line=str_varsize
-         else:
-            if(dimsele.isdigit()):
-               line = line+' * '+'('+dimsele+')'
-            elif(dimsele == time_var):
-               line = line
-            elif(var_gname_dict.has_key(dimsele)):
-               line = line + ' * (' + var_gname_dict[dimsele]+')'
-            else: 
-               line = line
-       if (readyn==True):
-           liner = line
-    sizeformular.append(line)    
-    var_size_dict[varname]=line
-
-    if (language_sw==1):
-        linew = "call adios_write (adios_handle, "   \
-              + "\""+varname+"\", "         \
-              + gwname +", adios_err)\n"         
-        if (readyn): 
-           liner = "adios_buf_size = "+liner                 \
-                 + "\ncall adios_read (adios_handle, " \
-                 + "\"" + varname                      \
-                 + "\", " + grname            \
-                 + ", adios_buf_size, adios_err)\n"
-    elif(language_sw==2):
-        if (dimsname==""):
-           if(typename=="string"): 
-              linew = "adios_write (adios_handle, "          \
-                 + "\"" + varname + "\", "                   \
-                 + gwname + ");\n"                         
-           else: 
-              linew = "adios_write (adios_handle, "          \
-                 + "\"" + varname + "\", &"                  \
-                 + gwname + ");\n"                         
-           if (readyn):
-             if(typename=="string"): 
-               liner = "adios_buf_size = "+liner                  \
-                     + ";\nadios_read (adios_handle, "      \
-                     + "\"" + varname + "\", "             \
-                     + grname + ", adios_buf_size);\n"
-             else: 
-               liner = "adios_buf_size = "+liner                  \
-                     + ";\nadios_read (adios_handle, "      \
-                     + "\"" + varname + "\", &"             \
-                     + grname + ", adios_buf_size);\n"
-        else: 
-           linew = "adios_write (adios_handle, "         \
-                 + "\"" + varname + "\", "               \
-                 + gwname + ");\n"                         
-           if (readyn): 
-              liner = "adios_buf_size = " +liner                 \
-                     + ";\nadios_read (adios_handle, " \
-                     + "\"" + varname + "\", "               \
-                     + grname + ", adios_buf_size);\n"
-    linerw=[linew,liner]
-    return linerw
-
-def processattr(node, language_sw):
-    global sizeformular
-    global var_gname_dict
-    attkeys=node.attributes.keys()
-    attrname=""
-    varname=""
-    pathname=""
-    valuename=""
-    typename="" 
-    for akey in attkeys:
-        akeystr=str(akey).lower()
-        if ( akeystr == 'name'):
-           attrname = node.attributes[akey].value 
-        elif ( akeystr == 'path'):
-           pathname = node.attributes[akey].value 
-        elif ( akeystr == 'value'):
-           valuename = node.attributes[akey].value 
-        elif (akeystr == 'type'):
-           typename = node.attributes[akey].value 
-        elif ( akeystr == 'var'):
-           varname=node.attributes[akey].value
-        else:
-           print "\""+pathname+attrname+"\" is not declared before the attribute \"" \
-                     +node.attributes["name"].value+"\""
-    if (valuename != ''):
-       if (typename != ''):
-           var_gname_dict[pathname+attrname] = valuename
-           var_gname_dict[attrname] = valuename
-    elif (varname != ""):
-       var_gname_dict[attrname] = var_gname_dict[varname]
-         
-def processnode(nodelist,language_sw,coord_comm,coord_var,time_var):
-   global items,sizeformular
-   for node in nodelist:
-       if (node.nodeType==node.ELEMENT_NODE and node.nodeName.lower()=="var"):
-           itemsrw=(processvar(node,language_sw,coord_comm,coord_var,time_var))
-           items[0] = items[0] + itemsrw[0]
-           items[1] = items[1] + itemsrw[1]
-       if (node.nodeType==node.ELEMENT_NODE and node.nodeName.lower()=="attribute"):
-           processattr(node,language_sw)
-       elif (node.nodeType==node.ELEMENT_NODE and node.nodeName.lower()=="gwrite"):
-           srccode =str(node.getAttribute("src"))
-           items [0] = items[0] + srccode + "\n"
-           items [1] = items[1] + srccode + "\n"
-       subnodelist=node.childNodes
-       processnode(subnodelist,language_sw,coord_comm,coord_var,time_var)
-
-def getVarlistFromXML(xmlFile):
-    global items,sizeformular, language_group_dict,var_gname_dict,var_size_dict 
-    var_gname_dict={}
-    items={}
-    items=["",""]
-    language_group_dict={}
-    variables={}
-    doc=xml.dom.minidom.parse(xmlFile)# parse an XML file by name
-    idx=0
-    group=doc.childNodes
-    if(group.length!=1):
-       print "Fatal: adios-config should be one and only one!"
-       raise SystemExit
-    root=group[0]
-    if(root.tagName.lower()!="adios-config"):
-       print "Fatal: wrong root element, switch to adios-config"  
-       raise SystemExit
-    attnum=len(root.attributes.keys())
-    if (attnum==0) :
-        language_flag=1
-    elif(attnum==1):
-        attkeys=root.attributes.keys()
-        if(str(attkeys[0]).lower()=="host-language"):
-           language=group[0].getAttribute(attkeys[0])
-        if (language.lower()=="fortran"):
-            language_flag=1
-        elif(language.lower()=="c" or language.lower()=="cpp"):
-            language_flag=2
-        else:
-            language_flag==-1
-            print "Fatal: Unknown language supported!"
-            raise SystemExit
-    gname=""
-    time_var = ""
-    coord_var = ""
-    coord_comm = "MPI_COMM_WORLD"
-    for group in root.childNodes:
-      if (group.nodeType==group.ELEMENT_NODE): 
-        if (group.tagName.lower()=="adios-group"): 
-            indent=""
-            attkeys=group.attributes.keys()
-            glanguage=language_flag
-            for akey in attkeys:
-                akeystr=str(akey).lower()
-                if (akeystr=="name"):
-                    gname=group.attributes[akey].value
-                elif (akeystr == "coordination-communicator"):
-                    coord_comm=group.attributes[akey].value
-                elif (akeystr == "coordination-var"):
-                    coord_var=group.attributes[akey].value
-                elif (akeystr=="host-language"):
-                    language=group.attributes[akey].value
-                    if (language.lower()=="fortran"):
-                               glanguage=1
-                    elif(language.lower()=="c" or language.lower()=="cpp"):
-                        glanguage=2
-                    else:
-                        glanguage==-1
-                        print "Fatal: Unknown language supported!"
-                        raise SystemExit
-                elif (akeystr == "time-index"):
-                    time_var = group.attributes[akey].value
-                else:
-                    print "Warning: Unknown attribute --"+str(akey)+"-- for adios-group: "+gname
-            if (gname ==""):
-                print "Fatal: name for adios-group is required!"
-                raise SystemExit
-
-            nodelist=group.childNodes
-             
-            #line = ""
-            #if(glanguage==1):
-            #        if (coord_var!= ""):
-            #            line = line                              \
-            #                + "call adios_write (adios_handle, "\
-            #                + "\""+coord_var+"\"//char(0), "    \
-            #                + coord_var +")\n"         
-            #        if (time_var != ""):
-            #             line = line                              \
-            #                  + "call adios_write (adios_handle, "\
-            #                  + "\""+time_var+"\"//char(0), "     \
-            #                  + time_var +")\n"        
-            #elif(glanguage):
-            #        if (coord_var!= ""):
-            #            line = line                              \
-            #                  + "adios_write (adios_handle, "\
-            #                  + "\""+coord_var+"\", &"    \
-            #                  + coord_var +");\n"         
-            #    if (time_var != ""):
-            #            line = line                              \
-            #                  + "adios_write (adios_handle, "\
-            #                  + "\""+time_var+"\", &"     \
-            #                  + time_var +");\n"
-            #items[0] = items[0]+line
-            items=["",""]
-            processnode(nodelist,glanguage,coord_comm,coord_var,time_var)
-
-            if(glanguage==1):
-               if (coord_comm == ''):
-                  line="call adios_group_size (adios_handle, adios_groupsize, adios_totalsize, adios_err)\n"
-               else:
-                  line="call adios_group_size (adios_handle, adios_groupsize, adios_totalsize, adios_err)\n"
-            else:
-               if (coord_comm == ''):
-                   line="adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);\n"
-               else:
-                   line="adios_group_size (adios_handle, adios_groupsize, &adios_totalsize);\n"
-            items[0]=line+items[0]
-            items[1]=line+items[1]
-            var_gname_dict={}
-            line = sizeformular[0]
-            if (glanguage == 1): 
-                for i in range(1,len(sizeformular)):
-                    line =line +' &\n                + '+sizeformular[i]
-                items[0]="adios_groupsize = " + line+"\n"+items[0]
-            elif (glanguage == 2): 
-                for i in range(1,len(sizeformular)):
-                    line =line +' \\\n                + '+sizeformular[i]
-                items[0]="adios_groupsize = " + line+";\n"+items[0]
-
-            language_group_dict[gname]=glanguage
-             
-            variables[str(gname)]=items
-            sizestr[str(gname)] = line
-            sizeformular=[]
-    return variables
-
-def main(argv=None):
-    if argv is None:
-        argv=sys.argv
-    vardict = getVarlistFromXML("config.xml")
-    #print vardict.keys()
-#    for key,value in vardict.items():
-#        if(key=="restart"): 
-#            print key,value
-if __name__ == "__main__":
-     main()
diff --git a/utils/skel/Makefile.am b/utils/skel/Makefile.am
new file mode 100644
index 0000000..e43d482
--- /dev/null
+++ b/utils/skel/Makefile.am
@@ -0,0 +1,32 @@
+SUBDIRS = etc
+
+dist_bin_SCRIPTS = bin/skel bin/set_method.sh bin/skel_extract.py
+
+pythonlibdir=@libdir@/python
+
+dist_pythonlib_DATA=\
+    lib/adios.py \
+	lib/argparse.py \
+    lib/skel_cat.py \
+    lib/skel_install.py \
+    lib/skel_makefile.py \
+    lib/skel_params.py \
+    lib/skel_settings.py \
+    lib/skel_source.py \
+    lib/skel_submit.py \
+    lib/skel_xml.py \
+    lib/skelconf.py \
+    lib/typeMapper.py 
+
+
+templatedir=@prefix@/etc/skel/templates
+
+dist_template_DATA=\
+    etc/templates/Makefile.default.tpl\
+	etc/templates/submit_sith.tpl\
+	etc/templates/submit_jaguar.tpl
+
+EXTRA_DIST=etc/settings etc/compiler_fragment.mk \
+           etc/templates/Makefile.default.tpl \
+           etc/templates/submit_jaguar.tpl \
+           etc/templates/submit_sith.tpl 
diff --git a/tests/suite/Makefile.in b/utils/skel/Makefile.in
similarity index 50%
copy from tests/suite/Makefile.in
copy to utils/skel/Makefile.in
index eaefeac..1b62a03 100644
--- a/tests/suite/Makefile.in
+++ b/utils/skel/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,15 +14,14 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
+
+
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -35,10 +35,14 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-subdir = tests/suite
-DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+subdir = utils/skel
+DIST_COMMON = $(dist_bin_SCRIPTS) $(dist_pythonlib_DATA) \
+	$(dist_template_DATA) $(srcdir)/Makefile.am \
+	$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -60,18 +64,75 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = 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__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pythonlibdir)" \
+	"$(DESTDIR)$(templatedir)"
+SCRIPTS = $(dist_bin_SCRIPTS)
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
 	html-recursive info-recursive install-data-recursive \
-	install-exec-recursive install-info-recursive \
-	install-recursive installcheck-recursive installdirs-recursive \
-	pdf-recursive ps-recursive uninstall-info-recursive \
-	uninstall-recursive
+	install-dvi-recursive install-exec-recursive \
+	install-html-recursive install-info-recursive \
+	install-pdf-recursive install-ps-recursive install-recursive \
+	installcheck-recursive installdirs-recursive pdf-recursive \
+	ps-recursive uninstall-recursive
+DATA = $(dist_pythonlib_DATA) $(dist_template_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+	$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+	distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 ADIOSLIB_CFLAGS = @ADIOSLIB_CFLAGS@
 ADIOSLIB_CPPFLAGS = @ADIOSLIB_CPPFLAGS@
@@ -94,32 +155,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
 CC = @CC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -128,72 +189,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
 FC = @FC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -204,11 +240,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -216,7 +252,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -242,26 +281,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -273,35 +305,68 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-SUBDIRS = programs 
-EXTRA_DIST = HOWTO-Add-new-test \
-             HOWTO-Run          \
-             cleanup.sh         \
-             reference/*        \
-             test.sh            \
-             tests/*
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = etc
+dist_bin_SCRIPTS = bin/skel bin/set_method.sh bin/skel_extract.py
+pythonlibdir = @libdir@/python
+dist_pythonlib_DATA = \
+    lib/adios.py \
+	lib/argparse.py \
+    lib/skel_cat.py \
+    lib/skel_install.py \
+    lib/skel_makefile.py \
+    lib/skel_params.py \
+    lib/skel_settings.py \
+    lib/skel_source.py \
+    lib/skel_submit.py \
+    lib/skel_xml.py \
+    lib/skelconf.py \
+    lib/typeMapper.py 
+
+templatedir = @prefix@/etc/skel/templates
+dist_template_DATA = \
+    etc/templates/Makefile.default.tpl\
+	etc/templates/submit_sith.tpl\
+	etc/templates/submit_jaguar.tpl
+
+EXTRA_DIST = etc/settings etc/compiler_fragment.mk \
+           etc/templates/Makefile.default.tpl \
+           etc/templates/submit_jaguar.tpl \
+           etc/templates/submit_sith.tpl 
 
 all: all-recursive
 
@@ -310,14 +375,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/suite/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  tests/suite/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/skel/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/skel/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -335,16 +400,87 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+	@list='$(dist_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-dist_binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_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
 
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
+install-dist_pythonlibDATA: $(dist_pythonlib_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(pythonlibdir)" || $(MKDIR_P) "$(DESTDIR)$(pythonlibdir)"
+	@list='$(dist_pythonlib_DATA)'; test -n "$(pythonlibdir)" || 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)$(pythonlibdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pythonlibdir)" || exit $$?; \
+	done
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
+uninstall-dist_pythonlibDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_pythonlib_DATA)'; test -n "$(pythonlibdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(pythonlibdir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(pythonlibdir)" && rm -f $$files
+install-dist_templateDATA: $(dist_template_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(templatedir)" || $(MKDIR_P) "$(DESTDIR)$(templatedir)"
+	@list='$(dist_template_DATA)'; test -n "$(templatedir)" || 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)$(templatedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(templatedir)" || exit $$?; \
+	done
+
+uninstall-dist_templateDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_template_DATA)'; test -n "$(templatedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(templatedir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(templatedir)" && rm -f $$files
 
 # This directory's subdirectories are mostly independent; you can cd
 # into them and run `make' without going through this Makefile.
@@ -353,7 +489,7 @@ uninstall-info-am:
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 $(RECURSIVE_TARGETS):
-	@failcom='exit 1'; \
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -370,16 +506,15 @@ $(RECURSIVE_TARGETS):
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done; \
 	if test "$$dot_seen" = "no"; then \
 	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
 	fi; test -z "$$fail"
 
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-	@failcom='exit 1'; \
+$(RECURSIVE_CLEAN_TARGETS):
+	@fail= failcom='exit 1'; \
 	for f in x $$MAKEFLAGS; do \
 	  case $$f in \
 	    *=* | --[!k]*);; \
@@ -405,16 +540,16 @@ maintainer-clean-recursive:
 	  else \
 	    local_target="$$target"; \
 	  fi; \
-	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
 	  || eval $$failcom; \
 	done && test -z "$$fail"
 tags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
 	done
 ctags-recursive:
 	list='$(SUBDIRS)'; for subdir in $$list; do \
-	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+	  test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
 	done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
@@ -422,14 +557,14 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
 	mkid -fID $$unique
 tags: TAGS
 
 TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
+	set x; \
 	here=`pwd`; \
 	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
 	  include_option=--etags-include; \
@@ -441,91 +576,113 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 	list='$(SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test ! -f $$subdir/TAGS || \
-	      tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
 	  fi; \
 	done; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
 	  test -n "$$unique" || unique=$$empty_fix; \
-	  $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
-	    $$tags $$unique; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
 	fi
 ctags: CTAGS
 CTAGS: ctags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
 		$(TAGS_FILES) $(LISP)
-	tags=; \
-	here=`pwd`; \
 	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
 	unique=`for i in $$list; do \
 	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
 	  done | \
-	  $(AWK) '    { files[$$0] = 1; } \
-	       END { for (i in files) print i; }'`; \
-	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+	      END { if (nonempty) { for (i in files) print i; }; }'`; \
+	test -z "$(CTAGS_ARGS)$$unique" \
 	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
-	     $$tags $$unique
+	     $$unique
 
 GTAGS:
 	here=`$(am__cd) $(top_builddir) && pwd` \
-	  && cd $(top_srcdir) \
-	  && gtags -i $(GTAGS_ARGS) $$here
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
 
 distclean-tags:
 	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
-	$(mkdir_p) $(distdir)/reference $(distdir)/tests
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
-	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
 	  if test "$$subdir" = .; then :; else \
 	    test -d "$(distdir)/$$subdir" \
-	    || $(mkdir_p) "$(distdir)/$$subdir" \
+	    || $(MKDIR_P) "$(distdir)/$$subdir" \
 	    || exit 1; \
-	    distdir=`$(am__cd) $(distdir) && pwd`; \
-	    top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
-	    (cd $$subdir && \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
 	      $(MAKE) $(AM_MAKEFLAGS) \
-	        top_distdir="$$top_distdir" \
-	        distdir="$$distdir/$$subdir" \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
 	        distdir) \
 	      || exit 1; \
 	  fi; \
 	done
 check-am: all-am
 check: check-recursive
-all-am: Makefile
+all-am: Makefile $(SCRIPTS) $(DATA)
 installdirs: installdirs-recursive
 installdirs-am:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pythonlibdir)" "$(DESTDIR)$(templatedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
 install: install-recursive
 install-exec: install-exec-recursive
 install-data: install-data-recursive
@@ -546,6 +703,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -556,8 +714,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-recursive
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool \
-	distclean-tags
+distclean-am: clean-am distclean-generic distclean-tags
 
 dvi: dvi-recursive
 
@@ -565,18 +722,38 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
 
-install-data-am:
+install-data-am: install-dist_pythonlibDATA install-dist_templateDATA
+
+install-dvi: install-dvi-recursive
 
-install-exec-am:
+install-dvi-am:
+
+install-exec-am: install-dist_binSCRIPTS
+
+install-html: install-html-recursive
+
+install-html-am:
 
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -595,22 +772,29 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-info-am
+uninstall-am: uninstall-dist_binSCRIPTS uninstall-dist_pythonlibDATA \
+	uninstall-dist_templateDATA
 
-uninstall-info: uninstall-info-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+	install-am install-strip tags-recursive
 
-.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \
-	clean clean-generic clean-libtool clean-recursive ctags \
-	ctags-recursive distclean distclean-generic distclean-libtool \
-	distclean-recursive distclean-tags distdir dvi dvi-am html \
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+	all all-am check check-am clean clean-generic clean-libtool \
+	ctags ctags-recursive distclean distclean-generic \
+	distclean-libtool distclean-tags distdir dvi dvi-am html \
 	html-am info info-am install install-am install-data \
-	install-data-am install-exec install-exec-am install-info \
-	install-info-am install-man install-strip installcheck \
-	installcheck-am installdirs installdirs-am maintainer-clean \
-	maintainer-clean-generic maintainer-clean-recursive \
-	mostlyclean mostlyclean-generic mostlyclean-libtool \
-	mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
-	uninstall uninstall-am uninstall-info-am
+	install-data-am install-dist_binSCRIPTS \
+	install-dist_pythonlibDATA install-dist_templateDATA \
+	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 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-dist_binSCRIPTS \
+	uninstall-dist_pythonlibDATA uninstall-dist_templateDATA
+
 
 # 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 --git a/utils/skel/bin/set_method.sh b/utils/skel/bin/set_method.sh
new file mode 100755
index 0000000..6d5adce
--- /dev/null
+++ b/utils/skel/bin/set_method.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# Parameters are:
+#       1) Method, in the correct case to fit the XML file format, e.g. POSIX or MPI_LUSTRE
+#       2) Infile
+#       3) Outfile
+#       4) Method parameter string
+
+
+# Two sed commands (-e): the first one replaces the XXX in each method="XXX" with the new method
+# The second sed replaces all instances of the string '***skel-parameters***' with the new parameter string 
+sed -e's+method="[a-zA-Z0-9\-\_]*"+method="'$1'"+g' \
+    -e's+\*\*\*skel\-parameters\*\*\*+'"$4"'+g' < $2 > $3
+
+
diff --git a/utils/skel/bin/skel b/utils/skel/bin/skel
new file mode 100755
index 0000000..0a0266b
--- /dev/null
+++ b/utils/skel/bin/skel
@@ -0,0 +1,102 @@
+#!/usr/bin/env python
+
+import sys
+import os.path
+
+# Make sure that the skel modules are available
+os.path.dirname(sys.argv[0])
+sys.path.insert (0, os.path.dirname(sys.argv[0]) + '/../lib/python')
+
+import argparse
+
+import adios
+import skelconf
+import skel_settings
+import skel_install
+import skel_makefile
+import skel_params
+import skel_source
+import skel_dwarf
+import skel_submit
+import skel_xml
+
+def parse_command_line():
+
+    parser = argparse.ArgumentParser (
+        formatter_class=argparse.RawDescriptionHelpFormatter,
+        description='''\
+Skel: Create, run and analyze skeletal I/O applications
+-------------------------------------------------------
+Available subcommands include:
+    skel install
+    skel makefile
+    skel params
+    skel source
+    skel submit
+    skel xml''')
+    parser.add_argument ('subcommand', metavar='subcommand', help='Skel command to execute')
+    parser.add_argument ('project', metavar='project', help='Name of the skel project')
+    parser.add_argument ('-g', '--group', help='adios group (only valid for skel params)')
+
+    return parser.parse_args()
+
+
+def main(argv=None):
+
+    skel_settings.create_settings_dir_if_needed()
+
+    # install does not require a project, so let's just check for it directly
+    if sys.argv[1] == 'install':
+        return 0;
+
+    args = parse_command_line()
+
+    if args.subcommand == 'install':
+        return 0
+
+    if args.subcommand == 'xml':
+        skel_xml.create_skel_xml (args.project)
+        return 0
+
+    try:
+        config = adios.adiosConfig (args.project + '_skel.xml')
+    except (IOError):
+        print "Error reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first."
+        return 1
+
+    if args.subcommand == 'params':
+        outfilename = args.project + '_params.xml.default'
+        skel_params.generate_param_file (args.project, outfilename, config, args.group)
+        return 0
+
+    try:    
+        params = skelconf.skelConfig (args.project + '_params.xml')
+    except (IOError):
+        print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,"
+        print "then copy the generated " + args.project + "_params.xml.default, and edit to suit your needs."
+        return 1
+
+    if args.subcommand == 'makefile':
+        skel_makefile.generate_makefiles (params, config)
+        return 0
+
+    if args.subcommand == 'source':
+        skel_source.create_sources (params, config, args.project)
+        return 0
+
+    if args.subcommand == 'dwarf':
+        skel_dwarf.create_dwarf (params, config, args.project)
+        return 0
+
+    if args.subcommand == 'submit':
+        skel_submit.generate_submit_scripts (params)
+        return 0
+
+    print 'Unknown subcommand, exiting.'
+
+
+if __name__ == "__main__":
+    main()
+
+
+
diff --git a/utils/skel/bin/skel_extract.py b/utils/skel/bin/skel_extract.py
new file mode 100755
index 0000000..d226a79
--- /dev/null
+++ b/utils/skel/bin/skel_extract.py
@@ -0,0 +1,90 @@
+#!/usr/bin/env python
+
+import argparse
+import xml.dom.minidom
+import sys
+
+#import skel_settings
+
+
+def parse_command_line():
+    parser = argparse.ArgumentParser (description='Extract data from specified skel output file')
+    parser.add_argument ('skel_output', metavar='Skel result', help='file to extract data from')
+    parser.add_argument ('-d', dest='dest', help='file to place the results in')
+    parser.add_argument ('-s', dest='select', help='measurement(s) to extract (default = *)')
+    parser.add_argument ('-r', dest='ranks', default='0', help='Use -r all to include measurements from all ranks for just one iteration.')
+    return parser.parse_args()
+
+
+
+
+# By default, print all data for rank 0 as one line, repeat for each iteration
+def extract (skel_output, dest, select, ranks):
+
+    doc = xml.dom.minidom.parse (skel_output)
+    if dest == None or dest == '':
+        outfile = sys.stdout
+    else:
+        outfile = open (dest, 'w')
+
+    if select == None or select == '':
+        select = '*'
+
+    keys = doc.getElementsByTagName('adios_timing')[0].getAttribute('keys').split(',')
+    tempkeys = []
+    for key in keys:
+        tempkeys.append (key.strip())
+
+    keys = tempkeys
+
+    if select == '*':
+        selected_fields = keys
+    else:
+        selected_fields = select.split(',')
+
+    # check the selected fields
+    for field in selected_fields:
+        if not field in keys:
+            print 'Invalid selection, field ' + field
+            return
+
+    #Print the header
+    header = ''
+    for field in selected_fields:
+        header = header + field
+        header = header +','
+
+    header = header.rstrip (',')
+    outfile.write (header + '\n')
+
+    for st in doc.getElementsByTagName ('adios_timing'):
+
+        #Print the data
+        for proc in st.getElementsByTagName('proc'):
+            if proc.getAttribute ('id') == '0' or ranks == 'all':  
+                data = ''
+                vals = proc.getAttribute ('vals').split(',')
+                for field in selected_fields:
+                    data = data + vals[keys.index(field)].strip() + ','
+                data = data.rstrip (',') + '\n'
+                outfile.write (data)
+        if ranks == 'all':
+            break
+    
+    outfile.close () 
+    
+
+
+
+def main ():
+
+
+    args = parse_command_line()
+    extract (args.skel_output, args.dest, args.select, args.ranks)
+
+
+
+if __name__ == "__main__":
+    main()
+
+
diff --git a/utils/skel/etc/Makefile.am b/utils/skel/etc/Makefile.am
new file mode 100644
index 0000000..429efc1
--- /dev/null
+++ b/utils/skel/etc/Makefile.am
@@ -0,0 +1,15 @@
+
+etcdir=@prefix@/etc/skel
+
+etc_DATA=\
+    compiler_fragment.mk \
+    settings
+
+
+CC=@MPICC@
+FC=@MPIFC@
+
+all: compiler_fragment.mk
+
+compiler_fragment.mk: Makefile
+	grep -e'^prefix\ =' -e'^CC\ =' -e'^FC\ =' -e'^CFLAGS\ =' -e'^LDFLAGS\ =' -e'^FCFLAGS\ =' -e'^FCLIBS\ =' < Makefile > compiler_fragment.mk
diff --git a/utils/gpp/Makefile.in b/utils/skel/etc/Makefile.in
similarity index 63%
copy from utils/gpp/Makefile.in
copy to utils/skel/etc/Makefile.in
index 21d24ca..5e4657c 100644
--- a/utils/gpp/Makefile.in
+++ b/utils/skel/etc/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.9.6 from Makefile.am.
+# 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  Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -14,15 +15,12 @@
 
 @SET_MAKE@
 
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
 VPATH = @srcdir@
 pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ../..
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
 am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
 install_sh_DATA = $(install_sh) -c -m 644
 install_sh_PROGRAM = $(install_sh) -c
 install_sh_SCRIPT = $(install_sh) -c
@@ -36,11 +34,12 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-subdir = utils/gpp
-DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \
-	$(srcdir)/Makefile.in
+subdir = utils/skel/etc
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/config/ac_dart.m4 \
+am__aclocal_m4_deps = $(top_srcdir)/config/ac_cray_pmi.m4 \
+	$(top_srcdir)/config/ac_cray_ugni.m4 \
+	$(top_srcdir)/config/ac_dataspaces.m4 \
 	$(top_srcdir)/config/ac_datatap.m4 \
 	$(top_srcdir)/config/ac_dimes.m4 \
 	$(top_srcdir)/config/ac_dmalloc.m4 \
@@ -62,11 +61,32 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)"
-dist_binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-SCRIPTS = $(dist_bin_SCRIPTS)
+CONFIG_CLEAN_VPATH_FILES =
 SOURCES =
 DIST_SOURCES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = 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__installdirs = "$(DESTDIR)$(etcdir)"
+DATA = $(etc_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 ADIOSLIB_CFLAGS = @ADIOSLIB_CFLAGS@
@@ -90,32 +110,32 @@ ADIOSREADLIB_SEQ_CFLAGS = @ADIOSREADLIB_SEQ_CFLAGS@
 ADIOSREADLIB_SEQ_CPPFLAGS = @ADIOSREADLIB_SEQ_CPPFLAGS@
 ADIOSREADLIB_SEQ_LDADD = @ADIOSREADLIB_SEQ_LDADD@
 ADIOSREADLIB_SEQ_LDFLAGS = @ADIOSREADLIB_SEQ_LDFLAGS@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
 AMTAR = @AMTAR@
 AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BUILD_FORTRAN_FALSE = @BUILD_FORTRAN_FALSE@
-BUILD_FORTRAN_TRUE = @BUILD_FORTRAN_TRUE@
-BUILD_WRITE_FALSE = @BUILD_WRITE_FALSE@
-BUILD_WRITE_TRUE = @BUILD_WRITE_TRUE@
-CC = @CC@
+CC = @MPICC@
 CCDEPMODE = @CCDEPMODE@
 CFLAGS = @CFLAGS@
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
+CRAY_PMI_CPPFLAGS = @CRAY_PMI_CPPFLAGS@
+CRAY_PMI_LDFLAGS = @CRAY_PMI_LDFLAGS@
+CRAY_PMI_LIBS = @CRAY_PMI_LIBS@
+CRAY_UGNI_CPPFLAGS = @CRAY_UGNI_CPPFLAGS@
+CRAY_UGNI_LDFLAGS = @CRAY_UGNI_LDFLAGS@
+CRAY_UGNI_LIBS = @CRAY_UGNI_LIBS@
 CSH = @CSH@
 CXX = @CXX@
 CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
 CYGPATH_W = @CYGPATH_W@
-DART_CPPFLAGS = @DART_CPPFLAGS@
-DART_LDFLAGS = @DART_LDFLAGS@
-DART_LIBS = @DART_LIBS@
+DATASPACES_CPPFLAGS = @DATASPACES_CPPFLAGS@
+DATASPACES_LDFLAGS = @DATASPACES_LDFLAGS@
+DATASPACES_LIBS = @DATASPACES_LIBS@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
 DIMES_CPPFLAGS = @DIMES_CPPFLAGS@
@@ -124,72 +144,47 @@ DIMES_LIBS = @DIMES_LIBS@
 DMALLOC_CPPFLAGS = @DMALLOC_CPPFLAGS@
 DMALLOC_LDFLAGS = @DMALLOC_LDFLAGS@
 DMALLOC_LIBS = @DMALLOC_LIBS@
+DSYMUTIL = @DSYMUTIL@
 DT_CPPFLAGS = @DT_CPPFLAGS@
 DT_LDFLAGS = @DT_LDFLAGS@
 DT_LIBS = @DT_LIBS@
-ECHO = @ECHO@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
-F77 = @F77@
-FC = @FC@
+FC = @MPIFC@
 FCFLAGS = @FCFLAGS@
 FCLIBS = @FCLIBS@
-FFLAGS = @FFLAGS@
-HAVE_DART_FALSE = @HAVE_DART_FALSE@
-HAVE_DART_TRUE = @HAVE_DART_TRUE@
-HAVE_DATATAP_FALSE = @HAVE_DATATAP_FALSE@
-HAVE_DATATAP_TRUE = @HAVE_DATATAP_TRUE@
-HAVE_DIMES_FALSE = @HAVE_DIMES_FALSE@
-HAVE_DIMES_TRUE = @HAVE_DIMES_TRUE@
-HAVE_DMALLOC_FALSE = @HAVE_DMALLOC_FALSE@
-HAVE_DMALLOC_TRUE = @HAVE_DMALLOC_TRUE@
-HAVE_HDF5_FALSE = @HAVE_HDF5_FALSE@
-HAVE_HDF5_TRUE = @HAVE_HDF5_TRUE@
-HAVE_INFINIBAND_FALSE = @HAVE_INFINIBAND_FALSE@
-HAVE_INFINIBAND_TRUE = @HAVE_INFINIBAND_TRUE@
-HAVE_LUSTRE_FALSE = @HAVE_LUSTRE_FALSE@
-HAVE_LUSTRE_TRUE = @HAVE_LUSTRE_TRUE@
-HAVE_MPI_FALSE = @HAVE_MPI_FALSE@
-HAVE_MPI_TRUE = @HAVE_MPI_TRUE@
-HAVE_MXML_FALSE = @HAVE_MXML_FALSE@
-HAVE_MXML_TRUE = @HAVE_MXML_TRUE@
-HAVE_NC4PAR_FALSE = @HAVE_NC4PAR_FALSE@
-HAVE_NC4PAR_TRUE = @HAVE_NC4PAR_TRUE@
-HAVE_NETCDF_FALSE = @HAVE_NETCDF_FALSE@
-HAVE_NETCDF_TRUE = @HAVE_NETCDF_TRUE@
-HAVE_NSSI_FALSE = @HAVE_NSSI_FALSE@
-HAVE_NSSI_TRUE = @HAVE_NSSI_TRUE@
-HAVE_PABLO_FALSE = @HAVE_PABLO_FALSE@
-HAVE_PABLO_TRUE = @HAVE_PABLO_TRUE@
-HAVE_PHDF5_FALSE = @HAVE_PHDF5_FALSE@
-HAVE_PHDF5_TRUE = @HAVE_PHDF5_TRUE@
-HAVE_PORTALS_FALSE = @HAVE_PORTALS_FALSE@
-HAVE_PORTALS_TRUE = @HAVE_PORTALS_TRUE@
+FGREP = @FGREP@
+GREP = @GREP@
 HDF5_CPPFLAGS = @HDF5_CPPFLAGS@
 HDF5_LDFLAGS = @HDF5_LDFLAGS@
 HDF5_LIBS = @HDF5_LIBS@
 INFINIBAND_CFLAGS = @INFINIBAND_CFLAGS@
 INFINIBAND_CPPFLAGS = @INFINIBAND_CPPFLAGS@
-INFINIBAND_HEADER = @INFINIBAND_HEADER@
 INFINIBAND_LDFLAGS = @INFINIBAND_LDFLAGS@
 INFINIBAND_LIBS = @INFINIBAND_LIBS@
+INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
 LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
 LUSTRE_CPPFLAGS = @LUSTRE_CPPFLAGS@
 LUSTRE_LDFLAGS = @LUSTRE_LDFLAGS@
 LUSTRE_LIBS = @LUSTRE_LIBS@
+MACRODEFFLAG = @MACRODEFFLAG@
 MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
 MPICC = @MPICC@
 MPICXX = @MPICXX@
 MPIFC = @MPIFC@
@@ -200,11 +195,11 @@ MXML_LIBS = @MXML_LIBS@
 NC4PAR_CPPFLAGS = @NC4PAR_CPPFLAGS@
 NC4PAR_LDFLAGS = @NC4PAR_LDFLAGS@
 NC4PAR_LIBS = @NC4PAR_LIBS@
-NEED_DARWIN_SINGLE_MODULE_FALSE = @NEED_DARWIN_SINGLE_MODULE_FALSE@
-NEED_DARWIN_SINGLE_MODULE_TRUE = @NEED_DARWIN_SINGLE_MODULE_TRUE@
 NETCDF_CPPFLAGS = @NETCDF_CPPFLAGS@
 NETCDF_LDFLAGS = @NETCDF_LDFLAGS@
 NETCDF_LIBS = @NETCDF_LIBS@
+NM = @NM@
+NMEDIT = @NMEDIT@
 NSSI_BUILDDIR = @NSSI_BUILDDIR@
 NSSI_CFLAGS = @NSSI_CFLAGS@
 NSSI_CPPFLAGS = @NSSI_CPPFLAGS@
@@ -212,7 +207,10 @@ NSSI_LDFLAGS = @NSSI_LDFLAGS@
 NSSI_LIBS = @NSSI_LIBS@
 NSSI_SERVER_LIBS = @NSSI_SERVER_LIBS@
 NSSI_SRCDIR = @NSSI_SRCDIR@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PABLO_CPPFLAGS = @PABLO_CPPFLAGS@
 PABLO_LDFLAGS = @PABLO_LDFLAGS@
 PABLO_LIBS = @PABLO_LIBS@
@@ -238,26 +236,19 @@ PTHREAD_CC = @PTHREAD_CC@
 PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
 PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
-RESEARCH_TRANSPORTS_FALSE = @RESEARCH_TRANSPORTS_FALSE@
-RESEARCH_TRANSPORTS_TRUE = @RESEARCH_TRANSPORTS_TRUE@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
-USE_PARALLEL_COMPILER_FALSE = @USE_PARALLEL_COMPILER_FALSE@
-USE_PARALLEL_COMPILER_TRUE = @USE_PARALLEL_COMPILER_TRUE@
 VERSION = @VERSION@
-ac_ct_AR = @ac_ct_AR@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 ac_ct_FC = @ac_ct_FC@
-ac_ct_RANLIB = @ac_ct_RANLIB@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
 am__quote = @am__quote@
@@ -269,29 +260,46 @@ build_alias = @build_alias@
 build_cpu = @build_cpu@
 build_os = @build_os@
 build_vendor = @build_vendor@
+builddir = @builddir@
 datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
 exec_prefix = @exec_prefix@
 host = @host@
 host_alias = @host_alias@
 host_cpu = @host_cpu@
 host_os = @host_os@
 host_vendor = @host_vendor@
+htmldir = @htmldir@
 includedir = @includedir@
 infodir = @infodir@
 install_sh = @install_sh@
 libdir = @libdir@
 libexecdir = @libexecdir@
+localedir = @localedir@
 localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
 oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
 prefix = @prefix@
 program_transform_name = @program_transform_name@
+psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
-dist_bin_SCRIPTS = gpp.py xmlparser.py gpp_types.py
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+etcdir = @prefix@/etc/skel
+etc_DATA = \
+    compiler_fragment.mk \
+    settings
+
 all: all-am
 
 .SUFFIXES:
@@ -299,14 +307,14 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
 	@for dep in $?; do \
 	  case '$(am__configure_deps)' in \
 	    *$$dep*) \
-	      cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
-		&& exit 0; \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
 	      exit 1;; \
 	  esac; \
 	done; \
-	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  utils/gpp/Makefile'; \
-	cd $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu  utils/gpp/Makefile
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu utils/skel/etc/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu utils/skel/etc/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
 	@case '$?' in \
@@ -324,35 +332,33 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-dist_binSCRIPTS: $(dist_bin_SCRIPTS)
-	@$(NORMAL_INSTALL)
-	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
-	@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  if test -f $$d$$p; then \
-	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-	    echo " $(dist_binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \
-	    $(dist_binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \
-	  else :; fi; \
-	done
-
-uninstall-dist_binSCRIPTS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(dist_bin_SCRIPTS)'; for p in $$list; do \
-	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
-	  echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
-	  rm -f "$(DESTDIR)$(bindir)/$$f"; \
-	done
+$(am__aclocal_m4_deps):
 
 mostlyclean-libtool:
 	-rm -f *.lo
 
 clean-libtool:
 	-rm -rf .libs _libs
+install-etcDATA: $(etc_DATA)
+	@$(NORMAL_INSTALL)
+	test -z "$(etcdir)" || $(MKDIR_P) "$(DESTDIR)$(etcdir)"
+	@list='$(etc_DATA)'; test -n "$(etcdir)" || 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)$(etcdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(etcdir)" || exit $$?; \
+	done
 
-distclean-libtool:
-	-rm -f libtool
-uninstall-info-am:
+uninstall-etcDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(etc_DATA)'; test -n "$(etcdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	test -n "$$files" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(etcdir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(etcdir)" && rm -f $$files
 tags: TAGS
 TAGS:
 
@@ -361,38 +367,41 @@ CTAGS:
 
 
 distdir: $(DISTFILES)
-	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
-	list='$(DISTFILES)'; for file in $$list; do \
-	  case $$file in \
-	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
-	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
-	  esac; \
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
 	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
-	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
-	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
-	    dir="/$$dir"; \
-	    $(mkdir_p) "$(distdir)$$dir"; \
-	  else \
-	    dir=''; \
-	  fi; \
 	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
 	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
 	    fi; \
-	    cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
 	  else \
-	    test -f $(distdir)/$$file \
-	    || cp -p $$d/$$file $(distdir)/$$file \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
 	    || exit 1; \
 	  fi; \
 	done
 check-am: all-am
 check: check-am
-all-am: Makefile $(SCRIPTS)
+all-am: Makefile $(DATA)
 installdirs:
-	for dir in "$(DESTDIR)$(bindir)"; do \
-	  test -z "$$dir" || $(mkdir_p) "$$dir"; \
+	for dir in "$(DESTDIR)$(etcdir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
 	done
 install: install-am
 install-exec: install-exec-am
@@ -414,6 +423,7 @@ clean-generic:
 
 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)
 
 maintainer-clean-generic:
 	@echo "This command is intended for maintainers to use"
@@ -424,7 +434,7 @@ clean-am: clean-generic clean-libtool mostlyclean-am
 
 distclean: distclean-am
 	-rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-libtool
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -432,18 +442,38 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
 
-install-data-am:
+install-data-am: install-etcDATA
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
 
-install-exec-am: install-dist_binSCRIPTS
+install-html-am:
 
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -462,18 +492,27 @@ ps: ps-am
 
 ps-am:
 
-uninstall-am: uninstall-dist_binSCRIPTS uninstall-info-am
+uninstall-am: uninstall-etcDATA
+
+.MAKE: install-am install-strip
 
 .PHONY: all all-am check check-am 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-dist_binSCRIPTS \
-	install-exec install-exec-am install-info install-info-am \
-	install-man install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
-	ps ps-am uninstall uninstall-am uninstall-dist_binSCRIPTS \
-	uninstall-info-am
+	install-data install-data-am install-dvi install-dvi-am \
+	install-etcDATA 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 \
+	uninstall uninstall-am uninstall-etcDATA
+
+
+all: compiler_fragment.mk
+
+compiler_fragment.mk: Makefile
+	grep -e'^prefix\ =' -e'^CC\ =' -e'^FC\ =' -e'^CFLAGS\ =' -e'^LDFLAGS\ =' -e'^FCFLAGS\ =' -e'^FCLIBS\ =' < Makefile > compiler_fragment.mk
 
 # 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 --git a/utils/skel/etc/compiler_fragment.mk b/utils/skel/etc/compiler_fragment.mk
new file mode 100644
index 0000000..342514c
--- /dev/null
+++ b/utils/skel/etc/compiler_fragment.mk
@@ -0,0 +1,7 @@
+CC = mpicc
+CFLAGS = -g -fPIC
+FC = mpif90
+FCFLAGS = -g
+FCLIBS =  -L/autofs/na1_compilers/pgi/rhel6-x86_64/12.8/linux86-64/12.8/lib -L/usr/lib64 -L/usr/lib/gcc/x86_64-redhat-linux/4.4.6 -lpgmp -lnuma -lpthread -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lnspgc -lpgc -lrt -lm
+LDFLAGS =  
+prefix = /ccs/proj/e2e/pnorbert/ADIOS/sith.pgi
diff --git a/utils/skel/etc/settings b/utils/skel/etc/settings
new file mode 100644
index 0000000..d98d55f
--- /dev/null
+++ b/utils/skel/etc/settings
@@ -0,0 +1,27 @@
+# Welcome to the skel settings file. 
+
+# Each line should contain either a comment (like this one) starting with #,
+# Or a name=value pair
+
+
+# The working directoy under which skel executables should be placed
+# This should be on a filesystem visible to the compute nodes
+deploy_dir=~/skel-deploy-dir
+
+
+# The submission script template to use, currently jaguar and sith are supported
+# See the skel manual for information about adding a new target platform
+submit_target=sith
+
+
+# Measurement settings to steer the code generation
+sleep_before_open=no
+barrier_before_open=yes
+barrier_before_access=no
+barrier_before_close=no
+barrier_after_close=no
+barrier_after_steps=no
+use_adios_timing=no
+
+
+
diff --git a/utils/skel/etc/templates/Makefile.default.tpl b/utils/skel/etc/templates/Makefile.default.tpl
new file mode 100644
index 0000000..d8d4549
--- /dev/null
+++ b/utils/skel/etc/templates/Makefile.default.tpl
@@ -0,0 +1,47 @@
+
+# To modify this Makefile, edit Makefile_default.tpl file in ~/.skel/templates/
+# and run skel makefile  
+
+include $$INCLUDE$$
+
+ADIOS_DIR=`adios_config -d`
+LDFLAGS += `adios_config -l`
+CFLAGS += `adios_config -c`
+FCFLAGS += `adios_config -fc`          
+FCLIBS += `adios_config -fl`
+               
+APP=$$APP$$
+CTESTS=$$CTESTS$$
+FTESTS=$$FTESTS$$
+
+DEST_DIR=$$DEPLOY_DIR$$/$(APP)/$$CORES_USED$$
+
+all: $(FTESTS) $(CTESTS)
+
+
+$(CTESTS): $(CTESTS:=.c)
+	$(CC) $(CFLAGS) -o $@ ${@}.c $(LDFLAGS)
+
+$(FTESTS): $(FTESTS:=.f90)
+	$(FC) $(FCFLAGS) -o $@ ${@}.f90 $(FCLIBS)
+
+
+deploy:
+	#Make sure this exists
+	mkdir -p $(DEST_DIR)
+
+	rm -f $(DEST_DIR)/submit*
+	cp $(APP)_skel.xml $(DEST_DIR)/$(APP)_skel.xml.in
+	cp $(CTESTS) submit* $(DEST_DIR)
+	cp $(FTESTS) submit* $(DEST_DIR)
+	cp $(prefix)/bin/set_method.sh $(DEST_DIR)
+	cp $(prefix)/bin/skel_cat.py $(DEST_DIR)
+
+
+clean:
+	rm -f *.c
+	rm -f *.f90
+	#rm -f submit*
+	rm -f $(CTESTS) $(FTESTS)
+
+
diff --git a/utils/skel/etc/templates/submit_jaguar.tpl b/utils/skel/etc/templates/submit_jaguar.tpl
new file mode 100644
index 0000000..b25394e
--- /dev/null
+++ b/utils/skel/etc/templates/submit_jaguar.tpl
@@ -0,0 +1,28 @@
+#!/bin/bash
+# Submission script for the $$TARGET$$ target
+
+
+#PBS -A stf006
+#PBS -N $$JOB_NAME$$
+#PBS -j oe
+#PBS -l walltime=$$WALLTIME$$,size=$$CORES_TOTAL$$16$$
+#PBS -l gres=widow2
+
+cd $PBS_O_WORKDIR
+date
+
+export MPICH_UNEX_BUFFER_SIZE=251658240
+export MPICH_MAX_SHORT_MSG_SIZE=64000
+
+
+$$START_TEST$$
+for i in {1..$$ITERATIONS$$}
+do
+echo $$METHOD$$
+$$PRE_RM$$
+set_method.sh $$METHOD$$ $$APP$$_skel.xml.in $$APP$$_skel.xml $$METHOD_PARAMS$$
+aprun -n $$CORES_USED$$ ./$$EXEC$$
+$$POST_RM$$
+done
+
+$$END_TEST$$
diff --git a/utils/skel/etc/templates/submit_sith.tpl b/utils/skel/etc/templates/submit_sith.tpl
new file mode 100644
index 0000000..479bf5d
--- /dev/null
+++ b/utils/skel/etc/templates/submit_sith.tpl
@@ -0,0 +1,29 @@
+#!/bin/bash
+# Submission script for the $$TARGET$$ target
+# To make changes to this file, edit the appropriate submit_<target>.tpl file in ~/.skel/templates/
+
+#PBS -A stf006
+#PBS -N $$JOB_NAME$$
+#PBS -j oe
+#PBS -l walltime=$$WALLTIME$$,nodes=$$NODES_TOTAL$$32$$:ppn=32
+#PBS -l gres=widow2
+
+cd $PBS_O_WORKDIR
+
+date
+
+$$START_TEST$$
+for i in {1..$$ITERATIONS$$}
+do
+echo $$METHOD$$
+$$PRE_RM$$
+./set_method.sh $$METHOD$$ $$APP$$_skel.xml.in $$APP$$_skel.xml 
+mpirun -n $$CORES_USED$$ ./$$EXEC$$
+./skel_cat.py $$APP$$_skel_time.xml $$APP$$_skel_time_${PBS_JOBID}.xml
+$$POST_RM$$
+done
+
+$$END_TEST$$
+
+
+
diff --git a/utils/skel/lib/adios.py b/utils/skel/lib/adios.py
new file mode 100644
index 0000000..f3c827a
--- /dev/null
+++ b/utils/skel/lib/adios.py
@@ -0,0 +1,341 @@
+import xml.dom.minidom
+
+import typeMapper
+
+class adiosConfig:
+
+    def __init__ (self, config_file_name):
+
+        self.config_file_name = config_file_name
+
+        #This would be a good time to parse the file...
+        doc = xml.dom.minidom.parse (config_file_name)
+        nodes = doc.childNodes
+        if (nodes.length != 1):
+            print 'malformed adios config file, should contain only a single adios-config element'
+            raise SystemExit
+        self.config_node = nodes[0]
+
+        # for each of the groups, instantiate an adiosGroup object, and store in self.adios_groups
+        self.adios_groups = []
+        self.methods = []
+        self.buffer = None
+
+        self.host_language = self.config_node.getAttribute ('host-language')
+
+        for node in self.config_node.getElementsByTagName('adios-group'):
+            self.adios_groups.append (adiosGroup (node) )
+
+        for node in self.config_node.getElementsByTagName('method'):
+            self.methods.append (method (node) )
+
+        for node in self.config_node.getElementsByTagName ('buffer'):
+            # there should be only one of these... this code ignores all but the last one.
+            self.buffer = buffer (node)
+
+        #We are currently ignoring any analysis declarations
+
+
+    def get_filename (self):
+        return self.config_file_name
+
+
+    def get_groups (self):
+        #return the group with the specified name
+        return self.adios_groups
+
+
+    def get_buffer (self):
+        #return the buffer info
+        print 'implement get_buffer'
+
+    def get_host_language (self):
+        return self.host_language
+
+class adiosGroup:
+
+    def __init__ (self, group_node):
+        self.group_node = group_node
+
+        self.time_index = self.group_node.getAttribute ('time-index')
+
+        self.vars = []
+        self.vardict = {}
+
+        for node in self.group_node.childNodes:
+            if (node.localName == 'var'):
+                newvar = var (node, self, self.time_index)
+                self.vars.append (newvar)
+                self.vardict [newvar.get_name()] = newvar
+
+        for node in self.group_node.getElementsByTagName('global-bounds'):
+            for varnode in node.getElementsByTagName('var'):
+                newvar = var (varnode, self, self.time_index, node) 
+                self.vars.append (newvar)
+                self.vardict [newvar.get_name()] = newvar
+
+    def get_name (self):
+        return self.group_node.getAttribute ('name')
+
+    def get_vars (self):
+        return self.vars
+
+    def get_var (self, varname):
+        return self.vardict [varname]
+
+
+class method:
+    
+    def __init__ (self, method_node):
+        self.method_node = method_node
+
+
+class buffer:
+    
+    def __init__ (self, buffer_node):
+        self.buffer_node = buffer_node
+
+
+class var:
+
+    def __init__ (self, var_node, group, time_index=None, global_bounds_node=None):
+        self.var_node = var_node
+        self.group = group
+        self.time_index = time_index
+        self.global_bounds_node = global_bounds_node
+
+    def get_name (self):
+        name = self.var_node.getAttribute ('name')
+        name = name.replace ("+", "_plus_")
+        name = name.replace ("%", "_pct_")
+        name = name.split ('(')[0]
+        return name
+
+    def get_gwrite (self):
+        gw = self.var_node.getAttribute ('gwrite')
+
+        if (gw == ''):
+            gw = self.get_name()
+    
+        # Trim the name at the first open paren to deal with gts issue
+        gw = gw.split('(')[0]
+        gw = gw.replace ("+", "_plus_")
+        gw = gw.replace ("%", "_pct_")
+
+        return gw
+
+    def get_group (self):
+        return self.group
+
+    def get_c_type (self):
+        return typeMapper.get_c_type (self.var_node.getAttribute ('type') )
+
+    def get_fortran_type (self):
+        return typeMapper.get_fortran_type (self.var_node.getAttribute ('type') )
+
+    def get_type (self):
+        return self.var_node.getAttribute ('type')
+
+    def get_dimensions (self):
+        if (self.var_node.getAttribute ('dimensions') == ''):
+            return None
+        else:
+            # place the dimensions in a list and remove the time-index if it is there.
+            dims = filter (lambda x : x != self.time_index, self.var_node.getAttribute ('dimensions').split(',') )
+            cleandims = []
+            for d in dims:
+
+                if d.isdigit():
+                    cleandims.append (d)
+                    continue
+
+                # Here we need to translate the variable name for this dimension (if it's a var) into the gwrite 
+                # for that variable
+                dim_var = self.get_group().get_var (d)				
+                if dim_var != None:
+                    d = dim_var.get_gwrite()
+
+				# Now clean up any unsightly parts
+                cleand = d.replace ("+", "_plus_") 
+                cleand = cleand.split('(')[0]
+                cleandims.append (cleand)
+            return cleandims
+
+    def is_scalar (self):
+        return self.get_dimensions() == None
+
+class fortranFormatter:
+    @staticmethod
+    def get_write_line (var):
+        return '\n  call adios_write (adios_handle, "' + var.get_name() + '", ' + var.get_gwrite() + ', adios_error)'  
+
+    @staticmethod
+    def get_declaration (var, group_params):
+        dims = var.get_dimensions()
+        if (dims == None):
+            # I think this should be get_name instead of get_gwrite. 
+            #init_val = group_params.get_scalar (var.get_gwrite() ).get_value()
+            init_val = group_params.get_scalar (var.get_name() ).get_value()
+            return '\n  ' + var.get_fortran_type() + ' :: ' + var.get_gwrite() 
+        else:
+            #fill_method = group_params.get_array (var.get_gwrite() ).get_fill_method()
+            dimspec = ''
+            for d in dims:
+                dimspec = dimspec + ':,'
+            dimspec = dimspec.rstrip (',')
+            return '\n  ' + var.get_fortran_type() + ', ALLOCATABLE, DIMENSION(' + dimspec + ') :: ' + var.get_gwrite()  
+
+    @staticmethod
+    def get_initialization (var, group_params):
+        dims = var.get_dimensions()
+        if (dims == None):
+            # I think this should be get_name instead of get_gwrite. 
+            #init_val = group_params.get_scalar (var.get_gwrite() ).get_value()
+            init_val = group_params.get_scalar (var.get_name() ).get_value()
+            return '\n  ' + var.get_gwrite() + ' = ' + init_val 
+        else:
+            fill_method = group_params.get_array (var.get_gwrite() ).get_fill_method()
+
+            return '\n  allocate (' + var.get_gwrite() + '(' + fortranFormatter.get_dim_str (var, ',') + ') )'
+
+            #return '\n  ' + var.get_gwrite() + ' = (' + var.get_c_type() + '*) malloc (' + cFormatter.get_dim_str (var, '*') + ' * sizeof (' + var.get_c_type() + ') );\n' + cFormatter.get_fill (var, fill_method)
+
+    @staticmethod
+    def get_dim_str (var, sep):
+        rv = ''
+        for d in var.get_dimensions():
+            rv += d
+            rv += sep
+        return rv.rstrip (sep)
+
+    @staticmethod
+    def get_groupsize_code (group):
+        groupsize_code_string = ''
+        groupsize_code_string += '\n\n! Set the adios group size'
+        groupsize_code_string += '\n  adios_groupsize = &'
+        for v in group.get_vars():
+            if (v.is_scalar() ):
+                groupsize_code_string += ('\n                     %d +' % typeMapper.get_size (v.get_type() ) + ' &')
+            else:
+                groupsize_code_string += ('\n                     %d * ' % typeMapper.get_size (v.get_type() ) )
+                
+                for d in v.get_dimensions():
+                    # need to check whether this is the timestep
+                    groupsize_code_string += '(' + d + ') * '
+
+                groupsize_code_string = groupsize_code_string.rstrip ('* ')
+
+                groupsize_code_string += (' + &')
+
+        # remove the final +, and add the ;
+        groupsize_code_string = groupsize_code_string.rstrip('+ &')
+
+        groupsize_code_string += '\n  call adios_group_size (adios_handle, adios_groupsize, skel_total_size, adios_error)'
+
+        return groupsize_code_string;
+
+
+
+class cFormatter:
+    @staticmethod
+    def get_write_line (var):
+        # The tricky bit here is deciding whether we need the & before the variable name.
+        # We omit it in two cases: 1) the variable type is string, or 2) the variable is not a scalar
+        if (var.get_c_type() == 'string' or var.get_dimensions() != None):
+            var_prefix = ''
+        else:
+            var_prefix = '&'
+
+        return '\nadios_write (adios_handle, "' + var.get_name() + '", ' + var_prefix + var.get_gwrite() + ');'  
+
+    @staticmethod
+    def get_read_all_line (var):
+        if (var.get_c_type() == 'string' or var.get_dimensions() != None):
+            var_prefix = ''
+        else:
+            var_prefix = '&'
+
+        return '\nadios_write (adios_handle, "' + var.get_name() + '", ' + var_prefix + var.get_gwrite() + ');'
+
+    @staticmethod
+    def get_dim_str (var, sep):
+        rv = ''
+        for d in var.get_dimensions():
+            rv += d
+            rv += sep
+        return rv.rstrip (sep)
+
+
+    @staticmethod
+    def get_fill (var, method):
+        fill_content = ''
+
+        if (method == 'rank'):
+            dims = var.get_dimensions()
+            fill_content = ''
+
+            fill_content += 'for (skel_i = 0; skel_i < ' + cFormatter.get_dim_str (var, '*') + '; skel_i++) \n'
+
+            fill_content += '    ' + var.get_gwrite() + '[skel_i] = (' + var.get_c_type() + ') skel_mpi_rank;'
+
+        return fill_content
+
+
+    @staticmethod
+    def get_declaration (var, group_params):
+        dims = var.get_dimensions()
+        if (dims == None):
+            # I think this should be get_name instead of get_gwrite. 
+            #init_val = group_params.get_scalar (var.get_gwrite() ).get_value()
+            init_val = group_params.get_scalar (var.get_name() ).get_value()
+            return '\n' + var.get_c_type() + ' ' + var.get_gwrite() + ';'
+        else:
+            fill_method = group_params.get_array (var.get_gwrite() ).get_fill_method()
+
+            return '\n' + var.get_c_type() + ' * ' + var.get_gwrite() + ';' 
+    
+    
+    @staticmethod
+    def get_initialization (var, group_params):
+        dims = var.get_dimensions()
+        if (dims == None):
+            # I think this should be get_name instead of get_gwrite. 
+            #init_val = group_params.get_scalar (var.get_gwrite() ).get_value()
+            init_val = group_params.get_scalar (var.get_name() ).get_value()
+            return '\n' + var.get_gwrite() + ' = ' + init_val + ';'
+        else:
+            fill_method = group_params.get_array (var.get_gwrite() ).get_fill_method()
+
+            return '\n' + var.get_gwrite() + ' = (' + var.get_c_type() + '*) malloc (' + cFormatter.get_dim_str (var, '*') + ' * sizeof (' + var.get_c_type() + ') );\n' + cFormatter.get_fill (var, fill_method)
+
+
+
+    @staticmethod
+    def get_groupsize_code (group):
+        groupsize_code_string = ''
+        groupsize_code_string += '\n\n// Set the adios group size'
+        groupsize_code_string += '\nadios_groupsize ='
+        for v in group.get_vars():
+            if (v.is_scalar() ):
+                groupsize_code_string += ('\n                     %d +' % typeMapper.get_size (v.get_type() ) )
+            else:
+                groupsize_code_string += ('\n                     %d * ' % typeMapper.get_size (v.get_type() ) )
+                
+                for d in v.get_dimensions():
+                    # need to check whether this is the timestep
+                    groupsize_code_string += '(' + d + ') * '
+
+                groupsize_code_string = groupsize_code_string.rstrip ('* ')
+
+                groupsize_code_string += (' +')
+
+        # remove the final +, and add the ;
+        groupsize_code_string = groupsize_code_string.rstrip('+') + ';'
+
+        groupsize_code_string += '\nadios_group_size (adios_handle, adios_groupsize, &skel_total_size);'
+
+        return groupsize_code_string;
+
+
+
+
diff --git a/utils/skel/lib/argparse.py b/utils/skel/lib/argparse.py
new file mode 100644
index 0000000..32d948c
--- /dev/null
+++ b/utils/skel/lib/argparse.py
@@ -0,0 +1,2362 @@
+# Author: Steven J. Bethard <steven.bethard at gmail.com>.
+
+"""Command-line parsing library
+
+This module is an optparse-inspired command-line parsing library that:
+
+    - handles both optional and positional arguments
+    - produces highly informative usage messages
+    - supports parsers that dispatch to sub-parsers
+
+The following is a simple usage example that sums integers from the
+command-line and writes the result to a file::
+
+    parser = argparse.ArgumentParser(
+        description='sum the integers at the command line')
+    parser.add_argument(
+        'integers', metavar='int', nargs='+', type=int,
+        help='an integer to be summed')
+    parser.add_argument(
+        '--log', default=sys.stdout, type=argparse.FileType('w'),
+        help='the file where the sum should be written')
+    args = parser.parse_args()
+    args.log.write('%s' % sum(args.integers))
+    args.log.close()
+
+The module contains the following public classes:
+
+    - ArgumentParser -- The main entry point for command-line parsing. As the
+        example above shows, the add_argument() method is used to populate
+        the parser with actions for optional and positional arguments. Then
+        the parse_args() method is invoked to convert the args at the
+        command-line into an object with attributes.
+
+    - ArgumentError -- The exception raised by ArgumentParser objects when
+        there are errors with the parser's actions. Errors raised while
+        parsing the command-line are caught by ArgumentParser and emitted
+        as command-line messages.
+
+    - FileType -- A factory for defining types of files to be created. As the
+        example above shows, instances of FileType are typically passed as
+        the type= argument of add_argument() calls.
+
+    - Action -- The base class for parser actions. Typically actions are
+        selected by passing strings like 'store_true' or 'append_const' to
+        the action= argument of add_argument(). However, for greater
+        customization of ArgumentParser actions, subclasses of Action may
+        be defined and passed as the action= argument.
+
+    - HelpFormatter, RawDescriptionHelpFormatter, RawTextHelpFormatter,
+        ArgumentDefaultsHelpFormatter -- Formatter classes which
+        may be passed as the formatter_class= argument to the
+        ArgumentParser constructor. HelpFormatter is the default,
+        RawDescriptionHelpFormatter and RawTextHelpFormatter tell the parser
+        not to change the formatting for help text, and
+        ArgumentDefaultsHelpFormatter adds information about argument defaults
+        to the help.
+
+All other classes in this module are considered implementation details.
+(Also note that HelpFormatter and RawDescriptionHelpFormatter are only
+considered public as object names -- the API of the formatter objects is
+still considered an implementation detail.)
+"""
+
+__version__ = '1.2.1'
+__all__ = [
+    'ArgumentParser',
+    'ArgumentError',
+    'ArgumentTypeError',
+    'FileType',
+    'HelpFormatter',
+    'ArgumentDefaultsHelpFormatter',
+    'RawDescriptionHelpFormatter',
+    'RawTextHelpFormatter',
+    'Namespace',
+    'Action',
+    'ONE_OR_MORE',
+    'OPTIONAL',
+    'PARSER',
+    'REMAINDER',
+    'SUPPRESS',
+    'ZERO_OR_MORE',
+]
+
+
+import copy as _copy
+import os as _os
+import re as _re
+import sys as _sys
+import textwrap as _textwrap
+
+from gettext import gettext as _
+
+try:
+    set
+except NameError:
+    # for python < 2.4 compatibility (sets module is there since 2.3):
+    from sets import Set as set
+
+try:
+    basestring
+except NameError:
+    basestring = str
+
+try:
+    sorted
+except NameError:
+    # for python < 2.4 compatibility:
+    def sorted(iterable, reverse=False):
+        result = list(iterable)
+        result.sort()
+        if reverse:
+            result.reverse()
+        return result
+
+
+def _callable(obj):
+    return hasattr(obj, '__call__') or hasattr(obj, '__bases__')
+
+
+SUPPRESS = '==SUPPRESS=='
+
+OPTIONAL = '?'
+ZERO_OR_MORE = '*'
+ONE_OR_MORE = '+'
+PARSER = 'A...'
+REMAINDER = '...'
+_UNRECOGNIZED_ARGS_ATTR = '_unrecognized_args'
+
+# =============================
+# Utility functions and classes
+# =============================
+
+class _AttributeHolder(object):
+    """Abstract base class that provides __repr__.
+
+    The __repr__ method returns a string in the format::
+        ClassName(attr=name, attr=name, ...)
+    The attributes are determined either by a class-level attribute,
+    '_kwarg_names', or by inspecting the instance __dict__.
+    """
+
+    def __repr__(self):
+        type_name = type(self).__name__
+        arg_strings = []
+        for arg in self._get_args():
+            arg_strings.append(repr(arg))
+        for name, value in self._get_kwargs():
+            arg_strings.append('%s=%r' % (name, value))
+        return '%s(%s)' % (type_name, ', '.join(arg_strings))
+
+    def _get_kwargs(self):
+        return sorted(self.__dict__.items())
+
+    def _get_args(self):
+        return []
+
+
+def _ensure_value(namespace, name, value):
+    if getattr(namespace, name, None) is None:
+        setattr(namespace, name, value)
+    return getattr(namespace, name)
+
+
+# ===============
+# Formatting Help
+# ===============
+
+class HelpFormatter(object):
+    """Formatter for generating usage messages and argument help strings.
+
+    Only the name of this class is considered a public API. All the methods
+    provided by the class are considered an implementation detail.
+    """
+
+    def __init__(self,
+                 prog,
+                 indent_increment=2,
+                 max_help_position=24,
+                 width=None):
+
+        # default setting for width
+        if width is None:
+            try:
+                width = int(_os.environ['COLUMNS'])
+            except (KeyError, ValueError):
+                width = 80
+            width -= 2
+
+        self._prog = prog
+        self._indent_increment = indent_increment
+        self._max_help_position = max_help_position
+        self._width = width
+
+        self._current_indent = 0
+        self._level = 0
+        self._action_max_length = 0
+
+        self._root_section = self._Section(self, None)
+        self._current_section = self._root_section
+
+        self._whitespace_matcher = _re.compile(r'\s+')
+        self._long_break_matcher = _re.compile(r'\n\n\n+')
+
+    # ===============================
+    # Section and indentation methods
+    # ===============================
+    def _indent(self):
+        self._current_indent += self._indent_increment
+        self._level += 1
+
+    def _dedent(self):
+        self._current_indent -= self._indent_increment
+        assert self._current_indent >= 0, 'Indent decreased below 0.'
+        self._level -= 1
+
+    class _Section(object):
+
+        def __init__(self, formatter, parent, heading=None):
+            self.formatter = formatter
+            self.parent = parent
+            self.heading = heading
+            self.items = []
+
+        def format_help(self):
+            # format the indented section
+            if self.parent is not None:
+                self.formatter._indent()
+            join = self.formatter._join_parts
+            for func, args in self.items:
+                func(*args)
+            item_help = join([func(*args) for func, args in self.items])
+            if self.parent is not None:
+                self.formatter._dedent()
+
+            # return nothing if the section was empty
+            if not item_help:
+                return ''
+
+            # add the heading if the section was non-empty
+            if self.heading is not SUPPRESS and self.heading is not None:
+                current_indent = self.formatter._current_indent
+                heading = '%*s%s:\n' % (current_indent, '', self.heading)
+            else:
+                heading = ''
+
+            # join the section-initial newline, the heading and the help
+            return join(['\n', heading, item_help, '\n'])
+
+    def _add_item(self, func, args):
+        self._current_section.items.append((func, args))
+
+    # ========================
+    # Message building methods
+    # ========================
+    def start_section(self, heading):
+        self._indent()
+        section = self._Section(self, self._current_section, heading)
+        self._add_item(section.format_help, [])
+        self._current_section = section
+
+    def end_section(self):
+        self._current_section = self._current_section.parent
+        self._dedent()
+
+    def add_text(self, text):
+        if text is not SUPPRESS and text is not None:
+            self._add_item(self._format_text, [text])
+
+    def add_usage(self, usage, actions, groups, prefix=None):
+        if usage is not SUPPRESS:
+            args = usage, actions, groups, prefix
+            self._add_item(self._format_usage, args)
+
+    def add_argument(self, action):
+        if action.help is not SUPPRESS:
+
+            # find all invocations
+            get_invocation = self._format_action_invocation
+            invocations = [get_invocation(action)]
+            for subaction in self._iter_indented_subactions(action):
+                invocations.append(get_invocation(subaction))
+
+            # update the maximum item length
+            invocation_length = max([len(s) for s in invocations])
+            action_length = invocation_length + self._current_indent
+            self._action_max_length = max(self._action_max_length,
+                                          action_length)
+
+            # add the item to the list
+            self._add_item(self._format_action, [action])
+
+    def add_arguments(self, actions):
+        for action in actions:
+            self.add_argument(action)
+
+    # =======================
+    # Help-formatting methods
+    # =======================
+    def format_help(self):
+        help = self._root_section.format_help()
+        if help:
+            help = self._long_break_matcher.sub('\n\n', help)
+            help = help.strip('\n') + '\n'
+        return help
+
+    def _join_parts(self, part_strings):
+        return ''.join([part
+                        for part in part_strings
+                        if part and part is not SUPPRESS])
+
+    def _format_usage(self, usage, actions, groups, prefix):
+        if prefix is None:
+            prefix = _('usage: ')
+
+        # if usage is specified, use that
+        if usage is not None:
+            usage = usage % dict(prog=self._prog)
+
+        # if no optionals or positionals are available, usage is just prog
+        elif usage is None and not actions:
+            usage = '%(prog)s' % dict(prog=self._prog)
+
+        # if optionals and positionals are available, calculate usage
+        elif usage is None:
+            prog = '%(prog)s' % dict(prog=self._prog)
+
+            # split optionals from positionals
+            optionals = []
+            positionals = []
+            for action in actions:
+                if action.option_strings:
+                    optionals.append(action)
+                else:
+                    positionals.append(action)
+
+            # build full usage string
+            format = self._format_actions_usage
+            action_usage = format(optionals + positionals, groups)
+            usage = ' '.join([s for s in [prog, action_usage] if s])
+
+            # wrap the usage parts if it's too long
+            text_width = self._width - self._current_indent
+            if len(prefix) + len(usage) > text_width:
+
+                # break usage into wrappable parts
+                part_regexp = r'\(.*?\)+|\[.*?\]+|\S+'
+                opt_usage = format(optionals, groups)
+                pos_usage = format(positionals, groups)
+                opt_parts = _re.findall(part_regexp, opt_usage)
+                pos_parts = _re.findall(part_regexp, pos_usage)
+                assert ' '.join(opt_parts) == opt_usage
+                assert ' '.join(pos_parts) == pos_usage
+
+                # helper for wrapping lines
+                def get_lines(parts, indent, prefix=None):
+                    lines = []
+                    line = []
+                    if prefix is not None:
+                        line_len = len(prefix) - 1
+                    else:
+                        line_len = len(indent) - 1
+                    for part in parts:
+                        if line_len + 1 + len(part) > text_width:
+                            lines.append(indent + ' '.join(line))
+                            line = []
+                            line_len = len(indent) - 1
+                        line.append(part)
+                        line_len += len(part) + 1
+                    if line:
+                        lines.append(indent + ' '.join(line))
+                    if prefix is not None:
+                        lines[0] = lines[0][len(indent):]
+                    return lines
+
+                # if prog is short, follow it with optionals or positionals
+                if len(prefix) + len(prog) <= 0.75 * text_width:
+                    indent = ' ' * (len(prefix) + len(prog) + 1)
+                    if opt_parts:
+                        lines = get_lines([prog] + opt_parts, indent, prefix)
+                        lines.extend(get_lines(pos_parts, indent))
+                    elif pos_parts:
+                        lines = get_lines([prog] + pos_parts, indent, prefix)
+                    else:
+                        lines = [prog]
+
+                # if prog is long, put it on its own line
+                else:
+                    indent = ' ' * len(prefix)
+                    parts = opt_parts + pos_parts
+                    lines = get_lines(parts, indent)
+                    if len(lines) > 1:
+                        lines = []
+                        lines.extend(get_lines(opt_parts, indent))
+                        lines.extend(get_lines(pos_parts, indent))
+                    lines = [prog] + lines
+
+                # join lines into usage
+                usage = '\n'.join(lines)
+
+        # prefix with 'usage:'
+        return '%s%s\n\n' % (prefix, usage)
+
+    def _format_actions_usage(self, actions, groups):
+        # find group indices and identify actions in groups
+        group_actions = set()
+        inserts = {}
+        for group in groups:
+            try:
+                start = actions.index(group._group_actions[0])
+            except ValueError:
+                continue
+            else:
+                end = start + len(group._group_actions)
+                if actions[start:end] == group._group_actions:
+                    for action in group._group_actions:
+                        group_actions.add(action)
+                    if not group.required:
+                        if start in inserts:
+                            inserts[start] += ' ['
+                        else:
+                            inserts[start] = '['
+                        inserts[end] = ']'
+                    else:
+                        if start in inserts:
+                            inserts[start] += ' ('
+                        else:
+                            inserts[start] = '('
+                        inserts[end] = ')'
+                    for i in range(start + 1, end):
+                        inserts[i] = '|'
+
+        # collect all actions format strings
+        parts = []
+        for i, action in enumerate(actions):
+
+            # suppressed arguments are marked with None
+            # remove | separators for suppressed arguments
+            if action.help is SUPPRESS:
+                parts.append(None)
+                if inserts.get(i) == '|':
+                    inserts.pop(i)
+                elif inserts.get(i + 1) == '|':
+                    inserts.pop(i + 1)
+
+            # produce all arg strings
+            elif not action.option_strings:
+                part = self._format_args(action, action.dest)
+
+                # if it's in a group, strip the outer []
+                if action in group_actions:
+                    if part[0] == '[' and part[-1] == ']':
+                        part = part[1:-1]
+
+                # add the action string to the list
+                parts.append(part)
+
+            # produce the first way to invoke the option in brackets
+            else:
+                option_string = action.option_strings[0]
+
+                # if the Optional doesn't take a value, format is:
+                #    -s or --long
+                if action.nargs == 0:
+                    part = '%s' % option_string
+
+                # if the Optional takes a value, format is:
+                #    -s ARGS or --long ARGS
+                else:
+                    default = action.dest.upper()
+                    args_string = self._format_args(action, default)
+                    part = '%s %s' % (option_string, args_string)
+
+                # make it look optional if it's not required or in a group
+                if not action.required and action not in group_actions:
+                    part = '[%s]' % part
+
+                # add the action string to the list
+                parts.append(part)
+
+        # insert things at the necessary indices
+        for i in sorted(inserts, reverse=True):
+            parts[i:i] = [inserts[i]]
+
+        # join all the action items with spaces
+        text = ' '.join([item for item in parts if item is not None])
+
+        # clean up separators for mutually exclusive groups
+        open = r'[\[(]'
+        close = r'[\])]'
+        text = _re.sub(r'(%s) ' % open, r'\1', text)
+        text = _re.sub(r' (%s)' % close, r'\1', text)
+        text = _re.sub(r'%s *%s' % (open, close), r'', text)
+        text = _re.sub(r'\(([^|]*)\)', r'\1', text)
+        text = text.strip()
+
+        # return the text
+        return text
+
+    def _format_text(self, text):
+        if '%(prog)' in text:
+            text = text % dict(prog=self._prog)
+        text_width = self._width - self._current_indent
+        indent = ' ' * self._current_indent
+        return self._fill_text(text, text_width, indent) + '\n\n'
+
+    def _format_action(self, action):
+        # determine the required width and the entry label
+        help_position = min(self._action_max_length + 2,
+                            self._max_help_position)
+        help_width = self._width - help_position
+        action_width = help_position - self._current_indent - 2
+        action_header = self._format_action_invocation(action)
+
+        # ho nelp; start on same line and add a final newline
+        if not action.help:
+            tup = self._current_indent, '', action_header
+            action_header = '%*s%s\n' % tup
+
+        # short action name; start on the same line and pad two spaces
+        elif len(action_header) <= action_width:
+            tup = self._current_indent, '', action_width, action_header
+            action_header = '%*s%-*s  ' % tup
+            indent_first = 0
+
+        # long action name; start on the next line
+        else:
+            tup = self._current_indent, '', action_header
+            action_header = '%*s%s\n' % tup
+            indent_first = help_position
+
+        # collect the pieces of the action help
+        parts = [action_header]
+
+        # if there was help for the action, add lines of help text
+        if action.help:
+            help_text = self._expand_help(action)
+            help_lines = self._split_lines(help_text, help_width)
+            parts.append('%*s%s\n' % (indent_first, '', help_lines[0]))
+            for line in help_lines[1:]:
+                parts.append('%*s%s\n' % (help_position, '', line))
+
+        # or add a newline if the description doesn't end with one
+        elif not action_header.endswith('\n'):
+            parts.append('\n')
+
+        # if there are any sub-actions, add their help as well
+        for subaction in self._iter_indented_subactions(action):
+            parts.append(self._format_action(subaction))
+
+        # return a single string
+        return self._join_parts(parts)
+
+    def _format_action_invocation(self, action):
+        if not action.option_strings:
+            metavar, = self._metavar_formatter(action, action.dest)(1)
+            return metavar
+
+        else:
+            parts = []
+
+            # if the Optional doesn't take a value, format is:
+            #    -s, --long
+            if action.nargs == 0:
+                parts.extend(action.option_strings)
+
+            # if the Optional takes a value, format is:
+            #    -s ARGS, --long ARGS
+            else:
+                default = action.dest.upper()
+                args_string = self._format_args(action, default)
+                for option_string in action.option_strings:
+                    parts.append('%s %s' % (option_string, args_string))
+
+            return ', '.join(parts)
+
+    def _metavar_formatter(self, action, default_metavar):
+        if action.metavar is not None:
+            result = action.metavar
+        elif action.choices is not None:
+            choice_strs = [str(choice) for choice in action.choices]
+            result = '{%s}' % ','.join(choice_strs)
+        else:
+            result = default_metavar
+
+        def format(tuple_size):
+            if isinstance(result, tuple):
+                return result
+            else:
+                return (result, ) * tuple_size
+        return format
+
+    def _format_args(self, action, default_metavar):
+        get_metavar = self._metavar_formatter(action, default_metavar)
+        if action.nargs is None:
+            result = '%s' % get_metavar(1)
+        elif action.nargs == OPTIONAL:
+            result = '[%s]' % get_metavar(1)
+        elif action.nargs == ZERO_OR_MORE:
+            result = '[%s [%s ...]]' % get_metavar(2)
+        elif action.nargs == ONE_OR_MORE:
+            result = '%s [%s ...]' % get_metavar(2)
+        elif action.nargs == REMAINDER:
+            result = '...'
+        elif action.nargs == PARSER:
+            result = '%s ...' % get_metavar(1)
+        else:
+            formats = ['%s' for _ in range(action.nargs)]
+            result = ' '.join(formats) % get_metavar(action.nargs)
+        return result
+
+    def _expand_help(self, action):
+        params = dict(vars(action), prog=self._prog)
+        for name in list(params):
+            if params[name] is SUPPRESS:
+                del params[name]
+        for name in list(params):
+            if hasattr(params[name], '__name__'):
+                params[name] = params[name].__name__
+        if params.get('choices') is not None:
+            choices_str = ', '.join([str(c) for c in params['choices']])
+            params['choices'] = choices_str
+        return self._get_help_string(action) % params
+
+    def _iter_indented_subactions(self, action):
+        try:
+            get_subactions = action._get_subactions
+        except AttributeError:
+            pass
+        else:
+            self._indent()
+            for subaction in get_subactions():
+                yield subaction
+            self._dedent()
+
+    def _split_lines(self, text, width):
+        text = self._whitespace_matcher.sub(' ', text).strip()
+        return _textwrap.wrap(text, width)
+
+    def _fill_text(self, text, width, indent):
+        text = self._whitespace_matcher.sub(' ', text).strip()
+        return _textwrap.fill(text, width, initial_indent=indent,
+                                           subsequent_indent=indent)
+
+    def _get_help_string(self, action):
+        return action.help
+
+
+class RawDescriptionHelpFormatter(HelpFormatter):
+    """Help message formatter which retains any formatting in descriptions.
+
+    Only the name of this class is considered a public API. All the methods
+    provided by the class are considered an implementation detail.
+    """
+
+    def _fill_text(self, text, width, indent):
+        return ''.join([indent + line for line in text.splitlines(True)])
+
+
+class RawTextHelpFormatter(RawDescriptionHelpFormatter):
+    """Help message formatter which retains formatting of all help text.
+
+    Only the name of this class is considered a public API. All the methods
+    provided by the class are considered an implementation detail.
+    """
+
+    def _split_lines(self, text, width):
+        return text.splitlines()
+
+
+class ArgumentDefaultsHelpFormatter(HelpFormatter):
+    """Help message formatter which adds default values to argument help.
+
+    Only the name of this class is considered a public API. All the methods
+    provided by the class are considered an implementation detail.
+    """
+
+    def _get_help_string(self, action):
+        help = action.help
+        if '%(default)' not in action.help:
+            if action.default is not SUPPRESS:
+                defaulting_nargs = [OPTIONAL, ZERO_OR_MORE]
+                if action.option_strings or action.nargs in defaulting_nargs:
+                    help += ' (default: %(default)s)'
+        return help
+
+
+# =====================
+# Options and Arguments
+# =====================
+
+def _get_action_name(argument):
+    if argument is None:
+        return None
+    elif argument.option_strings:
+        return  '/'.join(argument.option_strings)
+    elif argument.metavar not in (None, SUPPRESS):
+        return argument.metavar
+    elif argument.dest not in (None, SUPPRESS):
+        return argument.dest
+    else:
+        return None
+
+
+class ArgumentError(Exception):
+    """An error from creating or using an argument (optional or positional).
+
+    The string value of this exception is the message, augmented with
+    information about the argument that caused it.
+    """
+
+    def __init__(self, argument, message):
+        self.argument_name = _get_action_name(argument)
+        self.message = message
+
+    def __str__(self):
+        if self.argument_name is None:
+            format = '%(message)s'
+        else:
+            format = 'argument %(argument_name)s: %(message)s'
+        return format % dict(message=self.message,
+                             argument_name=self.argument_name)
+
+
+class ArgumentTypeError(Exception):
+    """An error from trying to convert a command line string to a type."""
+    pass
+
+
+# ==============
+# Action classes
+# ==============
+
+class Action(_AttributeHolder):
+    """Information about how to convert command line strings to Python objects.
+
+    Action objects are used by an ArgumentParser to represent the information
+    needed to parse a single argument from one or more strings from the
+    command line. The keyword arguments to the Action constructor are also
+    all attributes of Action instances.
+
+    Keyword Arguments:
+
+        - option_strings -- A list of command-line option strings which
+            should be associated with this action.
+
+        - dest -- The name of the attribute to hold the created object(s)
+
+        - nargs -- The number of command-line arguments that should be
+            consumed. By default, one argument will be consumed and a single
+            value will be produced.  Other values include:
+                - N (an integer) consumes N arguments (and produces a list)
+                - '?' consumes zero or one arguments
+                - '*' consumes zero or more arguments (and produces a list)
+                - '+' consumes one or more arguments (and produces a list)
+            Note that the difference between the default and nargs=1 is that
+            with the default, a single value will be produced, while with
+            nargs=1, a list containing a single value will be produced.
+
+        - const -- The value to be produced if the option is specified and the
+            option uses an action that takes no values.
+
+        - default -- The value to be produced if the option is not specified.
+
+        - type -- The type which the command-line arguments should be converted
+            to, should be one of 'string', 'int', 'float', 'complex' or a
+            callable object that accepts a single string argument. If None,
+            'string' is assumed.
+
+        - choices -- A container of values that should be allowed. If not None,
+            after a command-line argument has been converted to the appropriate
+            type, an exception will be raised if it is not a member of this
+            collection.
+
+        - required -- True if the action must always be specified at the
+            command line. This is only meaningful for optional command-line
+            arguments.
+
+        - help -- The help string describing the argument.
+
+        - metavar -- The name to be used for the option's argument with the
+            help string. If None, the 'dest' value will be used as the name.
+    """
+
+    def __init__(self,
+                 option_strings,
+                 dest,
+                 nargs=None,
+                 const=None,
+                 default=None,
+                 type=None,
+                 choices=None,
+                 required=False,
+                 help=None,
+                 metavar=None):
+        self.option_strings = option_strings
+        self.dest = dest
+        self.nargs = nargs
+        self.const = const
+        self.default = default
+        self.type = type
+        self.choices = choices
+        self.required = required
+        self.help = help
+        self.metavar = metavar
+
+    def _get_kwargs(self):
+        names = [
+            'option_strings',
+            'dest',
+            'nargs',
+            'const',
+            'default',
+            'type',
+            'choices',
+            'help',
+            'metavar',
+        ]
+        return [(name, getattr(self, name)) for name in names]
+
+    def __call__(self, parser, namespace, values, option_string=None):
+        raise NotImplementedError(_('.__call__() not defined'))
+
+
+class _StoreAction(Action):
+
+    def __init__(self,
+                 option_strings,
+                 dest,
+                 nargs=None,
+                 const=None,
+                 default=None,
+                 type=None,
+                 choices=None,
+                 required=False,
+                 help=None,
+                 metavar=None):
+        if nargs == 0:
+            raise ValueError('nargs for store actions must be > 0; if you '
+                             'have nothing to store, actions such as store '
+                             'true or store const may be more appropriate')
+        if const is not None and nargs != OPTIONAL:
+            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
+        super(_StoreAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            nargs=nargs,
+            const=const,
+            default=default,
+            type=type,
+            choices=choices,
+            required=required,
+            help=help,
+            metavar=metavar)
+
+    def __call__(self, parser, namespace, values, option_string=None):
+        setattr(namespace, self.dest, values)
+
+
+class _StoreConstAction(Action):
+
+    def __init__(self,
+                 option_strings,
+                 dest,
+                 const,
+                 default=None,
+                 required=False,
+                 help=None,
+                 metavar=None):
+        super(_StoreConstAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            nargs=0,
+            const=const,
+            default=default,
+            required=required,
+            help=help)
+
+    def __call__(self, parser, namespace, values, option_string=None):
+        setattr(namespace, self.dest, self.const)
+
+
+class _StoreTrueAction(_StoreConstAction):
+
+    def __init__(self,
+                 option_strings,
+                 dest,
+                 default=False,
+                 required=False,
+                 help=None):
+        super(_StoreTrueAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            const=True,
+            default=default,
+            required=required,
+            help=help)
+
+
+class _StoreFalseAction(_StoreConstAction):
+
+    def __init__(self,
+                 option_strings,
+                 dest,
+                 default=True,
+                 required=False,
+                 help=None):
+        super(_StoreFalseAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            const=False,
+            default=default,
+            required=required,
+            help=help)
+
+
+class _AppendAction(Action):
+
+    def __init__(self,
+                 option_strings,
+                 dest,
+                 nargs=None,
+                 const=None,
+                 default=None,
+                 type=None,
+                 choices=None,
+                 required=False,
+                 help=None,
+                 metavar=None):
+        if nargs == 0:
+            raise ValueError('nargs for append actions must be > 0; if arg '
+                             'strings are not supplying the value to append, '
+                             'the append const action may be more appropriate')
+        if const is not None and nargs != OPTIONAL:
+            raise ValueError('nargs must be %r to supply const' % OPTIONAL)
+        super(_AppendAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            nargs=nargs,
+            const=const,
+            default=default,
+            type=type,
+            choices=choices,
+            required=required,
+            help=help,
+            metavar=metavar)
+
+    def __call__(self, parser, namespace, values, option_string=None):
+        items = _copy.copy(_ensure_value(namespace, self.dest, []))
+        items.append(values)
+        setattr(namespace, self.dest, items)
+
+
+class _AppendConstAction(Action):
+
+    def __init__(self,
+                 option_strings,
+                 dest,
+                 const,
+                 default=None,
+                 required=False,
+                 help=None,
+                 metavar=None):
+        super(_AppendConstAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            nargs=0,
+            const=const,
+            default=default,
+            required=required,
+            help=help,
+            metavar=metavar)
+
+    def __call__(self, parser, namespace, values, option_string=None):
+        items = _copy.copy(_ensure_value(namespace, self.dest, []))
+        items.append(self.const)
+        setattr(namespace, self.dest, items)
+
+
+class _CountAction(Action):
+
+    def __init__(self,
+                 option_strings,
+                 dest,
+                 default=None,
+                 required=False,
+                 help=None):
+        super(_CountAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            nargs=0,
+            default=default,
+            required=required,
+            help=help)
+
+    def __call__(self, parser, namespace, values, option_string=None):
+        new_count = _ensure_value(namespace, self.dest, 0) + 1
+        setattr(namespace, self.dest, new_count)
+
+
+class _HelpAction(Action):
+
+    def __init__(self,
+                 option_strings,
+                 dest=SUPPRESS,
+                 default=SUPPRESS,
+                 help=None):
+        super(_HelpAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            default=default,
+            nargs=0,
+            help=help)
+
+    def __call__(self, parser, namespace, values, option_string=None):
+        parser.print_help()
+        parser.exit()
+
+
+class _VersionAction(Action):
+
+    def __init__(self,
+                 option_strings,
+                 version=None,
+                 dest=SUPPRESS,
+                 default=SUPPRESS,
+                 help="show program's version number and exit"):
+        super(_VersionAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            default=default,
+            nargs=0,
+            help=help)
+        self.version = version
+
+    def __call__(self, parser, namespace, values, option_string=None):
+        version = self.version
+        if version is None:
+            version = parser.version
+        formatter = parser._get_formatter()
+        formatter.add_text(version)
+        parser.exit(message=formatter.format_help())
+
+
+class _SubParsersAction(Action):
+
+    class _ChoicesPseudoAction(Action):
+
+        def __init__(self, name, help):
+            sup = super(_SubParsersAction._ChoicesPseudoAction, self)
+            sup.__init__(option_strings=[], dest=name, help=help)
+
+    def __init__(self,
+                 option_strings,
+                 prog,
+                 parser_class,
+                 dest=SUPPRESS,
+                 help=None,
+                 metavar=None):
+
+        self._prog_prefix = prog
+        self._parser_class = parser_class
+        self._name_parser_map = {}
+        self._choices_actions = []
+
+        super(_SubParsersAction, self).__init__(
+            option_strings=option_strings,
+            dest=dest,
+            nargs=PARSER,
+            choices=self._name_parser_map,
+            help=help,
+            metavar=metavar)
+
+    def add_parser(self, name, **kwargs):
+        # set prog from the existing prefix
+        if kwargs.get('prog') is None:
+            kwargs['prog'] = '%s %s' % (self._prog_prefix, name)
+
+        # create a pseudo-action to hold the choice help
+        if 'help' in kwargs:
+            help = kwargs.pop('help')
+            choice_action = self._ChoicesPseudoAction(name, help)
+            self._choices_actions.append(choice_action)
+
+        # create the parser and add it to the map
+        parser = self._parser_class(**kwargs)
+        self._name_parser_map[name] = parser
+        return parser
+
+    def _get_subactions(self):
+        return self._choices_actions
+
+    def __call__(self, parser, namespace, values, option_string=None):
+        parser_name = values[0]
+        arg_strings = values[1:]
+
+        # set the parser name if requested
+        if self.dest is not SUPPRESS:
+            setattr(namespace, self.dest, parser_name)
+
+        # select the parser
+        try:
+            parser = self._name_parser_map[parser_name]
+        except KeyError:
+            tup = parser_name, ', '.join(self._name_parser_map)
+            msg = _('unknown parser %r (choices: %s)' % tup)
+            raise ArgumentError(self, msg)
+
+        # parse all the remaining options into the namespace
+        # store any unrecognized options on the object, so that the top
+        # level parser can decide what to do with them
+        namespace, arg_strings = parser.parse_known_args(arg_strings, namespace)
+        if arg_strings:
+            vars(namespace).setdefault(_UNRECOGNIZED_ARGS_ATTR, [])
+            getattr(namespace, _UNRECOGNIZED_ARGS_ATTR).extend(arg_strings)
+
+
+# ==============
+# Type classes
+# ==============
+
+class FileType(object):
+    """Factory for creating file object types
+
+    Instances of FileType are typically passed as type= arguments to the
+    ArgumentParser add_argument() method.
+
+    Keyword Arguments:
+        - mode -- A string indicating how the file is to be opened. Accepts the
+            same values as the builtin open() function.
+        - bufsize -- The file's desired buffer size. Accepts the same values as
+            the builtin open() function.
+    """
+
+    def __init__(self, mode='r', bufsize=None):
+        self._mode = mode
+        self._bufsize = bufsize
+
+    def __call__(self, string):
+        # the special argument "-" means sys.std{in,out}
+        if string == '-':
+            if 'r' in self._mode:
+                return _sys.stdin
+            elif 'w' in self._mode:
+                return _sys.stdout
+            else:
+                msg = _('argument "-" with mode %r' % self._mode)
+                raise ValueError(msg)
+
+        # all other arguments are used as file names
+        if self._bufsize:
+            return open(string, self._mode, self._bufsize)
+        else:
+            return open(string, self._mode)
+
+    def __repr__(self):
+        args = [self._mode, self._bufsize]
+        args_str = ', '.join([repr(arg) for arg in args if arg is not None])
+        return '%s(%s)' % (type(self).__name__, args_str)
+
+# ===========================
+# Optional and Positional Parsing
+# ===========================
+
+class Namespace(_AttributeHolder):
+    """Simple object for storing attributes.
+
+    Implements equality by attribute names and values, and provides a simple
+    string representation.
+    """
+
+    def __init__(self, **kwargs):
+        for name in kwargs:
+            setattr(self, name, kwargs[name])
+
+    __hash__ = None
+
+    def __eq__(self, other):
+        return vars(self) == vars(other)
+
+    def __ne__(self, other):
+        return not (self == other)
+
+    def __contains__(self, key):
+        return key in self.__dict__
+
+
+class _ActionsContainer(object):
+
+    def __init__(self,
+                 description,
+                 prefix_chars,
+                 argument_default,
+                 conflict_handler):
+        super(_ActionsContainer, self).__init__()
+
+        self.description = description
+        self.argument_default = argument_default
+        self.prefix_chars = prefix_chars
+        self.conflict_handler = conflict_handler
+
+        # set up registries
+        self._registries = {}
+
+        # register actions
+        self.register('action', None, _StoreAction)
+        self.register('action', 'store', _StoreAction)
+        self.register('action', 'store_const', _StoreConstAction)
+        self.register('action', 'store_true', _StoreTrueAction)
+        self.register('action', 'store_false', _StoreFalseAction)
+        self.register('action', 'append', _AppendAction)
+        self.register('action', 'append_const', _AppendConstAction)
+        self.register('action', 'count', _CountAction)
+        self.register('action', 'help', _HelpAction)
+        self.register('action', 'version', _VersionAction)
+        self.register('action', 'parsers', _SubParsersAction)
+
+        # raise an exception if the conflict handler is invalid
+        self._get_handler()
+
+        # action storage
+        self._actions = []
+        self._option_string_actions = {}
+
+        # groups
+        self._action_groups = []
+        self._mutually_exclusive_groups = []
+
+        # defaults storage
+        self._defaults = {}
+
+        # determines whether an "option" looks like a negative number
+        self._negative_number_matcher = _re.compile(r'^-\d+$|^-\d*\.\d+$')
+
+        # whether or not there are any optionals that look like negative
+        # numbers -- uses a list so it can be shared and edited
+        self._has_negative_number_optionals = []
+
+    # ====================
+    # Registration methods
+    # ====================
+    def register(self, registry_name, value, object):
+        registry = self._registries.setdefault(registry_name, {})
+        registry[value] = object
+
+    def _registry_get(self, registry_name, value, default=None):
+        return self._registries[registry_name].get(value, default)
+
+    # ==================================
+    # Namespace default accessor methods
+    # ==================================
+    def set_defaults(self, **kwargs):
+        self._defaults.update(kwargs)
+
+        # if these defaults match any existing arguments, replace
+        # the previous default on the object with the new one
+        for action in self._actions:
+            if action.dest in kwargs:
+                action.default = kwargs[action.dest]
+
+    def get_default(self, dest):
+        for action in self._actions:
+            if action.dest == dest and action.default is not None:
+                return action.default
+        return self._defaults.get(dest, None)
+
+
+    # =======================
+    # Adding argument actions
+    # =======================
+    def add_argument(self, *args, **kwargs):
+        """
+        add_argument(dest, ..., name=value, ...)
+        add_argument(option_string, option_string, ..., name=value, ...)
+        """
+
+        # if no positional args are supplied or only one is supplied and
+        # it doesn't look like an option string, parse a positional
+        # argument
+        chars = self.prefix_chars
+        if not args or len(args) == 1 and args[0][0] not in chars:
+            if args and 'dest' in kwargs:
+                raise ValueError('dest supplied twice for positional argument')
+            kwargs = self._get_positional_kwargs(*args, **kwargs)
+
+        # otherwise, we're adding an optional argument
+        else:
+            kwargs = self._get_optional_kwargs(*args, **kwargs)
+
+        # if no default was supplied, use the parser-level default
+        if 'default' not in kwargs:
+            dest = kwargs['dest']
+            if dest in self._defaults:
+                kwargs['default'] = self._defaults[dest]
+            elif self.argument_default is not None:
+                kwargs['default'] = self.argument_default
+
+        # create the action object, and add it to the parser
+        action_class = self._pop_action_class(kwargs)
+        if not _callable(action_class):
+            raise ValueError('unknown action "%s"' % action_class)
+        action = action_class(**kwargs)
+
+        # raise an error if the action type is not callable
+        type_func = self._registry_get('type', action.type, action.type)
+        if not _callable(type_func):
+            raise ValueError('%r is not callable' % type_func)
+
+        return self._add_action(action)
+
+    def add_argument_group(self, *args, **kwargs):
+        group = _ArgumentGroup(self, *args, **kwargs)
+        self._action_groups.append(group)
+        return group
+
+    def add_mutually_exclusive_group(self, **kwargs):
+        group = _MutuallyExclusiveGroup(self, **kwargs)
+        self._mutually_exclusive_groups.append(group)
+        return group
+
+    def _add_action(self, action):
+        # resolve any conflicts
+        self._check_conflict(action)
+
+        # add to actions list
+        self._actions.append(action)
+        action.container = self
+
+        # index the action by any option strings it has
+        for option_string in action.option_strings:
+            self._option_string_actions[option_string] = action
+
+        # set the flag if any option strings look like negative numbers
+        for option_string in action.option_strings:
+            if self._negative_number_matcher.match(option_string):
+                if not self._has_negative_number_optionals:
+                    self._has_negative_number_optionals.append(True)
+
+        # return the created action
+        return action
+
+    def _remove_action(self, action):
+        self._actions.remove(action)
+
+    def _add_container_actions(self, container):
+        # collect groups by titles
+        title_group_map = {}
+        for group in self._action_groups:
+            if group.title in title_group_map:
+                msg = _('cannot merge actions - two groups are named %r')
+                raise ValueError(msg % (group.title))
+            title_group_map[group.title] = group
+
+        # map each action to its group
+        group_map = {}
+        for group in container._action_groups:
+
+            # if a group with the title exists, use that, otherwise
+            # create a new group matching the container's group
+            if group.title not in title_group_map:
+                title_group_map[group.title] = self.add_argument_group(
+                    title=group.title,
+                    description=group.description,
+                    conflict_handler=group.conflict_handler)
+
+            # map the actions to their new group
+            for action in group._group_actions:
+                group_map[action] = title_group_map[group.title]
+
+        # add container's mutually exclusive groups
+        # NOTE: if add_mutually_exclusive_group ever gains title= and
+        # description= then this code will need to be expanded as above
+        for group in container._mutually_exclusive_groups:
+            mutex_group = self.add_mutually_exclusive_group(
+                required=group.required)
+
+            # map the actions to their new mutex group
+            for action in group._group_actions:
+                group_map[action] = mutex_group
+
+        # add all actions to this container or their group
+        for action in container._actions:
+            group_map.get(action, self)._add_action(action)
+
+    def _get_positional_kwargs(self, dest, **kwargs):
+        # make sure required is not specified
+        if 'required' in kwargs:
+            msg = _("'required' is an invalid argument for positionals")
+            raise TypeError(msg)
+
+        # mark positional arguments as required if at least one is
+        # always required
+        if kwargs.get('nargs') not in [OPTIONAL, ZERO_OR_MORE]:
+            kwargs['required'] = True
+        if kwargs.get('nargs') == ZERO_OR_MORE and 'default' not in kwargs:
+            kwargs['required'] = True
+
+        # return the keyword arguments with no option strings
+        return dict(kwargs, dest=dest, option_strings=[])
+
+    def _get_optional_kwargs(self, *args, **kwargs):
+        # determine short and long option strings
+        option_strings = []
+        long_option_strings = []
+        for option_string in args:
+            # error on strings that don't start with an appropriate prefix
+            if not option_string[0] in self.prefix_chars:
+                msg = _('invalid option string %r: '
+                        'must start with a character %r')
+                tup = option_string, self.prefix_chars
+                raise ValueError(msg % tup)
+
+            # strings starting with two prefix characters are long options
+            option_strings.append(option_string)
+            if option_string[0] in self.prefix_chars:
+                if len(option_string) > 1:
+                    if option_string[1] in self.prefix_chars:
+                        long_option_strings.append(option_string)
+
+        # infer destination, '--foo-bar' -> 'foo_bar' and '-x' -> 'x'
+        dest = kwargs.pop('dest', None)
+        if dest is None:
+            if long_option_strings:
+                dest_option_string = long_option_strings[0]
+            else:
+                dest_option_string = option_strings[0]
+            dest = dest_option_string.lstrip(self.prefix_chars)
+            if not dest:
+                msg = _('dest= is required for options like %r')
+                raise ValueError(msg % option_string)
+            dest = dest.replace('-', '_')
+
+        # return the updated keyword arguments
+        return dict(kwargs, dest=dest, option_strings=option_strings)
+
+    def _pop_action_class(self, kwargs, default=None):
+        action = kwargs.pop('action', default)
+        return self._registry_get('action', action, action)
+
+    def _get_handler(self):
+        # determine function from conflict handler string
+        handler_func_name = '_handle_conflict_%s' % self.conflict_handler
+        try:
+            return getattr(self, handler_func_name)
+        except AttributeError:
+            msg = _('invalid conflict_resolution value: %r')
+            raise ValueError(msg % self.conflict_handler)
+
+    def _check_conflict(self, action):
+
+        # find all options that conflict with this option
+        confl_optionals = []
+        for option_string in action.option_strings:
+            if option_string in self._option_string_actions:
+                confl_optional = self._option_string_actions[option_string]
+                confl_optionals.append((option_string, confl_optional))
+
+        # resolve any conflicts
+        if confl_optionals:
+            conflict_handler = self._get_handler()
+            conflict_handler(action, confl_optionals)
+
+    def _handle_conflict_error(self, action, conflicting_actions):
+        message = _('conflicting option string(s): %s')
+        conflict_string = ', '.join([option_string
+                                     for option_string, action
+                                     in conflicting_actions])
+        raise ArgumentError(action, message % conflict_string)
+
+    def _handle_conflict_resolve(self, action, conflicting_actions):
+
+        # remove all conflicting options
+        for option_string, action in conflicting_actions:
+
+            # remove the conflicting option
+            action.option_strings.remove(option_string)
+            self._option_string_actions.pop(option_string, None)
+
+            # if the option now has no option string, remove it from the
+            # container holding it
+            if not action.option_strings:
+                action.container._remove_action(action)
+
+
+class _ArgumentGroup(_ActionsContainer):
+
+    def __init__(self, container, title=None, description=None, **kwargs):
+        # add any missing keyword arguments by checking the container
+        update = kwargs.setdefault
+        update('conflict_handler', container.conflict_handler)
+        update('prefix_chars', container.prefix_chars)
+        update('argument_default', container.argument_default)
+        super_init = super(_ArgumentGroup, self).__init__
+        super_init(description=description, **kwargs)
+
+        # group attributes
+        self.title = title
+        self._group_actions = []
+
+        # share most attributes with the container
+        self._registries = container._registries
+        self._actions = container._actions
+        self._option_string_actions = container._option_string_actions
+        self._defaults = container._defaults
+        self._has_negative_number_optionals = \
+            container._has_negative_number_optionals
+
+    def _add_action(self, action):
+        action = super(_ArgumentGroup, self)._add_action(action)
+        self._group_actions.append(action)
+        return action
+
+    def _remove_action(self, action):
+        super(_ArgumentGroup, self)._remove_action(action)
+        self._group_actions.remove(action)
+
+
+class _MutuallyExclusiveGroup(_ArgumentGroup):
+
+    def __init__(self, container, required=False):
+        super(_MutuallyExclusiveGroup, self).__init__(container)
+        self.required = required
+        self._container = container
+
+    def _add_action(self, action):
+        if action.required:
+            msg = _('mutually exclusive arguments must be optional')
+            raise ValueError(msg)
+        action = self._container._add_action(action)
+        self._group_actions.append(action)
+        return action
+
+    def _remove_action(self, action):
+        self._container._remove_action(action)
+        self._group_actions.remove(action)
+
+
+class ArgumentParser(_AttributeHolder, _ActionsContainer):
+    """Object for parsing command line strings into Python objects.
+
+    Keyword Arguments:
+        - prog -- The name of the program (default: sys.argv[0])
+        - usage -- A usage message (default: auto-generated from arguments)
+        - description -- A description of what the program does
+        - epilog -- Text following the argument descriptions
+        - parents -- Parsers whose arguments should be copied into this one
+        - formatter_class -- HelpFormatter class for printing help messages
+        - prefix_chars -- Characters that prefix optional arguments
+        - fromfile_prefix_chars -- Characters that prefix files containing
+            additional arguments
+        - argument_default -- The default value for all arguments
+        - conflict_handler -- String indicating how to handle conflicts
+        - add_help -- Add a -h/-help option
+    """
+
+    def __init__(self,
+                 prog=None,
+                 usage=None,
+                 description=None,
+                 epilog=None,
+                 version=None,
+                 parents=[],
+                 formatter_class=HelpFormatter,
+                 prefix_chars='-',
+                 fromfile_prefix_chars=None,
+                 argument_default=None,
+                 conflict_handler='error',
+                 add_help=True):
+
+        if version is not None:
+            import warnings
+            warnings.warn(
+                """The "version" argument to ArgumentParser is deprecated. """
+                """Please use """
+                """"add_argument(..., action='version', version="N", ...)" """
+                """instead""", DeprecationWarning)
+
+        superinit = super(ArgumentParser, self).__init__
+        superinit(description=description,
+                  prefix_chars=prefix_chars,
+                  argument_default=argument_default,
+                  conflict_handler=conflict_handler)
+
+        # default setting for prog
+        if prog is None:
+            prog = _os.path.basename(_sys.argv[0])
+
+        self.prog = prog
+        self.usage = usage
+        self.epilog = epilog
+        self.version = version
+        self.formatter_class = formatter_class
+        self.fromfile_prefix_chars = fromfile_prefix_chars
+        self.add_help = add_help
+
+        add_group = self.add_argument_group
+        self._positionals = add_group(_('positional arguments'))
+        self._optionals = add_group(_('optional arguments'))
+        self._subparsers = None
+
+        # register types
+        def identity(string):
+            return string
+        self.register('type', None, identity)
+
+        # add help and version arguments if necessary
+        # (using explicit default to override global argument_default)
+        if '-' in prefix_chars:
+            default_prefix = '-'
+        else:
+            default_prefix = prefix_chars[0]
+        if self.add_help:
+            self.add_argument(
+                default_prefix+'h', default_prefix*2+'help',
+                action='help', default=SUPPRESS,
+                help=_('show this help message and exit'))
+        if self.version:
+            self.add_argument(
+                default_prefix+'v', default_prefix*2+'version',
+                action='version', default=SUPPRESS,
+                version=self.version,
+                help=_("show program's version number and exit"))
+
+        # add parent arguments and defaults
+        for parent in parents:
+            self._add_container_actions(parent)
+            try:
+                defaults = parent._defaults
+            except AttributeError:
+                pass
+            else:
+                self._defaults.update(defaults)
+
+    # =======================
+    # Pretty __repr__ methods
+    # =======================
+    def _get_kwargs(self):
+        names = [
+            'prog',
+            'usage',
+            'description',
+            'version',
+            'formatter_class',
+            'conflict_handler',
+            'add_help',
+        ]
+        return [(name, getattr(self, name)) for name in names]
+
+    # ==================================
+    # Optional/Positional adding methods
+    # ==================================
+    def add_subparsers(self, **kwargs):
+        if self._subparsers is not None:
+            self.error(_('cannot have multiple subparser arguments'))
+
+        # add the parser class to the arguments if it's not present
+        kwargs.setdefault('parser_class', type(self))
+
+        if 'title' in kwargs or 'description' in kwargs:
+            title = _(kwargs.pop('title', 'subcommands'))
+            description = _(kwargs.pop('description', None))
+            self._subparsers = self.add_argument_group(title, description)
+        else:
+            self._subparsers = self._positionals
+
+        # prog defaults to the usage message of this parser, skipping
+        # optional arguments and with no "usage:" prefix
+        if kwargs.get('prog') is None:
+            formatter = self._get_formatter()
+            positionals = self._get_positional_actions()
+            groups = self._mutually_exclusive_groups
+            formatter.add_usage(self.usage, positionals, groups, '')
+            kwargs['prog'] = formatter.format_help().strip()
+
+        # create the parsers action and add it to the positionals list
+        parsers_class = self._pop_action_class(kwargs, 'parsers')
+        action = parsers_class(option_strings=[], **kwargs)
+        self._subparsers._add_action(action)
+
+        # return the created parsers action
+        return action
+
+    def _add_action(self, action):
+        if action.option_strings:
+            self._optionals._add_action(action)
+        else:
+            self._positionals._add_action(action)
+        return action
+
+    def _get_optional_actions(self):
+        return [action
+                for action in self._actions
+                if action.option_strings]
+
+    def _get_positional_actions(self):
+        return [action
+                for action in self._actions
+                if not action.option_strings]
+
+    # =====================================
+    # Command line argument parsing methods
+    # =====================================
+    def parse_args(self, args=None, namespace=None):
+        args, argv = self.parse_known_args(args, namespace)
+        if argv:
+            msg = _('unrecognized arguments: %s')
+            self.error(msg % ' '.join(argv))
+        return args
+
+    def parse_known_args(self, args=None, namespace=None):
+        # args default to the system args
+        if args is None:
+            args = _sys.argv[1:]
+
+        # default Namespace built from parser defaults
+        if namespace is None:
+            namespace = Namespace()
+
+        # add any action defaults that aren't present
+        for action in self._actions:
+            if action.dest is not SUPPRESS:
+                if not hasattr(namespace, action.dest):
+                    if action.default is not SUPPRESS:
+                        default = action.default
+                        if isinstance(action.default, basestring):
+                            default = self._get_value(action, default)
+                        setattr(namespace, action.dest, default)
+
+        # add any parser defaults that aren't present
+        for dest in self._defaults:
+            if not hasattr(namespace, dest):
+                setattr(namespace, dest, self._defaults[dest])
+
+        # parse the arguments and exit if there are any errors
+        try:
+            namespace, args = self._parse_known_args(args, namespace)
+            if hasattr(namespace, _UNRECOGNIZED_ARGS_ATTR):
+                args.extend(getattr(namespace, _UNRECOGNIZED_ARGS_ATTR))
+                delattr(namespace, _UNRECOGNIZED_ARGS_ATTR)
+            return namespace, args
+        except ArgumentError:
+            err = _sys.exc_info()[1]
+            self.error(str(err))
+
+    def _parse_known_args(self, arg_strings, namespace):
+        # replace arg strings that are file references
+        if self.fromfile_prefix_chars is not None:
+            arg_strings = self._read_args_from_files(arg_strings)
+
+        # map all mutually exclusive arguments to the other arguments
+        # they can't occur with
+        action_conflicts = {}
+        for mutex_group in self._mutually_exclusive_groups:
+            group_actions = mutex_group._group_actions
+            for i, mutex_action in enumerate(mutex_group._group_actions):
+                conflicts = action_conflicts.setdefault(mutex_action, [])
+                conflicts.extend(group_actions[:i])
+                conflicts.extend(group_actions[i + 1:])
+
+        # find all option indices, and determine the arg_string_pattern
+        # which has an 'O' if there is an option at an index,
+        # an 'A' if there is an argument, or a '-' if there is a '--'
+        option_string_indices = {}
+        arg_string_pattern_parts = []
+        arg_strings_iter = iter(arg_strings)
+        for i, arg_string in enumerate(arg_strings_iter):
+
+            # all args after -- are non-options
+            if arg_string == '--':
+                arg_string_pattern_parts.append('-')
+                for arg_string in arg_strings_iter:
+                    arg_string_pattern_parts.append('A')
+
+            # otherwise, add the arg to the arg strings
+            # and note the index if it was an option
+            else:
+                option_tuple = self._parse_optional(arg_string)
+                if option_tuple is None:
+                    pattern = 'A'
+                else:
+                    option_string_indices[i] = option_tuple
+                    pattern = 'O'
+                arg_string_pattern_parts.append(pattern)
+
+        # join the pieces together to form the pattern
+        arg_strings_pattern = ''.join(arg_string_pattern_parts)
+
+        # converts arg strings to the appropriate and then takes the action
+        seen_actions = set()
+        seen_non_default_actions = set()
+
+        def take_action(action, argument_strings, option_string=None):
+            seen_actions.add(action)
+            argument_values = self._get_values(action, argument_strings)
+
+            # error if this argument is not allowed with other previously
+            # seen arguments, assuming that actions that use the default
+            # value don't really count as "present"
+            if argument_values is not action.default:
+                seen_non_default_actions.add(action)
+                for conflict_action in action_conflicts.get(action, []):
+                    if conflict_action in seen_non_default_actions:
+                        msg = _('not allowed with argument %s')
+                        action_name = _get_action_name(conflict_action)
+                        raise ArgumentError(action, msg % action_name)
+
+            # take the action if we didn't receive a SUPPRESS value
+            # (e.g. from a default)
+            if argument_values is not SUPPRESS:
+                action(self, namespace, argument_values, option_string)
+
+        # function to convert arg_strings into an optional action
+        def consume_optional(start_index):
+
+            # get the optional identified at this index
+            option_tuple = option_string_indices[start_index]
+            action, option_string, explicit_arg = option_tuple
+
+            # identify additional optionals in the same arg string
+            # (e.g. -xyz is the same as -x -y -z if no args are required)
+            match_argument = self._match_argument
+            action_tuples = []
+            while True:
+
+                # if we found no optional action, skip it
+                if action is None:
+                    extras.append(arg_strings[start_index])
+                    return start_index + 1
+
+                # if there is an explicit argument, try to match the
+                # optional's string arguments to only this
+                if explicit_arg is not None:
+                    arg_count = match_argument(action, 'A')
+
+                    # if the action is a single-dash option and takes no
+                    # arguments, try to parse more single-dash options out
+                    # of the tail of the option string
+                    chars = self.prefix_chars
+                    if arg_count == 0 and option_string[1] not in chars:
+                        action_tuples.append((action, [], option_string))
+                        char = option_string[0]
+                        option_string = char + explicit_arg[0]
+                        new_explicit_arg = explicit_arg[1:] or None
+                        optionals_map = self._option_string_actions
+                        if option_string in optionals_map:
+                            action = optionals_map[option_string]
+                            explicit_arg = new_explicit_arg
+                        else:
+                            msg = _('ignored explicit argument %r')
+                            raise ArgumentError(action, msg % explicit_arg)
+
+                    # if the action expect exactly one argument, we've
+                    # successfully matched the option; exit the loop
+                    elif arg_count == 1:
+                        stop = start_index + 1
+                        args = [explicit_arg]
+                        action_tuples.append((action, args, option_string))
+                        break
+
+                    # error if a double-dash option did not use the
+                    # explicit argument
+                    else:
+                        msg = _('ignored explicit argument %r')
+                        raise ArgumentError(action, msg % explicit_arg)
+
+                # if there is no explicit argument, try to match the
+                # optional's string arguments with the following strings
+                # if successful, exit the loop
+                else:
+                    start = start_index + 1
+                    selected_patterns = arg_strings_pattern[start:]
+                    arg_count = match_argument(action, selected_patterns)
+                    stop = start + arg_count
+                    args = arg_strings[start:stop]
+                    action_tuples.append((action, args, option_string))
+                    break
+
+            # add the Optional to the list and return the index at which
+            # the Optional's string args stopped
+            assert action_tuples
+            for action, args, option_string in action_tuples:
+                take_action(action, args, option_string)
+            return stop
+
+        # the list of Positionals left to be parsed; this is modified
+        # by consume_positionals()
+        positionals = self._get_positional_actions()
+
+        # function to convert arg_strings into positional actions
+        def consume_positionals(start_index):
+            # match as many Positionals as possible
+            match_partial = self._match_arguments_partial
+            selected_pattern = arg_strings_pattern[start_index:]
+            arg_counts = match_partial(positionals, selected_pattern)
+
+            # slice off the appropriate arg strings for each Positional
+            # and add the Positional and its args to the list
+            for action, arg_count in zip(positionals, arg_counts):
+                args = arg_strings[start_index: start_index + arg_count]
+                start_index += arg_count
+                take_action(action, args)
+
+            # slice off the Positionals that we just parsed and return the
+            # index at which the Positionals' string args stopped
+            positionals[:] = positionals[len(arg_counts):]
+            return start_index
+
+        # consume Positionals and Optionals alternately, until we have
+        # passed the last option string
+        extras = []
+        start_index = 0
+        if option_string_indices:
+            max_option_string_index = max(option_string_indices)
+        else:
+            max_option_string_index = -1
+        while start_index <= max_option_string_index:
+
+            # consume any Positionals preceding the next option
+            next_option_string_index = min([
+                index
+                for index in option_string_indices
+                if index >= start_index])
+            if start_index != next_option_string_index:
+                positionals_end_index = consume_positionals(start_index)
+
+                # only try to parse the next optional if we didn't consume
+                # the option string during the positionals parsing
+                if positionals_end_index > start_index:
+                    start_index = positionals_end_index
+                    continue
+                else:
+                    start_index = positionals_end_index
+
+            # if we consumed all the positionals we could and we're not
+            # at the index of an option string, there were extra arguments
+            if start_index not in option_string_indices:
+                strings = arg_strings[start_index:next_option_string_index]
+                extras.extend(strings)
+                start_index = next_option_string_index
+
+            # consume the next optional and any arguments for it
+            start_index = consume_optional(start_index)
+
+        # consume any positionals following the last Optional
+        stop_index = consume_positionals(start_index)
+
+        # if we didn't consume all the argument strings, there were extras
+        extras.extend(arg_strings[stop_index:])
+
+        # if we didn't use all the Positional objects, there were too few
+        # arg strings supplied.
+        if positionals:
+            self.error(_('too few arguments'))
+
+        # make sure all required actions were present
+        for action in self._actions:
+            if action.required:
+                if action not in seen_actions:
+                    name = _get_action_name(action)
+                    self.error(_('argument %s is required') % name)
+
+        # make sure all required groups had one option present
+        for group in self._mutually_exclusive_groups:
+            if group.required:
+                for action in group._group_actions:
+                    if action in seen_non_default_actions:
+                        break
+
+                # if no actions were used, report the error
+                else:
+                    names = [_get_action_name(action)
+                             for action in group._group_actions
+                             if action.help is not SUPPRESS]
+                    msg = _('one of the arguments %s is required')
+                    self.error(msg % ' '.join(names))
+
+        # return the updated namespace and the extra arguments
+        return namespace, extras
+
+    def _read_args_from_files(self, arg_strings):
+        # expand arguments referencing files
+        new_arg_strings = []
+        for arg_string in arg_strings:
+
+            # for regular arguments, just add them back into the list
+            if arg_string[0] not in self.fromfile_prefix_chars:
+                new_arg_strings.append(arg_string)
+
+            # replace arguments referencing files with the file content
+            else:
+                try:
+                    args_file = open(arg_string[1:])
+                    try:
+                        arg_strings = []
+                        for arg_line in args_file.read().splitlines():
+                            for arg in self.convert_arg_line_to_args(arg_line):
+                                arg_strings.append(arg)
+                        arg_strings = self._read_args_from_files(arg_strings)
+                        new_arg_strings.extend(arg_strings)
+                    finally:
+                        args_file.close()
+                except IOError:
+                    err = _sys.exc_info()[1]
+                    self.error(str(err))
+
+        # return the modified argument list
+        return new_arg_strings
+
+    def convert_arg_line_to_args(self, arg_line):
+        return [arg_line]
+
+    def _match_argument(self, action, arg_strings_pattern):
+        # match the pattern for this action to the arg strings
+        nargs_pattern = self._get_nargs_pattern(action)
+        match = _re.match(nargs_pattern, arg_strings_pattern)
+
+        # raise an exception if we weren't able to find a match
+        if match is None:
+            nargs_errors = {
+                None: _('expected one argument'),
+                OPTIONAL: _('expected at most one argument'),
+                ONE_OR_MORE: _('expected at least one argument'),
+            }
+            default = _('expected %s argument(s)') % action.nargs
+            msg = nargs_errors.get(action.nargs, default)
+            raise ArgumentError(action, msg)
+
+        # return the number of arguments matched
+        return len(match.group(1))
+
+    def _match_arguments_partial(self, actions, arg_strings_pattern):
+        # progressively shorten the actions list by slicing off the
+        # final actions until we find a match
+        result = []
+        for i in range(len(actions), 0, -1):
+            actions_slice = actions[:i]
+            pattern = ''.join([self._get_nargs_pattern(action)
+                               for action in actions_slice])
+            match = _re.match(pattern, arg_strings_pattern)
+            if match is not None:
+                result.extend([len(string) for string in match.groups()])
+                break
+
+        # return the list of arg string counts
+        return result
+
+    def _parse_optional(self, arg_string):
+        # if it's an empty string, it was meant to be a positional
+        if not arg_string:
+            return None
+
+        # if it doesn't start with a prefix, it was meant to be positional
+        if not arg_string[0] in self.prefix_chars:
+            return None
+
+        # if the option string is present in the parser, return the action
+        if arg_string in self._option_string_actions:
+            action = self._option_string_actions[arg_string]
+            return action, arg_string, None
+
+        # if it's just a single character, it was meant to be positional
+        if len(arg_string) == 1:
+            return None
+
+        # if the option string before the "=" is present, return the action
+        if '=' in arg_string:
+            option_string, explicit_arg = arg_string.split('=', 1)
+            if option_string in self._option_string_actions:
+                action = self._option_string_actions[option_string]
+                return action, option_string, explicit_arg
+
+        # search through all possible prefixes of the option string
+        # and all actions in the parser for possible interpretations
+        option_tuples = self._get_option_tuples(arg_string)
+
+        # if multiple actions match, the option string was ambiguous
+        if len(option_tuples) > 1:
+            options = ', '.join([option_string
+                for action, option_string, explicit_arg in option_tuples])
+            tup = arg_string, options
+            self.error(_('ambiguous option: %s could match %s') % tup)
+
+        # if exactly one action matched, this segmentation is good,
+        # so return the parsed action
+        elif len(option_tuples) == 1:
+            option_tuple, = option_tuples
+            return option_tuple
+
+        # if it was not found as an option, but it looks like a negative
+        # number, it was meant to be positional
+        # unless there are negative-number-like options
+        if self._negative_number_matcher.match(arg_string):
+            if not self._has_negative_number_optionals:
+                return None
+
+        # if it contains a space, it was meant to be a positional
+        if ' ' in arg_string:
+            return None
+
+        # it was meant to be an optional but there is no such option
+        # in this parser (though it might be a valid option in a subparser)
+        return None, arg_string, None
+
+    def _get_option_tuples(self, option_string):
+        result = []
+
+        # option strings starting with two prefix characters are only
+        # split at the '='
+        chars = self.prefix_chars
+        if option_string[0] in chars and option_string[1] in chars:
+            if '=' in option_string:
+                option_prefix, explicit_arg = option_string.split('=', 1)
+            else:
+                option_prefix = option_string
+                explicit_arg = None
+            for option_string in self._option_string_actions:
+                if option_string.startswith(option_prefix):
+                    action = self._option_string_actions[option_string]
+                    tup = action, option_string, explicit_arg
+                    result.append(tup)
+
+        # single character options can be concatenated with their arguments
+        # but multiple character options always have to have their argument
+        # separate
+        elif option_string[0] in chars and option_string[1] not in chars:
+            option_prefix = option_string
+            explicit_arg = None
+            short_option_prefix = option_string[:2]
+            short_explicit_arg = option_string[2:]
+
+            for option_string in self._option_string_actions:
+                if option_string == short_option_prefix:
+                    action = self._option_string_actions[option_string]
+                    tup = action, option_string, short_explicit_arg
+                    result.append(tup)
+                elif option_string.startswith(option_prefix):
+                    action = self._option_string_actions[option_string]
+                    tup = action, option_string, explicit_arg
+                    result.append(tup)
+
+        # shouldn't ever get here
+        else:
+            self.error(_('unexpected option string: %s') % option_string)
+
+        # return the collected option tuples
+        return result
+
+    def _get_nargs_pattern(self, action):
+        # in all examples below, we have to allow for '--' args
+        # which are represented as '-' in the pattern
+        nargs = action.nargs
+
+        # the default (None) is assumed to be a single argument
+        if nargs is None:
+            nargs_pattern = '(-*A-*)'
+
+        # allow zero or one arguments
+        elif nargs == OPTIONAL:
+            nargs_pattern = '(-*A?-*)'
+
+        # allow zero or more arguments
+        elif nargs == ZERO_OR_MORE:
+            nargs_pattern = '(-*[A-]*)'
+
+        # allow one or more arguments
+        elif nargs == ONE_OR_MORE:
+            nargs_pattern = '(-*A[A-]*)'
+
+        # allow any number of options or arguments
+        elif nargs == REMAINDER:
+            nargs_pattern = '([-AO]*)'
+
+        # allow one argument followed by any number of options or arguments
+        elif nargs == PARSER:
+            nargs_pattern = '(-*A[-AO]*)'
+
+        # all others should be integers
+        else:
+            nargs_pattern = '(-*%s-*)' % '-*'.join('A' * nargs)
+
+        # if this is an optional action, -- is not allowed
+        if action.option_strings:
+            nargs_pattern = nargs_pattern.replace('-*', '')
+            nargs_pattern = nargs_pattern.replace('-', '')
+
+        # return the pattern
+        return nargs_pattern
+
+    # ========================
+    # Value conversion methods
+    # ========================
+    def _get_values(self, action, arg_strings):
+        # for everything but PARSER args, strip out '--'
+        if action.nargs not in [PARSER, REMAINDER]:
+            arg_strings = [s for s in arg_strings if s != '--']
+
+        # optional argument produces a default when not present
+        if not arg_strings and action.nargs == OPTIONAL:
+            if action.option_strings:
+                value = action.const
+            else:
+                value = action.default
+            if isinstance(value, basestring):
+                value = self._get_value(action, value)
+                self._check_value(action, value)
+
+        # when nargs='*' on a positional, if there were no command-line
+        # args, use the default if it is anything other than None
+        elif (not arg_strings and action.nargs == ZERO_OR_MORE and
+              not action.option_strings):
+            if action.default is not None:
+                value = action.default
+            else:
+                value = arg_strings
+            self._check_value(action, value)
+
+        # single argument or optional argument produces a single value
+        elif len(arg_strings) == 1 and action.nargs in [None, OPTIONAL]:
+            arg_string, = arg_strings
+            value = self._get_value(action, arg_string)
+            self._check_value(action, value)
+
+        # REMAINDER arguments convert all values, checking none
+        elif action.nargs == REMAINDER:
+            value = [self._get_value(action, v) for v in arg_strings]
+
+        # PARSER arguments convert all values, but check only the first
+        elif action.nargs == PARSER:
+            value = [self._get_value(action, v) for v in arg_strings]
+            self._check_value(action, value[0])
+
+        # all other types of nargs produce a list
+        else:
+            value = [self._get_value(action, v) for v in arg_strings]
+            for v in value:
+                self._check_value(action, v)
+
+        # return the converted value
+        return value
+
+    def _get_value(self, action, arg_string):
+        type_func = self._registry_get('type', action.type, action.type)
+        if not _callable(type_func):
+            msg = _('%r is not callable')
+            raise ArgumentError(action, msg % type_func)
+
+        # convert the value to the appropriate type
+        try:
+            result = type_func(arg_string)
+
+        # ArgumentTypeErrors indicate errors
+        except ArgumentTypeError:
+            name = getattr(action.type, '__name__', repr(action.type))
+            msg = str(_sys.exc_info()[1])
+            raise ArgumentError(action, msg)
+
+        # TypeErrors or ValueErrors also indicate errors
+        except (TypeError, ValueError):
+            name = getattr(action.type, '__name__', repr(action.type))
+            msg = _('invalid %s value: %r')
+            raise ArgumentError(action, msg % (name, arg_string))
+
+        # return the converted value
+        return result
+
+    def _check_value(self, action, value):
+        # converted value must be one of the choices (if specified)
+        if action.choices is not None and value not in action.choices:
+            tup = value, ', '.join(map(repr, action.choices))
+            msg = _('invalid choice: %r (choose from %s)') % tup
+            raise ArgumentError(action, msg)
+
+    # =======================
+    # Help-formatting methods
+    # =======================
+    def format_usage(self):
+        formatter = self._get_formatter()
+        formatter.add_usage(self.usage, self._actions,
+                            self._mutually_exclusive_groups)
+        return formatter.format_help()
+
+    def format_help(self):
+        formatter = self._get_formatter()
+
+        # usage
+        formatter.add_usage(self.usage, self._actions,
+                            self._mutually_exclusive_groups)
+
+        # description
+        formatter.add_text(self.description)
+
+        # positionals, optionals and user-defined groups
+        for action_group in self._action_groups:
+            formatter.start_section(action_group.title)
+            formatter.add_text(action_group.description)
+            formatter.add_arguments(action_group._group_actions)
+            formatter.end_section()
+
+        # epilog
+        formatter.add_text(self.epilog)
+
+        # determine help from format above
+        return formatter.format_help()
+
+    def format_version(self):
+        import warnings
+        warnings.warn(
+            'The format_version method is deprecated -- the "version" '
+            'argument to ArgumentParser is no longer supported.',
+            DeprecationWarning)
+        formatter = self._get_formatter()
+        formatter.add_text(self.version)
+        return formatter.format_help()
+
+    def _get_formatter(self):
+        return self.formatter_class(prog=self.prog)
+
+    # =====================
+    # Help-printing methods
+    # =====================
+    def print_usage(self, file=None):
+        if file is None:
+            file = _sys.stdout
+        self._print_message(self.format_usage(), file)
+
+    def print_help(self, file=None):
+        if file is None:
+            file = _sys.stdout
+        self._print_message(self.format_help(), file)
+
+    def print_version(self, file=None):
+        import warnings
+        warnings.warn(
+            'The print_version method is deprecated -- the "version" '
+            'argument to ArgumentParser is no longer supported.',
+            DeprecationWarning)
+        self._print_message(self.format_version(), file)
+
+    def _print_message(self, message, file=None):
+        if message:
+            if file is None:
+                file = _sys.stderr
+            file.write(message)
+
+    # ===============
+    # Exiting methods
+    # ===============
+    def exit(self, status=0, message=None):
+        if message:
+            self._print_message(message, _sys.stderr)
+        _sys.exit(status)
+
+    def error(self, message):
+        """error(message: string)
+
+        Prints a usage message incorporating the message to stderr and
+        exits.
+
+        If you override this in a subclass, it should not return -- it
+        should either exit or raise an exception.
+        """
+        self.print_usage(_sys.stderr)
+        self.exit(2, _('%s: error: %s\n') % (self.prog, message))
diff --git a/utils/skel/lib/skel_cat.py b/utils/skel/lib/skel_cat.py
new file mode 100644
index 0000000..42f74e8
--- /dev/null
+++ b/utils/skel/lib/skel_cat.py
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+
+import argparse
+import os
+import os.path
+import shutil
+import sys
+import xml.dom.minidom
+
+#import skel_settings
+
+
+def parse_command_line():
+    parser = argparse.ArgumentParser (description='Merge two skel output files into one, keeping a single document root.')
+    parser.add_argument ('f1', metavar='file1', help='destination file')
+    parser.add_argument ('f2', metavar='file2', help='file to merge into destination file')
+
+    parser.add_argument ('--app', help='The name of the application corresponding to the result being concatenated, e.g. gts.')
+    parser.add_argument ('--tags', help='A comma delimited list of name:value pairs to add to the result being concatenated to facilitate analysis')
+
+    return parser.parse_args()
+
+
+
+
+
+def concatenate (f1, f2, app, tags):
+    # Read both files, merge, write to f1 
+
+    doc1 = xml.dom.minidom.parse (f1)
+    doc2 = xml.dom.minidom.parse (f2)
+
+    timing_to_merge = doc2.getElementsByTagName ('adios_timing')[0]
+    timing_to_merge.setAttribute ('app', app)
+    timing_to_merge.setAttribute ('tags', tags)
+    doc1.documentElement.appendChild (timing_to_merge)
+
+    file1 = open (f1, 'w')
+    file1.write (doc1.toxml() )
+
+
+
+
+
+
+def move (f1, f2, app, tags):
+    doc = xml.dom.minidom.parse (f2)
+
+    timing_element = doc.getElementsByTagName ('adios_timing')[0]
+    timing_element.setAttribute ('app', app)
+    timing_element.setAttribute ('tags', tags)
+
+    file1 = open (f1, 'w')
+    file1.write (doc.toxml() )
+
+    os.remove (f2)
+
+
+def main ():
+
+    #skel_settings.create_settings_dir_if_needed()
+
+    args = parse_command_line()
+
+    # If f1 does not exist, just move f2 to f1
+    if not os.path.isfile (args.f1):
+        #shutil.move (args.f2, args.f1) # Note args are (src, dest)
+        move (args.f1, args.f2, args.app, args.tags)
+    else:
+        concatenate (args.f1, args.f2, args.app, args.tags)
+        os.remove (args.f2)
+
+
+if __name__ == "__main__":
+    main()
+
+
diff --git a/utils/skel/lib/skel_install.py b/utils/skel/lib/skel_install.py
new file mode 100644
index 0000000..6c8a434
--- /dev/null
+++ b/utils/skel/lib/skel_install.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+import skel_settings
+
+def main(argv=None):
+    skel_settings.create_settings_dir_if_needed()
+
+
+if __name__ == "__main__":
+    main()
diff --git a/utils/skel/lib/skel_makefile.py b/utils/skel/lib/skel_makefile.py
new file mode 100644
index 0000000..0455ad7
--- /dev/null
+++ b/utils/skel/lib/skel_makefile.py
@@ -0,0 +1,136 @@
+#!/usr/bin/env python
+
+import argparse
+import os
+import sys
+
+import adios
+import skelconf
+import skel_settings
+
+
+
+def generate_makefiles (params, config):
+    lang = config.get_host_language()
+    if "C" == lang or "c" == lang:
+        generate_makefiles_c (params)
+    else:
+        generate_makefiles_fortran (params)
+
+
+
+def generate_makefiles_fortran (params):
+
+    platform = params.get_target()
+
+    settings = skel_settings.skel_settings()
+
+    makefile = open ('Makefile', 'w')
+
+    makefile_template_name = '~/.skel/templates/Makefile.' + platform + '.tpl'
+    makefile_template = open(os.path.expanduser(makefile_template_name), 'r')
+
+    include_statement = "" + os.path.dirname (sys.argv[0]) + '/../etc/skel/compiler_fragment.mk'
+
+    for template_line in makefile_template:
+
+        # Fill in any replacement vars in this line...
+        template_line = template_line.replace ('$$APP$$', params.get_application () )
+        template_line = template_line.replace ('$$INCLUDE$$', include_statement)
+        template_line = template_line.replace ('$$TARGET$$', platform)
+        template_line = template_line.replace ('$$DEPLOY_DIR$$', settings.get_deploy_dir())
+        template_line = template_line.replace ('$$SKEL_HOME$$', settings.get_skel_home())
+        template_line = template_line.replace ('$$CORES_USED$$', '%d'%params.get_batches()[0].get_cores())
+
+        if '$$CTESTS$$' in template_line:
+            template_line = template_line.replace ('$$CTESTS$$', '')
+
+        if '$$FTESTS$$' in template_line:
+            test_string = ''
+            test_set = set()
+            for batch in params.get_batches():
+                for test in batch.get_tests():
+                    test_set.add (params.get_application() + '_skel_' + test.get_group_name() + '_' + test.get_type() + ' ')
+
+            for t in test_set:
+                test_string = test_string + t
+            template_line = template_line.replace ('$$FTESTS$$', test_string)
+
+        makefile.write (template_line)
+
+
+def generate_makefiles_c (params):
+
+    platform = params.get_target()
+
+    settings = skel_settings.skel_settings()
+
+    makefile = open ('Makefile', 'w')
+
+    makefile_template_name = os.path.dirname (sys.argv[0]) + '/../etc/skel/templates/Makefile.' + platform + '.tpl'
+    makefile_template = open(os.path.expanduser(makefile_template_name), 'r')
+
+    include_statement = "" + os.path.dirname (sys.argv[0]) + '/../etc/skel/compiler_fragment.mk'
+
+    for template_line in makefile_template:
+
+        # Fill in any replacement vars in this line...
+        template_line = template_line.replace ('$$APP$$', params.get_application () )
+        template_line = template_line.replace ('$$INCLUDE$$', include_statement)
+        template_line = template_line.replace ('$$TARGET$$', platform)
+        template_line = template_line.replace ('$$DEPLOY_DIR$$', settings.get_deploy_dir())
+
+        #skel_home makes no sense in ADIOS release
+        #template_line = template_line.replace ('$$SKEL_HOME$$', settings.get_skel_home())
+
+        template_line = template_line.replace ('$$CORES_USED$$', '%d'%params.get_batches()[0].get_cores())
+
+        if '$$FTESTS$$' in template_line:
+            template_line = template_line.replace ('$$FTESTS$$', '')
+
+        if '$$CTESTS$$' in template_line:
+            test_string = ''
+            test_set = set()
+            for batch in params.get_batches():
+                for test in batch.get_tests():
+                    test_set.add (params.get_application() + '_skel_' + test.get_group_name() + '_' + test.get_type() + ' ')
+
+            for t in test_set:
+                test_string = test_string + t
+            template_line = template_line.replace ('$$CTESTS$$', test_string)
+
+        makefile.write (template_line)
+
+
+def parse_command_line():
+
+    parser = argparse.ArgumentParser (description='Create a Makefile for the given skel project')
+    parser.add_argument ('project', metavar='project', help='Name of the skel project')
+
+    return parser.parse_args()
+
+
+def main(argv=None):
+
+    skel_settings.create_settings_dir_if_needed()
+
+    args = parse_command_line()
+
+    config = adios.adiosConfig (args.project + '_skel.xml')
+    params = skelconf.skelConfig (args.project + '_params.xml')
+
+    lang = config.get_host_language ()
+    if 'c' == lang or 'C' == lang:
+        print 'generating C flavored Makefile'
+        generate_makefiles_c (params)
+    else:
+        print 'generating fortran flavored Makefile'
+        generate_makefiles_fortran (params)
+
+
+
+if __name__ == "__main__":
+    main()
+
+
+
diff --git a/utils/skel/lib/skel_params.py b/utils/skel/lib/skel_params.py
new file mode 100644
index 0000000..ca807d7
--- /dev/null
+++ b/utils/skel/lib/skel_params.py
@@ -0,0 +1,101 @@
+#!/usr/bin/env python
+import sys
+import os
+import argparse
+
+import adios
+import skel_settings
+
+
+def generate_param_file (app, outfile, config, groupname):
+
+    param_file = open (outfile, 'w')
+
+    #Write the file header
+    param_file.write ('<?xml version="1.0"?>')
+    param_file.write ('\n<skel-config application="' + app + '">')
+
+    param_file.write ('\n\n<!--')
+    param_file.write ('\n  Within each group, use the scalar elements to control things like array sizes and offsets.')
+    param_file.write ('\n  Simply adjust the value attribute as needed. The type is provided for convenience.')
+    param_file.write ('\n  Note that there are 2 special values that you can use:')
+    param_file.write ('\n    skel_mpi_size refers to the number of processes participating in this run, and')
+    param_file.write ('\n    skel_mpi_rank is used to indicate the rank of the local process')
+    param_file.write ('\n  -->\n')
+
+
+    #Write a section for each group of interest
+    for group in config.get_groups():
+
+        # if we've specified a particular group, ignore all of the other groups
+        if (groupname != None and groupname != group.get_name() ): 
+            continue
+
+        param_file.write ('\n\n  <adios-group name="' + group.get_name() + '">')
+
+        all_scalars = set()
+        all_arrays = set()
+
+        for var in group.get_vars():
+            if var.is_scalar():
+                all_scalars.add ('\n    <scalar name="' + var.get_name() + '" type="' + var.get_type() + '" value="128" />')
+            else:
+                dims = var.get_dimensions()
+                dim_str ='dims="'
+                for dim in dims:
+                    dim_str = dim_str + dim + ','
+                dim_str = dim_str.rstrip(',')
+                dim_str = dim_str + '"'
+
+                all_arrays.add ('\n    <array name="' + var.get_gwrite() + '" type="' + var.get_type() + '" ' + dim_str + ' fill-method="rank"></array>')
+
+        for s in all_scalars:
+            param_file.write (s)
+        for a in all_arrays:
+            param_file.write (a)
+
+        param_file.write ('\n  </adios-group>')
+
+    # Make a test run for all of the writes
+    param_file.write ('\n\n  <batch name="writes" cores="128" walltime="0:30:00">')
+    for group in config.get_groups():
+
+        param_file.write ('\n    <test type="write" group="' + group.get_name() + '" method="POSIX" iterations="10" rm="pre" tags="name1:val1,name2:val2" />')
+
+    param_file.write ('\n  </batch>')
+
+
+    #Write the footer
+
+    param_file.write ('\n\n</skel-config>')
+    param_file.close()
+
+
+
+def parse_command_line():
+
+    parser = argparse.ArgumentParser (description='Create a parameter file for the given skel project')
+    parser.add_argument ('project', metavar='project', help='Name of the skel project')
+    parser.add_argument ('-g', '--group', help='If specified, produce output only for this group')    
+    return parser.parse_args()
+
+
+
+def main(argv=None):
+
+    skel_settings.create_settings_dir_if_needed()
+
+    args = parse_command_line()
+
+    config = adios.adiosConfig (args.project + '_skel.xml')
+
+    # Determine outfile name
+    outfilename = args.project + '_params.xml.default'
+
+    generate_param_file (args.project, outfilename, config, args.group)
+        
+
+if __name__ == "__main__":
+    main()
+
+ 
diff --git a/utils/skel/lib/skel_settings.py b/utils/skel/lib/skel_settings.py
new file mode 100644
index 0000000..7317e48
--- /dev/null
+++ b/utils/skel/lib/skel_settings.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+
+import sys
+import os.path
+import shutil
+
+
+class skel_settings:
+    def __init__(self):
+        self.settings_dict = {}
+
+        # Parse the settings file. Ignore comments. Process name=value pairs.
+        settings_file_name = '~/.skel/settings'
+        settings_file = open (os.path.expanduser (settings_file_name) )
+        for line in settings_file:
+            line = line.strip()
+            if line.startswith ('#'):
+                continue
+            if line == '':
+                continue
+            split_line = line.split('=')
+            if not len (split_line) == 2:
+                print 'Malformed configuration line: ' + line
+                print 'Ignoring'
+                continue
+            self.settings_dict[split_line[0]] = split_line[1]
+
+
+
+    def get_skel_home (self):
+        return self.settings_dict['skel_home']
+
+    def get_deploy_dir (self):
+        return self.settings_dict['deploy_dir']
+
+
+    def get_submit_target (self):
+        t = self.settings_dict['submit_target']
+        if t == None or t == '':
+            return "jaguar"
+        else:
+            return t
+
+
+    def get_settings_dict (self):
+        return self.settings_dict
+
+
+
+
+def create_settings_dir_if_needed():
+    skel_settings_dir_name = os.path.expanduser ('~/.skel')
+    if not os.path.exists (skel_settings_dir_name):
+        bindir = os.path.dirname (sys.argv[0])
+        shutil.copytree (bindir + '/../etc/skel', skel_settings_dir_name)
+        print 'Created ' + skel_settings_dir_name
+
+
+def main(argv=None):
+    create_settings_dir_if_needed()
+
+
+if __name__ == "__main__":
+    main()
+
+
+
diff --git a/utils/skel/lib/skel_source.py b/utils/skel/lib/skel_source.py
new file mode 100644
index 0000000..d9e1447
--- /dev/null
+++ b/utils/skel/lib/skel_source.py
@@ -0,0 +1,685 @@
+#!/usr/bin/env python
+import sys
+import os
+import argparse
+
+import adios
+import skelconf
+import skel_settings
+
+
+def generate_c (outfile, config, params, test):
+    if test.get_type() == 'write':
+        generate_c_write (outfile, config, params, test)
+    elif test.get_type() == 'read_all':
+        generate_c_read_all (outfile, config, params, test)
+
+
+def generate_fortran (outfile, config, params, test):
+    if test.get_type() == 'write':
+        generate_fortran_write (outfile, config, params, test)
+    elif test.get_type() == 'read_all':
+        generate_c_read_all (outfile, config, params, test)
+
+def generate_c_write (outfile, config, params, test):
+    
+    outfile = outfile.replace ('.c', '_write.c')
+    measure = test.get_measure()
+
+    #print 'opening ' + outfile
+    c_file = open (outfile, 'w')
+
+    # Look at all of the groups, Generate the code when we find the requested group
+    # The loop is left over from a previous iteration, it could very well be removed.
+    for g in config.get_groups():
+
+        # if a group was specified, and this is not it, go to the next group
+        if g.get_name() != test.get_group_name():
+            continue
+
+        c_file.write ('//\n// Automatically generated by skel. Modify at your own risk.\n')
+
+        # Generate includes
+        c_file.write ('\n#include "adios.h"')
+        c_file.write ('\n#include "mpi.h"')
+        c_file.write ('\n#include <stdlib.h>')
+        c_file.write ('\n#include <stdio.h>')
+
+        c_file.write ('\n\nint main (int argc, char ** argv)')
+        c_file.write ('\n{')
+
+
+        c_file.write ('\n\nMPI_Init (&argc, &argv);')
+
+        # Declare timers
+        c_file.write ('\n\ndouble skel_init_timer = 0;')
+        c_file.write ('\ndouble skel_open_timer = 0;')
+        c_file.write ('\ndouble skel_access_timer = 0;')
+        c_file.write ('\ndouble skel_close_timer = 0;')
+        c_file.write ('\ndouble skel_total_timer = 0;')
+
+        c_file.write ('\n\n// Time the init')
+        c_file.write ('\nMPI_Barrier (MPI_COMM_WORLD);')
+        c_file.write ('\nskel_init_timer -= MPI_Wtime();')
+
+        c_file.write ('\n\nadios_init ("' + config.get_filename() + '");')
+
+        c_file.write ('\nskel_init_timer += MPI_Wtime();')
+
+        c_file.write ('\n\nint skel_mpi_size, skel_mpi_rank, skel_i;')
+        c_file.write ('\nuint64_t adios_groupsize;')
+        c_file.write ('\nMPI_Comm_rank (MPI_COMM_WORLD, &skel_mpi_rank);')
+        c_file.write ('\nMPI_Comm_size (MPI_COMM_WORLD, &skel_mpi_size);')
+
+        c_file.write ('\n\nint64_t adios_handle;')
+        c_file.write ('\nuint64_t skel_total_size;')
+
+
+        # Declare all of the program variables
+        # We split the scalars and the arrays, since the arrays will likely depend on some of
+        # the scalars having already been declared.
+        # The sets are used to eliminate duplicates when multiple file vars are written from the
+        # same program var (as is done by genarray)
+        c_file.write ('\n\n// Scalar declarations')
+        declarations = set()
+        for v in filter (lambda x : x.is_scalar(), g.get_vars() ):
+            declarations.add (adios.cFormatter.get_declaration (v, params.get_group (g.get_name() ) ) )
+
+        for d in declarations:
+            c_file.write (d)
+
+        # Now the initializations
+        for v in filter (lambda x : x.is_scalar(), g.get_vars() ):
+            c_file.write (adios.cFormatter.get_initialization (v, params.get_group (g.get_name() ) ) )
+
+        c_file.write ('\n\n// Array declarations')
+        declarations = set()
+        for v in filter (lambda x : not x.is_scalar(), g.get_vars() ):
+            declarations.add (adios.cFormatter.get_declaration (v, params.get_group (g.get_name() ) ) )
+
+        for d in declarations:
+            c_file.write ('\n' + d)
+
+        for v in filter (lambda x : not x.is_scalar(), g.get_vars() ):
+            c_file.write (adios.cFormatter.get_initialization (v, params.get_group (g.get_name() ) ) )
+
+        if measure.use_sleep_before_open():
+            c_file.write ('\n\nsleep(30);')
+
+
+        #Loop <steps> times
+        c_file.write ('\n\nfor (skel_i = 0; skel_i < ' + test.get_steps() + '; skel_i++)' )
+        c_file.write ('{')
+
+        #start timing
+        c_file.write ('\n\n// Time the opens')
+        if measure.use_barrier_before_open():
+            c_file.write ('\nMPI_Barrier (MPI_COMM_WORLD);')
+        c_file.write ('\nskel_open_timer -= MPI_Wtime();')
+        c_file.write ('\nskel_total_timer -= MPI_Wtime();')
+
+        c_file.write ('\nMPI_Comm comm = MPI_COMM_WORLD;')
+
+        c_file.write ('\nadios_open(&adios_handle, "' + g.get_name() + '", "out_' + test.get_group_name() + '_' + test.get_type() + '.bp", "w", &comm);')
+
+        #end timing
+        c_file.write ('\nskel_open_timer += MPI_Wtime();')
+
+        # Generate the write statements
+        c_file.write ('\n\n// Time the writes')
+        if measure.use_barrier_before_access():
+            c_file.write ('\nMPI_Barrier (MPI_COMM_WORLD);')
+        c_file.write ('\nskel_access_timer -= MPI_Wtime();')
+
+        # Set the adios group size
+        c_file.write (adios.cFormatter.get_groupsize_code (g) )
+
+        c_file.write ('\n\n// Write each variable')
+        for v in g.get_vars():
+            c_file.write (adios.cFormatter.get_write_line (v) )
+
+        c_file.write ('\n\n// Stop timing the writes')
+        c_file.write ('\nskel_access_timer += MPI_Wtime();')
+            
+        # close the file
+        c_file.write ('\n\n// Time the closes')
+        if measure.use_barrier_before_close():
+            c_file.write ('\nMPI_Barrier (MPI_COMM_WORLD);')
+        c_file.write ('\nskel_close_timer -= MPI_Wtime();')
+        c_file.write ('\nadios_close (adios_handle);')
+        if measure.use_barrier_after_close():
+            c_file.write ('\nMPI_Barrier (MPI_COMM_WORLD);')
+        c_file.write ('\nskel_close_timer += MPI_Wtime();')
+
+        #<steps> loop ends here
+        c_file.write('}')
+
+        if measure.use_barrier_before_final_time():
+            c_file.write ('\nMPI_Barrier (MPI_COMM_WORLD);')
+
+        c_file.write ('\nskel_total_timer += MPI_Wtime();')
+
+
+        # Output timing info
+        # For now, do a reduce to output a single value for the total time
+        # In future we can gather and output all of the times to see variability
+        c_file.write ('\n\n// Output results')
+
+        c_file.write ('\n\n adios_timing_write_xml (adios_handle, "' + params.get_application() + '_skel_time.xml");')
+
+
+        c_file.write ('\ndouble skel_total_init, skel_total_open, skel_total_access, skel_total_close, skel_total_total;')
+
+        if measure.use_reduce():
+            c_file.write ('\nMPI_Reduce (&skel_init_timer, &skel_total_init, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);')
+            c_file.write ('\nMPI_Reduce (&skel_open_timer, &skel_total_open, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);')
+            c_file.write ('\nMPI_Reduce (&skel_access_timer, &skel_total_access, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);')
+            c_file.write ('\nMPI_Reduce (&skel_close_timer, &skel_total_close, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);')
+            c_file.write ('\nMPI_Reduce (&skel_total_timer, &skel_total_total, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);')
+#        else:
+#            c_file.write ('\nskel_total_init = skel_init_timer;')
+#            c_file.write ('\nskel_total_open = skel_open_timer;')
+#            c_file.write ('\nskel_total_access = skel_access_timer;')
+#            c_file.write ('\nskel_total_close = skel_close_timer;')
+#            c_file.write ('\nskel_total_total = skel_total_timer;')
+
+        if measure.report_all():
+            pass
+            # Detailed reporting disabled, use adios timing instead.
+
+            #c_file.write ('\n    fprintf (stdout, "rank, %i, open: %f, access %f, close %f, total %f\\n", skel_mpi_rank, skel_open_timer, skel_access_timer, skel_close_timer, skel_total_timer);')
+            #c_file.write ('\n    fprintf (stdout, "effective bandwidth %f, adios_groupsize %lli\\n", adios_groupsize * skel_mpi_size / (skel_total_total * (1024 * 1024 * 1024) ), adios_groupsize);')
+            
+
+        c_file.write ('\nif (skel_mpi_rank == 0) {')
+
+        #c_file.write ('\n    fprintf (stdout, "RRR rank, %i, open: %f, access %f, close %f, total %f\\n", skel_mpi_rank, skel_total_open, skel_total_access, skel_total_close, skel_total_total);')
+        #c_file.write ('\n    fprintf (stdout, "RRR effective bandwidth %f, adios_groupsize %lli\\n", adios_groupsize * skel_mpi_size / (skel_total_total * (1024 * 1024 * 1024) ), adios_groupsize);')
+
+        c_file.write ('\n    fprintf (stdout, "\\n");')
+        c_file.write ('\n    fprintf (stdout, "\\n*************************");')
+        c_file.write ('\n    fprintf (stdout, "\\n   Groupsize: %lli", adios_groupsize);')
+        c_file.write ('\n    fprintf (stdout, "\\n  Open Time: %f", skel_total_open);')
+        c_file.write ('\n    fprintf (stdout, "\\nAccess Time: %f", skel_total_access);')
+        c_file.write ('\n    fprintf (stdout, "\\n Close Time: %f", skel_total_close);')
+        c_file.write ('\n    fprintf (stdout, "\\n Total Time: %f", skel_total_total);')
+        c_file.write ('\n    fprintf (stdout, "\\n*************************");')
+        c_file.write ('\n    fprintf (stdout, "\\n");')
+
+
+        c_file.write ('\n}')
+        
+
+        # free the array memory
+        c_file.write ('\n\n// Free the arrays')
+        frees = set()
+        for v in filter (lambda x : not x.is_scalar(), g.get_vars() ):
+            frees.add ('\nfree (' + v.get_gwrite() + ');')
+
+        for f in frees:
+            c_file.write (f)
+
+        c_file.write ('\n\n// Clean up')
+
+        c_file.write ('\nadios_finalize(0);')
+
+        c_file.write ('\nMPI_Finalize();')
+        c_file.write ('\n}\n')
+
+        # Just write one group, so if we get here, we are finished 
+        break
+
+    c_file.close()
+
+    # end: generate_c_write
+
+
+def generate_fortran_write (outfile, config, params, test):
+
+    outfile = outfile.replace ('.f90', '_write.f90')
+    measure = test.get_measure()
+
+    f_file = open (outfile, 'w')
+
+    # Look at all of the groups, Generate the code when we find the requested group
+    # The loop is left over from a previous iteration, it could very well be removed.
+    for g in config.get_groups():
+
+        # if a group was specified, and this is not it, go to the next group
+        if g.get_name() != test.get_group_name():
+            continue
+
+        f_file.write ('!!\n!! Automatically generated by skel. Modify at your own risk.\n')
+
+        f_file.write ('\n\nprogram skel')
+        f_file.write ('\n')
+        
+
+        # Generate includes
+        f_file.write ('\n\n  use mpi')
+
+        f_file.write ('\n  IMPLICIT NONE')
+
+
+        # Declare timers
+        f_file.write ('\n\n  real*8 :: skel_init_timer = 0, &')
+        f_file.write ('\n    skel_open_timer = 0, &')
+        f_file.write ('\n    skel_access_timer = 0, &')
+        f_file.write ('\n    skel_close_timer = 0, &')
+        f_file.write ('\n    skel_total_timer = 0')
+
+        f_file.write ('\n\n  CHARACTER(LEN=128) :: skel_filename')
+        f_file.write ('\n\n  integer*4 :: skel_mpi_size, skel_mpi_rank, skel_i')
+        f_file.write ('\n  integer*4 :: error')
+        f_file.write ('\n  integer*8 :: adios_error')
+
+        f_file.write ('\n  integer*8 :: adios_groupsize')
+
+        f_file.write ('\n\n  integer :: comm')
+
+        f_file.write ('\n\n  integer*8 :: adios_handle, &')
+        f_file.write ('\n    skel_total_size')
+
+        f_file.write ('\n  real*8 :: skel_total_init, skel_total_open, skel_total_access, skel_total_close, skel_total_total')
+
+
+        # Declare all of the program variables
+        # We split the scalars and the arrays, since the arrays will likely depend on some of
+        # the scalars having already been declared.
+        # The sets are used to eliminate duplicates when multiple file vars are written from the
+        # same program var (as is done by genarray)
+        f_file.write ('\n\n! Scalar declarations')
+        declarations = set()
+        for v in filter (lambda x : x.is_scalar(), g.get_vars() ):
+            declarations.add (adios.fortranFormatter.get_declaration (v, params.get_group (g.get_name() ) ) )
+
+        for d in declarations:
+            f_file.write (d)
+
+        f_file.write ('\n\n! Array declarations')
+        declarations = set()
+        for v in filter (lambda x : not x.is_scalar(), g.get_vars() ):
+            declarations.add (adios.fortranFormatter.get_declaration (v, params.get_group (g.get_name() ) ) )
+
+        for d in declarations:
+            f_file.write (d)
+
+
+
+
+        f_file.write ('\n\n  call MPI_INIT (error)')
+
+        f_file.write ('\n\n! Time the init')
+        f_file.write ('\n  call MPI_BARRIER (MPI_COMM_WORLD, error)')
+        f_file.write ('\n  skel_init_timer = skel_init_timer - MPI_Wtime();')
+
+        f_file.write ('\n\n  call adios_init ("' + config.get_filename() + '", adios_error)')
+
+        f_file.write ('\n  skel_init_timer = skel_init_timer + MPI_WTIME();')
+
+        f_file.write ('\n  call MPI_Comm_rank (MPI_COMM_WORLD, skel_mpi_rank, error)')
+        f_file.write ('\n  call MPI_Comm_size (MPI_COMM_WORLD, skel_mpi_size, error)')
+
+
+        f_file.write ('\n\n! Initialize the scalars')
+
+        # Now the scalar initializations
+        # Need to worry about the order of these since some will be used by others
+        # For now, just do the numerical values first, then come back and do the more
+        # complicated ones. This won't cover something like a depends on b, b depends on c,
+        # but it will work for the moment
+        for v in filter (lambda x : x.is_scalar(), g.get_vars() ):
+            #split at the spaces, just print the ones where the third element is a number
+            init_str = adios.fortranFormatter.get_initialization (v, params.get_group (g.get_name() ) )
+            if init_str.split (None, 2)[2].isdigit():
+                f_file.write (init_str)
+
+        for v in filter (lambda x : x.is_scalar(), g.get_vars() ):
+            #split at the spaces, just print the ones where the third element is a number
+            init_str = adios.fortranFormatter.get_initialization (v, params.get_group (g.get_name() ) )
+            if not init_str.split (None, 2)[2].isdigit():
+                f_file.write (init_str)
+
+        f_file.write ('\n\n! Initialize the arrays')
+
+		# And the vector initializations
+        for v in filter (lambda x : not x.is_scalar(), g.get_vars() ):
+            f_file.write (adios.fortranFormatter.get_initialization (v, params.get_group (g.get_name() ) ) )
+
+
+        if measure.use_sleep_before_open():
+            f_file.write ('\n\n  call sleep (30)')
+        #start timing
+        f_file.write ('\n  skel_total_timer = skel_total_timer - MPI_Wtime()')
+
+        f_file.write ('\n\n skel_i = 0')
+
+        #Loop <steps> times
+        f_file.write ('\n\n DO')
+        f_file.write ('\n  skel_i = skel_i + 1')
+        f_file.write ('\n  IF (skel_i .GT. ' + test.get_steps() + ') EXIT')
+
+        f_file.write ('\n\n! Time the opens')
+        if measure.use_barrier_before_open():
+            f_file.write ('\n  call MPI_Barrier (MPI_COMM_WORLD, error)')
+        f_file.write ('\n  skel_open_timer = skel_open_timer - MPI_Wtime()')
+
+        #f_file.write ('\n  MPI_Comm comm = MPI_COMM_WORLD;')
+
+        f_file.write ('\n\n  write (skel_filename, \'(I0)\') skel_i')
+        f_file.write ('\n  skel_filename = "out_' + test.get_group_name() + '_' + test.get_type() + '_"//skel_filename//".bp"')
+
+        f_file.write ('\n call MPI_Comm_dup (MPI_COMM_WORLD, comm, error)')
+
+        f_file.write ('\n  call adios_open(adios_handle, "' + g.get_name() + '", skel_filename, "w", comm, adios_error);')
+
+        #end timing
+        f_file.write ('\n  skel_open_timer = skel_open_timer + MPI_Wtime()')
+
+        # Generate the write statements
+        f_file.write ('\n\n! Time the writes')
+        if measure.use_barrier_before_access():
+            f_file.write ('\n  call MPI_Barrier (MPI_COMM_WORLD, error)')
+        f_file.write ('\n  skel_access_timer = skel_access_timer - MPI_Wtime()')
+
+        # Set the adios group size
+        f_file.write (adios.fortranFormatter.get_groupsize_code (g) )
+
+        f_file.write ('\n\n! Write each variable')
+        for v in g.get_vars():
+            f_file.write (adios.fortranFormatter.get_write_line (v) )
+
+        f_file.write ('\n\n! Stop timing the writes')
+        f_file.write ('\n  skel_access_timer = skel_access_timer + MPI_Wtime()')
+            
+        # close the file
+        f_file.write ('\n\n! Time the closes')
+        if measure.use_barrier_before_close():
+            f_file.write ('\n  call MPI_Barrier (MPI_COMM_WORLD, error)')
+        f_file.write ('\n  skel_close_timer = skel_close_timer - MPI_Wtime()')
+        f_file.write ('\n  call adios_close (adios_handle, adios_error)')
+        if measure.use_barrier_after_close():
+            f_file.write ('\n  call MPI_Barrier (MPI_COMM_WORLD, error)')
+        f_file.write ('\n  skel_close_timer = skel_close_timer + MPI_Wtime()')
+
+        f_file.write ('\n\n END DO')
+
+        if measure.use_barrier_before_final_time():
+            f_file.write ('\n\n  call MPI_Barrier (MPI_COMM_WORLD, error)')
+        f_file.write ('\n\n  skel_total_timer = skel_total_timer + MPI_Wtime()')
+
+        # Output timing info
+        # For now, do a reduce to output a single value for the total time
+        # In future we can gather and output all of the times to see variability
+        f_file.write ('\n\n! Output results')
+
+        if measure.use_adios_timing():
+            f_file.write ('\n\n  call adios_timing_write_xml (adios_handle, "' + params.get_application() + '_skel_time.xml")')
+
+        if measure.use_reduce():
+            f_file.write ('\n\n  call MPI_Reduce (skel_init_timer, skel_total_init, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 0, MPI_COMM_WORLD, error)')
+            f_file.write ('\n  call MPI_Reduce (skel_open_timer, skel_total_open, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 0, MPI_COMM_WORLD, error)')
+            f_file.write ('\n  call MPI_Reduce (skel_access_timer, skel_total_access, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 0, MPI_COMM_WORLD, error)')
+            f_file.write ('\n  call MPI_Reduce (skel_close_timer, skel_total_close, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 0, MPI_COMM_WORLD, error)')
+            f_file.write ('\n  call MPI_Reduce (skel_total_timer, skel_total_total, 1, MPI_DOUBLE_PRECISION, MPI_MAX, 0, MPI_COMM_WORLD, error)')
+        else:
+            f_file.write ('\n  skel_total_init = skel_init_timer')
+            f_file.write ('\n  skel_total_open = skel_open_timer')
+            f_file.write ('\n  skel_total_access = skel_access_timer')
+            f_file.write ('\n  skel_total_close = skel_close_timer')
+            f_file.write ('\n  skel_total_total = skel_total_timer')
+
+        if measure.report_all():
+            pass
+            # All rank reporting disabled for skel, use ADIOS timing library instead.
+
+            #f_file.write ('\n    fprintf (stdout, "rank, %i, open: %f, access %f, close %f, total %f\\n", skel_mpi_rank, skel_open_timer, skel_access_timer, skel_close_timer, skel_total_timer);')
+            #f_file.write ("\n\n  write (*,'(a6,i7,a7,f15.8,a9,f15.8,a7,f15.8,a7,f15.8)') 'rank, ', skel_mpi_rank , ' open: ', skel_open_timer, ', access ', skel_access_timer, ' close ', skel_close_timer, ' total ', skel_total_timer")
+            #f_file.write ('\n    fprintf (stdout, "effective bandwidth %f, adios_groupsize %lli\\n", adios_groupsize * skel_mpi_size / (skel_total_total * (1024 * 1024 * 1024) ), adios_groupsize);')
+            #f_file.write ("\n  write (*, '(a20,f15.8,a17,i9)') 'effective bandwidth ', adios_groupsize * skel_mpi_size / (skel_total_total * (1024 * 1024 * 1024) ), 'adios_groupsize: ', adios_groupsize")
+            
+
+        f_file.write ('\n\n  if (skel_mpi_rank == 0) then')
+
+        f_file.write ("\n    write (*,*) '\\n'")
+        f_file.write ("\n    write (*,*) '**************************'")
+        f_file.write ("\n    write (*,*) '  Groupsize: ', adios_groupsize")
+        f_file.write ("\n    write (*,*) '  Open Time: ', skel_total_open")
+        f_file.write ("\n    write (*,*) 'Access Time: ', skel_total_access")
+        f_file.write ("\n    write (*,*) ' Close Time: ', skel_total_close")
+        f_file.write ("\n    write (*,*) ' Total Time: ', skel_total_total")
+        f_file.write ("\n    write (*,*) '**************************'")
+        f_file.write ("\n    write (*,*) '\\n'")
+
+        #f_file.write ("\n    write (*, '(a10,i9,a7,f15.8,a8,f15.8,a7,f15.8,a7,f15.8,a2)')  'RRR rank, ', skel_mpi_rank, ' open: ', skel_total_open, ' access ', skel_total_access, ' close ', skel_total_close, ' total ', skel_total_total, '\\n'")
+
+        #f_file.write ("\n    write (*,'(a24,f15.8,a17,i9)') 'RRR effective bandwidth ', adios_groupsize * skel_mpi_size / (skel_total_total * (1024 * 1024 * 1024) ), 'adios_groupsize', adios_groupsize")
+
+        f_file.write ('\n  endif')
+        
+
+        # free the array memory -- skip this for now
+        #f_file.write ('\n\n// Free the arrays')
+        #frees = set()
+        #for v in filter (lambda x : not x.is_scalar(), g.get_vars() ):
+        #    frees.add ('\nfree (' + v.get_gwrite() + ');')
+
+        #for f in frees:
+        #    f_file.write (f)
+
+        f_file.write ('\n\n! Clean up')
+
+        f_file.write ('\n  call adios_finalize(0, adios_error)')
+
+        f_file.write ('\n  call MPI_Finalize(error)')
+        f_file.write ('\n\nend program skel\n')
+
+        # Just write one group, so if we get here, we are finished 
+        break
+
+    f_file.close()
+
+    # end: generate_fortran_write
+
+
+def generate_c_read_all (outfile, config, params, test):
+
+    outfile = outfile.replace ('.c', '_read_all.c')
+
+    c_file = open (outfile, 'w')
+
+    # Look at all of the groups, Generate the code when we find the requested group
+    # The loop is left over from a previous iteration, it could very well be removed.
+    for g in config.get_groups():
+
+        # if a group was specified, and this is not it, go to the next group
+        if g.get_name() != test.get_group_name():
+            continue
+
+        c_file.write ('//\n// Automatically generated by skel. Modify at your own risk.\n')
+
+        # Generate includes
+        c_file.write ('\n#include "adios.h"')
+        c_file.write ('\n#include "adios_read.h"')
+        c_file.write ('\n#include "mpi.h"')
+        c_file.write ('\n#include <stdlib.h>')
+        c_file.write ('\n#include <stdio.h>')
+
+        c_file.write ('\n\nint main (int argc, char ** argv)')
+        c_file.write ('\n{')
+
+        c_file.write ('\n\nMPI_Init (&argc, &argv);')
+        c_file.write ('\nadios_init ("' + config.get_filename() + '");')
+
+        c_file.write ('\nint skel_mpi_size, skel_mpi_rank, skel_i;')
+        c_file.write ('\nMPI_Comm_rank (MPI_COMM_WORLD, &skel_mpi_rank);')
+        c_file.write ('\nMPI_Comm_size (MPI_COMM_WORLD, &skel_mpi_size);')
+
+        # Declare timers
+        c_file.write ('\n\ndouble skel_open_timer = 0;')
+        c_file.write ('\ndouble skel_access_timer = 0;')
+        c_file.write ('\ndouble skel_close_timer = 0;')
+
+        # Declare all of the program variables
+        # We split the scalars and the arrays, since the arrays will likely depend on some of
+        # the scalars having already been declared.
+        # The sets are used to eliminate duplicates when multiple file vars are written from the
+        # same program var (as is done by genarray)
+        c_file.write ('\n\n// Scalar declarations')
+        declarations = set()
+        for v in filter (lambda x : x.is_scalar(), g.get_vars() ):
+            declarations.add (adios.cFormatter.get_declaration (v, params.get_group (g.get_name() ) ) )
+
+        for d in declarations:
+            c_file.write (d)
+
+        c_file.write ('\n\n// Array declarations')
+        declarations = set()
+        for v in filter (lambda x : not x.is_scalar(), g.get_vars() ):
+            declarations.add (adios.cFormatter.get_declaration (v, params.get_group (g.get_name() ) ) )
+
+        for d in declarations:
+            c_file.write ('\n' + d)
+
+        #start timing
+        c_file.write ('\n\n// Time the opens')
+        c_file.write ('\nMPI_Barrier (MPI_COMM_WORLD);')
+        c_file.write ('\nskel_open_timer -= MPI_Wtime();')
+
+        c_file.write ('\nMPI_Comm comm = MPI_COMM_WORLD;')
+
+        c_file.write ('\nADIOS_FILE* afile = adios_fopen ("out_' + test.get_group_name() + '_' + test.get_type() + '.bp", comm);')
+        c_file.write ('\nADIOS_GROUP* group = adios_gopen (afile, "' + g.get_name() + '");')
+
+        #end timing
+        c_file.write ('\nskel_open_timer += MPI_Wtime();')
+
+        # Generate the write statements
+        c_file.write ('\n\n// Time the writes')
+        c_file.write ('\nMPI_Barrier (MPI_COMM_WORLD);')
+        c_file.write ('\nskel_access_timer -= MPI_Wtime();')
+
+        c_file.write ('\n\n// Read all of each variable')
+        c_file.write ('\nuint64_t starts[] = {0,0,0,0,0,0,0,0}; // 8 dimensions should do it.')
+        c_file.write ('\nuint64_t counts[] = {0,0,0,0,0,0,0,0};')
+
+        for v in g.get_vars():
+
+            c_file.write ('\n')
+
+            # The tricky bit here is deciding whether we need the & before the variable name.
+            # We omit it in two cases: 1) the variable type is string, or 2) the variable is not a scalar
+            if (v.get_c_type() == 'string' or v.get_dimensions() != None):
+                var_prefix = ''
+            else:
+                var_prefix = '&'
+        
+            index = 0
+            if v.get_dimensions() != None:
+                for d in v.get_dimensions():
+                    c_file.write ('\ncounts[%d] = '% index + d + ';')
+                    index = index + 1
+
+            c_file.write ('\nadios_read_var(group, "' + v.get_name() + '", starts, counts, ' + var_prefix + v.get_gwrite() + ');' )
+
+        c_file.write ('\n\n// Stop timing the writes')
+        c_file.write ('\nskel_access_timer += MPI_Wtime();')
+            
+        # close the file
+        c_file.write ('\n\n// Time the closes')
+        c_file.write ('\nMPI_Barrier (MPI_COMM_WORLD);')
+        c_file.write ('\nskel_close_timer -= MPI_Wtime();')
+        c_file.write ('\nadios_gclose (group);')
+        c_file.write ('\nadios_fclose (afile);')
+        c_file.write ('\nskel_close_timer += MPI_Wtime();')
+
+
+        # Output timing info
+        # For now, do a reduce to output a single value for the total time
+        # In future we can gather and output all of the times to see variability
+        c_file.write ('\n\n// Output results')
+        c_file.write ('\ndouble skel_total_open, skel_total_access, skel_total_close;')
+        c_file.write ('\nMPI_Reduce (&skel_open_timer, &skel_total_open, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);')
+        c_file.write ('\nMPI_Reduce (&skel_access_timer, &skel_total_access, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);')
+        c_file.write ('\nMPI_Reduce (&skel_close_timer, &skel_total_close, 1, MPI_DOUBLE, MPI_MAX, 0, MPI_COMM_WORLD);')
+        c_file.write ('\nif (skel_mpi_rank == 0) {')
+
+        c_file.write ('\n    fprintf (stdout, "open: %f, access %f, close %f", skel_total_open, skel_total_access, skel_total_close);')
+
+        c_file.write ('\n}')
+        
+
+        # free the array memory
+        c_file.write ('\n\n// Free the arrays')
+        frees = set()
+        for v in filter (lambda x : not x.is_scalar(), g.get_vars() ):
+            frees.add ('\nfree (' + v.get_gwrite() + ');')
+
+        for f in frees:
+            c_file.write (f)
+
+        c_file.write ('\n\n// Clean up')
+
+        c_file.write ('\nadios_finalize(0);')
+
+        c_file.write ('\nMPI_Finalize();')
+        c_file.write ('\n}\n')
+
+        # Just write one group, so if we get here, we are finished 
+        break
+
+    c_file.close()
+
+    #end: generate_c_read_all
+
+
+
+def create_sources (params, config, project):
+
+    # Determine the target language
+    if config.host_language == "C" or config.host_language =="c":
+        generate = generate_c
+        filetype = ".c"
+    else:
+        generate = generate_fortran
+        filetype = ".f90"
+
+    # Produce all of the Fortran files
+    for batch in params.get_batches():
+        for test in batch.get_tests():
+
+            # Determine outfile name
+            extension = '_skel_' + test.get_group_name()
+            outfilename = project + extension + filetype
+
+            generate (outfilename, config, params, test)
+
+
+
+def parse_command_line():
+
+    parser = argparse.ArgumentParser (description='Generate the required source code for the specified skel project')
+    parser.add_argument ('project', metavar='project', help='Name of the skel project')
+
+    return parser.parse_args()
+
+
+
+def main(argv=None):
+
+    skel_settings.create_settings_dir_if_needed()
+
+    args = parse_command_line()
+
+    config = adios.adiosConfig (args.project + '_skel.xml')
+    params = skelconf.skelConfig (args.project + '_params.xml')
+
+    create_sources (params, config, args.project)
+
+
+        
+
+if __name__ == "__main__":
+    main()
+
+ 
diff --git a/utils/skel/lib/skel_submit.py b/utils/skel/lib/skel_submit.py
new file mode 100644
index 0000000..c0194cb
--- /dev/null
+++ b/utils/skel/lib/skel_submit.py
@@ -0,0 +1,137 @@
+#!/usr/bin/env python
+
+import argparse
+import os
+
+import skelconf
+import adios
+import skel_settings
+
+
+# To produce submit scripts, we'll work from a template. There will
+# be two types of replacement, simple variables, and macros (for the
+# tests)
+def generate_submit_scripts (params):
+    for batch in params.get_batches():
+        #platform = params.get_target()
+        settings = skel_settings.skel_settings()
+        platform = settings.get_submit_target()
+
+        sfile = open ('submit_' + platform + '_' + batch.get_name(), 'w')
+        sfile_template = open (os.path.expanduser('~/.skel/templates/submit_' + platform + '.tpl'), 'r')
+
+        i = 0
+        template_lines = sfile_template.readlines()
+        while i < len (template_lines):
+
+            template_line = template_lines[i]
+
+            if '$$START_TEST$$' in template_line:
+            # This is the test macro, run through it for each test
+                template_start_index = i + 1
+                for test in batch.get_tests():
+                    j = template_start_index
+                    template_line = template_lines[j]
+                    while not '$$END_TEST$$' in template_line:
+                        sfile.write (submit_line_template_replace (template_line, params, batch, test))
+                        j = j + 1
+                        template_line = template_lines[j]
+                    # Point at the first line after the macro
+                    i = j + 1
+            else:
+                # Fill in any replacement vars in this line...
+                template_line = submit_line_template_replace (template_line, params, batch, None)
+                sfile.write (template_line)
+                i = i + 1
+
+        sfile_template.close()
+        sfile.close()
+
+
+import re
+import math
+
+def submit_line_template_replace (template_line, params, batch, test):
+
+    template_line = template_line.replace ('$$JOB_NAME$$', batch.get_name() + '_%d'%batch.get_cores() + '_skel_' + params.get_application() )
+    template_line = template_line.replace ('$$WALLTIME$$', batch.get_walltime() )
+    template_line = template_line.replace ('$$APP$$', params.get_application() )
+    template_line = template_line.replace ('$$CORES_USED$$', '%d'%batch.get_cores() )
+    template_line = template_line.replace ('$$TARGET$$', params.get_target() )
+
+    if test != None:
+
+        #Test specific replacements
+        template_line = template_line.replace ('$$TAGS$$', test.get_tags() )
+        template_line = template_line.replace ('$$METHOD$$', test.get_method() )
+        template_line = template_line.replace ('$$EXEC$$', params.get_application() + '_skel_' + test.get_group_name() + '_' + test.get_type() )
+
+        template_line = template_line.replace ('$$ITERATIONS$$', test.get_iterations() )
+
+        template_line = template_line.replace ('$$METHOD_PARAMS$$', test.get_method_params() )
+        template_line = template_line.replace ('$$EXT$$', test.get_ext() )
+
+        if test.get_rm() == 'pre' or test.get_rm() == 'both':
+            prerm = 'rm -rf out*'
+        else:
+            prerm = ''
+        template_line = template_line.replace ('$$PRE_RM$$', prerm)
+
+        if test.get_rm() == 'post' or test.get_rm() == 'both':
+            postrm = 'rm -rf out*'
+        else:
+            postrm = ''
+        template_line = template_line.replace ('$$POST_RM$$', postrm)
+
+
+    if '$$CORES_TOTAL$$' in template_line:
+        pattern = re.compile (r"\$\$CORES_TOTAL\$\$[\d]*\$\$")
+        match = pattern.search (template_line)
+        match_term = match.group()
+
+        # If we split the matched string at the dollar signs, the cores/node will be
+        # at index 4
+        count = float(match_term.split('$')[4])
+        total_cores = int (math.ceil( (batch.get_cores() / count) ) * count)
+        template_line = template_line.replace (match_term, '%d'%total_cores)
+
+
+    if '$$NODES_TOTAL$$' in template_line:
+        pattern = re.compile (r"\$\$NODES_TOTAL\$\$[\d]*\$\$")
+        match = pattern.search (template_line)
+        match_term = match.group()
+
+        count = float(match_term.split('$')[4])
+        total_nodes = int (math.ceil( (batch.get_cores() / count) ) )
+        template_line = template_line.replace (match_term, '%d'%total_nodes)
+
+    return template_line
+
+
+def parse_command_line():
+
+    parser = argparse.ArgumentParser (description='Create submission scripts for the given skel project')
+    parser.add_argument ('project', metavar='project', help='Name of the skel project')
+
+    return parser.parse_args()
+
+
+def main(argv=None):
+
+    skel_settings.create_settings_dir_if_needed()
+    
+    args = parse_command_line()
+
+    config = adios.adiosConfig (args.project + '_skel.xml')
+    params = skelconf.skelConfig (args.project + '_params.xml')
+
+    #generate_makefiles_c (params)
+    generate_submit_scripts (params)
+
+
+
+if __name__ == "__main__":
+    main()
+
+
+
diff --git a/utils/skel/lib/skel_xml.py b/utils/skel/lib/skel_xml.py
new file mode 100644
index 0000000..1377d14
--- /dev/null
+++ b/utils/skel/lib/skel_xml.py
@@ -0,0 +1,133 @@
+#!/usr/bin/env python
+
+import argparse
+import xml.dom.minidom
+
+import skel_settings
+
+
+def parse_command_line():
+    parser = argparse.ArgumentParser (description='Rewrite elements of the adios config file that would produce invalid syntax in the generated code, e.g. gwrite attributes containing + or %')
+    parser.add_argument ('project', metavar='project', help='Name of the skel project')
+
+    return parser.parse_args()
+
+
+def cleanse (str):
+
+    # Trim the name at the first open paren to deal with gts issue
+    str = str.split('(')[0]
+    
+    # replace unfriendly characters with safer versions
+    str = str.replace ("+", "__plus__")
+    str = str.replace ("%", "__pct__")
+    str = str.replace ("/", "__div__")
+    str = str.replace ("-", "__minus__")
+    str = str.replace ("**", "__pow__")
+    str = str.replace ("*", "__mul__")
+
+
+    return str
+
+
+
+
+def create_skel_xml (project):
+
+    outfilename = project + '_skel.xml'
+
+    skel_file = open (outfilename, 'w')
+
+    doc = xml.dom.minidom.parse (project + '.xml')
+  
+    #remove diagnostic groups (xgc1)
+
+    groups = doc.getElementsByTagName ('adios-group')
+    for g in groups:
+        if g.getAttribute('name').startswith ('diag'):
+            # remove this group
+            doc.getElementsByTagName ('adios-config')[0].removeChild(g)
+
+    methods = doc.getElementsByTagName ('method')
+    for m in methods:
+        if m.getAttribute ('group').startswith ('diag'):
+            # remove this method
+            doc.getElementsByTagName ('adios-config')[0].removeChild(m)
+
+    for m in methods:
+        token = doc.createTextNode ('***skel-parameters***')
+        m.appendChild (token)
+
+
+
+	
+
+    #deal with the language
+    lang = doc.getElementsByTagName ('adios-config')[0].getAttribute ('host-language')
+
+#    #for now, assume the skeletal will be C
+#    if (lang == 'Fortran'):
+#        flip_dims = 'True'
+#        doc.getElementsByTagName ('adios-config')[0].setAttribute ('host-language', 'C')
+#    else:
+#        flip_dims = 'False'
+
+    #Do not change the language
+    flip_dims = 'False'
+
+    
+    #clean up the variables
+    vars = doc.getElementsByTagName ('var')
+    for v in vars:
+        gwrite = v.getAttributeNode ('gwrite')
+        dims = v.getAttributeNode ('dimensions')
+        name = v.getAttributeNode ('name')
+        if gwrite != None:
+            gwrite.value = cleanse (gwrite.value)
+        if dims != None:
+            dims.value = cleanse (dims.value)
+            if flip_dims == 'True':
+                dims.value = ','.join(dims.value.split(',')[::-1] )
+        if name != None:
+            name.value = cleanse (name.value)
+
+
+    global_bounds = doc.getElementsByTagName ('global-bounds')
+    for gb in global_bounds:
+        dims = gb.getAttribute ('dimensions')
+        offsets = gb.getAttribute ('offsets')
+
+        if dims != None:
+            dims = cleanse (dims)
+            if flip_dims == 'True':
+                dims = ','.join (dims.split(',')[::-1] )
+            gb.setAttribute ('dimensions', dims)
+
+        if offsets != None:
+            offsets = cleanse (offsets)
+            if flip_dims == 'True':
+                offsets = ','.join (offsets.split(',')[::-1] )
+            gb.setAttribute ('offsets', offsets)
+
+    xmlstr = doc.toxml() 
+
+    # ADIOS stumbles when there is no newline after the xml declaration, so we'll add one here
+    xmlstr = xmlstr.replace ("?>", "?>\n", 1)
+
+    skel_file.write (xmlstr)
+
+
+
+def main ():
+
+    skel_settings.create_settings_dir_if_needed()
+
+    args = parse_command_line()
+
+    create_skel_xml (args.project)
+
+
+if __name__ == "__main__":
+    main()
+
+
diff --git a/utils/skel/lib/skelconf.py b/utils/skel/lib/skelconf.py
new file mode 100644
index 0000000..9771226
--- /dev/null
+++ b/utils/skel/lib/skelconf.py
@@ -0,0 +1,246 @@
+import xml.dom.minidom
+
+import skel_settings
+
+
+class skelConfig:
+    def __init__ (self, infile):
+        doc = xml.dom.minidom.parse (infile)
+
+        nodes = doc.childNodes
+        if (nodes.length != 1):
+            print 'malformed param file, should contain only a single skel-config element'
+            raise SystemExit
+        self.config_node = nodes[0]
+
+        self.groups = []
+        self.group_dict = {}
+
+        for node in self.config_node.getElementsByTagName('adios-group'):
+            this_group = group (node)
+            self.groups.append (this_group)
+            self.group_dict[this_group.get_name()] = this_group
+
+        self.batches = []
+
+        for node in self.config_node.getElementsByTagName('batch'):
+            self.batches.append (batch (node) )
+
+    def get_group (self, name):
+        return self.group_dict[name]
+
+    def get_groups (self):
+        return self.groups
+
+    def get_batches (self):
+        return self.batches
+
+    def get_application (self):
+        return self.config_node.getAttribute ('application')
+
+    def get_target (self):
+        target = self.config_node.getAttribute ('target')
+
+        if target == None or target == '':
+            return "default"
+
+        return target
+
+
+class group:
+    def __init__ (self, group_node):
+        self.group_node = group_node
+
+        self.scalars = []
+        self.arrays = []
+
+        self.scalar_dict = {}
+        self.array_dict = {}
+
+        for node in self.group_node.childNodes:
+            if (node.localName == 'scalar'):
+                this_scalar = scalar (node)
+                self.scalars.append (this_scalar)
+                self.scalar_dict[this_scalar.get_name()] = this_scalar
+            if (node.localName == 'array'):
+                this_array = array (node)
+                self.arrays.append (this_array)
+                self.array_dict[this_array.get_name()] = this_array
+
+    def get_name (self):
+        return self.group_node.getAttribute ('name')
+
+    def get_scalars (self):
+        return self.scalars
+
+    def get_scalar (self, name):
+        return self.scalar_dict[name]
+
+    def get_arrays (self):
+        return self.arrays
+
+    def get_array (self, name):
+        return self.array_dict[name]
+
+
+class batch:
+    def __init__ (self, batch_node):
+        self.batch_node = batch_node
+
+        self.tests = []
+        for node in self.batch_node.getElementsByTagName ('test'):
+            self.tests.append (test (node) )
+
+    def get_tests (self):
+        return self.tests
+
+    def get_name (self):
+        return self.batch_node.getAttribute ('name')
+
+    def get_cores (self):
+        return int (self.batch_node.getAttribute ('cores') )
+
+    def get_walltime (self):
+        return self.batch_node.getAttribute ('walltime')
+
+
+class test:
+    def __init__ (self, test_node):
+        self.test_node = test_node
+        self.measure = measure (self.test_node.getAttribute ('measure') )
+
+
+    def get_type (self):
+        return self.test_node.getAttribute ('type')
+
+    def get_method_params (self):
+        return self.test_node.getAttribute ('method_params')
+
+    def get_group_name (self):
+        return self.test_node.getAttribute ('group')
+
+    def get_method (self):
+        return self.test_node.getAttribute ('method')
+
+    def get_rm (self):
+        return self.test_node.getAttribute ('rm')
+
+    def get_tags (self):
+        return self.test_node.getAttribute ('tags')
+
+    def get_steps (self):
+        steps = self.test_node.getAttribute ('steps')
+        if steps == None or steps == '':
+            return '1'
+        else:
+            return steps
+
+    def get_iterations (self):
+        iter = self.test_node.getAttribute ('iterations')
+        if iter == None or iter == '':
+            return '1'
+        else:
+            return iter
+
+    def get_ext (self):
+        return self.test_node.getAttribute ('ext')
+
+    def get_measure (self):
+        return self.measure
+
+# the measure object hides the logic of which code to emit for the various measurement options
+class measure:
+    def __init__ (self, measure_string):
+        self.settings_dict = skel_settings.skel_settings().get_settings_dict()
+        self.measure_string = measure_string
+
+    def use_barrier_before_open (self):
+        val = self.settings_dict["barrier_before_open"]
+        if val =="no":
+            return False
+
+        return True
+
+    def use_barrier_before_access (self):
+        val = self.settings_dict["barrier_before_access"]
+        if val =="yes":
+            return True 
+
+        return False
+
+    def use_barrier_before_close (self):
+        val = self.settings_dict["barrier_before_close"]
+        if val =="yes":
+            return True 
+
+        return False 
+
+    def use_barrier_after_close (self):
+        val = self.settings_dict["barrier_after_close"]
+        if val =="yes":
+            return True 
+
+        return False 
+
+    def use_barrier_before_final_time (self):
+        val = self.settings_dict["barrier_after_steps"]
+        if val =="no":
+            return False 
+
+        return True
+
+    def use_reduce (self):
+        #val = self.settings_dict["reduce_times"]
+        #if val =="no":
+        #    return False 
+
+        # Only reduced output is available from skel. Use adios timing mechanism for more detailed results
+
+        return True
+
+    def report_all (self):
+        #val = self.settings_dict["report_all"]
+        #if val =="yes":
+        #    return True 
+
+        # Only reduced output is available from skel. Use adios timing mechanism for more detailed results
+
+        return False
+
+    def use_adios_timing (self):
+        val = self.settings_dict["use_adios_timing"]
+        if val =="no":
+            return False 
+
+        return True
+
+    def use_sleep_before_open (self):
+        val = self.settings_dict["sleep_before_open"]
+        if val =="yes":
+            return True 
+
+        return False 
+
+class scalar:
+    def __init__ (self, scalar_node):
+        self.scalar_node = scalar_node
+
+    def get_name (self):
+        return self.scalar_node.getAttribute ('name')
+
+    def get_value (self):
+        return self.scalar_node.getAttribute ('value')
+
+
+class array:
+    def __init__ (self, array_node):
+        self.array_node = array_node
+
+    def get_name (self):
+        return self.array_node.getAttribute ('name')
+
+    def get_gwrite (self):
+        return self.array_node.getAttribute ('gwrite')
+
+    def get_fill_method (self):
+        return self.array_node.getAttribute ('fill-method')
diff --git a/utils/skel/lib/typeMapper.py b/utils/skel/lib/typeMapper.py
new file mode 100644
index 0000000..97b9db3
--- /dev/null
+++ b/utils/skel/lib/typeMapper.py
@@ -0,0 +1,108 @@
+
+
+c_types = {
+    'string' : 'string',
+    'byte' : 'unsigned char',
+    'integer*1' : 'char',
+    'short' : 'short',
+    'integer*2' : 'short',
+    'integer' : 'int',
+    'integer*4' : 'int',
+    'long' : 'long',
+    'integer*8' : 'long',
+    'unsigned byte' : 'unsigned byte',
+    'unsigned integer*1' : 'unsigned byte',
+    'unsigned short' : 'unsigned short',
+    'unsigned integer*2' : 'unsigned short',
+    'unsigned integer' : 'unsigned integer',
+    'unsigned integer*4' : 'unsigned integer',
+    'unsigned long' : 'unsigned long',
+    'unsigned integer*8' : 'unsigned long',
+    'float' : 'float',
+    'real' : 'float',
+    'real*4' : 'float',
+    'unsigned float' : 'unsigned float',
+    'unsigned real' : 'unsigned float',
+    'unsigned real*4' : 'unsigned float',
+    'double' : 'double',
+    'real*8' : 'double',
+    'unsigned double' : 'unsigned double',
+    'unsigned real*8' : 'unsigned double',
+    'complex' : 'complex',
+    'double complex' : 'double complex'
+}
+
+fortran_types = {
+    'string' : 'string',
+    'byte' : 'integer*1',
+    'integer*1' : 'integer*1',
+    'short' : 'integer*2',
+    'integer*2' : 'integer*2',
+    'integer' : 'integer*4',
+    'integer*4' : 'integer*4',
+    'long' : 'integer*8',
+    'integer*8' : 'integer*8',
+    'unsigned byte' : 'unsigned integer*1',
+    'unsigned integer*1' : 'unsigned integer*1',
+    'unsigned short' : 'unsigned integer*2',
+    'unsigned integer*2' : 'unsigned integer*2',
+    'unsigned integer' : 'unsigned integer*4',
+    'unsigned integer*4' : 'unsigned integer*4',
+    'unsigned long' : 'unsigned integer*8',
+    'unsigned integer*8' : 'unsigned integer*8',
+    'float' : 'real*4',
+    'real' : 'real*4',
+    'real*4' : 'real*4',
+    'unsigned float' : 'unsigned real*4',
+    'unsigned real' : 'unsigned real*4',
+    'unsigned real*4' : 'unsigned real*4',
+    'double' : 'real*8',
+    'real*8' : 'real*8',
+    'unsigned double' : 'unsigned real*8',
+    'unsigned real*8' : 'unsigned real*8',
+    'complex' : 'complex',
+    'double complex' : 'double complex'
+}
+
+type_sizes = {
+    'string' : 1,
+    'byte' : 1,
+    'integer*1' : 1,
+    'short' : 2,
+    'integer*2' : 2,
+    'integer' : 4,
+    'integer*4' : 4,
+    'long' : 8,
+    'integer*8' : 8,
+    'unsigned byte' : 1,
+    'unsigned integer*1' : 1,
+    'unsigned short' : 2,
+    'unsigned integer*2' : 2,
+    'unsigned integer' : 4,
+    'unsigned integer*4' : 4,
+    'unsigned long' : 8,
+    'unsigned integer*8' : 8,
+    'float' : 4,
+    'real' : 4,
+    'real*4' : 4,
+    'unsigned float' : 4,
+    'unsigned real' : 4,
+    'unsigned real*4' : 4,
+    'double' : 8,
+    'real*8' : 8,
+    'unsigned double' : 8,
+    'unsigned real*8' : 8,
+    'complex' : 8,
+    'double complex' : 16
+}
+
+def get_c_type (parsed_type):
+    return c_types [parsed_type]
+
+def get_fortran_type (parsed_type):
+    return fortran_types [parsed_type]
+
+def get_size (parsed_type):
+    return type_sizes [parsed_type]
+
+
diff --git a/wrappers/.svn/all-wcprops b/wrappers/.svn/all-wcprops
new file mode 100644
index 0000000..0d3bce1
--- /dev/null
+++ b/wrappers/.svn/all-wcprops
@@ -0,0 +1,5 @@
+K 25
+svn:wc:ra_dav:version-url
+V 44
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers
+END
diff --git a/wrappers/.svn/dir-prop-base b/wrappers/.svn/dir-prop-base
new file mode 100644
index 0000000..3160658
--- /dev/null
+++ b/wrappers/.svn/dir-prop-base
@@ -0,0 +1,5 @@
+K 13
+svn:mergeinfo
+V 0
+
+END
diff --git a/wrappers/.svn/entries b/wrappers/.svn/entries
new file mode 100644
index 0000000..00099e0
--- /dev/null
+++ b/wrappers/.svn/entries
@@ -0,0 +1,44 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+has-props
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+matlab
+dir
+

+java
+dir
+

+numpy
+dir
+

diff --git a/wrappers/.svn/format b/wrappers/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/java/.svn/all-wcprops b/wrappers/java/.svn/all-wcprops
new file mode 100644
index 0000000..93d1dda
--- /dev/null
+++ b/wrappers/java/.svn/all-wcprops
@@ -0,0 +1,41 @@
+K 25
+svn:wc:ra_dav:version-url
+V 49
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java
+END
+gov_ornl_ccs_AdiosVarinfo.cxx
+K 25
+svn:wc:ra_dav:version-url
+V 79
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/gov_ornl_ccs_AdiosVarinfo.cxx
+END
+gov_ornl_ccs_AdiosBufferAllocWhen.cxx
+K 25
+svn:wc:ra_dav:version-url
+V 87
+/svn-ewok/ADIOS/!svn/ver/1818/trunk/wrappers/java/gov_ornl_ccs_AdiosBufferAllocWhen.cxx
+END
+gov_ornl_ccs_AdiosFlag.cxx
+K 25
+svn:wc:ra_dav:version-url
+V 76
+/svn-ewok/ADIOS/!svn/ver/1818/trunk/wrappers/java/gov_ornl_ccs_AdiosFlag.cxx
+END
+gov_ornl_ccs_AdiosDatatype.cxx
+K 25
+svn:wc:ra_dav:version-url
+V 80
+/svn-ewok/ADIOS/!svn/ver/1818/trunk/wrappers/java/gov_ornl_ccs_AdiosDatatype.cxx
+END
+CMakeLists.txt
+K 25
+svn:wc:ra_dav:version-url
+V 64
+/svn-ewok/ADIOS/!svn/ver/1818/trunk/wrappers/java/CMakeLists.txt
+END
+gov_ornl_ccs_Adios.cxx
+K 25
+svn:wc:ra_dav:version-url
+V 72
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/gov_ornl_ccs_Adios.cxx
+END
diff --git a/wrappers/java/.svn/entries b/wrappers/java/.svn/entries
new file mode 100644
index 0000000..c6a1712
--- /dev/null
+++ b/wrappers/java/.svn/entries
@@ -0,0 +1,350 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/java
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+test
+dir
+

+gov_ornl_ccs_AdiosVarinfo.cxx
+file
+
+
+
+
+2012-08-27T21:26:07.223925Z
+32e5e17831a628391313c0544832c80a
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+5442
+

+gov_ornl_ccs_AdiosBufferAllocWhen.cxx
+file
+
+
+
+
+2012-07-09T22:53:06.820613Z
+d41d8cd98f00b204e9800998ecf8427e
+2012-07-09T20:01:29.504650Z
+1818
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+

+gov_ornl_ccs_AdiosFlag.cxx
+file
+
+
+
+
+2012-07-09T22:53:06.822616Z
+d41d8cd98f00b204e9800998ecf8427e
+2012-07-09T20:01:29.504650Z
+1818
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+

+Modules
+dir
+

+gov_ornl_ccs_AdiosDatatype.cxx
+file
+
+
+
+
+2012-07-09T22:53:06.824618Z
+d41d8cd98f00b204e9800998ecf8427e
+2012-07-09T20:01:29.504650Z
+1818
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+0
+

+gov_ornl_ccs_AdiosGroup.cxx
+file
+
+
+
+
+2012-07-02T16:20:13.231151Z
+68da0c385355e4f309cb66fb0e155158
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2533
+

+gov
+dir
+

+CMakeLists.txt
+file
+
+
+
+
+2012-07-09T22:53:06.828614Z
+8d976e3e9046c5f79c134ce11a3090bd
+2012-07-09T20:01:29.504650Z
+1818
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2684
+

+README
+file
+
+
+
+
+2012-07-02T16:20:13.297151Z
+8049c72f4216c9958ad61e30ef09cf54
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1319
+

+gov_ornl_ccs_Adios.cxx
+file
+
+
+
+
+2012-08-27T21:26:07.242922Z
+1e3c82f12c9e4cfa6d0d75260187466a
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+17615
+

+gov_ornl_ccs_AdiosFile.cxx
+file
+
+
+
+
+2012-07-02T16:20:13.305155Z
+8e960705c659ddf3ed72a393a12ceb1d
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2738
+

diff --git a/wrappers/java/.svn/format b/wrappers/java/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/java/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/java/.svn/text-base/CMakeLists.txt.svn-base b/wrappers/java/.svn/text-base/CMakeLists.txt.svn-base
new file mode 100644
index 0000000..ad29b78
--- /dev/null
+++ b/wrappers/java/.svn/text-base/CMakeLists.txt.svn-base
@@ -0,0 +1,96 @@
+cmake_minimum_required (VERSION 2.8)
+set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules)
+include(${CMAKE_CURRENT_SOURCE_DIR}/Modules/CMakeUtilityFunctions.cmake)
+
+project (AdiosJava CXX Java)
+
+include_directories (${CMAKE_CURRENT_BINARY_DIR})
+
+find_package (Java REQUIRED)
+include_directories (${JNI_INCLUDE_DIRS})
+
+find_package (JNI REQUIRED)
+include_directories (${JNI_INCLUDE_DIRS})
+
+option (ADIOS_USE_MPI "Use parallel ADIOS" ON)
+
+find_package (ADIOS REQUIRED)
+add_definitions (${ADIOS_COMPILE_FLAGS})  
+add_definitions (-DADIOS_USE_READ_API_1)
+include_directories (${ADIOS_INCLUDE_PATH})
+
+if (ADIOS_USE_MPI)
+  find_package (MPI REQUIRED)
+  include_directories (${MPI_CXX_INCLUDE_PATH})
+  add_definitions (-DADIOS_USE_MPI)  
+else ()
+  find_package (MPI REQUIRED)
+endif()
+
+set (SRC
+  gov_ornl_ccs_AdiosDatatype.cxx
+  gov_ornl_ccs_AdiosFlag.cxx
+  gov_ornl_ccs_AdiosBufferAllocWhen.cxx
+  gov_ornl_ccs_Adios.cxx
+  gov_ornl_ccs_AdiosFile.cxx
+  gov_ornl_ccs_AdiosGroup.cxx
+  gov_ornl_ccs_AdiosVarinfo.cxx
+  )
+
+foreach (FILE ${SRC})
+  string (REGEX REPLACE ".cxx" ".h" FILE ${FILE})
+  list (APPEND HEADERS ${FILE})
+endforeach ()
+
+add_library (AdiosJava SHARED
+  ${HEADERS}
+  ${SRC}
+  )
+
+set (CMAKE_JNI_TARGET TRUE)
+set (CMAKE_JAVA_TARGET_VERSION 1.2.0)
+
+target_link_libraries (AdiosJava
+  ${ADIOS_LIBRARIES}
+  ${MPI_CXX_LIBRARIES}
+  )
+
+foreach (FILE ${HEADERS})
+  string (REGEX REPLACE "_" "/" JAVA_FILE ${FILE})
+  string (REGEX REPLACE "\\.h" ".java" JAVA_FILE ${JAVA_FILE})
+
+  string (REGEX REPLACE "_" "." JAVA_OBJ ${FILE})
+  string (REGEX REPLACE "\\.h" "" JAVA_OBJ ${JAVA_OBJ})
+
+  add_custom_command (
+    OUTPUT ${FILE}
+    COMMAND ${Java_JAVAC_EXECUTABLE} -d ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${JAVA_FILE}
+    COMMAND ${Java_JAVAH_EXECUTABLE} -jni -d ${CMAKE_CURRENT_BINARY_DIR} ${JAVA_OBJ}
+    DEPENDS ${JAVA_FILE} ${PREV}
+    )
+  list (APPEND PREV ${FILE})
+endforeach ()
+
+foreach (FILE ${SRC})
+  string (REGEX REPLACE "_" "/" FILE ${FILE})
+  string (REGEX REPLACE "\\.cxx" ".java" FILE ${FILE})
+  list (APPEND JAVA_SRC ${FILE})
+endforeach ()
+
+add_custom_command (TARGET AdiosJava
+  POST_BUILD
+  COMMAND cmake -E echo "Creating jar file..."
+  COMMAND jar cvf AdiosJava.jar gov
+  )
+
+install (TARGETS AdiosJava
+  RUNTIME DESTINATION bin
+  LIBRARY DESTINATION lib
+  ARCHIVE DESTINATION lib
+  )
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/AdiosJava.jar DESTINATION lib)
+
+ENABLE_TESTING()
+add_test (test1 ${CMAKE_CURRENT_SOURCE_DIR}/test/test1.sh ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/test AdiosTest)
+add_test (test2 ${CMAKE_CURRENT_SOURCE_DIR}/test/test2.sh ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/test AdiosNoxmlTest)
+
diff --git a/wrappers/java/.svn/text-base/README.svn-base b/wrappers/java/.svn/text-base/README.svn-base
new file mode 100644
index 0000000..7e98705
--- /dev/null
+++ b/wrappers/java/.svn/text-base/README.svn-base
@@ -0,0 +1,49 @@
+ADIOS Java wrapper
+-----------------
+
+This directory contains the codes for the ADIOS java wrapper, a Java
+Native Interface (JNI) program to call the native ADIOS library.
+
+
+== Build == 
+
+This program can be built with CMake (http://www.cmake.org/). You may
+want to a build directory and run cmake pointing the source directory
+containing CMakeLists.txt (this directory). For example, 
+
+$ mkdir build; cd build
+$ cmake /dir/to/source
+
+CMake will search installed ADIOS library, Java, JNI, MPI library (if
+needed), etc. Once completed, type make to build:
+
+$ make
+
+If you need verbose output, you may add an option:
+$ make VERBOSE=1
+
+After successful building, you can see libAdiosJava.so (or
+libAdiosJava.dylib in Mac) and AdiosJava.jar. Those two files are
+needed to call in Java.
+
+Then, you can install the library by,
+$ make install
+
+The default install directory is /usr/local. You can change by
+specifying CMAKE_INSTALL_PREFIX value;
+
+$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/install /dir/to/source
+
+Or, you can use the ccmake command, the CMake curses interface. Refer
+to the CMake documentation for more detailed instructions.
+
+== Test == 
+
+This program contains a test program. To run testing after building,
+type the following command:
+
+$ make test
+
+If you need a verbose output, type the following
+
+$ ctest -V
diff --git a/wrappers/java/.svn/text-base/gov_ornl_ccs_Adios.cxx.svn-base b/wrappers/java/.svn/text-base/gov_ornl_ccs_Adios.cxx.svn-base
new file mode 100644
index 0000000..941eb51
--- /dev/null
+++ b/wrappers/java/.svn/text-base/gov_ornl_ccs_Adios.cxx.svn-base
@@ -0,0 +1,578 @@
+#include "gov_ornl_ccs_Adios.h"
+
+#include <adios.h>
+#include <iostream>
+#include <string.h>
+#include <stdlib.h>
+
+#define STR(A) #A
+#define CONCAT2(A, B) A ## B
+#define CONCAT3(A, B, C) CONCAT2(CONCAT2(A, B), C)
+#define GET_ARRAY_ELEMENT(TYPE) CONCAT3(Get, TYPE, ArrayElements)
+#define WRITE_ONE(JTYPE)                                        \
+    /* std::cout << __FUNCTION__ << "..." << std::endl; */      \
+    int result;                                                 \
+    const char *str_var_name;                                   \
+    str_var_name = env->GetStringUTFChars(var_name, NULL);      \
+    if (str_var_name == NULL) return -1;                        \
+    result = adios_write ((int64_t) fh, str_var_name, &val);    \
+    env->ReleaseStringUTFChars(var_name, str_var_name);         \
+    return result;
+
+#define WRITE_ARRAY(JTYPE, CTYPE)                                       \
+    /* std::cout << __FUNCTION__ << " ..." << std::endl;*/              \
+    int result;                                                         \
+    const char *str_var_name;                                           \
+    JTYPE *valarr = env->Get ##CTYPE ##ArrayElements(val, NULL);        \
+    str_var_name = env->GetStringUTFChars(var_name, NULL);              \
+    if (str_var_name == NULL) return -1;                                \
+    result = adios_write ((int64_t) fh, str_var_name, (void *) valarr); \
+    env->ReleaseStringUTFChars(var_name, str_var_name);                 \
+    env->Release ##CTYPE ##ArrayElements(val, valarr, 0);               \
+    return result;
+
+#define FUNC_WRITE_ONE(FNAME, JTYPE)                                    \
+    JNIEXPORT jint JNICALL FNAME                                        \
+    (JNIEnv * env, jclass cls, jlong fh, jstring var_name, JTYPE val)   \
+    {                                                                   \
+        WRITE_ONE(JTYPE);                                               \
+    }
+
+#define FUNC_WRITE_ARRAY(FNAME, JTYPE, CTYPE)                           \
+    JNIEXPORT jint JNICALL FNAME                                        \
+    (JNIEnv * env, jclass cls, jlong fh, jstring var_name, JTYPE ##Array val) \
+    {                                                                   \
+        WRITE_ARRAY(JTYPE, CTYPE);                                      \
+    }
+
+#define STR_ALLOC(var) \
+    const char *str_##var = env->GetStringUTFChars(var, NULL); \
+    if (str_##var == NULL) return -1;
+
+#define STR_ALLOC2(var) \
+    const char *str_##var = env->GetStringUTFChars(var, NULL); \
+    if (str_##var == NULL) goto end;
+
+#define STR_FREE(var) \
+    env->ReleaseStringUTFChars(var, str_##var);
+
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_init
+ * Signature: (Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL 
+Java_gov_ornl_ccs_Adios_adios_1init 
+(JNIEnv *env, jclass cls, jstring xml_fname)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+    int result;
+    jboolean isCopy;
+
+    STR_ALLOC(xml_fname);
+
+    result = adios_init(str_xml_fname);
+    //std::cout << "result = " << result << std::endl;
+    
+    STR_FREE(xml_fname);
+
+    return result;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_open
+ * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;J)J
+ */
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1open
+(JNIEnv * env, jclass cls, jstring group_name, jstring file_name, jstring mode, jlong comm)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    int result;
+    int64_t fd_p = 0;
+
+    STR_ALLOC(group_name);
+    STR_ALLOC(file_name);
+    STR_ALLOC(mode);
+
+    //std::cout << "[IN] fd_p = " << (int64_t) fd_p << std::endl;
+    //std::cout << "[IN] str_group_name = " << str_group_name << std::endl;
+    //std::cout << "[IN] str_file_name = " << str_file_name << std::endl;
+    //std::cout << "[IN] str_mode = " << str_mode << std::endl;
+    //std::cout << "[IN] comm = " << (long) comm << std::endl;
+    result = adios_open(&fd_p, str_group_name, str_file_name, str_mode, &comm);
+    //std::cout << "[OUT] fd_p = " << fd_p << std::endl;
+    //std::cout << "[OUT] result = " << result << std::endl;
+
+    STR_FREE(group_name);
+    STR_FREE(file_name);
+    STR_FREE(mode);
+
+    return (jlong) fd_p;
+}
+
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1group_1size
+(JNIEnv * env, jclass cls, jlong fh, jlong group_size)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    uint64_t total_size = 0;
+    int result;
+
+    //std::cout << "[IN] fh = " << (int64_t) fh << std::endl;
+    //std::cout << "[IN] group_size = " << (uint64_t) group_size << std::endl;
+    result = adios_group_size ((int64_t) fh, (uint64_t) group_size, (uint64_t *) &total_size);
+    //std::cout << "[OUT] fh = " << (int64_t) fh << std::endl;
+    //std::cout << "[OUT] total size = " << total_size << std::endl;
+    //std::cout << "[OUT] result = " << result << std::endl;
+
+    return total_size;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_write
+ * Signature: (JLjava/lang/String;B)I
+ * Signature: (JLjava/lang/String;I)I
+ * Signature: (JLjava/lang/String;J)I
+ * Signature: (JLjava/lang/String;F)I
+ * Signature: (JLjava/lang/String;D)I
+ */
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2B, 
+    jbyte)
+
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2I,
+    jint)
+
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2J,
+    jlong)
+
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2F,
+    jfloat)
+
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2D,
+    jdouble)
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_write
+ * Signature: (JLjava/lang/String;[B)I
+ * Signature: (JLjava/lang/String;[I)I
+ * Signature: (JLjava/lang/String;[J)I
+ * Signature: (JLjava/lang/String;[F)I
+ * Signature: (JLjava/lang/String;[D)I
+ */
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3B,
+    jbyte,
+    Byte)
+
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3I,
+    jint,
+    Int)
+
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3J,
+    jlong,
+    Long)
+
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3F,
+    jfloat,
+    Float)
+
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3D,
+    jdouble,
+    Double)
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_close
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1close
+(JNIEnv * env, jclass cls, jlong fh)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    //std::cout << "[IN] fh = " << fh << std::endl;
+    return adios_close ((int64_t) fh);
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_finalize
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1finalize
+(JNIEnv * env, jclass cls, jint id)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+    return adios_finalize (id);
+}
+
+#ifdef ADIOS_USE_MPI
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_init
+ * Signature: ([Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1init
+(JNIEnv * env, jclass cls, jobjectArray args)
+{
+    int argc = env->GetArrayLength(args);
+    char **argv;
+    int result; 
+    
+    for (int i = 0; i < argc; i++) 
+    {
+        jstring jstr = (jstring) env->GetObjectArrayElement(args, i);
+        const char *chr = env->GetStringUTFChars(jstr, 0);
+
+        //argv[i] = (char *) malloc(env->GetStringLength(jstr) + 1);
+        argv[i] = new char[env->GetStringLength(jstr) + 1];
+        strcpy(argv[i], chr);
+
+        env->ReleaseStringUTFChars(jstr, chr);
+    }
+
+    result = MPI_Init(&argc, &argv);
+
+    for (int i = 0; i < argc; i++) 
+    {
+        //free(argv[i]);
+        delete[] argv[i]; 
+    }
+
+    return result;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_comm_rank
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1comm_1rank
+(JNIEnv * env, jclass cls, jlong comm)
+{
+    int rank;
+    MPI_Comm_rank((MPI_Comm) comm, &rank);
+    
+    return rank;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_comm_size
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1comm_1size
+(JNIEnv * env, jclass cls, jlong comm)
+{
+    int size;
+    MPI_Comm_size((MPI_Comm) comm, &size);
+    
+    return size;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_finalize
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1finalize
+(JNIEnv * env, jclass cls)
+{
+    return MPI_Finalize();
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_comm_world
+ * Signature: ()I
+ */
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1comm_1world
+(JNIEnv * env, jclass cls)
+{
+    return (jlong) MPI_COMM_WORLD;
+}
+#endif
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_open_and_set_group_size
+ * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1open_1and_1set_1group_1size
+(JNIEnv * env, jclass cls, jstring group_name, jstring file_name, jstring mode, jlong group_size, jlong comm)
+{
+    // Doesn't work, either
+    //jlong fh = Java_gov_ornl_ccs_Adios_adios_1open(env, cls, group_name, file_name, mode, comm);
+    //Java_gov_ornl_ccs_Adios_adios_1group_1size(env, cls, fh, group_size);
+
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    int result;
+    int64_t fd_p = 0;
+
+    STR_ALLOC(group_name);
+    STR_ALLOC(file_name);
+    STR_ALLOC(mode);
+
+    //std::cout << "[IN] fd_p = " << (int64_t) fd_p << std::endl;
+    //std::cout << "[IN] str_group_name = " << str_group_name << std::endl;
+    //std::cout << "[IN] str_file_name = " << str_file_name << std::endl;
+    //std::cout << "[IN] str_mode = " << str_mode << std::endl;
+    //std::cout << "[IN] comm = " << (long) comm << std::endl;
+    result = adios_open(&fd_p, str_group_name, str_file_name, str_mode, &comm);
+    //std::cout << "[OUT] fd_p = " << fd_p << std::endl;
+    //std::cout << "[OUT] result = " << result << std::endl;
+
+    STR_FREE(group_name);
+    STR_FREE(file_name);
+    STR_FREE(mode);
+
+    uint64_t total_size;
+    //std::cout << "[IN] fd_p = " << (int64_t) fd_p << std::endl;
+    adios_group_size (fd_p, group_size, (uint64_t *) &total_size);
+    //std::cout << "[OUT] total size = " << total_size << std::endl;
+
+    return (jlong) fd_p;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_init_noxml
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL 
+Java_gov_ornl_ccs_Adios_adios_1init_1noxml
+(JNIEnv *env, jclass cls)
+{
+    return adios_init_noxml();
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_allocate_buffer
+ * Signature: (IJ)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1allocate_1buffer
+(JNIEnv * env, jclass cls, jint when, jlong size)
+{
+    return adios_allocate_buffer((ADIOS_BUFFER_ALLOC_WHEN) when, size);
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_declare_group
+ * Signature: (Ljava/lang/String;Ljava/lang/String;I)J
+ */
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1declare_1group
+(JNIEnv * env, jclass cls, jstring name, jstring time_index, jint stats)
+{
+    int64_t id_p;
+    int result;
+
+    STR_ALLOC(name);
+    STR_ALLOC(time_index);
+
+    result = adios_declare_group(&id_p, str_name, str_time_index, (ADIOS_FLAG) stats);
+
+    STR_FREE(name);
+    STR_FREE(time_index);
+
+    return (jlong) id_p;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_define_var
+ * Signature: (JLjava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1define_1var
+(JNIEnv * env, jclass cls, jlong group_id, jstring name, jstring path, jint type, jstring dimensions, jstring global_dimensions, jstring local_offsets)
+{
+    int result;
+
+    STR_ALLOC(name);
+    STR_ALLOC(path);
+    STR_ALLOC(dimensions);
+    STR_ALLOC(global_dimensions);
+    STR_ALLOC(local_offsets);
+
+    result = adios_define_var((int64_t) group_id, str_name, str_path, (ADIOS_DATATYPES) type, str_dimensions, str_global_dimensions, str_local_offsets);
+    
+    STR_FREE(name);
+    STR_FREE(path);
+    STR_FREE(dimensions);
+    STR_FREE(global_dimensions);
+    STR_FREE(local_offsets);
+
+    return result;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_define_attribute
+ * Signature: (JLjava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1define_1attribute
+(JNIEnv * env, jclass cls, jlong group_id, jstring name, jstring path, jint type, jstring value, jstring var)
+{
+    int result;
+    
+    STR_ALLOC(name);
+    STR_ALLOC(path);
+    STR_ALLOC(value);
+    STR_ALLOC(var);
+    
+    result = adios_define_attribute((int64_t) group_id, str_name, str_path, (ADIOS_DATATYPES) type, str_value, str_var);
+
+    STR_FREE(name);
+    STR_FREE(path);
+    STR_FREE(value);
+    STR_FREE(var);
+
+    return result;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_select_method
+ * Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1select_1method
+(JNIEnv * env, jclass cls, jlong group_id, jstring method, jstring parameters, jstring base_path)
+{
+    int result;
+    
+    STR_ALLOC(method);
+    STR_ALLOC(parameters);
+    STR_ALLOC(base_path);
+    
+    result = adios_select_method((int64_t) group_id, str_method, str_parameters, str_base_path);
+
+    STR_FREE(method);
+    STR_FREE(parameters);
+    STR_FREE(base_path);
+    
+    return result;
+}
+
+#define READ_ONE(JTYPE)                                                 \
+    /* std::cout << __FUNCTION__ << " ..." << std::endl; */             \
+    int result;                                                         \
+    JTYPE val;                                                          \
+    const char *str_var_name;                                           \
+    uint64_t read_size = sizeof(JTYPE);                                 \
+    str_var_name = env->GetStringUTFChars(var_name, NULL);              \
+    if (str_var_name == NULL) return -1;                                \
+    result = adios_read ((int64_t) fh, str_var_name, &val, sizeof(JTYPE)); \
+    env->ReleaseStringUTFChars(var_name, str_var_name);                 \
+    return val;
+
+#define FUNC_READ_ONE(FNAME, JTYPE)                                     \
+    JNIEXPORT JTYPE JNICALL FNAME                                       \
+    (JNIEnv * env, jclass cls, jlong fh, jstring var_name)              \
+    {                                                                   \
+        READ_ONE(JTYPE);                                                \
+    }
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_read_byte_value
+ * Signature: (JLjava/lang/String;)B
+ * Signature: (JLjava/lang/String;)I
+ * Signature: (JLjava/lang/String;)J
+ * Signature: (JLjava/lang/String;)F
+ * Signature: (JLjava/lang/String;)D
+ */
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1byte_1value,
+    jbyte);
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1int_1value,
+    jint);
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1long_1value,
+    jlong);
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1float_1value,
+    jfloat);
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1double_1value,
+    jdouble);
+
+
+
+#define READ_ARRAY(JTYPE, CTYPE)                                        \
+    /* std::cout << __FUNCTION__ << " ..." << std::endl; */             \
+    int result;                                                         \
+    const char *str_var_name;                                           \
+    JTYPE *valarr = env->Get ##CTYPE ##ArrayElements(val, NULL);        \
+    uint64_t read_size = env->GetArrayLength(val) * sizeof(JTYPE);      \
+    str_var_name = env->GetStringUTFChars(var_name, NULL);              \
+    if (str_var_name == NULL) return -1;                                \
+    result = adios_read ((int64_t) fh, str_var_name, (void *) valarr, read_size); \
+    env->ReleaseStringUTFChars(var_name, str_var_name);                 \
+    env->Release ##CTYPE ##ArrayElements(val, valarr, 0);               \
+    return result;
+
+#define FUNC_READ_ARRAY(FNAME, JTYPE, CTYPE)                            \
+    JNIEXPORT jint JNICALL FNAME                                        \
+    (JNIEnv * env, jclass cls, jlong fh, jstring var_name, JTYPE ##Array val) \
+    {                                                                   \
+        READ_ARRAY(JTYPE, CTYPE);                                      \
+    }
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_read
+ * Signature: (JLjava/lang/String;[B)I
+ * Signature: (JLjava/lang/String;[I)I
+ * Signature: (JLjava/lang/String;[J)I
+ * Signature: (JLjava/lang/String;[F)I
+ * Signature: (JLjava/lang/String;[D)I
+ */
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3B,
+    jbyte,
+    Byte);
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3I,
+    jint,
+    Int);
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3J,
+    jlong,
+    Long);
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3F,
+    jfloat,
+    Float);
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3D,
+    jdouble,
+    Double);
+
+
diff --git a/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosBufferAllocWhen.cxx.svn-base b/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosBufferAllocWhen.cxx.svn-base
new file mode 100644
index 0000000..e69de29
diff --git a/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosDatatype.cxx.svn-base b/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosDatatype.cxx.svn-base
new file mode 100644
index 0000000..e69de29
diff --git a/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosFile.cxx.svn-base b/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosFile.cxx.svn-base
new file mode 100644
index 0000000..5431c8b
--- /dev/null
+++ b/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosFile.cxx.svn-base
@@ -0,0 +1,102 @@
+#include "gov_ornl_ccs_AdiosFile.h"
+
+#include <adios_read.h>
+
+/*
+ * Class:     gov_ornl_ccs_AdiosFile
+ * Method:    adios_fopen
+ * Signature: (Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosFile_adios_1fopen
+(JNIEnv * env, jobject obj, jstring path, jlong comm)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    const char *str;
+    int result;
+    jboolean isCopy;
+    jclass cls;
+    jfieldID fid;
+
+    ADIOS_FILE* fp;
+
+    str = env->GetStringUTFChars(path, &isCopy);
+    if (str == NULL) return -1; /* OutOfMemoryError already thrown */
+
+    fp = adios_fopen(str, (MPI_Comm) comm);
+    env->ReleaseStringUTFChars(path, str);
+
+    cls = env->GetObjectClass(obj);
+    if (cls == NULL) {
+        return -1;
+    }
+
+    fid = env->GetFieldID(cls, "fp", "J");
+    env->SetLongField(obj, fid, (jlong)fp);
+    
+    fid = env->GetFieldID(cls, "fh", "J");
+    env->SetLongField(obj, fid, fp->fh);
+
+    fid = env->GetFieldID(cls, "groups_count", "I");
+    env->SetIntField(obj, fid, fp->groups_count);
+
+    fid = env->GetFieldID(cls, "vars_count", "I");
+    env->SetIntField(obj, fid, fp->vars_count);
+
+    fid = env->GetFieldID(cls, "attrs_count", "I");
+    env->SetIntField(obj, fid, fp->attrs_count);
+
+    fid = env->GetFieldID(cls, "tidx_start", "I");
+    env->SetIntField(obj, fid, fp->tidx_start);
+
+    fid = env->GetFieldID(cls, "ntimesteps", "I");
+    env->SetIntField(obj, fid, fp->ntimesteps);
+
+    fid = env->GetFieldID(cls, "version", "I");
+    env->SetIntField(obj, fid, fp->version);
+
+    fid = env->GetFieldID(cls, "file_size", "J");
+    env->SetIntField(obj, fid, fp->file_size);
+
+    fid = env->GetFieldID(cls, "endianness", "I");
+    env->SetIntField(obj, fid, fp->endianness);
+
+    jclass stringClass = env->FindClass("java/lang/String");
+    jobjectArray group_namelist = env->NewObjectArray(fp->groups_count, stringClass, NULL);
+
+    for (int i = 0; i < fp->groups_count; i++)
+    {
+        jstring group_name = env->NewStringUTF(fp->group_namelist[i]);
+        env->SetObjectArrayElement(group_namelist, i, group_name);
+    }
+
+    fid = env->GetFieldID(cls, "group_namelist", "[Ljava/lang/String;");    
+    env->SetObjectField(obj, fid, group_namelist);
+
+    return 0;
+}
+
+/*
+ * Class:     gov_ornl_ccs_AdiosFile
+ * Method:    adios_fclose
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosFile_adios_1fclose
+(JNIEnv * env, jobject obj)
+{
+    jclass cls;
+    jfieldID fid;
+    jlong fp;
+    jint result;
+
+    cls = env->GetObjectClass(obj);
+    fid = env->GetFieldID(cls, "fp", "J");
+    fp = env->GetLongField(obj, fid);
+
+    result = adios_fclose((ADIOS_FILE*)fp);
+
+    fid = env->GetFieldID(cls, "fp", "J");
+    env->SetLongField(obj, fid, 0);
+
+    return result;
+}
diff --git a/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosFlag.cxx.svn-base b/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosFlag.cxx.svn-base
new file mode 100644
index 0000000..e69de29
diff --git a/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosGroup.cxx.svn-base b/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosGroup.cxx.svn-base
new file mode 100644
index 0000000..284f713
--- /dev/null
+++ b/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosGroup.cxx.svn-base
@@ -0,0 +1,97 @@
+#include "gov_ornl_ccs_AdiosGroup.h"
+
+#include <adios_read.h>
+
+/*
+ * Class:     gov_ornl_ccs_AdiosGroup
+ * Method:    adios_gopen
+ * Signature: (JLjava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosGroup_adios_1gopen
+(JNIEnv * env, jobject obj, jlong fp, jstring grpname)
+{
+    const char *str;
+    jboolean isCopy;
+    jclass cls;
+    jfieldID fid;
+
+    ADIOS_GROUP* gp;
+
+    str = env->GetStringUTFChars(grpname, &isCopy);
+    if (str == NULL) return -1; /* OutOfMemoryError already thrown */
+
+    gp = adios_gopen((ADIOS_FILE *)fp, str);
+
+    env->ReleaseStringUTFChars(grpname, str);
+    
+    cls = env->GetObjectClass(obj);
+    if (cls == NULL) {
+        return -1;
+    }
+
+    fid = env->GetFieldID(cls, "gp", "J");
+    env->SetLongField(obj, fid, (jlong)gp);
+
+    fid = env->GetFieldID(cls, "gh", "J");
+    env->SetLongField(obj, fid, gp->gh);
+
+    fid = env->GetFieldID(cls, "grpid", "I");
+    env->SetIntField(obj, fid, gp->grpid);
+
+    fid = env->GetFieldID(cls, "vars_count", "I");
+    env->SetIntField(obj, fid, gp->vars_count);
+
+    fid = env->GetFieldID(cls, "attrs_count", "I");
+    env->SetIntField(obj, fid, gp->attrs_count);
+
+    
+    jclass stringClass = env->FindClass("java/lang/String");
+
+    jobjectArray var_namelist = env->NewObjectArray(gp->vars_count, stringClass, NULL);
+
+    for (int i = 0; i < gp->vars_count; i++)
+    {
+        jstring var_name = env->NewStringUTF(gp->var_namelist[i]);
+        env->SetObjectArrayElement(var_namelist, i, var_name);
+    }
+
+    fid = env->GetFieldID(cls, "var_namelist", "[Ljava/lang/String;");    
+    env->SetObjectField(obj, fid, var_namelist);
+
+    jobjectArray attr_namelist = env->NewObjectArray(gp->attrs_count, stringClass, NULL);
+
+    for (int i = 0; i < gp->attrs_count; i++)
+    {
+        jstring attr_name = env->NewStringUTF(gp->attr_namelist[i]);
+        env->SetObjectArrayElement(attr_namelist, i, attr_name);
+    }
+
+    fid = env->GetFieldID(cls, "attr_namelist", "[Ljava/lang/String;");    
+    env->SetObjectField(obj, fid, attr_namelist);
+
+    return 0;
+}
+
+/*
+ * Class:     gov_ornl_ccs_AdiosGroup
+ * Method:    adios_gclose
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosGroup_adios_1gclose
+(JNIEnv * env, jobject obj)
+{
+    jclass cls;
+    jfieldID fid;
+    jlong gp;
+    jint result;
+
+    cls = env->GetObjectClass(obj);
+    fid = env->GetFieldID(cls, "gp", "J");
+    gp = env->GetLongField(obj, fid);
+
+    result = adios_gclose((ADIOS_GROUP*)gp);
+
+    env->SetLongField(obj, fid, 0);
+
+    return result;
+}
diff --git a/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosVarinfo.cxx.svn-base b/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosVarinfo.cxx.svn-base
new file mode 100644
index 0000000..1af4c71
--- /dev/null
+++ b/wrappers/java/.svn/text-base/gov_ornl_ccs_AdiosVarinfo.cxx.svn-base
@@ -0,0 +1,175 @@
+#include "gov_ornl_ccs_AdiosVarinfo.h"
+
+#include <adios_read.h>
+#include <iostream>
+
+/*
+ * Class:     gov_ornl_ccs_AdiosVarinfo
+ * Method:    adios_inq_var
+ * Signature: (JJLjava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosVarinfo_adios_1inq_1var
+(JNIEnv * env, jobject obj, jlong gp, jstring varname)
+{
+    const char *str;
+    jboolean isCopy;
+    jclass cls;
+    jfieldID fid;
+
+    ADIOS_VARINFO* vp;
+
+    str = env->GetStringUTFChars(varname, &isCopy);
+    if (str == NULL) return -1; /* OutOfMemoryError already thrown */
+
+    vp = adios_inq_var((ADIOS_GROUP *)gp, str);
+    env->ReleaseStringUTFChars(varname, str);
+    
+    cls = env->GetObjectClass(obj);
+    if (cls == NULL) {
+        return -1;
+    }
+
+    fid = env->GetFieldID(cls, "vp", "J");
+    env->SetLongField(obj, fid, (jlong)vp);
+
+    fid = env->GetFieldID(cls, "grpid", "I");
+    env->SetIntField(obj, fid, vp->grpid);
+
+    fid = env->GetFieldID(cls, "varid", "I");
+    env->SetIntField(obj, fid, vp->varid);
+
+    fid = env->GetFieldID(cls, "type", "I");
+    env->SetIntField(obj, fid, vp->type);
+
+    fid = env->GetFieldID(cls, "ndim", "I");
+    env->SetIntField(obj, fid, vp->ndim);
+
+    fid = env->GetFieldID(cls, "timedim", "I");
+    env->SetIntField(obj, fid, vp->timedim);
+
+    jlongArray dims = env->NewLongArray(vp->ndim);
+    env->SetLongArrayRegion(dims, 0, vp->ndim, (jlong *) vp->dims);    
+
+    fid = env->GetFieldID(cls, "dims", "[J");
+    env->SetObjectField(obj, fid, dims);
+
+    if (vp->ndim == 0) {
+        int size = adios_type_size(vp->type, NULL);
+        jbyteArray value = env->NewByteArray(size);
+        env->SetByteArrayRegion(value, 0, size, (jbyte *) vp->value);
+
+        fid = env->GetFieldID(cls, "value", "[B");
+        env->SetObjectField(obj, fid, value);
+    } 
+
+    return 0;
+}
+
+/*
+ * Class:     gov_ornl_ccs_AdiosVarinfo
+ * Method:    adios_free_varinfo
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosVarinfo_adios_1free_1varinfo
+(JNIEnv * env, jobject obj)
+{
+    jclass cls;
+    jfieldID fid;
+    jlong vp;
+
+    cls = env->GetObjectClass(obj);
+    fid = env->GetFieldID(cls, "vp", "J");
+    vp = env->GetLongField(obj, fid);
+
+    adios_free_varinfo((ADIOS_VARINFO*)vp);
+
+    env->SetLongField(obj, fid, 0);
+
+    return 0;
+}
+
+/*
+ * Class:     gov_ornl_ccs_AdiosVarinfo
+ * Method:    adios_read_var_byid
+ * Signature: (JI[J[J)[D
+ */
+JNIEXPORT jdoubleArray JNICALL Java_gov_ornl_ccs_AdiosVarinfo_adios_1read_1var_1byid
+(JNIEnv * env, jobject obj, jlong gp, jint varid, jlongArray start, jlongArray count)
+{
+    jint len = env->GetArrayLength(count);
+
+    if (len != env->GetArrayLength(start))
+        return NULL;
+
+    jlong *startarr = env->GetLongArrayElements(start, NULL);
+    jlong *countarr = env->GetLongArrayElements(count, NULL);
+
+    jlong ncount = 1;
+    for (jint i = 0; i < len; i++)
+        ncount *= countarr[i];
+
+    jdoubleArray result = env->NewDoubleArray(ncount);
+    jdouble *data = env->GetDoubleArrayElements(result, NULL);
+
+    int64_t nbytes = adios_read_var_byid((ADIOS_GROUP*)gp, (int) varid, (uint64_t *)startarr, (uint64_t *)countarr, (void *)data);
+
+    env->ReleaseLongArrayElements(start, startarr, 0);
+    env->ReleaseLongArrayElements(count, countarr, 0);
+    env->ReleaseDoubleArrayElements(result, data, 0);
+
+    return result;
+}
+
+#define READ_ARRAY(JTYPE, CTYPE)                                        \
+    /* std::cout << __FUNCTION__ << "..." << std::endl; */              \
+    int result;                                                         \
+    jint len = env->GetArrayLength(count);                              \
+    if (len != env->GetArrayLength(start))  return 0;                   \
+    jlong *startarr = env->GetLongArrayElements(start, NULL);           \
+    jlong *countarr = env->GetLongArrayElements(count, NULL);           \
+    jlong ncount = 1;                                                   \
+    for (jint i = 0; i < len; i++) ncount *= countarr[i];               \
+    JTYPE *data = env->Get ##CTYPE ##ArrayElements(val, NULL);          \
+    result = adios_read_var_byid((ADIOS_GROUP*)gp, (int) varid, (uint64_t *)startarr, (uint64_t *)countarr, (void *)data); \
+    env->ReleaseLongArrayElements(start, startarr, 0);                  \
+    env->ReleaseLongArrayElements(count, countarr, 0);                  \
+    env->Release ##CTYPE ##ArrayElements(val, data, 0);                 \
+    return result;
+
+#define FUNC_READ_ARRAY(FNAME, JTYPE, CTYPE)                            \
+    JNIEXPORT jint JNICALL FNAME                                        \
+    (JNIEnv * env, jobject obj, jlong gp, jint varid, jlongArray start, jlongArray count, JTYPE ##Array val) \
+    {                                                                   \
+        READ_ARRAY(JTYPE, CTYPE);                                       \
+    }
+
+/*
+ * Class:     gov_ornl_ccs_AdiosVarinfo
+ * Method:    adios_read
+ * Signature: (JI[J[J[B)I
+ */
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3B,
+    jbyte,
+    Byte)
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3I,
+    jint,
+    Int)
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3J,
+    jlong,
+    Long)
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3F,
+    jfloat,
+    Float)
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3D,
+    jdouble,
+    Double)
diff --git a/wrappers/java/CMakeLists.txt b/wrappers/java/CMakeLists.txt
new file mode 100644
index 0000000..ad29b78
--- /dev/null
+++ b/wrappers/java/CMakeLists.txt
@@ -0,0 +1,96 @@
+cmake_minimum_required (VERSION 2.8)
+set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules)
+include(${CMAKE_CURRENT_SOURCE_DIR}/Modules/CMakeUtilityFunctions.cmake)
+
+project (AdiosJava CXX Java)
+
+include_directories (${CMAKE_CURRENT_BINARY_DIR})
+
+find_package (Java REQUIRED)
+include_directories (${JNI_INCLUDE_DIRS})
+
+find_package (JNI REQUIRED)
+include_directories (${JNI_INCLUDE_DIRS})
+
+option (ADIOS_USE_MPI "Use parallel ADIOS" ON)
+
+find_package (ADIOS REQUIRED)
+add_definitions (${ADIOS_COMPILE_FLAGS})  
+add_definitions (-DADIOS_USE_READ_API_1)
+include_directories (${ADIOS_INCLUDE_PATH})
+
+if (ADIOS_USE_MPI)
+  find_package (MPI REQUIRED)
+  include_directories (${MPI_CXX_INCLUDE_PATH})
+  add_definitions (-DADIOS_USE_MPI)  
+else ()
+  find_package (MPI REQUIRED)
+endif()
+
+set (SRC
+  gov_ornl_ccs_AdiosDatatype.cxx
+  gov_ornl_ccs_AdiosFlag.cxx
+  gov_ornl_ccs_AdiosBufferAllocWhen.cxx
+  gov_ornl_ccs_Adios.cxx
+  gov_ornl_ccs_AdiosFile.cxx
+  gov_ornl_ccs_AdiosGroup.cxx
+  gov_ornl_ccs_AdiosVarinfo.cxx
+  )
+
+foreach (FILE ${SRC})
+  string (REGEX REPLACE ".cxx" ".h" FILE ${FILE})
+  list (APPEND HEADERS ${FILE})
+endforeach ()
+
+add_library (AdiosJava SHARED
+  ${HEADERS}
+  ${SRC}
+  )
+
+set (CMAKE_JNI_TARGET TRUE)
+set (CMAKE_JAVA_TARGET_VERSION 1.2.0)
+
+target_link_libraries (AdiosJava
+  ${ADIOS_LIBRARIES}
+  ${MPI_CXX_LIBRARIES}
+  )
+
+foreach (FILE ${HEADERS})
+  string (REGEX REPLACE "_" "/" JAVA_FILE ${FILE})
+  string (REGEX REPLACE "\\.h" ".java" JAVA_FILE ${JAVA_FILE})
+
+  string (REGEX REPLACE "_" "." JAVA_OBJ ${FILE})
+  string (REGEX REPLACE "\\.h" "" JAVA_OBJ ${JAVA_OBJ})
+
+  add_custom_command (
+    OUTPUT ${FILE}
+    COMMAND ${Java_JAVAC_EXECUTABLE} -d ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${JAVA_FILE}
+    COMMAND ${Java_JAVAH_EXECUTABLE} -jni -d ${CMAKE_CURRENT_BINARY_DIR} ${JAVA_OBJ}
+    DEPENDS ${JAVA_FILE} ${PREV}
+    )
+  list (APPEND PREV ${FILE})
+endforeach ()
+
+foreach (FILE ${SRC})
+  string (REGEX REPLACE "_" "/" FILE ${FILE})
+  string (REGEX REPLACE "\\.cxx" ".java" FILE ${FILE})
+  list (APPEND JAVA_SRC ${FILE})
+endforeach ()
+
+add_custom_command (TARGET AdiosJava
+  POST_BUILD
+  COMMAND cmake -E echo "Creating jar file..."
+  COMMAND jar cvf AdiosJava.jar gov
+  )
+
+install (TARGETS AdiosJava
+  RUNTIME DESTINATION bin
+  LIBRARY DESTINATION lib
+  ARCHIVE DESTINATION lib
+  )
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/AdiosJava.jar DESTINATION lib)
+
+ENABLE_TESTING()
+add_test (test1 ${CMAKE_CURRENT_SOURCE_DIR}/test/test1.sh ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/test AdiosTest)
+add_test (test2 ${CMAKE_CURRENT_SOURCE_DIR}/test/test2.sh ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/test AdiosNoxmlTest)
+
diff --git a/wrappers/java/Modules/.svn/entries b/wrappers/java/Modules/.svn/entries
new file mode 100644
index 0000000..a7958a0
--- /dev/null
+++ b/wrappers/java/Modules/.svn/entries
@@ -0,0 +1,137 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/java/Modules
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+FindADIOS.cmake
+file
+
+
+
+
+2012-07-02T16:20:12.330232Z
+85035b1c47413d257bec292b0b31ea82
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+4915
+

+FindPackageHandleStandardArgs.cmake
+file
+
+
+
+
+2012-07-02T16:20:12.338235Z
+dbd7b4e1b87232a7fe8f57cf8ef10360
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+11465
+

+CMakeUtilityFunctions.cmake
+file
+
+
+
+
+2012-07-02T16:20:12.333235Z
+5a708f6f902199b8aab71c8d8a8f3a4a
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+319
+

diff --git a/wrappers/java/Modules/.svn/format b/wrappers/java/Modules/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/java/Modules/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/java/Modules/.svn/text-base/CMakeUtilityFunctions.cmake.svn-base b/wrappers/java/Modules/.svn/text-base/CMakeUtilityFunctions.cmake.svn-base
new file mode 100644
index 0000000..c29cb8a
--- /dev/null
+++ b/wrappers/java/Modules/.svn/text-base/CMakeUtilityFunctions.cmake.svn-base
@@ -0,0 +1,19 @@
+function (print VAR)
+  set(NAME ${VAR})
+  list (APPEND VARS ${${VAR}})
+
+  set(MSG)
+  set(IS_FIRST TRUE)
+
+  foreach(ELM ${VARS})
+    if (IS_FIRST)
+      set(MSG ${ELM})
+      set(IS_FIRST FALSE)
+    else ()
+      set(MSG ${MSG}, ${ELM})
+    endif ()
+  endforeach()
+
+  message("${NAME} = "${MSG})
+endfunction(print VAR)
+
diff --git a/wrappers/java/Modules/.svn/text-base/FindADIOS.cmake.svn-base b/wrappers/java/Modules/.svn/text-base/FindADIOS.cmake.svn-base
new file mode 100644
index 0000000..8a55c77
--- /dev/null
+++ b/wrappers/java/Modules/.svn/text-base/FindADIOS.cmake.svn-base
@@ -0,0 +1,136 @@
+# - Find a ADIOS implementation
+#
+# === Variables ===
+#
+# This module will set the following variables:
+#   ADIOS_USE_MPI         Can be set to ON to force the use of the MPI library
+#                         Defaults to ON.
+#   ADIOS_FOUND           TRUE if FindADIOS found ADIOS flags
+#   ADIOS_COMPILE_FLAGS   Compilation flags for ADIOS programs
+#   ADIOS_INCLUDE_PATH    Include path(s) for ADIOS header
+#   ADIOS_LINK_FLAGS      Linking flags for ADIOS programs
+#   ADIOS_LIBRARIES       All libraries to link ADIOS programs against
+# 
+# === Example ===
+#
+#   set (ADIOS_USE_MPI OFF)
+#   find_package (ADIOS)
+#   if (ADIOS_FOUND)
+#     add_definitions (${ADIOS_COMPILE_FLAGS})  
+#     include_directories (${ADIOS_INCLUDE_PATH})
+#     target_link_libraries(foo ${ADIOS_LIBRARIES})
+#   endif ()
+#
+
+# NOTE: 
+# This module is written based FindMPI. Most routines are copied from FindMPI.
+
+# include this to handle the QUIETLY and REQUIRED arguments
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(GetPrerequisites)
+
+if(NOT DEFINED ADIOS_USE_MPI)
+  set(ADIOS_USE_MPI TRUE)
+endif()
+
+if (ADIOS_USE_MPI)
+  set(CONFIG_OPTION "")
+else ()
+  set(CONFIG_OPTION "-s")
+endif()
+
+execute_process(
+  COMMAND adios_config -c ${CONFIG_OPTION}
+  OUTPUT_VARIABLE ADIOS_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+# Extract compile flags from the compile command line
+string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" ADIOS_ALL_COMPILE_FLAGS "${ADIOS_COMPILE_CMDLINE}")
+set(ADIOS_COMPILE_FLAGS_WORK)
+
+foreach(FLAG ${ADIOS_ALL_COMPILE_FLAGS})
+  if (ADIOS_COMPILE_FLAGS_WORK)
+    set(ADIOS_COMPILE_FLAGS_WORK "${ADIOS_COMPILE_FLAGS_WORK} ${FLAG}")
+  else()
+    set(ADIOS_COMPILE_FLAGS_WORK ${FLAG})
+  endif()
+endforeach()
+
+# Extract include paths from compile command line
+string(REGEX MATCHALL "(^| )-I([^\" ]+|\"[^\"]+\")" ADIOS_ALL_INCLUDE_PATHS "${ADIOS_COMPILE_CMDLINE}")
+unset(ADIOS_INCLUDE_PATH_WORK)
+foreach(IPATH ${ADIOS_ALL_INCLUDE_PATHS})
+  string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH})
+  string(REGEX REPLACE "//" "/" IPATH ${IPATH})
+  list(APPEND ADIOS_INCLUDE_PATH_WORK ${IPATH})
+endforeach()
+
+execute_process(
+  COMMAND adios_config -l ${CONFIG_OPTION}
+  OUTPUT_VARIABLE  ADIOS_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+
+# Extract linker paths from the link command line
+string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" ADIOS_ALL_LINK_PATHS "${ADIOS_LINK_CMDLINE}")
+unset(ADIOS_LINK_PATH)
+foreach(LPATH ${ADIOS_ALL_LINK_PATHS})
+  string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
+  string(REGEX REPLACE "//" "/" LPATH ${LPATH})
+  list(APPEND ADIOS_LINK_PATH ${LPATH})
+endforeach()
+
+# try using showme:libdirs if extracting didn't work.
+if (NOT ADIOS_LINK_PATH)
+  set(ADIOS_LINK_PATH ${ADIOS_LIBDIRS})
+  separate_arguments(ADIOS_LINK_PATH)
+endif()
+
+# Extract linker flags from the link command line
+string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")" ADIOS_ALL_LINK_FLAGS "${ADIOS_LINK_CMDLINE}")
+set(ADIOS_LINK_FLAGS_WORK)
+foreach(FLAG ${ADIOS_ALL_LINK_FLAGS})
+  if (ADIOS_LINK_FLAGS_WORK)
+    set(ADIOS_LINK_FLAGS_WORK "${ADIOS_LINK_FLAGS_WORK} ${FLAG}")
+  else()
+    set(ADIOS_LINK_FLAGS_WORK ${FLAG})
+  endif()
+endforeach()
+
+# Extract the set of libraries to link against from the link command
+# line
+string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" ADIOS_LIBNAMES "${ADIOS_LINK_CMDLINE}")
+
+# Determine full path names for all of the libraries that one needs
+# to link against in an MPI program
+unset(ADIOS_LIBRARIES_WORK)
+foreach(LIB ${ADIOS_LIBNAMES})
+  string(REGEX REPLACE "^ ?-l" "" LIB ${LIB})
+  # ADIOS_LIB is cached by find_library, but we don't want that.  Clear it first.
+  set(ADIOS_LIB "ADIOS_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
+  find_library(ADIOS_LIB NAMES ${LIB} HINTS ${ADIOS_LINK_PATH})
+
+  if (ADIOS_LIB)
+    list(APPEND ADIOS_LIBRARIES_WORK ${ADIOS_LIB})
+  elseif (NOT ADIOS_FIND_QUIETLY)
+    message(WARNING "Unable to find ADIOS library ${LIB}")
+  endif()
+endforeach()
+
+# Sanity check ADIOS_LIBRARIES to make sure there are enough libraries
+list(LENGTH ADIOS_LIBRARIES_WORK ADIOS_NUMLIBS)
+list(LENGTH ADIOS_LIBNAMES ADIOS_NUMLIBS_EXPECTED)
+if (NOT ADIOS_NUMLIBS EQUAL ADIOS_NUMLIBS_EXPECTED)
+  message("Expected ${ADIOS_NUMLIBS_EXPECTED} but found ${ADIOS_NUMLIBS}")
+  set(ADIOS_LIBRARIES_WORK "ADIOS_LIBRARIES-NOTFOUND")
+endif()
+
+# If we found MPI, set up all of the appropriate cache entries
+set(ADIOS_COMPILE_FLAGS ${ADIOS_COMPILE_FLAGS_WORK} CACHE STRING "ADIOS compilation flags"         FORCE)
+set(ADIOS_INCLUDE_PATH  ${ADIOS_INCLUDE_PATH_WORK}  CACHE STRING "ADIOS include path"              FORCE)
+set(ADIOS_LINK_FLAGS    ${ADIOS_LINK_FLAGS_WORK}    CACHE STRING "ADIOS linking flags"             FORCE)
+set(ADIOS_LIBRARIES     ${ADIOS_LIBRARIES_WORK}     CACHE STRING "ADIOS libraries to link against" FORCE)
+
+find_package_handle_standard_args(ADIOS DEFAULT_MSG ADIOS_INCLUDE_PATH ADIOS_LIBRARIES)
+
+
diff --git a/wrappers/java/Modules/.svn/text-base/FindPackageHandleStandardArgs.cmake.svn-base b/wrappers/java/Modules/.svn/text-base/FindPackageHandleStandardArgs.cmake.svn-base
new file mode 100644
index 0000000..1acb021
--- /dev/null
+++ b/wrappers/java/Modules/.svn/text-base/FindPackageHandleStandardArgs.cmake.svn-base
@@ -0,0 +1,260 @@
+# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
+#
+# This function is intended to be used in FindXXX.cmake modules files.
+# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE().
+# It also sets the <UPPERCASED_NAME>_FOUND variable.
+# The package is considered found if all variables <var1>... listed contain
+# valid results, e.g. valid filepaths.
+#
+# There are two modes of this function. The first argument in both modes is
+# the name of the Find-module where it is called (in original casing).
+#
+# The first simple mode looks like this:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
+# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# If DEFAULT_MSG is given as second argument, then the function will generate
+# itself useful success and error messages. You can also supply a custom error message
+# for the failure case. This is not recommended.
+#
+# The second mode is more powerful and also supports version checking:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
+#                                           [VERSION_VAR   <versionvar>
+#                                           [CONFIG_MODE]
+#                                           [FAIL_MESSAGE "Custom failure message"] )
+#
+# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# After REQUIRED_VARS the variables which are required for this package are listed.
+# Following VERSION_VAR the name of the variable can be specified which holds
+# the version of the package which has been found. If this is done, this version
+# will be checked against the (potentially) specified required version used
+# in the find_package() call. The EXACT keyword is also handled. The default
+# messages include information about the required version and the version
+# which has been actually found, both if the version is ok or not.
+# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
+# a find_package(... NO_MODULE) call, in this case all the information
+# provided by the config-mode of find_package() will be evaluated
+# automatically.
+# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
+# used, the default message will be displayed.
+#
+# Example for mode 1:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
+#
+# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
+# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
+# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
+# independent whether QUIET was used or not.
+# If it is found, success will be reported, including the content of <var1>.
+# On repeated Cmake runs, the same message won't be printed again.
+#
+# Example for mode 2:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
+#                                             VERSION_VAR BISON_VERSION)
+# In this case, BISON is considered to be found if the variable(s) listed
+# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
+# Also the version of BISON will be checked by using the version contained
+# in BISON_VERSION.
+# Since no FAIL_MESSAGE is given, the default messages will be printed.
+#
+# Another example for mode 2:
+#
+#    FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
+# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE)
+# and adds an additional search directory for automoc4.
+# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
+# success/error message.
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+INCLUDE(FindPackageMessage)
+INCLUDE(CMakeParseArguments)
+
+# internal helper macro
+MACRO(_FPHSA_FAILURE_MESSAGE _msg)
+  IF (${_NAME}_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "${_msg}")
+  ELSE (${_NAME}_FIND_REQUIRED)
+    IF (NOT ${_NAME}_FIND_QUIETLY)
+      MESSAGE(STATUS "${_msg}")
+    ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+  ENDIF (${_NAME}_FIND_REQUIRED)
+ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
+
+
+# internal helper macro to generate the failure message when used in CONFIG_MODE:
+MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+  # <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
+  IF(${_NAME}_CONFIG)
+    _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
+  ELSE(${_NAME}_CONFIG)
+    # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
+    # List them all in the error message:
+    IF(${_NAME}_CONSIDERED_CONFIGS)
+      SET(configsText "")
+      LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
+      MATH(EXPR configsCount "${configsCount} - 1")
+      FOREACH(currentConfigIndex RANGE ${configsCount})
+        LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
+        LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
+        SET(configsText "${configsText}    ${filename} (version ${version})\n")
+      ENDFOREACH(currentConfigIndex)
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
+
+    ELSE(${_NAME}_CONSIDERED_CONFIGS)
+      # Simple case: No Config-file was found at all:
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
+    ENDIF(${_NAME}_CONSIDERED_CONFIGS)
+  ENDIF(${_NAME}_CONFIG)
+ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+
+
+FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
+
+# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
+# new extended or in the "old" mode:
+  SET(options CONFIG_MODE)
+  SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
+  SET(multiValueArgs REQUIRED_VARS)
+  SET(_KEYWORDS_FOR_EXTENDED_MODE  ${options} ${oneValueArgs} ${multiValueArgs} )
+  LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
+
+  IF(${INDEX} EQUAL -1)
+    SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
+    SET(FPHSA_REQUIRED_VARS ${ARGN})
+    SET(FPHSA_VERSION_VAR)
+  ELSE(${INDEX} EQUAL -1)
+
+    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}"  ${_FIRST_ARG} ${ARGN})
+
+    IF(FPHSA_UNPARSED_ARGUMENTS)
+      MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
+    ENDIF(FPHSA_UNPARSED_ARGUMENTS)
+
+    IF(NOT FPHSA_FAIL_MESSAGE)
+      SET(FPHSA_FAIL_MESSAGE  "DEFAULT_MSG")
+    ENDIF(NOT FPHSA_FAIL_MESSAGE)
+  ENDIF(${INDEX} EQUAL -1)
+
+# now that we collected all arguments, process them
+
+  IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+    SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
+  ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+
+  # In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
+  # when it successfully found the config-file, including version checking:
+  IF(FPHSA_CONFIG_MODE)
+    LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
+    LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
+    SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
+  ENDIF(FPHSA_CONFIG_MODE)
+
+  IF(NOT FPHSA_REQUIRED_VARS)
+    MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
+  ENDIF(NOT FPHSA_REQUIRED_VARS)
+
+  LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
+
+  STRING(TOUPPER ${_NAME} _NAME_UPPER)
+  STRING(TOLOWER ${_NAME} _NAME_LOWER)
+
+  # collect all variables which were not found, so they can be printed, so the
+  # user knows better what went wrong (#6375)
+  SET(MISSING_VARS "")
+  SET(DETAILS "")
+  SET(${_NAME_UPPER}_FOUND TRUE)
+  # check if all passed variables are valid
+  FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
+    IF(NOT ${_CURRENT_VAR})
+      SET(${_NAME_UPPER}_FOUND FALSE)
+      SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
+    ELSE(NOT ${_CURRENT_VAR})
+      SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
+    ENDIF(NOT ${_CURRENT_VAR})
+  ENDFOREACH(_CURRENT_VAR)
+
+
+  # version handling:
+  SET(VERSION_MSG "")
+  SET(VERSION_OK TRUE)
+  SET(VERSION ${${FPHSA_VERSION_VAR}} )
+  IF (${_NAME}_FIND_VERSION)
+
+    IF(VERSION)
+
+      IF(${_NAME}_FIND_VERSION_EXACT)       # exact version required
+        IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
+        ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+
+      ELSE(${_NAME}_FIND_VERSION_EXACT)     # minimum version specified:
+        IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
+        ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ELSE(VERSION)
+
+      # if the package was not found, but a version was given, add that to the output:
+      IF(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
+      ELSE(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ENDIF(VERSION)
+  ELSE (${_NAME}_FIND_VERSION)
+    IF(VERSION)
+      SET(VERSION_MSG "(found version \"${VERSION}\")")
+    ENDIF(VERSION)
+  ENDIF (${_NAME}_FIND_VERSION)
+
+  IF(VERSION_OK)
+    SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
+  ELSE(VERSION_OK)
+    SET(${_NAME_UPPER}_FOUND FALSE)
+  ENDIF(VERSION_OK)
+
+
+  # print the result:
+  IF (${_NAME_UPPER}_FOUND)
+    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}")
+  ELSE (${_NAME_UPPER}_FOUND)
+
+    IF(FPHSA_CONFIG_MODE)
+      _FPHSA_HANDLE_FAILURE_CONFIG_MODE()
+    ELSE(FPHSA_CONFIG_MODE)
+      IF(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
+      ELSE(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
+      ENDIF(NOT VERSION_OK)
+    ENDIF(FPHSA_CONFIG_MODE)
+
+  ENDIF (${_NAME_UPPER}_FOUND)
+
+  SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
+
+ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)
diff --git a/wrappers/java/Modules/CMakeUtilityFunctions.cmake b/wrappers/java/Modules/CMakeUtilityFunctions.cmake
new file mode 100644
index 0000000..c29cb8a
--- /dev/null
+++ b/wrappers/java/Modules/CMakeUtilityFunctions.cmake
@@ -0,0 +1,19 @@
+function (print VAR)
+  set(NAME ${VAR})
+  list (APPEND VARS ${${VAR}})
+
+  set(MSG)
+  set(IS_FIRST TRUE)
+
+  foreach(ELM ${VARS})
+    if (IS_FIRST)
+      set(MSG ${ELM})
+      set(IS_FIRST FALSE)
+    else ()
+      set(MSG ${MSG}, ${ELM})
+    endif ()
+  endforeach()
+
+  message("${NAME} = "${MSG})
+endfunction(print VAR)
+
diff --git a/wrappers/java/Modules/FindADIOS.cmake b/wrappers/java/Modules/FindADIOS.cmake
new file mode 100644
index 0000000..8a55c77
--- /dev/null
+++ b/wrappers/java/Modules/FindADIOS.cmake
@@ -0,0 +1,136 @@
+# - Find a ADIOS implementation
+#
+# === Variables ===
+#
+# This module will set the following variables:
+#   ADIOS_USE_MPI         Can be set to ON to force the use of the MPI library
+#                         Defaults to ON.
+#   ADIOS_FOUND           TRUE if FindADIOS found ADIOS flags
+#   ADIOS_COMPILE_FLAGS   Compilation flags for ADIOS programs
+#   ADIOS_INCLUDE_PATH    Include path(s) for ADIOS header
+#   ADIOS_LINK_FLAGS      Linking flags for ADIOS programs
+#   ADIOS_LIBRARIES       All libraries to link ADIOS programs against
+# 
+# === Example ===
+#
+#   set (ADIOS_USE_MPI OFF)
+#   find_package (ADIOS)
+#   if (ADIOS_FOUND)
+#     add_definitions (${ADIOS_COMPILE_FLAGS})  
+#     include_directories (${ADIOS_INCLUDE_PATH})
+#     target_link_libraries(foo ${ADIOS_LIBRARIES})
+#   endif ()
+#
+
+# NOTE: 
+# This module is written based FindMPI. Most routines are copied from FindMPI.
+
+# include this to handle the QUIETLY and REQUIRED arguments
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(GetPrerequisites)
+
+if(NOT DEFINED ADIOS_USE_MPI)
+  set(ADIOS_USE_MPI TRUE)
+endif()
+
+if (ADIOS_USE_MPI)
+  set(CONFIG_OPTION "")
+else ()
+  set(CONFIG_OPTION "-s")
+endif()
+
+execute_process(
+  COMMAND adios_config -c ${CONFIG_OPTION}
+  OUTPUT_VARIABLE ADIOS_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+# Extract compile flags from the compile command line
+string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" ADIOS_ALL_COMPILE_FLAGS "${ADIOS_COMPILE_CMDLINE}")
+set(ADIOS_COMPILE_FLAGS_WORK)
+
+foreach(FLAG ${ADIOS_ALL_COMPILE_FLAGS})
+  if (ADIOS_COMPILE_FLAGS_WORK)
+    set(ADIOS_COMPILE_FLAGS_WORK "${ADIOS_COMPILE_FLAGS_WORK} ${FLAG}")
+  else()
+    set(ADIOS_COMPILE_FLAGS_WORK ${FLAG})
+  endif()
+endforeach()
+
+# Extract include paths from compile command line
+string(REGEX MATCHALL "(^| )-I([^\" ]+|\"[^\"]+\")" ADIOS_ALL_INCLUDE_PATHS "${ADIOS_COMPILE_CMDLINE}")
+unset(ADIOS_INCLUDE_PATH_WORK)
+foreach(IPATH ${ADIOS_ALL_INCLUDE_PATHS})
+  string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH})
+  string(REGEX REPLACE "//" "/" IPATH ${IPATH})
+  list(APPEND ADIOS_INCLUDE_PATH_WORK ${IPATH})
+endforeach()
+
+execute_process(
+  COMMAND adios_config -l ${CONFIG_OPTION}
+  OUTPUT_VARIABLE  ADIOS_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+
+# Extract linker paths from the link command line
+string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" ADIOS_ALL_LINK_PATHS "${ADIOS_LINK_CMDLINE}")
+unset(ADIOS_LINK_PATH)
+foreach(LPATH ${ADIOS_ALL_LINK_PATHS})
+  string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
+  string(REGEX REPLACE "//" "/" LPATH ${LPATH})
+  list(APPEND ADIOS_LINK_PATH ${LPATH})
+endforeach()
+
+# try using showme:libdirs if extracting didn't work.
+if (NOT ADIOS_LINK_PATH)
+  set(ADIOS_LINK_PATH ${ADIOS_LIBDIRS})
+  separate_arguments(ADIOS_LINK_PATH)
+endif()
+
+# Extract linker flags from the link command line
+string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")" ADIOS_ALL_LINK_FLAGS "${ADIOS_LINK_CMDLINE}")
+set(ADIOS_LINK_FLAGS_WORK)
+foreach(FLAG ${ADIOS_ALL_LINK_FLAGS})
+  if (ADIOS_LINK_FLAGS_WORK)
+    set(ADIOS_LINK_FLAGS_WORK "${ADIOS_LINK_FLAGS_WORK} ${FLAG}")
+  else()
+    set(ADIOS_LINK_FLAGS_WORK ${FLAG})
+  endif()
+endforeach()
+
+# Extract the set of libraries to link against from the link command
+# line
+string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" ADIOS_LIBNAMES "${ADIOS_LINK_CMDLINE}")
+
+# Determine full path names for all of the libraries that one needs
+# to link against in an MPI program
+unset(ADIOS_LIBRARIES_WORK)
+foreach(LIB ${ADIOS_LIBNAMES})
+  string(REGEX REPLACE "^ ?-l" "" LIB ${LIB})
+  # ADIOS_LIB is cached by find_library, but we don't want that.  Clear it first.
+  set(ADIOS_LIB "ADIOS_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
+  find_library(ADIOS_LIB NAMES ${LIB} HINTS ${ADIOS_LINK_PATH})
+
+  if (ADIOS_LIB)
+    list(APPEND ADIOS_LIBRARIES_WORK ${ADIOS_LIB})
+  elseif (NOT ADIOS_FIND_QUIETLY)
+    message(WARNING "Unable to find ADIOS library ${LIB}")
+  endif()
+endforeach()
+
+# Sanity check ADIOS_LIBRARIES to make sure there are enough libraries
+list(LENGTH ADIOS_LIBRARIES_WORK ADIOS_NUMLIBS)
+list(LENGTH ADIOS_LIBNAMES ADIOS_NUMLIBS_EXPECTED)
+if (NOT ADIOS_NUMLIBS EQUAL ADIOS_NUMLIBS_EXPECTED)
+  message("Expected ${ADIOS_NUMLIBS_EXPECTED} but found ${ADIOS_NUMLIBS}")
+  set(ADIOS_LIBRARIES_WORK "ADIOS_LIBRARIES-NOTFOUND")
+endif()
+
+# If we found MPI, set up all of the appropriate cache entries
+set(ADIOS_COMPILE_FLAGS ${ADIOS_COMPILE_FLAGS_WORK} CACHE STRING "ADIOS compilation flags"         FORCE)
+set(ADIOS_INCLUDE_PATH  ${ADIOS_INCLUDE_PATH_WORK}  CACHE STRING "ADIOS include path"              FORCE)
+set(ADIOS_LINK_FLAGS    ${ADIOS_LINK_FLAGS_WORK}    CACHE STRING "ADIOS linking flags"             FORCE)
+set(ADIOS_LIBRARIES     ${ADIOS_LIBRARIES_WORK}     CACHE STRING "ADIOS libraries to link against" FORCE)
+
+find_package_handle_standard_args(ADIOS DEFAULT_MSG ADIOS_INCLUDE_PATH ADIOS_LIBRARIES)
+
+
diff --git a/wrappers/java/Modules/FindPackageHandleStandardArgs.cmake b/wrappers/java/Modules/FindPackageHandleStandardArgs.cmake
new file mode 100644
index 0000000..1acb021
--- /dev/null
+++ b/wrappers/java/Modules/FindPackageHandleStandardArgs.cmake
@@ -0,0 +1,260 @@
+# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
+#
+# This function is intended to be used in FindXXX.cmake modules files.
+# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE().
+# It also sets the <UPPERCASED_NAME>_FOUND variable.
+# The package is considered found if all variables <var1>... listed contain
+# valid results, e.g. valid filepaths.
+#
+# There are two modes of this function. The first argument in both modes is
+# the name of the Find-module where it is called (in original casing).
+#
+# The first simple mode looks like this:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
+# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# If DEFAULT_MSG is given as second argument, then the function will generate
+# itself useful success and error messages. You can also supply a custom error message
+# for the failure case. This is not recommended.
+#
+# The second mode is more powerful and also supports version checking:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
+#                                           [VERSION_VAR   <versionvar>
+#                                           [CONFIG_MODE]
+#                                           [FAIL_MESSAGE "Custom failure message"] )
+#
+# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# After REQUIRED_VARS the variables which are required for this package are listed.
+# Following VERSION_VAR the name of the variable can be specified which holds
+# the version of the package which has been found. If this is done, this version
+# will be checked against the (potentially) specified required version used
+# in the find_package() call. The EXACT keyword is also handled. The default
+# messages include information about the required version and the version
+# which has been actually found, both if the version is ok or not.
+# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
+# a find_package(... NO_MODULE) call, in this case all the information
+# provided by the config-mode of find_package() will be evaluated
+# automatically.
+# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
+# used, the default message will be displayed.
+#
+# Example for mode 1:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
+#
+# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
+# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
+# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
+# independent whether QUIET was used or not.
+# If it is found, success will be reported, including the content of <var1>.
+# On repeated Cmake runs, the same message won't be printed again.
+#
+# Example for mode 2:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
+#                                             VERSION_VAR BISON_VERSION)
+# In this case, BISON is considered to be found if the variable(s) listed
+# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
+# Also the version of BISON will be checked by using the version contained
+# in BISON_VERSION.
+# Since no FAIL_MESSAGE is given, the default messages will be printed.
+#
+# Another example for mode 2:
+#
+#    FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
+# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE)
+# and adds an additional search directory for automoc4.
+# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
+# success/error message.
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+INCLUDE(FindPackageMessage)
+INCLUDE(CMakeParseArguments)
+
+# internal helper macro
+MACRO(_FPHSA_FAILURE_MESSAGE _msg)
+  IF (${_NAME}_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "${_msg}")
+  ELSE (${_NAME}_FIND_REQUIRED)
+    IF (NOT ${_NAME}_FIND_QUIETLY)
+      MESSAGE(STATUS "${_msg}")
+    ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+  ENDIF (${_NAME}_FIND_REQUIRED)
+ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
+
+
+# internal helper macro to generate the failure message when used in CONFIG_MODE:
+MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+  # <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
+  IF(${_NAME}_CONFIG)
+    _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
+  ELSE(${_NAME}_CONFIG)
+    # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
+    # List them all in the error message:
+    IF(${_NAME}_CONSIDERED_CONFIGS)
+      SET(configsText "")
+      LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
+      MATH(EXPR configsCount "${configsCount} - 1")
+      FOREACH(currentConfigIndex RANGE ${configsCount})
+        LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
+        LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
+        SET(configsText "${configsText}    ${filename} (version ${version})\n")
+      ENDFOREACH(currentConfigIndex)
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
+
+    ELSE(${_NAME}_CONSIDERED_CONFIGS)
+      # Simple case: No Config-file was found at all:
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
+    ENDIF(${_NAME}_CONSIDERED_CONFIGS)
+  ENDIF(${_NAME}_CONFIG)
+ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+
+
+FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
+
+# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
+# new extended or in the "old" mode:
+  SET(options CONFIG_MODE)
+  SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
+  SET(multiValueArgs REQUIRED_VARS)
+  SET(_KEYWORDS_FOR_EXTENDED_MODE  ${options} ${oneValueArgs} ${multiValueArgs} )
+  LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
+
+  IF(${INDEX} EQUAL -1)
+    SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
+    SET(FPHSA_REQUIRED_VARS ${ARGN})
+    SET(FPHSA_VERSION_VAR)
+  ELSE(${INDEX} EQUAL -1)
+
+    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}"  ${_FIRST_ARG} ${ARGN})
+
+    IF(FPHSA_UNPARSED_ARGUMENTS)
+      MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
+    ENDIF(FPHSA_UNPARSED_ARGUMENTS)
+
+    IF(NOT FPHSA_FAIL_MESSAGE)
+      SET(FPHSA_FAIL_MESSAGE  "DEFAULT_MSG")
+    ENDIF(NOT FPHSA_FAIL_MESSAGE)
+  ENDIF(${INDEX} EQUAL -1)
+
+# now that we collected all arguments, process them
+
+  IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+    SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
+  ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+
+  # In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
+  # when it successfully found the config-file, including version checking:
+  IF(FPHSA_CONFIG_MODE)
+    LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
+    LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
+    SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
+  ENDIF(FPHSA_CONFIG_MODE)
+
+  IF(NOT FPHSA_REQUIRED_VARS)
+    MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
+  ENDIF(NOT FPHSA_REQUIRED_VARS)
+
+  LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
+
+  STRING(TOUPPER ${_NAME} _NAME_UPPER)
+  STRING(TOLOWER ${_NAME} _NAME_LOWER)
+
+  # collect all variables which were not found, so they can be printed, so the
+  # user knows better what went wrong (#6375)
+  SET(MISSING_VARS "")
+  SET(DETAILS "")
+  SET(${_NAME_UPPER}_FOUND TRUE)
+  # check if all passed variables are valid
+  FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
+    IF(NOT ${_CURRENT_VAR})
+      SET(${_NAME_UPPER}_FOUND FALSE)
+      SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
+    ELSE(NOT ${_CURRENT_VAR})
+      SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
+    ENDIF(NOT ${_CURRENT_VAR})
+  ENDFOREACH(_CURRENT_VAR)
+
+
+  # version handling:
+  SET(VERSION_MSG "")
+  SET(VERSION_OK TRUE)
+  SET(VERSION ${${FPHSA_VERSION_VAR}} )
+  IF (${_NAME}_FIND_VERSION)
+
+    IF(VERSION)
+
+      IF(${_NAME}_FIND_VERSION_EXACT)       # exact version required
+        IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
+        ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+
+      ELSE(${_NAME}_FIND_VERSION_EXACT)     # minimum version specified:
+        IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
+        ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ELSE(VERSION)
+
+      # if the package was not found, but a version was given, add that to the output:
+      IF(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
+      ELSE(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ENDIF(VERSION)
+  ELSE (${_NAME}_FIND_VERSION)
+    IF(VERSION)
+      SET(VERSION_MSG "(found version \"${VERSION}\")")
+    ENDIF(VERSION)
+  ENDIF (${_NAME}_FIND_VERSION)
+
+  IF(VERSION_OK)
+    SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
+  ELSE(VERSION_OK)
+    SET(${_NAME_UPPER}_FOUND FALSE)
+  ENDIF(VERSION_OK)
+
+
+  # print the result:
+  IF (${_NAME_UPPER}_FOUND)
+    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}")
+  ELSE (${_NAME_UPPER}_FOUND)
+
+    IF(FPHSA_CONFIG_MODE)
+      _FPHSA_HANDLE_FAILURE_CONFIG_MODE()
+    ELSE(FPHSA_CONFIG_MODE)
+      IF(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
+      ELSE(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
+      ENDIF(NOT VERSION_OK)
+    ENDIF(FPHSA_CONFIG_MODE)
+
+  ENDIF (${_NAME_UPPER}_FOUND)
+
+  SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
+
+ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)
diff --git a/wrappers/java/README b/wrappers/java/README
new file mode 100644
index 0000000..7e98705
--- /dev/null
+++ b/wrappers/java/README
@@ -0,0 +1,49 @@
+ADIOS Java wrapper
+-----------------
+
+This directory contains the codes for the ADIOS java wrapper, a Java
+Native Interface (JNI) program to call the native ADIOS library.
+
+
+== Build == 
+
+This program can be built with CMake (http://www.cmake.org/). You may
+want to a build directory and run cmake pointing the source directory
+containing CMakeLists.txt (this directory). For example, 
+
+$ mkdir build; cd build
+$ cmake /dir/to/source
+
+CMake will search installed ADIOS library, Java, JNI, MPI library (if
+needed), etc. Once completed, type make to build:
+
+$ make
+
+If you need verbose output, you may add an option:
+$ make VERBOSE=1
+
+After successful building, you can see libAdiosJava.so (or
+libAdiosJava.dylib in Mac) and AdiosJava.jar. Those two files are
+needed to call in Java.
+
+Then, you can install the library by,
+$ make install
+
+The default install directory is /usr/local. You can change by
+specifying CMAKE_INSTALL_PREFIX value;
+
+$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/install /dir/to/source
+
+Or, you can use the ccmake command, the CMake curses interface. Refer
+to the CMake documentation for more detailed instructions.
+
+== Test == 
+
+This program contains a test program. To run testing after building,
+type the following command:
+
+$ make test
+
+If you need a verbose output, type the following
+
+$ ctest -V
diff --git a/wrappers/java/gov/.svn/all-wcprops b/wrappers/java/gov/.svn/all-wcprops
new file mode 100644
index 0000000..f6345b0
--- /dev/null
+++ b/wrappers/java/gov/.svn/all-wcprops
@@ -0,0 +1,5 @@
+K 25
+svn:wc:ra_dav:version-url
+V 53
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/gov
+END
diff --git a/wrappers/java/gov/.svn/entries b/wrappers/java/gov/.svn/entries
new file mode 100644
index 0000000..63f26a2
--- /dev/null
+++ b/wrappers/java/gov/.svn/entries
@@ -0,0 +1,38 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/java/gov
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+ornl
+dir
+

diff --git a/wrappers/java/gov/.svn/format b/wrappers/java/gov/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/java/gov/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/java/gov/ornl/.svn/all-wcprops b/wrappers/java/gov/ornl/.svn/all-wcprops
new file mode 100644
index 0000000..7a25f3d
--- /dev/null
+++ b/wrappers/java/gov/ornl/.svn/all-wcprops
@@ -0,0 +1,5 @@
+K 25
+svn:wc:ra_dav:version-url
+V 58
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/gov/ornl
+END
diff --git a/wrappers/java/gov/ornl/.svn/entries b/wrappers/java/gov/ornl/.svn/entries
new file mode 100644
index 0000000..31ca767
--- /dev/null
+++ b/wrappers/java/gov/ornl/.svn/entries
@@ -0,0 +1,38 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/java/gov/ornl
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+ccs
+dir
+

diff --git a/wrappers/java/gov/ornl/.svn/format b/wrappers/java/gov/ornl/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/java/gov/ornl/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/java/gov/ornl/ccs/.svn/all-wcprops b/wrappers/java/gov/ornl/ccs/.svn/all-wcprops
new file mode 100644
index 0000000..fa300be
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/all-wcprops
@@ -0,0 +1,35 @@
+K 25
+svn:wc:ra_dav:version-url
+V 62
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/gov/ornl/ccs
+END
+Adios.java
+K 25
+svn:wc:ra_dav:version-url
+V 73
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/gov/ornl/ccs/Adios.java
+END
+AdiosVarinfo.java
+K 25
+svn:wc:ra_dav:version-url
+V 80
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/gov/ornl/ccs/AdiosVarinfo.java
+END
+AdiosBufferAllocWhen.java
+K 25
+svn:wc:ra_dav:version-url
+V 88
+/svn-ewok/ADIOS/!svn/ver/1818/trunk/wrappers/java/gov/ornl/ccs/AdiosBufferAllocWhen.java
+END
+AdiosFlag.java
+K 25
+svn:wc:ra_dav:version-url
+V 77
+/svn-ewok/ADIOS/!svn/ver/1818/trunk/wrappers/java/gov/ornl/ccs/AdiosFlag.java
+END
+AdiosDatatype.java
+K 25
+svn:wc:ra_dav:version-url
+V 81
+/svn-ewok/ADIOS/!svn/ver/1864/trunk/wrappers/java/gov/ornl/ccs/AdiosDatatype.java
+END
diff --git a/wrappers/java/gov/ornl/ccs/.svn/entries b/wrappers/java/gov/ornl/ccs/.svn/entries
new file mode 100644
index 0000000..11e327d
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/entries
@@ -0,0 +1,307 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/java/gov/ornl/ccs
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+Adios.java
+file
+
+
+
+
+2012-08-27T21:26:07.098999Z
+f3e60c409cc29198a47ea81a21e35771
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+9064
+

+AdiosFile.java
+file
+
+
+
+
+2012-07-02T16:20:13.112154Z
+85fd890633b5d69f960a39b2b0c8deab
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1963
+

+AdiosTest.java
+file
+
+
+
+
+2012-07-02T16:20:13.116151Z
+eb1a463c1cb31ca8a5df07b01a4523ff
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1264
+

+AdiosVarinfo.java
+file
+
+
+
+
+2012-08-27T21:26:07.114015Z
+853394074e2fd1b221f61cb115c4404d
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+4172
+

+AdiosBufferAllocWhen.java
+file
+
+
+
+
+2012-07-09T22:53:06.755617Z
+467a896c005eacb51093c4b6a8239021
+2012-07-09T20:01:29.504650Z
+1818
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+259
+

+AdiosFlag.java
+file
+
+
+
+
+2012-07-09T22:53:06.758615Z
+8beb0a6259caef55ce50299541c26094
+2012-07-09T20:01:29.504650Z
+1818
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+235
+

+AdiosDatatype.java
+file
+
+
+
+
+2012-07-11T21:22:26.039700Z
+00b04f2ab9be8cdc105761379ebdae67
+2012-07-11T18:44:01.762605Z
+1864
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+813
+

+AdiosGroup.java
+file
+
+
+
+
+2012-07-02T16:20:13.184151Z
+12ad77cb2fe078c997090e15cd532734
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1966
+

diff --git a/wrappers/java/gov/ornl/ccs/.svn/format b/wrappers/java/gov/ornl/ccs/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/java/gov/ornl/ccs/.svn/text-base/Adios.java.svn-base b/wrappers/java/gov/ornl/ccs/.svn/text-base/Adios.java.svn-base
new file mode 100644
index 0000000..c775977
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/text-base/Adios.java.svn-base
@@ -0,0 +1,266 @@
+// The AdiosJava.java file
+package gov.ornl.ccs;
+
+import java.nio.ByteBuffer;
+import java.nio.DoubleBuffer;
+
+public class Adios
+{
+    // Declaration of the Native (C) function
+    private static native int adios_init (String xml_fname);
+
+    private static native long adios_open (String group_name, String file_name, String mode, long comm);
+    private static native long adios_group_size (long fh, long group_size);
+    private static native int adios_write (long fh, String var_name, byte val);
+    private static native int adios_write (long fh, String var_name, int val);
+    private static native int adios_write (long fh, String var_name, long val);
+    private static native int adios_write (long fh, String var_name, float val);
+    private static native int adios_write (long fh, String var_name, double val);
+    private static native int adios_write (long fh, String var_name, byte[] val);
+    private static native int adios_write (long fh, String var_name, int[] val);
+    private static native int adios_write (long fh, String var_name, long[] val);
+    private static native int adios_write (long fh, String var_name, float[] val);
+    private static native int adios_write (long fh, String var_name, double[] val);
+
+    // Note: adios_read is a delayed operation
+    // Only non-buffered method will populate the data
+    private static native byte adios_read_byte_value (long fh, String var_name);
+    private static native int adios_read_int_value (long fh, String var_name);
+    private static native long adios_read_long_value (long fh, String var_name);
+    private static native float adios_read_float_value (long fh, String var_name);
+    private static native double adios_read_double_value (long fh, String var_name);
+
+    private static native int adios_read (long fh, String var_name, byte[] val);
+    private static native int adios_read (long fh, String var_name, int[] val);
+    private static native int adios_read (long fh, String var_name, long[] val);
+    private static native int adios_read (long fh, String var_name, float[] val);
+    private static native int adios_read (long fh, String var_name, double[] val);
+
+    private static native int adios_close (long fh);
+    private static native int adios_finalize (int id);
+
+    private static native int adios_mpi_init(String[] args);
+    private static native int adios_mpi_comm_rank(long comm);
+    private static native int adios_mpi_comm_size(long comm);
+    private static native int adios_mpi_finalize();
+    private static native long adios_mpi_comm_world();
+
+    private static native long adios_open_and_set_group_size (String group_name, String file_name, String mode, long group_size, long comm);
+
+    private static native int adios_init_noxml();
+    private static native int adios_allocate_buffer(int when, long size);
+    private static native long adios_declare_group(String name, String time_index, int stats);
+    private static native int adios_define_var(long group_id, String name, String path, int type, String dimensions, String global_dimensions, String local_offsets);
+    private static native int adios_define_attribute(long group_id, String name, String path, int type, String value, String var);
+    private static native int adios_select_method(long group_id, String method, String parameters, String base_path);
+
+    static
+    {
+        // The runtime system executes a class's static
+        // initializer when it loads the class.
+        System.loadLibrary("AdiosJava");
+    }
+
+	/* Call adios_init */
+    public static int Init(String xml_fname)
+    {
+        return adios_init(xml_fname);
+    }
+    
+	/* Call adios_open. Return a group handler */
+    public static long Open(String group_name, String file_name, String mode, long comm)
+    {
+        return adios_open(group_name, file_name, mode, comm);
+    }
+
+	/* Call adios_group_size and return the total size */
+    public static long SetGroupSize(long fh, long group_size)
+    {
+        return adios_group_size (fh, group_size);
+    }
+
+	/* Call adios_write and return the total size */
+    public static long Write (long fh, String var_name, byte value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, int value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, long value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, float value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, double value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, byte[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, int[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, long[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, float[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, double[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static byte ReadByteValue (long fh, String var_name)
+    {
+        return adios_read_byte_value(fh, var_name);
+    }
+
+    public static int ReadIntValue (long fh, String var_name)
+    {
+        return adios_read_int_value(fh, var_name);
+    }
+
+    public static long ReadLongValue (long fh, String var_name)
+    {
+        return adios_read_long_value(fh, var_name);
+    }
+
+    public static float ReadFloatValue (long fh, String var_name)
+    {
+        return adios_read_float_value(fh, var_name);
+    }
+
+    public static double ReadDoubleValue (long fh, String var_name)
+    {
+        return adios_read_double_value(fh, var_name);
+    }
+
+    public static long Read (long fh, String var_name, byte[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+    public static long Read (long fh, String var_name, int[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+    public static long Read (long fh, String var_name, long[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+    public static long Read (long fh, String var_name, float[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+    public static long Read (long fh, String var_name, double[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+	/* Call adios_close */
+    public static int Close (long fh)
+    {
+        return adios_close (fh);
+    }
+
+	/* Call adios_finalize */
+    public static int Finalize (int id)
+    {
+        return adios_finalize(id);
+    }
+
+	/* Call MPI_Init */
+    public static int MPI_Init(String[] args)
+    {
+        return adios_mpi_init(args);
+    }
+
+ 	/* Call MPI_Comm_rank */
+    public static int MPI_Comm_rank(long comm)
+    {
+        return adios_mpi_comm_rank(comm);
+    }
+
+	/* Call MPI_Comm_size */
+    public static int MPI_Comm_size(long comm)
+    {
+        return adios_mpi_comm_size(comm);
+    }
+
+	/* Call MPI_Finalize */
+    public static int MPI_Finalize()
+    {
+        return adios_mpi_finalize();
+    }
+
+	/* Get MPI_COMM_WORLD */
+    public static long MPI_COMM_WORLD()
+    {
+        return adios_mpi_comm_world();
+    }
+
+    public static long OpenAndSetGroupSize(String group_name, String file_name, String mode, long group_size, long comm)
+    {
+        return adios_open_and_set_group_size(group_name, file_name, mode, group_size, comm);
+    }
+
+	/* Call adios_init_noxml */
+    public static int Init_Noxml()
+    {
+        return adios_init_noxml();
+    }
+    
+	/* Call adios_allocate_buffer */
+    public static int AllocateBuffer(AdiosBufferAllocWhen when, long size)
+    {
+        return adios_allocate_buffer(when.getCode(), size);
+    }
+    
+
+	/* Call adios_declare_group */
+    public static long DeclareGroup(String name, String time_index, AdiosFlag stats)
+    {
+        return adios_declare_group(name, time_index, stats.getCode());
+    }
+
+	/* Call adios_define_var */
+    public static int DefineVar(long group_id, String name, String path, AdiosDatatype type, String dimensions, String global_dimensions, String local_offsets)
+    {
+        return adios_define_var(group_id, name, path, type.getCode(), dimensions, global_dimensions, local_offsets);
+    }
+
+ 	/* Call adios_define_attribute */
+    public static int DefineAttribute(long group_id, String name, String path, AdiosDatatype type, String value, String var)
+    {
+        return adios_define_attribute(group_id, name, path, type.getCode(), value, var);
+    }
+
+ 	/* Call adios_select_method */
+    public static int SelectMethod(long group_id, String method, String parameters, String base_path)
+    {
+        return adios_select_method(group_id, method, parameters, base_path);
+    }
+}
diff --git a/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosBufferAllocWhen.java.svn-base b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosBufferAllocWhen.java.svn-base
new file mode 100644
index 0000000..bc8f39a
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosBufferAllocWhen.java.svn-base
@@ -0,0 +1,17 @@
+package gov.ornl.ccs;
+
+public enum AdiosBufferAllocWhen {
+    UNKNOWN (0),
+    NOW (1), 
+    LATER (2);
+
+    private int code;
+
+    AdiosBufferAllocWhen(int code) {
+        this.code = code;
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+}
diff --git a/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosDatatype.java.svn-base b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosDatatype.java.svn-base
new file mode 100644
index 0000000..bb33487
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosDatatype.java.svn-base
@@ -0,0 +1,33 @@
+package gov.ornl.ccs;
+
+public enum AdiosDatatype {
+    UNKNOWN(-1)             /* (SIZE) */
+    ,BYTE(0)                 /* (1) */
+    ,SHORT(1)                /* (2) */
+    ,INTEGER(2)              /* (4) */
+    ,LONG(4)                 /* (8) */
+    
+    ,UNSIGNED_BYTE(50)       /* (1) */
+    ,UNSIGNED_SHORT(51)      /* (2) */
+    ,UNSIGNED_INTEGER(52)    /* (4) */
+    ,UNSIGNED_LONG(54)       /* (8) */
+    
+    ,REAL(5)                 /* (4) */
+    ,DOUBLE(6)               /* (8) */
+    ,LONG_DOUBLE(7)          /* (16) */
+    
+    ,STRING(9)               /* (?) */
+    ,COMPLEX(10)             /* (8) */
+    ,DOUBLE_COMPLEX(11)      /* (16) */;
+        
+    private int code;
+
+    AdiosDatatype(int code) {
+        this.code = code;
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+}
+
diff --git a/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosFile.java.svn-base b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosFile.java.svn-base
new file mode 100644
index 0000000..ceeffa2
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosFile.java.svn-base
@@ -0,0 +1,65 @@
+// The AdiosJava.java file
+package gov.ornl.ccs;
+
+public class AdiosFile
+{
+
+    // Declaration of the Native (C) function
+    private native int adios_fopen (String path, long comm);
+    private native int adios_fclose ();
+
+    public long fp;
+    public long fh;
+    public int groups_count;
+    public int vars_count;
+    public int attrs_count;
+    public int tidx_start;
+    public int ntimesteps;
+    public int version;
+    public long file_size;
+    public int endianness;
+    public String[] group_namelist;
+
+    static
+    {
+        // The runtime system executes a class's static
+        // initializer when it loads the class.
+        System.loadLibrary("AdiosJava");
+    }
+
+    public int open(String path, long comm)
+    {
+        return adios_fopen(path, comm);
+    }
+
+    public int close()
+    {
+        return adios_fclose();
+    }
+
+    public String toString()
+    {
+        StringBuilder result = new StringBuilder();
+        String NEW_LINE = System.getProperty("line.separator");
+
+        result.append(this.getClass().getName() + " Object {" + NEW_LINE);
+        result.append(" fp: " + fp + NEW_LINE);
+        result.append(" fh: " + fh + NEW_LINE);
+        result.append(" groups_count: " + groups_count + NEW_LINE);
+        result.append(" vars_count: " + vars_count + NEW_LINE);
+        result.append(" attrs_count: " + attrs_count + NEW_LINE);
+        result.append(" tidx_start: " + tidx_start + NEW_LINE);
+        result.append(" ntimesteps: " + ntimesteps + NEW_LINE);
+        result.append(" version: " + version + NEW_LINE);
+        result.append(" file_size: " + file_size + NEW_LINE);
+        result.append(" endianness: " + endianness + NEW_LINE);
+        if (group_namelist != null) {
+            for (int i = 0; i < groups_count; i++) {
+                result.append(" group_namelist[" + i + "]: " + group_namelist[i] + NEW_LINE);
+            }
+        }
+        result.append("}");
+
+        return result.toString();
+    }
+}
diff --git a/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosFlag.java.svn-base b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosFlag.java.svn-base
new file mode 100644
index 0000000..60f05dd
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosFlag.java.svn-base
@@ -0,0 +1,18 @@
+package gov.ornl.ccs;
+
+public enum AdiosFlag {
+    UNKNOWN (0),
+    YES (1), 
+    NO (2);
+
+    private int code;
+
+    AdiosFlag(int code) {
+        this.code = code;
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+}
+
diff --git a/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosGroup.java.svn-base b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosGroup.java.svn-base
new file mode 100644
index 0000000..64b76d6
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosGroup.java.svn-base
@@ -0,0 +1,71 @@
+package gov.ornl.ccs;
+
+import java.util.ArrayList;
+
+public class AdiosGroup
+{
+    // Declaration of the Native (C) function
+    private native int adios_gopen (long fp, String grpname);
+    private native int adios_gclose ();
+
+    AdiosFile file;
+    public long gp;
+    public long gh;
+    public int grpid;
+    public int vars_count;
+    public int attrs_count;
+    public String[] var_namelist;
+    public String[] attr_namelist;
+
+    static
+    {
+        // The runtime system executes a class's static
+        // initializer when it loads the class.
+        System.loadLibrary("AdiosJava");
+    }
+
+    public AdiosGroup(AdiosFile file)
+    {
+        this.file = file;
+    }
+
+    public int open(String grpname)
+    {
+        return adios_gopen(file.fp, grpname);
+    }
+
+    public int close()
+    {
+        return adios_gclose();
+    }
+
+    public String toString()
+    {
+        StringBuilder result = new StringBuilder();
+        String NEW_LINE = System.getProperty("line.separator");
+
+        result.append(this.getClass().getName() + " Object {" + NEW_LINE);
+        result.append(" gp: " + gp + NEW_LINE);
+        result.append(" gh: " + gh + NEW_LINE);
+        result.append(" vars_count: " + vars_count + NEW_LINE);
+        result.append(" attrs_count: " + attrs_count + NEW_LINE);
+
+        if (var_namelist != null) {
+            result.append(" var_namelist.length: " + var_namelist.length + NEW_LINE);
+            for (int i = 0; i < var_namelist.length; i++) {
+                result.append(" var_namelist[" + i + "]: " + var_namelist[i] + NEW_LINE);
+            }
+        }
+
+        if (attr_namelist != null) {
+            result.append(" attr_namelist.length: " + attr_namelist.length + NEW_LINE);
+            for (int i = 0; i < attr_namelist.length; i++) {
+                result.append(" attr_namelist[" + i + "]: " + attr_namelist[i] + NEW_LINE);
+            }
+        }
+
+        result.append("}");
+
+        return result.toString();
+    }
+}
\ No newline at end of file
diff --git a/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosTest.java.svn-base b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosTest.java.svn-base
new file mode 100644
index 0000000..e619d01
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosTest.java.svn-base
@@ -0,0 +1,50 @@
+package gov.ornl.ccs;
+
+import gov.ornl.ccs.Adios;
+import gov.ornl.ccs.AdiosFile;
+import gov.ornl.ccs.AdiosGroup;
+
+public class AdiosTest
+{
+    // The main program
+    public static void main(String[] args)
+    {
+        System.out.println("Hello");
+
+        //Adios adios = new Adios();
+        //adios.init();
+
+        AdiosFile file = new AdiosFile();
+        file.open("adios_global.bp");
+
+        AdiosGroup group = new AdiosGroup(file);
+        group.open("temperature");
+
+        AdiosVarinfo var = new AdiosVarinfo(group);
+        var.inq("temperature");
+
+        long[] start = {0, 0};
+        long[] count = {1, 10};
+        double[] output = var.read(start, count);
+        //double[] output = var.read(start, count);
+
+        System.out.println("output.length = " + output.length);
+        for (int i = 0; i < output.length; i++) {
+            System.out.println("output[" + i + "] = " + output[i]);
+        }
+
+        var.close();
+        group.close();
+        file.close();
+
+        //AdiosGroup group = new AdiosGroup();
+        //group.open("adios_global.bp");
+        //group.open("temperature");
+
+        
+        System.out.println();
+        System.out.println(file);
+        System.out.println(group);
+        System.out.println(var);
+    }
+}
diff --git a/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosVarinfo.java.svn-base b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosVarinfo.java.svn-base
new file mode 100644
index 0000000..9384b7c
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/.svn/text-base/AdiosVarinfo.java.svn-base
@@ -0,0 +1,151 @@
+// The AdiosJava.java file
+package gov.ornl.ccs;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class AdiosVarinfo
+{
+
+    // Declaration of the Native (C) function
+    private native int adios_inq_var(long gp, String varname);
+    private native int adios_free_varinfo();
+
+    //private native double[] adios_read_var_byid(long gp, int varid, long[] start, long[] count);
+
+    private native int adios_read(long gp, int varid, long[] start, long[] count, byte[] out);
+    private native int adios_read(long gp, int varid, long[] start, long[] count, int[] out);
+    private native int adios_read(long gp, int varid, long[] start, long[] count, long[] out);
+    private native int adios_read(long gp, int varid, long[] start, long[] count, float[] out);
+    private native int adios_read(long gp, int varid, long[] start, long[] count, double[] out);
+
+    AdiosGroup group;
+
+    public long vp;
+    public int grpid;
+    public int varid;
+    public int type;
+    public int ndim;
+    public long[] dims;
+    public int timedim;
+    public byte[] value;
+
+    static
+    {
+        // The runtime system executes a class's static
+        // initializer when it loads the class.
+        System.loadLibrary("AdiosJava");
+    }
+
+    public AdiosVarinfo(AdiosGroup group)
+    {
+        this.group = group;
+    }
+
+    public int inq(String varname)
+    {
+        return adios_inq_var(group.gp, varname);
+    }
+
+    public int close()
+    {
+        return adios_free_varinfo();
+    }
+
+    public int read(long[] start, long[] count, byte[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public int read(long[] start, long[] count, int[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public int read(long[] start, long[] count, long[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public int read(long[] start, long[] count, float[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public int read(long[] start, long[] count, double[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public byte[] read()
+    {
+        return value;
+    }
+
+    public int readIntValue()
+    {
+        ByteBuffer bb = ByteBuffer.wrap(value);
+        if (group.file.endianness == 0)
+            bb.order(ByteOrder.LITTLE_ENDIAN);
+        else
+            bb.order(ByteOrder.BIG_ENDIAN);
+
+        return bb.getInt();
+    }
+
+    public long readLongValue()
+    {
+        ByteBuffer bb = ByteBuffer.wrap(value);
+        if (group.file.endianness == 0)
+            bb.order(ByteOrder.LITTLE_ENDIAN);
+        else
+            bb.order(ByteOrder.BIG_ENDIAN);
+
+        return bb.getLong();
+    }
+
+    public float readFloatValue()
+    {
+        ByteBuffer bb = ByteBuffer.wrap(value);
+        if (group.file.endianness == 0)
+            bb.order(ByteOrder.LITTLE_ENDIAN);
+        else
+            bb.order(ByteOrder.BIG_ENDIAN);
+
+        return bb.getFloat();
+    }
+
+    public double readDoubleValue()
+    {
+        ByteBuffer bb = ByteBuffer.wrap(value);
+        if (group.file.endianness == 0)
+            bb.order(ByteOrder.LITTLE_ENDIAN);
+        else
+            bb.order(ByteOrder.BIG_ENDIAN);
+
+        return bb.getDouble();
+    }
+
+    public String toString()
+    {
+        StringBuilder result = new StringBuilder();
+        String NEW_LINE = System.getProperty("line.separator");
+
+        result.append(this.getClass().getName() + " Object {" + NEW_LINE);
+        result.append(" vp: " + vp + NEW_LINE);
+        result.append(" grpid: " + grpid + NEW_LINE);
+        result.append(" varid: " + varid + NEW_LINE);
+        result.append(" type: " + type + NEW_LINE);
+        result.append(" ndim: " + ndim + NEW_LINE);
+        result.append(" dims.length: " + dims.length + NEW_LINE);
+        if (dims.length > 0) {
+            for (int i = 0; i < dims.length; i++) {
+                result.append(" dims[" + i + "]: " + dims[i] + NEW_LINE);
+            }
+        }
+        result.append(" timedim: " + timedim + NEW_LINE);
+        result.append("}");
+
+        return result.toString();
+    }
+}
diff --git a/wrappers/java/gov/ornl/ccs/Adios.java b/wrappers/java/gov/ornl/ccs/Adios.java
new file mode 100644
index 0000000..c775977
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/Adios.java
@@ -0,0 +1,266 @@
+// The AdiosJava.java file
+package gov.ornl.ccs;
+
+import java.nio.ByteBuffer;
+import java.nio.DoubleBuffer;
+
+public class Adios
+{
+    // Declaration of the Native (C) function
+    private static native int adios_init (String xml_fname);
+
+    private static native long adios_open (String group_name, String file_name, String mode, long comm);
+    private static native long adios_group_size (long fh, long group_size);
+    private static native int adios_write (long fh, String var_name, byte val);
+    private static native int adios_write (long fh, String var_name, int val);
+    private static native int adios_write (long fh, String var_name, long val);
+    private static native int adios_write (long fh, String var_name, float val);
+    private static native int adios_write (long fh, String var_name, double val);
+    private static native int adios_write (long fh, String var_name, byte[] val);
+    private static native int adios_write (long fh, String var_name, int[] val);
+    private static native int adios_write (long fh, String var_name, long[] val);
+    private static native int adios_write (long fh, String var_name, float[] val);
+    private static native int adios_write (long fh, String var_name, double[] val);
+
+    // Note: adios_read is a delayed operation
+    // Only non-buffered method will populate the data
+    private static native byte adios_read_byte_value (long fh, String var_name);
+    private static native int adios_read_int_value (long fh, String var_name);
+    private static native long adios_read_long_value (long fh, String var_name);
+    private static native float adios_read_float_value (long fh, String var_name);
+    private static native double adios_read_double_value (long fh, String var_name);
+
+    private static native int adios_read (long fh, String var_name, byte[] val);
+    private static native int adios_read (long fh, String var_name, int[] val);
+    private static native int adios_read (long fh, String var_name, long[] val);
+    private static native int adios_read (long fh, String var_name, float[] val);
+    private static native int adios_read (long fh, String var_name, double[] val);
+
+    private static native int adios_close (long fh);
+    private static native int adios_finalize (int id);
+
+    private static native int adios_mpi_init(String[] args);
+    private static native int adios_mpi_comm_rank(long comm);
+    private static native int adios_mpi_comm_size(long comm);
+    private static native int adios_mpi_finalize();
+    private static native long adios_mpi_comm_world();
+
+    private static native long adios_open_and_set_group_size (String group_name, String file_name, String mode, long group_size, long comm);
+
+    private static native int adios_init_noxml();
+    private static native int adios_allocate_buffer(int when, long size);
+    private static native long adios_declare_group(String name, String time_index, int stats);
+    private static native int adios_define_var(long group_id, String name, String path, int type, String dimensions, String global_dimensions, String local_offsets);
+    private static native int adios_define_attribute(long group_id, String name, String path, int type, String value, String var);
+    private static native int adios_select_method(long group_id, String method, String parameters, String base_path);
+
+    static
+    {
+        // The runtime system executes a class's static
+        // initializer when it loads the class.
+        System.loadLibrary("AdiosJava");
+    }
+
+	/* Call adios_init */
+    public static int Init(String xml_fname)
+    {
+        return adios_init(xml_fname);
+    }
+    
+	/* Call adios_open. Return a group handler */
+    public static long Open(String group_name, String file_name, String mode, long comm)
+    {
+        return adios_open(group_name, file_name, mode, comm);
+    }
+
+	/* Call adios_group_size and return the total size */
+    public static long SetGroupSize(long fh, long group_size)
+    {
+        return adios_group_size (fh, group_size);
+    }
+
+	/* Call adios_write and return the total size */
+    public static long Write (long fh, String var_name, byte value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, int value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, long value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, float value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, double value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, byte[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, int[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, long[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, float[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static long Write (long fh, String var_name, double[] value)
+    {
+        return adios_write (fh, var_name, value);
+    }
+
+    public static byte ReadByteValue (long fh, String var_name)
+    {
+        return adios_read_byte_value(fh, var_name);
+    }
+
+    public static int ReadIntValue (long fh, String var_name)
+    {
+        return adios_read_int_value(fh, var_name);
+    }
+
+    public static long ReadLongValue (long fh, String var_name)
+    {
+        return adios_read_long_value(fh, var_name);
+    }
+
+    public static float ReadFloatValue (long fh, String var_name)
+    {
+        return adios_read_float_value(fh, var_name);
+    }
+
+    public static double ReadDoubleValue (long fh, String var_name)
+    {
+        return adios_read_double_value(fh, var_name);
+    }
+
+    public static long Read (long fh, String var_name, byte[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+    public static long Read (long fh, String var_name, int[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+    public static long Read (long fh, String var_name, long[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+    public static long Read (long fh, String var_name, float[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+    public static long Read (long fh, String var_name, double[] value)
+    {
+        return adios_read (fh, var_name, value);
+    }
+
+	/* Call adios_close */
+    public static int Close (long fh)
+    {
+        return adios_close (fh);
+    }
+
+	/* Call adios_finalize */
+    public static int Finalize (int id)
+    {
+        return adios_finalize(id);
+    }
+
+	/* Call MPI_Init */
+    public static int MPI_Init(String[] args)
+    {
+        return adios_mpi_init(args);
+    }
+
+ 	/* Call MPI_Comm_rank */
+    public static int MPI_Comm_rank(long comm)
+    {
+        return adios_mpi_comm_rank(comm);
+    }
+
+	/* Call MPI_Comm_size */
+    public static int MPI_Comm_size(long comm)
+    {
+        return adios_mpi_comm_size(comm);
+    }
+
+	/* Call MPI_Finalize */
+    public static int MPI_Finalize()
+    {
+        return adios_mpi_finalize();
+    }
+
+	/* Get MPI_COMM_WORLD */
+    public static long MPI_COMM_WORLD()
+    {
+        return adios_mpi_comm_world();
+    }
+
+    public static long OpenAndSetGroupSize(String group_name, String file_name, String mode, long group_size, long comm)
+    {
+        return adios_open_and_set_group_size(group_name, file_name, mode, group_size, comm);
+    }
+
+	/* Call adios_init_noxml */
+    public static int Init_Noxml()
+    {
+        return adios_init_noxml();
+    }
+    
+	/* Call adios_allocate_buffer */
+    public static int AllocateBuffer(AdiosBufferAllocWhen when, long size)
+    {
+        return adios_allocate_buffer(when.getCode(), size);
+    }
+    
+
+	/* Call adios_declare_group */
+    public static long DeclareGroup(String name, String time_index, AdiosFlag stats)
+    {
+        return adios_declare_group(name, time_index, stats.getCode());
+    }
+
+	/* Call adios_define_var */
+    public static int DefineVar(long group_id, String name, String path, AdiosDatatype type, String dimensions, String global_dimensions, String local_offsets)
+    {
+        return adios_define_var(group_id, name, path, type.getCode(), dimensions, global_dimensions, local_offsets);
+    }
+
+ 	/* Call adios_define_attribute */
+    public static int DefineAttribute(long group_id, String name, String path, AdiosDatatype type, String value, String var)
+    {
+        return adios_define_attribute(group_id, name, path, type.getCode(), value, var);
+    }
+
+ 	/* Call adios_select_method */
+    public static int SelectMethod(long group_id, String method, String parameters, String base_path)
+    {
+        return adios_select_method(group_id, method, parameters, base_path);
+    }
+}
diff --git a/wrappers/java/gov/ornl/ccs/AdiosBufferAllocWhen.java b/wrappers/java/gov/ornl/ccs/AdiosBufferAllocWhen.java
new file mode 100644
index 0000000..bc8f39a
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/AdiosBufferAllocWhen.java
@@ -0,0 +1,17 @@
+package gov.ornl.ccs;
+
+public enum AdiosBufferAllocWhen {
+    UNKNOWN (0),
+    NOW (1), 
+    LATER (2);
+
+    private int code;
+
+    AdiosBufferAllocWhen(int code) {
+        this.code = code;
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+}
diff --git a/wrappers/java/gov/ornl/ccs/AdiosDatatype.java b/wrappers/java/gov/ornl/ccs/AdiosDatatype.java
new file mode 100644
index 0000000..bb33487
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/AdiosDatatype.java
@@ -0,0 +1,33 @@
+package gov.ornl.ccs;
+
+public enum AdiosDatatype {
+    UNKNOWN(-1)             /* (SIZE) */
+    ,BYTE(0)                 /* (1) */
+    ,SHORT(1)                /* (2) */
+    ,INTEGER(2)              /* (4) */
+    ,LONG(4)                 /* (8) */
+    
+    ,UNSIGNED_BYTE(50)       /* (1) */
+    ,UNSIGNED_SHORT(51)      /* (2) */
+    ,UNSIGNED_INTEGER(52)    /* (4) */
+    ,UNSIGNED_LONG(54)       /* (8) */
+    
+    ,REAL(5)                 /* (4) */
+    ,DOUBLE(6)               /* (8) */
+    ,LONG_DOUBLE(7)          /* (16) */
+    
+    ,STRING(9)               /* (?) */
+    ,COMPLEX(10)             /* (8) */
+    ,DOUBLE_COMPLEX(11)      /* (16) */;
+        
+    private int code;
+
+    AdiosDatatype(int code) {
+        this.code = code;
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+}
+
diff --git a/wrappers/java/gov/ornl/ccs/AdiosFile.java b/wrappers/java/gov/ornl/ccs/AdiosFile.java
new file mode 100644
index 0000000..ceeffa2
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/AdiosFile.java
@@ -0,0 +1,65 @@
+// The AdiosJava.java file
+package gov.ornl.ccs;
+
+public class AdiosFile
+{
+
+    // Declaration of the Native (C) function
+    private native int adios_fopen (String path, long comm);
+    private native int adios_fclose ();
+
+    public long fp;
+    public long fh;
+    public int groups_count;
+    public int vars_count;
+    public int attrs_count;
+    public int tidx_start;
+    public int ntimesteps;
+    public int version;
+    public long file_size;
+    public int endianness;
+    public String[] group_namelist;
+
+    static
+    {
+        // The runtime system executes a class's static
+        // initializer when it loads the class.
+        System.loadLibrary("AdiosJava");
+    }
+
+    public int open(String path, long comm)
+    {
+        return adios_fopen(path, comm);
+    }
+
+    public int close()
+    {
+        return adios_fclose();
+    }
+
+    public String toString()
+    {
+        StringBuilder result = new StringBuilder();
+        String NEW_LINE = System.getProperty("line.separator");
+
+        result.append(this.getClass().getName() + " Object {" + NEW_LINE);
+        result.append(" fp: " + fp + NEW_LINE);
+        result.append(" fh: " + fh + NEW_LINE);
+        result.append(" groups_count: " + groups_count + NEW_LINE);
+        result.append(" vars_count: " + vars_count + NEW_LINE);
+        result.append(" attrs_count: " + attrs_count + NEW_LINE);
+        result.append(" tidx_start: " + tidx_start + NEW_LINE);
+        result.append(" ntimesteps: " + ntimesteps + NEW_LINE);
+        result.append(" version: " + version + NEW_LINE);
+        result.append(" file_size: " + file_size + NEW_LINE);
+        result.append(" endianness: " + endianness + NEW_LINE);
+        if (group_namelist != null) {
+            for (int i = 0; i < groups_count; i++) {
+                result.append(" group_namelist[" + i + "]: " + group_namelist[i] + NEW_LINE);
+            }
+        }
+        result.append("}");
+
+        return result.toString();
+    }
+}
diff --git a/wrappers/java/gov/ornl/ccs/AdiosFlag.java b/wrappers/java/gov/ornl/ccs/AdiosFlag.java
new file mode 100644
index 0000000..60f05dd
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/AdiosFlag.java
@@ -0,0 +1,18 @@
+package gov.ornl.ccs;
+
+public enum AdiosFlag {
+    UNKNOWN (0),
+    YES (1), 
+    NO (2);
+
+    private int code;
+
+    AdiosFlag(int code) {
+        this.code = code;
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+}
+
diff --git a/wrappers/java/gov/ornl/ccs/AdiosGroup.java b/wrappers/java/gov/ornl/ccs/AdiosGroup.java
new file mode 100644
index 0000000..64b76d6
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/AdiosGroup.java
@@ -0,0 +1,71 @@
+package gov.ornl.ccs;
+
+import java.util.ArrayList;
+
+public class AdiosGroup
+{
+    // Declaration of the Native (C) function
+    private native int adios_gopen (long fp, String grpname);
+    private native int adios_gclose ();
+
+    AdiosFile file;
+    public long gp;
+    public long gh;
+    public int grpid;
+    public int vars_count;
+    public int attrs_count;
+    public String[] var_namelist;
+    public String[] attr_namelist;
+
+    static
+    {
+        // The runtime system executes a class's static
+        // initializer when it loads the class.
+        System.loadLibrary("AdiosJava");
+    }
+
+    public AdiosGroup(AdiosFile file)
+    {
+        this.file = file;
+    }
+
+    public int open(String grpname)
+    {
+        return adios_gopen(file.fp, grpname);
+    }
+
+    public int close()
+    {
+        return adios_gclose();
+    }
+
+    public String toString()
+    {
+        StringBuilder result = new StringBuilder();
+        String NEW_LINE = System.getProperty("line.separator");
+
+        result.append(this.getClass().getName() + " Object {" + NEW_LINE);
+        result.append(" gp: " + gp + NEW_LINE);
+        result.append(" gh: " + gh + NEW_LINE);
+        result.append(" vars_count: " + vars_count + NEW_LINE);
+        result.append(" attrs_count: " + attrs_count + NEW_LINE);
+
+        if (var_namelist != null) {
+            result.append(" var_namelist.length: " + var_namelist.length + NEW_LINE);
+            for (int i = 0; i < var_namelist.length; i++) {
+                result.append(" var_namelist[" + i + "]: " + var_namelist[i] + NEW_LINE);
+            }
+        }
+
+        if (attr_namelist != null) {
+            result.append(" attr_namelist.length: " + attr_namelist.length + NEW_LINE);
+            for (int i = 0; i < attr_namelist.length; i++) {
+                result.append(" attr_namelist[" + i + "]: " + attr_namelist[i] + NEW_LINE);
+            }
+        }
+
+        result.append("}");
+
+        return result.toString();
+    }
+}
\ No newline at end of file
diff --git a/wrappers/java/gov/ornl/ccs/AdiosTest.java b/wrappers/java/gov/ornl/ccs/AdiosTest.java
new file mode 100644
index 0000000..e619d01
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/AdiosTest.java
@@ -0,0 +1,50 @@
+package gov.ornl.ccs;
+
+import gov.ornl.ccs.Adios;
+import gov.ornl.ccs.AdiosFile;
+import gov.ornl.ccs.AdiosGroup;
+
+public class AdiosTest
+{
+    // The main program
+    public static void main(String[] args)
+    {
+        System.out.println("Hello");
+
+        //Adios adios = new Adios();
+        //adios.init();
+
+        AdiosFile file = new AdiosFile();
+        file.open("adios_global.bp");
+
+        AdiosGroup group = new AdiosGroup(file);
+        group.open("temperature");
+
+        AdiosVarinfo var = new AdiosVarinfo(group);
+        var.inq("temperature");
+
+        long[] start = {0, 0};
+        long[] count = {1, 10};
+        double[] output = var.read(start, count);
+        //double[] output = var.read(start, count);
+
+        System.out.println("output.length = " + output.length);
+        for (int i = 0; i < output.length; i++) {
+            System.out.println("output[" + i + "] = " + output[i]);
+        }
+
+        var.close();
+        group.close();
+        file.close();
+
+        //AdiosGroup group = new AdiosGroup();
+        //group.open("adios_global.bp");
+        //group.open("temperature");
+
+        
+        System.out.println();
+        System.out.println(file);
+        System.out.println(group);
+        System.out.println(var);
+    }
+}
diff --git a/wrappers/java/gov/ornl/ccs/AdiosVarinfo.java b/wrappers/java/gov/ornl/ccs/AdiosVarinfo.java
new file mode 100644
index 0000000..9384b7c
--- /dev/null
+++ b/wrappers/java/gov/ornl/ccs/AdiosVarinfo.java
@@ -0,0 +1,151 @@
+// The AdiosJava.java file
+package gov.ornl.ccs;
+
+import java.nio.ByteBuffer;
+import java.nio.ByteOrder;
+
+public class AdiosVarinfo
+{
+
+    // Declaration of the Native (C) function
+    private native int adios_inq_var(long gp, String varname);
+    private native int adios_free_varinfo();
+
+    //private native double[] adios_read_var_byid(long gp, int varid, long[] start, long[] count);
+
+    private native int adios_read(long gp, int varid, long[] start, long[] count, byte[] out);
+    private native int adios_read(long gp, int varid, long[] start, long[] count, int[] out);
+    private native int adios_read(long gp, int varid, long[] start, long[] count, long[] out);
+    private native int adios_read(long gp, int varid, long[] start, long[] count, float[] out);
+    private native int adios_read(long gp, int varid, long[] start, long[] count, double[] out);
+
+    AdiosGroup group;
+
+    public long vp;
+    public int grpid;
+    public int varid;
+    public int type;
+    public int ndim;
+    public long[] dims;
+    public int timedim;
+    public byte[] value;
+
+    static
+    {
+        // The runtime system executes a class's static
+        // initializer when it loads the class.
+        System.loadLibrary("AdiosJava");
+    }
+
+    public AdiosVarinfo(AdiosGroup group)
+    {
+        this.group = group;
+    }
+
+    public int inq(String varname)
+    {
+        return adios_inq_var(group.gp, varname);
+    }
+
+    public int close()
+    {
+        return adios_free_varinfo();
+    }
+
+    public int read(long[] start, long[] count, byte[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public int read(long[] start, long[] count, int[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public int read(long[] start, long[] count, long[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public int read(long[] start, long[] count, float[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public int read(long[] start, long[] count, double[] out)
+    {
+        return adios_read(group.gp, varid, start, count, out);
+    }
+
+    public byte[] read()
+    {
+        return value;
+    }
+
+    public int readIntValue()
+    {
+        ByteBuffer bb = ByteBuffer.wrap(value);
+        if (group.file.endianness == 0)
+            bb.order(ByteOrder.LITTLE_ENDIAN);
+        else
+            bb.order(ByteOrder.BIG_ENDIAN);
+
+        return bb.getInt();
+    }
+
+    public long readLongValue()
+    {
+        ByteBuffer bb = ByteBuffer.wrap(value);
+        if (group.file.endianness == 0)
+            bb.order(ByteOrder.LITTLE_ENDIAN);
+        else
+            bb.order(ByteOrder.BIG_ENDIAN);
+
+        return bb.getLong();
+    }
+
+    public float readFloatValue()
+    {
+        ByteBuffer bb = ByteBuffer.wrap(value);
+        if (group.file.endianness == 0)
+            bb.order(ByteOrder.LITTLE_ENDIAN);
+        else
+            bb.order(ByteOrder.BIG_ENDIAN);
+
+        return bb.getFloat();
+    }
+
+    public double readDoubleValue()
+    {
+        ByteBuffer bb = ByteBuffer.wrap(value);
+        if (group.file.endianness == 0)
+            bb.order(ByteOrder.LITTLE_ENDIAN);
+        else
+            bb.order(ByteOrder.BIG_ENDIAN);
+
+        return bb.getDouble();
+    }
+
+    public String toString()
+    {
+        StringBuilder result = new StringBuilder();
+        String NEW_LINE = System.getProperty("line.separator");
+
+        result.append(this.getClass().getName() + " Object {" + NEW_LINE);
+        result.append(" vp: " + vp + NEW_LINE);
+        result.append(" grpid: " + grpid + NEW_LINE);
+        result.append(" varid: " + varid + NEW_LINE);
+        result.append(" type: " + type + NEW_LINE);
+        result.append(" ndim: " + ndim + NEW_LINE);
+        result.append(" dims.length: " + dims.length + NEW_LINE);
+        if (dims.length > 0) {
+            for (int i = 0; i < dims.length; i++) {
+                result.append(" dims[" + i + "]: " + dims[i] + NEW_LINE);
+            }
+        }
+        result.append(" timedim: " + timedim + NEW_LINE);
+        result.append("}");
+
+        return result.toString();
+    }
+}
diff --git a/wrappers/java/gov_ornl_ccs_Adios.cxx b/wrappers/java/gov_ornl_ccs_Adios.cxx
new file mode 100644
index 0000000..941eb51
--- /dev/null
+++ b/wrappers/java/gov_ornl_ccs_Adios.cxx
@@ -0,0 +1,578 @@
+#include "gov_ornl_ccs_Adios.h"
+
+#include <adios.h>
+#include <iostream>
+#include <string.h>
+#include <stdlib.h>
+
+#define STR(A) #A
+#define CONCAT2(A, B) A ## B
+#define CONCAT3(A, B, C) CONCAT2(CONCAT2(A, B), C)
+#define GET_ARRAY_ELEMENT(TYPE) CONCAT3(Get, TYPE, ArrayElements)
+#define WRITE_ONE(JTYPE)                                        \
+    /* std::cout << __FUNCTION__ << "..." << std::endl; */      \
+    int result;                                                 \
+    const char *str_var_name;                                   \
+    str_var_name = env->GetStringUTFChars(var_name, NULL);      \
+    if (str_var_name == NULL) return -1;                        \
+    result = adios_write ((int64_t) fh, str_var_name, &val);    \
+    env->ReleaseStringUTFChars(var_name, str_var_name);         \
+    return result;
+
+#define WRITE_ARRAY(JTYPE, CTYPE)                                       \
+    /* std::cout << __FUNCTION__ << " ..." << std::endl;*/              \
+    int result;                                                         \
+    const char *str_var_name;                                           \
+    JTYPE *valarr = env->Get ##CTYPE ##ArrayElements(val, NULL);        \
+    str_var_name = env->GetStringUTFChars(var_name, NULL);              \
+    if (str_var_name == NULL) return -1;                                \
+    result = adios_write ((int64_t) fh, str_var_name, (void *) valarr); \
+    env->ReleaseStringUTFChars(var_name, str_var_name);                 \
+    env->Release ##CTYPE ##ArrayElements(val, valarr, 0);               \
+    return result;
+
+#define FUNC_WRITE_ONE(FNAME, JTYPE)                                    \
+    JNIEXPORT jint JNICALL FNAME                                        \
+    (JNIEnv * env, jclass cls, jlong fh, jstring var_name, JTYPE val)   \
+    {                                                                   \
+        WRITE_ONE(JTYPE);                                               \
+    }
+
+#define FUNC_WRITE_ARRAY(FNAME, JTYPE, CTYPE)                           \
+    JNIEXPORT jint JNICALL FNAME                                        \
+    (JNIEnv * env, jclass cls, jlong fh, jstring var_name, JTYPE ##Array val) \
+    {                                                                   \
+        WRITE_ARRAY(JTYPE, CTYPE);                                      \
+    }
+
+#define STR_ALLOC(var) \
+    const char *str_##var = env->GetStringUTFChars(var, NULL); \
+    if (str_##var == NULL) return -1;
+
+#define STR_ALLOC2(var) \
+    const char *str_##var = env->GetStringUTFChars(var, NULL); \
+    if (str_##var == NULL) goto end;
+
+#define STR_FREE(var) \
+    env->ReleaseStringUTFChars(var, str_##var);
+
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_init
+ * Signature: (Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL 
+Java_gov_ornl_ccs_Adios_adios_1init 
+(JNIEnv *env, jclass cls, jstring xml_fname)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+    int result;
+    jboolean isCopy;
+
+    STR_ALLOC(xml_fname);
+
+    result = adios_init(str_xml_fname);
+    //std::cout << "result = " << result << std::endl;
+    
+    STR_FREE(xml_fname);
+
+    return result;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_open
+ * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;J)J
+ */
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1open
+(JNIEnv * env, jclass cls, jstring group_name, jstring file_name, jstring mode, jlong comm)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    int result;
+    int64_t fd_p = 0;
+
+    STR_ALLOC(group_name);
+    STR_ALLOC(file_name);
+    STR_ALLOC(mode);
+
+    //std::cout << "[IN] fd_p = " << (int64_t) fd_p << std::endl;
+    //std::cout << "[IN] str_group_name = " << str_group_name << std::endl;
+    //std::cout << "[IN] str_file_name = " << str_file_name << std::endl;
+    //std::cout << "[IN] str_mode = " << str_mode << std::endl;
+    //std::cout << "[IN] comm = " << (long) comm << std::endl;
+    result = adios_open(&fd_p, str_group_name, str_file_name, str_mode, &comm);
+    //std::cout << "[OUT] fd_p = " << fd_p << std::endl;
+    //std::cout << "[OUT] result = " << result << std::endl;
+
+    STR_FREE(group_name);
+    STR_FREE(file_name);
+    STR_FREE(mode);
+
+    return (jlong) fd_p;
+}
+
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1group_1size
+(JNIEnv * env, jclass cls, jlong fh, jlong group_size)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    uint64_t total_size = 0;
+    int result;
+
+    //std::cout << "[IN] fh = " << (int64_t) fh << std::endl;
+    //std::cout << "[IN] group_size = " << (uint64_t) group_size << std::endl;
+    result = adios_group_size ((int64_t) fh, (uint64_t) group_size, (uint64_t *) &total_size);
+    //std::cout << "[OUT] fh = " << (int64_t) fh << std::endl;
+    //std::cout << "[OUT] total size = " << total_size << std::endl;
+    //std::cout << "[OUT] result = " << result << std::endl;
+
+    return total_size;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_write
+ * Signature: (JLjava/lang/String;B)I
+ * Signature: (JLjava/lang/String;I)I
+ * Signature: (JLjava/lang/String;J)I
+ * Signature: (JLjava/lang/String;F)I
+ * Signature: (JLjava/lang/String;D)I
+ */
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2B, 
+    jbyte)
+
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2I,
+    jint)
+
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2J,
+    jlong)
+
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2F,
+    jfloat)
+
+FUNC_WRITE_ONE (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2D,
+    jdouble)
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_write
+ * Signature: (JLjava/lang/String;[B)I
+ * Signature: (JLjava/lang/String;[I)I
+ * Signature: (JLjava/lang/String;[J)I
+ * Signature: (JLjava/lang/String;[F)I
+ * Signature: (JLjava/lang/String;[D)I
+ */
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3B,
+    jbyte,
+    Byte)
+
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3I,
+    jint,
+    Int)
+
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3J,
+    jlong,
+    Long)
+
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3F,
+    jfloat,
+    Float)
+
+FUNC_WRITE_ARRAY (
+    Java_gov_ornl_ccs_Adios_adios_1write__JLjava_lang_String_2_3D,
+    jdouble,
+    Double)
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_close
+ * Signature: (J)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1close
+(JNIEnv * env, jclass cls, jlong fh)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    //std::cout << "[IN] fh = " << fh << std::endl;
+    return adios_close ((int64_t) fh);
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_finalize
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1finalize
+(JNIEnv * env, jclass cls, jint id)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+    return adios_finalize (id);
+}
+
+#ifdef ADIOS_USE_MPI
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_init
+ * Signature: ([Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1init
+(JNIEnv * env, jclass cls, jobjectArray args)
+{
+    int argc = env->GetArrayLength(args);
+    char **argv;
+    int result; 
+    
+    for (int i = 0; i < argc; i++) 
+    {
+        jstring jstr = (jstring) env->GetObjectArrayElement(args, i);
+        const char *chr = env->GetStringUTFChars(jstr, 0);
+
+        //argv[i] = (char *) malloc(env->GetStringLength(jstr) + 1);
+        argv[i] = new char[env->GetStringLength(jstr) + 1];
+        strcpy(argv[i], chr);
+
+        env->ReleaseStringUTFChars(jstr, chr);
+    }
+
+    result = MPI_Init(&argc, &argv);
+
+    for (int i = 0; i < argc; i++) 
+    {
+        //free(argv[i]);
+        delete[] argv[i]; 
+    }
+
+    return result;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_comm_rank
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1comm_1rank
+(JNIEnv * env, jclass cls, jlong comm)
+{
+    int rank;
+    MPI_Comm_rank((MPI_Comm) comm, &rank);
+    
+    return rank;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_comm_size
+ * Signature: (I)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1comm_1size
+(JNIEnv * env, jclass cls, jlong comm)
+{
+    int size;
+    MPI_Comm_size((MPI_Comm) comm, &size);
+    
+    return size;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_finalize
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1finalize
+(JNIEnv * env, jclass cls)
+{
+    return MPI_Finalize();
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_mpi_comm_world
+ * Signature: ()I
+ */
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1mpi_1comm_1world
+(JNIEnv * env, jclass cls)
+{
+    return (jlong) MPI_COMM_WORLD;
+}
+#endif
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_open_and_set_group_size
+ * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JJ)J
+ */
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1open_1and_1set_1group_1size
+(JNIEnv * env, jclass cls, jstring group_name, jstring file_name, jstring mode, jlong group_size, jlong comm)
+{
+    // Doesn't work, either
+    //jlong fh = Java_gov_ornl_ccs_Adios_adios_1open(env, cls, group_name, file_name, mode, comm);
+    //Java_gov_ornl_ccs_Adios_adios_1group_1size(env, cls, fh, group_size);
+
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    int result;
+    int64_t fd_p = 0;
+
+    STR_ALLOC(group_name);
+    STR_ALLOC(file_name);
+    STR_ALLOC(mode);
+
+    //std::cout << "[IN] fd_p = " << (int64_t) fd_p << std::endl;
+    //std::cout << "[IN] str_group_name = " << str_group_name << std::endl;
+    //std::cout << "[IN] str_file_name = " << str_file_name << std::endl;
+    //std::cout << "[IN] str_mode = " << str_mode << std::endl;
+    //std::cout << "[IN] comm = " << (long) comm << std::endl;
+    result = adios_open(&fd_p, str_group_name, str_file_name, str_mode, &comm);
+    //std::cout << "[OUT] fd_p = " << fd_p << std::endl;
+    //std::cout << "[OUT] result = " << result << std::endl;
+
+    STR_FREE(group_name);
+    STR_FREE(file_name);
+    STR_FREE(mode);
+
+    uint64_t total_size;
+    //std::cout << "[IN] fd_p = " << (int64_t) fd_p << std::endl;
+    adios_group_size (fd_p, group_size, (uint64_t *) &total_size);
+    //std::cout << "[OUT] total size = " << total_size << std::endl;
+
+    return (jlong) fd_p;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_init_noxml
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL 
+Java_gov_ornl_ccs_Adios_adios_1init_1noxml
+(JNIEnv *env, jclass cls)
+{
+    return adios_init_noxml();
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_allocate_buffer
+ * Signature: (IJ)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1allocate_1buffer
+(JNIEnv * env, jclass cls, jint when, jlong size)
+{
+    return adios_allocate_buffer((ADIOS_BUFFER_ALLOC_WHEN) when, size);
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_declare_group
+ * Signature: (Ljava/lang/String;Ljava/lang/String;I)J
+ */
+JNIEXPORT jlong JNICALL Java_gov_ornl_ccs_Adios_adios_1declare_1group
+(JNIEnv * env, jclass cls, jstring name, jstring time_index, jint stats)
+{
+    int64_t id_p;
+    int result;
+
+    STR_ALLOC(name);
+    STR_ALLOC(time_index);
+
+    result = adios_declare_group(&id_p, str_name, str_time_index, (ADIOS_FLAG) stats);
+
+    STR_FREE(name);
+    STR_FREE(time_index);
+
+    return (jlong) id_p;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_define_var
+ * Signature: (JLjava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1define_1var
+(JNIEnv * env, jclass cls, jlong group_id, jstring name, jstring path, jint type, jstring dimensions, jstring global_dimensions, jstring local_offsets)
+{
+    int result;
+
+    STR_ALLOC(name);
+    STR_ALLOC(path);
+    STR_ALLOC(dimensions);
+    STR_ALLOC(global_dimensions);
+    STR_ALLOC(local_offsets);
+
+    result = adios_define_var((int64_t) group_id, str_name, str_path, (ADIOS_DATATYPES) type, str_dimensions, str_global_dimensions, str_local_offsets);
+    
+    STR_FREE(name);
+    STR_FREE(path);
+    STR_FREE(dimensions);
+    STR_FREE(global_dimensions);
+    STR_FREE(local_offsets);
+
+    return result;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_define_attribute
+ * Signature: (JLjava/lang/String;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1define_1attribute
+(JNIEnv * env, jclass cls, jlong group_id, jstring name, jstring path, jint type, jstring value, jstring var)
+{
+    int result;
+    
+    STR_ALLOC(name);
+    STR_ALLOC(path);
+    STR_ALLOC(value);
+    STR_ALLOC(var);
+    
+    result = adios_define_attribute((int64_t) group_id, str_name, str_path, (ADIOS_DATATYPES) type, str_value, str_var);
+
+    STR_FREE(name);
+    STR_FREE(path);
+    STR_FREE(value);
+    STR_FREE(var);
+
+    return result;
+}
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_select_method
+ * Signature: (JLjava/lang/String;Ljava/lang/String;Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_Adios_adios_1select_1method
+(JNIEnv * env, jclass cls, jlong group_id, jstring method, jstring parameters, jstring base_path)
+{
+    int result;
+    
+    STR_ALLOC(method);
+    STR_ALLOC(parameters);
+    STR_ALLOC(base_path);
+    
+    result = adios_select_method((int64_t) group_id, str_method, str_parameters, str_base_path);
+
+    STR_FREE(method);
+    STR_FREE(parameters);
+    STR_FREE(base_path);
+    
+    return result;
+}
+
+#define READ_ONE(JTYPE)                                                 \
+    /* std::cout << __FUNCTION__ << " ..." << std::endl; */             \
+    int result;                                                         \
+    JTYPE val;                                                          \
+    const char *str_var_name;                                           \
+    uint64_t read_size = sizeof(JTYPE);                                 \
+    str_var_name = env->GetStringUTFChars(var_name, NULL);              \
+    if (str_var_name == NULL) return -1;                                \
+    result = adios_read ((int64_t) fh, str_var_name, &val, sizeof(JTYPE)); \
+    env->ReleaseStringUTFChars(var_name, str_var_name);                 \
+    return val;
+
+#define FUNC_READ_ONE(FNAME, JTYPE)                                     \
+    JNIEXPORT JTYPE JNICALL FNAME                                       \
+    (JNIEnv * env, jclass cls, jlong fh, jstring var_name)              \
+    {                                                                   \
+        READ_ONE(JTYPE);                                                \
+    }
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_read_byte_value
+ * Signature: (JLjava/lang/String;)B
+ * Signature: (JLjava/lang/String;)I
+ * Signature: (JLjava/lang/String;)J
+ * Signature: (JLjava/lang/String;)F
+ * Signature: (JLjava/lang/String;)D
+ */
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1byte_1value,
+    jbyte);
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1int_1value,
+    jint);
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1long_1value,
+    jlong);
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1float_1value,
+    jfloat);
+
+FUNC_READ_ONE(
+    Java_gov_ornl_ccs_Adios_adios_1read_1double_1value,
+    jdouble);
+
+
+
+#define READ_ARRAY(JTYPE, CTYPE)                                        \
+    /* std::cout << __FUNCTION__ << " ..." << std::endl; */             \
+    int result;                                                         \
+    const char *str_var_name;                                           \
+    JTYPE *valarr = env->Get ##CTYPE ##ArrayElements(val, NULL);        \
+    uint64_t read_size = env->GetArrayLength(val) * sizeof(JTYPE);      \
+    str_var_name = env->GetStringUTFChars(var_name, NULL);              \
+    if (str_var_name == NULL) return -1;                                \
+    result = adios_read ((int64_t) fh, str_var_name, (void *) valarr, read_size); \
+    env->ReleaseStringUTFChars(var_name, str_var_name);                 \
+    env->Release ##CTYPE ##ArrayElements(val, valarr, 0);               \
+    return result;
+
+#define FUNC_READ_ARRAY(FNAME, JTYPE, CTYPE)                            \
+    JNIEXPORT jint JNICALL FNAME                                        \
+    (JNIEnv * env, jclass cls, jlong fh, jstring var_name, JTYPE ##Array val) \
+    {                                                                   \
+        READ_ARRAY(JTYPE, CTYPE);                                      \
+    }
+
+/*
+ * Class:     gov_ornl_ccs_Adios
+ * Method:    adios_read
+ * Signature: (JLjava/lang/String;[B)I
+ * Signature: (JLjava/lang/String;[I)I
+ * Signature: (JLjava/lang/String;[J)I
+ * Signature: (JLjava/lang/String;[F)I
+ * Signature: (JLjava/lang/String;[D)I
+ */
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3B,
+    jbyte,
+    Byte);
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3I,
+    jint,
+    Int);
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3J,
+    jlong,
+    Long);
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3F,
+    jfloat,
+    Float);
+
+FUNC_READ_ARRAY(
+    Java_gov_ornl_ccs_Adios_adios_1read__JLjava_lang_String_2_3D,
+    jdouble,
+    Double);
+
+
diff --git a/wrappers/java/gov_ornl_ccs_AdiosBufferAllocWhen.cxx b/wrappers/java/gov_ornl_ccs_AdiosBufferAllocWhen.cxx
new file mode 100644
index 0000000..e69de29
diff --git a/wrappers/java/gov_ornl_ccs_AdiosDatatype.cxx b/wrappers/java/gov_ornl_ccs_AdiosDatatype.cxx
new file mode 100644
index 0000000..e69de29
diff --git a/wrappers/java/gov_ornl_ccs_AdiosFile.cxx b/wrappers/java/gov_ornl_ccs_AdiosFile.cxx
new file mode 100644
index 0000000..5431c8b
--- /dev/null
+++ b/wrappers/java/gov_ornl_ccs_AdiosFile.cxx
@@ -0,0 +1,102 @@
+#include "gov_ornl_ccs_AdiosFile.h"
+
+#include <adios_read.h>
+
+/*
+ * Class:     gov_ornl_ccs_AdiosFile
+ * Method:    adios_fopen
+ * Signature: (Ljava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosFile_adios_1fopen
+(JNIEnv * env, jobject obj, jstring path, jlong comm)
+{
+    //std::cout << __FUNCTION__ << "..." << std::endl;
+
+    const char *str;
+    int result;
+    jboolean isCopy;
+    jclass cls;
+    jfieldID fid;
+
+    ADIOS_FILE* fp;
+
+    str = env->GetStringUTFChars(path, &isCopy);
+    if (str == NULL) return -1; /* OutOfMemoryError already thrown */
+
+    fp = adios_fopen(str, (MPI_Comm) comm);
+    env->ReleaseStringUTFChars(path, str);
+
+    cls = env->GetObjectClass(obj);
+    if (cls == NULL) {
+        return -1;
+    }
+
+    fid = env->GetFieldID(cls, "fp", "J");
+    env->SetLongField(obj, fid, (jlong)fp);
+    
+    fid = env->GetFieldID(cls, "fh", "J");
+    env->SetLongField(obj, fid, fp->fh);
+
+    fid = env->GetFieldID(cls, "groups_count", "I");
+    env->SetIntField(obj, fid, fp->groups_count);
+
+    fid = env->GetFieldID(cls, "vars_count", "I");
+    env->SetIntField(obj, fid, fp->vars_count);
+
+    fid = env->GetFieldID(cls, "attrs_count", "I");
+    env->SetIntField(obj, fid, fp->attrs_count);
+
+    fid = env->GetFieldID(cls, "tidx_start", "I");
+    env->SetIntField(obj, fid, fp->tidx_start);
+
+    fid = env->GetFieldID(cls, "ntimesteps", "I");
+    env->SetIntField(obj, fid, fp->ntimesteps);
+
+    fid = env->GetFieldID(cls, "version", "I");
+    env->SetIntField(obj, fid, fp->version);
+
+    fid = env->GetFieldID(cls, "file_size", "J");
+    env->SetIntField(obj, fid, fp->file_size);
+
+    fid = env->GetFieldID(cls, "endianness", "I");
+    env->SetIntField(obj, fid, fp->endianness);
+
+    jclass stringClass = env->FindClass("java/lang/String");
+    jobjectArray group_namelist = env->NewObjectArray(fp->groups_count, stringClass, NULL);
+
+    for (int i = 0; i < fp->groups_count; i++)
+    {
+        jstring group_name = env->NewStringUTF(fp->group_namelist[i]);
+        env->SetObjectArrayElement(group_namelist, i, group_name);
+    }
+
+    fid = env->GetFieldID(cls, "group_namelist", "[Ljava/lang/String;");    
+    env->SetObjectField(obj, fid, group_namelist);
+
+    return 0;
+}
+
+/*
+ * Class:     gov_ornl_ccs_AdiosFile
+ * Method:    adios_fclose
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosFile_adios_1fclose
+(JNIEnv * env, jobject obj)
+{
+    jclass cls;
+    jfieldID fid;
+    jlong fp;
+    jint result;
+
+    cls = env->GetObjectClass(obj);
+    fid = env->GetFieldID(cls, "fp", "J");
+    fp = env->GetLongField(obj, fid);
+
+    result = adios_fclose((ADIOS_FILE*)fp);
+
+    fid = env->GetFieldID(cls, "fp", "J");
+    env->SetLongField(obj, fid, 0);
+
+    return result;
+}
diff --git a/wrappers/java/gov_ornl_ccs_AdiosFlag.cxx b/wrappers/java/gov_ornl_ccs_AdiosFlag.cxx
new file mode 100644
index 0000000..e69de29
diff --git a/wrappers/java/gov_ornl_ccs_AdiosGroup.cxx b/wrappers/java/gov_ornl_ccs_AdiosGroup.cxx
new file mode 100644
index 0000000..284f713
--- /dev/null
+++ b/wrappers/java/gov_ornl_ccs_AdiosGroup.cxx
@@ -0,0 +1,97 @@
+#include "gov_ornl_ccs_AdiosGroup.h"
+
+#include <adios_read.h>
+
+/*
+ * Class:     gov_ornl_ccs_AdiosGroup
+ * Method:    adios_gopen
+ * Signature: (JLjava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosGroup_adios_1gopen
+(JNIEnv * env, jobject obj, jlong fp, jstring grpname)
+{
+    const char *str;
+    jboolean isCopy;
+    jclass cls;
+    jfieldID fid;
+
+    ADIOS_GROUP* gp;
+
+    str = env->GetStringUTFChars(grpname, &isCopy);
+    if (str == NULL) return -1; /* OutOfMemoryError already thrown */
+
+    gp = adios_gopen((ADIOS_FILE *)fp, str);
+
+    env->ReleaseStringUTFChars(grpname, str);
+    
+    cls = env->GetObjectClass(obj);
+    if (cls == NULL) {
+        return -1;
+    }
+
+    fid = env->GetFieldID(cls, "gp", "J");
+    env->SetLongField(obj, fid, (jlong)gp);
+
+    fid = env->GetFieldID(cls, "gh", "J");
+    env->SetLongField(obj, fid, gp->gh);
+
+    fid = env->GetFieldID(cls, "grpid", "I");
+    env->SetIntField(obj, fid, gp->grpid);
+
+    fid = env->GetFieldID(cls, "vars_count", "I");
+    env->SetIntField(obj, fid, gp->vars_count);
+
+    fid = env->GetFieldID(cls, "attrs_count", "I");
+    env->SetIntField(obj, fid, gp->attrs_count);
+
+    
+    jclass stringClass = env->FindClass("java/lang/String");
+
+    jobjectArray var_namelist = env->NewObjectArray(gp->vars_count, stringClass, NULL);
+
+    for (int i = 0; i < gp->vars_count; i++)
+    {
+        jstring var_name = env->NewStringUTF(gp->var_namelist[i]);
+        env->SetObjectArrayElement(var_namelist, i, var_name);
+    }
+
+    fid = env->GetFieldID(cls, "var_namelist", "[Ljava/lang/String;");    
+    env->SetObjectField(obj, fid, var_namelist);
+
+    jobjectArray attr_namelist = env->NewObjectArray(gp->attrs_count, stringClass, NULL);
+
+    for (int i = 0; i < gp->attrs_count; i++)
+    {
+        jstring attr_name = env->NewStringUTF(gp->attr_namelist[i]);
+        env->SetObjectArrayElement(attr_namelist, i, attr_name);
+    }
+
+    fid = env->GetFieldID(cls, "attr_namelist", "[Ljava/lang/String;");    
+    env->SetObjectField(obj, fid, attr_namelist);
+
+    return 0;
+}
+
+/*
+ * Class:     gov_ornl_ccs_AdiosGroup
+ * Method:    adios_gclose
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosGroup_adios_1gclose
+(JNIEnv * env, jobject obj)
+{
+    jclass cls;
+    jfieldID fid;
+    jlong gp;
+    jint result;
+
+    cls = env->GetObjectClass(obj);
+    fid = env->GetFieldID(cls, "gp", "J");
+    gp = env->GetLongField(obj, fid);
+
+    result = adios_gclose((ADIOS_GROUP*)gp);
+
+    env->SetLongField(obj, fid, 0);
+
+    return result;
+}
diff --git a/wrappers/java/gov_ornl_ccs_AdiosVarinfo.cxx b/wrappers/java/gov_ornl_ccs_AdiosVarinfo.cxx
new file mode 100644
index 0000000..1af4c71
--- /dev/null
+++ b/wrappers/java/gov_ornl_ccs_AdiosVarinfo.cxx
@@ -0,0 +1,175 @@
+#include "gov_ornl_ccs_AdiosVarinfo.h"
+
+#include <adios_read.h>
+#include <iostream>
+
+/*
+ * Class:     gov_ornl_ccs_AdiosVarinfo
+ * Method:    adios_inq_var
+ * Signature: (JJLjava/lang/String;)I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosVarinfo_adios_1inq_1var
+(JNIEnv * env, jobject obj, jlong gp, jstring varname)
+{
+    const char *str;
+    jboolean isCopy;
+    jclass cls;
+    jfieldID fid;
+
+    ADIOS_VARINFO* vp;
+
+    str = env->GetStringUTFChars(varname, &isCopy);
+    if (str == NULL) return -1; /* OutOfMemoryError already thrown */
+
+    vp = adios_inq_var((ADIOS_GROUP *)gp, str);
+    env->ReleaseStringUTFChars(varname, str);
+    
+    cls = env->GetObjectClass(obj);
+    if (cls == NULL) {
+        return -1;
+    }
+
+    fid = env->GetFieldID(cls, "vp", "J");
+    env->SetLongField(obj, fid, (jlong)vp);
+
+    fid = env->GetFieldID(cls, "grpid", "I");
+    env->SetIntField(obj, fid, vp->grpid);
+
+    fid = env->GetFieldID(cls, "varid", "I");
+    env->SetIntField(obj, fid, vp->varid);
+
+    fid = env->GetFieldID(cls, "type", "I");
+    env->SetIntField(obj, fid, vp->type);
+
+    fid = env->GetFieldID(cls, "ndim", "I");
+    env->SetIntField(obj, fid, vp->ndim);
+
+    fid = env->GetFieldID(cls, "timedim", "I");
+    env->SetIntField(obj, fid, vp->timedim);
+
+    jlongArray dims = env->NewLongArray(vp->ndim);
+    env->SetLongArrayRegion(dims, 0, vp->ndim, (jlong *) vp->dims);    
+
+    fid = env->GetFieldID(cls, "dims", "[J");
+    env->SetObjectField(obj, fid, dims);
+
+    if (vp->ndim == 0) {
+        int size = adios_type_size(vp->type, NULL);
+        jbyteArray value = env->NewByteArray(size);
+        env->SetByteArrayRegion(value, 0, size, (jbyte *) vp->value);
+
+        fid = env->GetFieldID(cls, "value", "[B");
+        env->SetObjectField(obj, fid, value);
+    } 
+
+    return 0;
+}
+
+/*
+ * Class:     gov_ornl_ccs_AdiosVarinfo
+ * Method:    adios_free_varinfo
+ * Signature: ()I
+ */
+JNIEXPORT jint JNICALL Java_gov_ornl_ccs_AdiosVarinfo_adios_1free_1varinfo
+(JNIEnv * env, jobject obj)
+{
+    jclass cls;
+    jfieldID fid;
+    jlong vp;
+
+    cls = env->GetObjectClass(obj);
+    fid = env->GetFieldID(cls, "vp", "J");
+    vp = env->GetLongField(obj, fid);
+
+    adios_free_varinfo((ADIOS_VARINFO*)vp);
+
+    env->SetLongField(obj, fid, 0);
+
+    return 0;
+}
+
+/*
+ * Class:     gov_ornl_ccs_AdiosVarinfo
+ * Method:    adios_read_var_byid
+ * Signature: (JI[J[J)[D
+ */
+JNIEXPORT jdoubleArray JNICALL Java_gov_ornl_ccs_AdiosVarinfo_adios_1read_1var_1byid
+(JNIEnv * env, jobject obj, jlong gp, jint varid, jlongArray start, jlongArray count)
+{
+    jint len = env->GetArrayLength(count);
+
+    if (len != env->GetArrayLength(start))
+        return NULL;
+
+    jlong *startarr = env->GetLongArrayElements(start, NULL);
+    jlong *countarr = env->GetLongArrayElements(count, NULL);
+
+    jlong ncount = 1;
+    for (jint i = 0; i < len; i++)
+        ncount *= countarr[i];
+
+    jdoubleArray result = env->NewDoubleArray(ncount);
+    jdouble *data = env->GetDoubleArrayElements(result, NULL);
+
+    int64_t nbytes = adios_read_var_byid((ADIOS_GROUP*)gp, (int) varid, (uint64_t *)startarr, (uint64_t *)countarr, (void *)data);
+
+    env->ReleaseLongArrayElements(start, startarr, 0);
+    env->ReleaseLongArrayElements(count, countarr, 0);
+    env->ReleaseDoubleArrayElements(result, data, 0);
+
+    return result;
+}
+
+#define READ_ARRAY(JTYPE, CTYPE)                                        \
+    /* std::cout << __FUNCTION__ << "..." << std::endl; */              \
+    int result;                                                         \
+    jint len = env->GetArrayLength(count);                              \
+    if (len != env->GetArrayLength(start))  return 0;                   \
+    jlong *startarr = env->GetLongArrayElements(start, NULL);           \
+    jlong *countarr = env->GetLongArrayElements(count, NULL);           \
+    jlong ncount = 1;                                                   \
+    for (jint i = 0; i < len; i++) ncount *= countarr[i];               \
+    JTYPE *data = env->Get ##CTYPE ##ArrayElements(val, NULL);          \
+    result = adios_read_var_byid((ADIOS_GROUP*)gp, (int) varid, (uint64_t *)startarr, (uint64_t *)countarr, (void *)data); \
+    env->ReleaseLongArrayElements(start, startarr, 0);                  \
+    env->ReleaseLongArrayElements(count, countarr, 0);                  \
+    env->Release ##CTYPE ##ArrayElements(val, data, 0);                 \
+    return result;
+
+#define FUNC_READ_ARRAY(FNAME, JTYPE, CTYPE)                            \
+    JNIEXPORT jint JNICALL FNAME                                        \
+    (JNIEnv * env, jobject obj, jlong gp, jint varid, jlongArray start, jlongArray count, JTYPE ##Array val) \
+    {                                                                   \
+        READ_ARRAY(JTYPE, CTYPE);                                       \
+    }
+
+/*
+ * Class:     gov_ornl_ccs_AdiosVarinfo
+ * Method:    adios_read
+ * Signature: (JI[J[J[B)I
+ */
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3B,
+    jbyte,
+    Byte)
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3I,
+    jint,
+    Int)
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3J,
+    jlong,
+    Long)
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3F,
+    jfloat,
+    Float)
+
+FUNC_READ_ARRAY (
+    Java_gov_ornl_ccs_AdiosVarinfo_adios_1read__JI_3J_3J_3D,
+    jdouble,
+    Double)
diff --git a/wrappers/java/test/.svn/all-wcprops b/wrappers/java/test/.svn/all-wcprops
new file mode 100644
index 0000000..da1c7f0
--- /dev/null
+++ b/wrappers/java/test/.svn/all-wcprops
@@ -0,0 +1,29 @@
+K 25
+svn:wc:ra_dav:version-url
+V 54
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/test
+END
+AdiosTest.java
+K 25
+svn:wc:ra_dav:version-url
+V 69
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/test/AdiosTest.java
+END
+test1.sh
+K 25
+svn:wc:ra_dav:version-url
+V 63
+/svn-ewok/ADIOS/!svn/ver/1988/trunk/wrappers/java/test/test1.sh
+END
+test2.sh
+K 25
+svn:wc:ra_dav:version-url
+V 63
+/svn-ewok/ADIOS/!svn/ver/1904/trunk/wrappers/java/test/test2.sh
+END
+AdiosNoxmlTest.java
+K 25
+svn:wc:ra_dav:version-url
+V 74
+/svn-ewok/ADIOS/!svn/ver/1818/trunk/wrappers/java/test/AdiosNoxmlTest.java
+END
diff --git a/wrappers/java/test/.svn/entries b/wrappers/java/test/.svn/entries
new file mode 100644
index 0000000..4a221ea
--- /dev/null
+++ b/wrappers/java/test/.svn/entries
@@ -0,0 +1,171 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/java/test
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+AdiosTest.java
+file
+
+
+
+
+2012-08-27T21:26:06.881003Z
+1ca8d412976a891fea39fae7b2f7774b
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3447
+

+test1.sh
+file
+
+
+
+
+2012-08-27T21:26:06.887003Z
+85fe96f9e1e319ff4d10134e72d9439d
+2012-08-24T20:38:58.492553Z
+1988
+jyc
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1127
+

+test2.sh
+file
+
+
+
+
+2012-07-18T17:27:57.926903Z
+486e4b330f6bc4283831fa24da65cf50
+2012-07-16T18:03:02.225950Z
+1904
+jyc
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+311
+

+AdiosNoxmlTest.java
+file
+
+
+
+
+2012-07-09T22:53:06.630614Z
+2cb5eaaed48d348ab3ad44bc96575b46
+2012-07-09T20:01:29.504650Z
+1818
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1995
+

diff --git a/wrappers/java/test/.svn/format b/wrappers/java/test/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/java/test/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/java/test/.svn/prop-base/test1.sh.svn-base b/wrappers/java/test/.svn/prop-base/test1.sh.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/wrappers/java/test/.svn/prop-base/test1.sh.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/wrappers/java/test/.svn/prop-base/test2.sh.svn-base b/wrappers/java/test/.svn/prop-base/test2.sh.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/wrappers/java/test/.svn/prop-base/test2.sh.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/wrappers/java/test/.svn/text-base/AdiosNoxmlTest.java.svn-base b/wrappers/java/test/.svn/text-base/AdiosNoxmlTest.java.svn-base
new file mode 100644
index 0000000..41c871f
--- /dev/null
+++ b/wrappers/java/test/.svn/text-base/AdiosNoxmlTest.java.svn-base
@@ -0,0 +1,57 @@
+import gov.ornl.ccs.*;
+
+import java.nio.ByteBuffer;
+
+public class AdiosNoxmlTest
+{
+    // The main program
+    public static void main(String[] args)
+    {
+        System.out.println(">>> AdiosJava Noxml Test Drive");
+        
+        System.out.println(">>> ADIOS NOXML API ... ");
+        Adios.MPI_Init(new String[0]);
+        long comm = Adios.MPI_COMM_WORLD();
+        int rank = Adios.MPI_Comm_rank(comm);
+        int size = Adios.MPI_Comm_size(comm);
+        System.out.println("[DEBUG] MPI rank/size = " + rank + " / " + size);
+        System.out.println("[DEBUG] MPI &comm     = " + comm);
+
+        Adios.Init_Noxml();
+        Adios.AllocateBuffer(AdiosBufferAllocWhen.NOW, 10);
+
+        long group_id = Adios.DeclareGroup("restart", "iter", AdiosFlag.YES);
+        Adios.SelectMethod(group_id, "MPI", "", "");
+        Adios.DefineVar(group_id, "NX", "", AdiosDatatype.INTEGER, "", "", "");
+        Adios.DefineVar(group_id, "G", "", AdiosDatatype.INTEGER, "", "", "");
+        Adios.DefineVar(group_id, "O", "", AdiosDatatype.INTEGER, "", "", "");
+        Adios.DefineVar(group_id, "temperature", "", AdiosDatatype.DOUBLE, "NX", "G", "O");
+
+        System.out.println(">>> ADIOS Write API ... ");
+        long adios_handle = Adios.Open ("restart", "adios_noxml.bp", "w", comm);
+
+        int NX = 10; 
+        int G = NX * size;
+        int O = NX * rank;
+
+        double[] t = new double[NX];
+        for (int i = 0; i < NX; i++) {
+            t[i] = rank * NX + (double) i;
+        }
+
+        long groupsize = 4 + 4 + 4 + 8 * (1) * (NX);
+        
+        long adios_totalsize = Adios.SetGroupSize(adios_handle, groupsize);
+        
+        Adios.Write (adios_handle, "NX", NX);
+        Adios.Write (adios_handle, "G", G);
+        Adios.Write (adios_handle, "O", O);
+        Adios.Write (adios_handle, "temperature", t);
+        Adios.Close (adios_handle);
+        
+        Adios.Finalize (rank);        
+        Adios.MPI_Finalize();
+
+        System.out.println(">>> Done.");
+    }
+}
diff --git a/wrappers/java/test/.svn/text-base/AdiosTest.java.svn-base b/wrappers/java/test/.svn/text-base/AdiosTest.java.svn-base
new file mode 100644
index 0000000..c1b9ce0
--- /dev/null
+++ b/wrappers/java/test/.svn/text-base/AdiosTest.java.svn-base
@@ -0,0 +1,106 @@
+import gov.ornl.ccs.Adios;
+import gov.ornl.ccs.AdiosFile;
+import gov.ornl.ccs.AdiosGroup;
+import gov.ornl.ccs.AdiosVarinfo;
+import java.nio.ByteBuffer;
+
+public class AdiosTest
+{
+    // The main program
+    public static void main(String[] args)
+    {
+        System.out.println(">>> AdiosJava Test Drive");
+        System.out.println(">>> ADIOS Write API ... ");
+        
+        Adios.MPI_Init(new String[0]);
+        long comm = Adios.MPI_COMM_WORLD();
+        int rank = Adios.MPI_Comm_rank(comm);
+        int size = Adios.MPI_Comm_size(comm);
+        System.out.println("MPI rank/size = " + rank + " / " + size);
+        System.out.println("MPI &comm     = " + comm);
+
+        Adios.Init("config.xml");
+        long adios_handle = Adios.Open ("temperature", "adios_global.bp", "w", comm);
+        
+        int      NX = 10; 
+        double[] t = new double[NX];
+        for (int i = 0; i < NX; i++) {
+            t[i] = (double) i;
+        }
+
+        byte[] b = new byte[NX];
+        for (int i = 0; i < NX; i++) {
+            b[i] = (byte) (i + 65); // ASCII code
+        }
+
+        long groupsize = 4 + 4 + 4 + 2 * 8 * (1) * (NX);
+
+        
+        long adios_totalsize = Adios.SetGroupSize(adios_handle, groupsize);
+
+        //adios_handle = Adios.OpenAndSetGroupSize("temperature", "adios_global.bp", "w", groupsize, comm);
+
+        Adios.Write (adios_handle, "NX", NX);
+        Adios.Write (adios_handle, "size", size);
+        Adios.Write (adios_handle, "rank", rank);
+        Adios.Write (adios_handle, "temperature", t);
+        Adios.Write (adios_handle, "ascii", b);
+
+        Adios.Close (adios_handle);
+        Adios.Finalize (rank);
+        
+        System.out.println(">>> ADIOS Read API ... ");
+
+        System.out.println(">>> AdiosFile.open ... ");
+        AdiosFile file = new AdiosFile();
+        file.open("adios_global.bp", comm);
+        
+        System.out.println(">>> AdiosGroup.open ... ");
+        AdiosGroup group = new AdiosGroup(file);
+        group.open("temperature");
+
+        System.out.println(">>> AdiosVarinfo.inq ... ");
+        AdiosVarinfo var = new AdiosVarinfo(group);
+        var.inq("temperature");
+
+        long[] start = {0, 0};
+        long[] count = {1, NX};
+        System.out.println(">>> AdiosVarinfo.read ... ");
+        double[] output = new double[NX];
+        var.read(start, count, output);
+
+        System.out.println("temperature.length = " + output.length);
+        for (int i = 0; i < output.length; i++) {
+            System.out.println("temperature[" + i + "] = " + output[i]);
+        }
+
+        System.out.println(">>> AdiosVarinfo.inq ... ");
+        AdiosVarinfo var2 = new AdiosVarinfo(group);
+        var2.inq("NX");
+        System.out.println("NX = " + var2.readIntValue());
+
+
+        System.out.println(">>> AdiosVarinfo.inq ... ");
+        AdiosVarinfo var3 = new AdiosVarinfo(group);
+        var3.inq("ascii");
+        byte[] output3 = new byte[NX];
+        var3.read(start, count, output3);
+
+        System.out.println("ascii.length = " + output3.length);
+        for (int i = 0; i < output3.length; i++) {
+            System.out.println("ascii[" + i + "] = " + output3[i]);
+        }
+
+        var.close();
+        var2.close();
+        var3.close();
+        group.close();
+        file.close();
+
+        System.out.println();
+        System.out.println(file);
+        System.out.println(group);
+        System.out.println(var);
+        System.out.println(var2);
+    }
+}
diff --git a/examples/C/global-array/adios_global.xml b/wrappers/java/test/.svn/text-base/test1.sh.svn-base
similarity index 63%
copy from examples/C/global-array/adios_global.xml
copy to wrappers/java/test/.svn/text-base/test1.sh.svn-base
index bbf5a65..056ce16 100644
--- a/examples/C/global-array/adios_global.xml
+++ b/wrappers/java/test/.svn/text-base/test1.sh.svn-base
@@ -1,3 +1,19 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0` ADIOSJAR SRCDIR TARGET"
+}
+
+if [ $# -lt 3 ]  ; then
+    usage
+    exit 1
+fi
+
+ADIOSJAR=$1
+SRCDIR=$2
+TARGET=$3
+
+cat << EOF > config.xml
 <?xml version="1.0"?>
 <adios-config host-language="C">
     <adios-group name="temperature" coordination-communicator="comm" stats="On">
@@ -6,6 +22,7 @@
     <var name="rank" type="integer"/>
     <global-bounds dimensions="size,NX" offsets="rank,0">
        <var name="temperature" gwrite="t" type="double" dimensions="1,NX"/>
+       <var name="ascii" gwrite="t" type="byte" dimensions="1,NX"/>
     </global-bounds>
     <attribute name="description" path="/temperature" value="Global array written from 'size' processes" type="string"/>
 </adios-group>
@@ -15,4 +32,9 @@
 <buffer size-MB="2" allocate-time="now"/>
 
 </adios-config>
+EOF
 
+rm -f adios_global.bp
+javac -classpath $ADIOSJAR -d . $SRCDIR/$TARGET.java
+java -Djava.library.path=. -classpath $ADIOSJAR:. $TARGET
+exit $?
diff --git a/wrappers/java/test/.svn/text-base/test2.sh.svn-base b/wrappers/java/test/.svn/text-base/test2.sh.svn-base
new file mode 100644
index 0000000..66b5d34
--- /dev/null
+++ b/wrappers/java/test/.svn/text-base/test2.sh.svn-base
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0` ADIOSJAR SRCDIR TARGET"
+}
+
+if [ $# -lt 3 ]  ; then
+    usage
+    exit 1
+fi
+
+ADIOSJAR=$1
+SRCDIR=$2
+TARGET=$3
+
+rm -f adios_noxml.bp
+javac -classpath $ADIOSJAR -d . $SRCDIR/$TARGET.java
+java -Djava.library.path=. -classpath $ADIOSJAR:. $TARGET
+exit $?
diff --git a/wrappers/java/test/AdiosNoxmlTest.java b/wrappers/java/test/AdiosNoxmlTest.java
new file mode 100644
index 0000000..41c871f
--- /dev/null
+++ b/wrappers/java/test/AdiosNoxmlTest.java
@@ -0,0 +1,57 @@
+import gov.ornl.ccs.*;
+
+import java.nio.ByteBuffer;
+
+public class AdiosNoxmlTest
+{
+    // The main program
+    public static void main(String[] args)
+    {
+        System.out.println(">>> AdiosJava Noxml Test Drive");
+        
+        System.out.println(">>> ADIOS NOXML API ... ");
+        Adios.MPI_Init(new String[0]);
+        long comm = Adios.MPI_COMM_WORLD();
+        int rank = Adios.MPI_Comm_rank(comm);
+        int size = Adios.MPI_Comm_size(comm);
+        System.out.println("[DEBUG] MPI rank/size = " + rank + " / " + size);
+        System.out.println("[DEBUG] MPI &comm     = " + comm);
+
+        Adios.Init_Noxml();
+        Adios.AllocateBuffer(AdiosBufferAllocWhen.NOW, 10);
+
+        long group_id = Adios.DeclareGroup("restart", "iter", AdiosFlag.YES);
+        Adios.SelectMethod(group_id, "MPI", "", "");
+        Adios.DefineVar(group_id, "NX", "", AdiosDatatype.INTEGER, "", "", "");
+        Adios.DefineVar(group_id, "G", "", AdiosDatatype.INTEGER, "", "", "");
+        Adios.DefineVar(group_id, "O", "", AdiosDatatype.INTEGER, "", "", "");
+        Adios.DefineVar(group_id, "temperature", "", AdiosDatatype.DOUBLE, "NX", "G", "O");
+
+        System.out.println(">>> ADIOS Write API ... ");
+        long adios_handle = Adios.Open ("restart", "adios_noxml.bp", "w", comm);
+
+        int NX = 10; 
+        int G = NX * size;
+        int O = NX * rank;
+
+        double[] t = new double[NX];
+        for (int i = 0; i < NX; i++) {
+            t[i] = rank * NX + (double) i;
+        }
+
+        long groupsize = 4 + 4 + 4 + 8 * (1) * (NX);
+        
+        long adios_totalsize = Adios.SetGroupSize(adios_handle, groupsize);
+        
+        Adios.Write (adios_handle, "NX", NX);
+        Adios.Write (adios_handle, "G", G);
+        Adios.Write (adios_handle, "O", O);
+        Adios.Write (adios_handle, "temperature", t);
+        Adios.Close (adios_handle);
+        
+        Adios.Finalize (rank);        
+        Adios.MPI_Finalize();
+
+        System.out.println(">>> Done.");
+    }
+}
diff --git a/wrappers/java/test/AdiosTest.java b/wrappers/java/test/AdiosTest.java
new file mode 100644
index 0000000..c1b9ce0
--- /dev/null
+++ b/wrappers/java/test/AdiosTest.java
@@ -0,0 +1,106 @@
+import gov.ornl.ccs.Adios;
+import gov.ornl.ccs.AdiosFile;
+import gov.ornl.ccs.AdiosGroup;
+import gov.ornl.ccs.AdiosVarinfo;
+import java.nio.ByteBuffer;
+
+public class AdiosTest
+{
+    // The main program
+    public static void main(String[] args)
+    {
+        System.out.println(">>> AdiosJava Test Drive");
+        System.out.println(">>> ADIOS Write API ... ");
+        
+        Adios.MPI_Init(new String[0]);
+        long comm = Adios.MPI_COMM_WORLD();
+        int rank = Adios.MPI_Comm_rank(comm);
+        int size = Adios.MPI_Comm_size(comm);
+        System.out.println("MPI rank/size = " + rank + " / " + size);
+        System.out.println("MPI &comm     = " + comm);
+
+        Adios.Init("config.xml");
+        long adios_handle = Adios.Open ("temperature", "adios_global.bp", "w", comm);
+        
+        int      NX = 10; 
+        double[] t = new double[NX];
+        for (int i = 0; i < NX; i++) {
+            t[i] = (double) i;
+        }
+
+        byte[] b = new byte[NX];
+        for (int i = 0; i < NX; i++) {
+            b[i] = (byte) (i + 65); // ASCII code
+        }
+
+        long groupsize = 4 + 4 + 4 + 2 * 8 * (1) * (NX);
+
+        
+        long adios_totalsize = Adios.SetGroupSize(adios_handle, groupsize);
+
+        //adios_handle = Adios.OpenAndSetGroupSize("temperature", "adios_global.bp", "w", groupsize, comm);
+
+        Adios.Write (adios_handle, "NX", NX);
+        Adios.Write (adios_handle, "size", size);
+        Adios.Write (adios_handle, "rank", rank);
+        Adios.Write (adios_handle, "temperature", t);
+        Adios.Write (adios_handle, "ascii", b);
+
+        Adios.Close (adios_handle);
+        Adios.Finalize (rank);
+        
+        System.out.println(">>> ADIOS Read API ... ");
+
+        System.out.println(">>> AdiosFile.open ... ");
+        AdiosFile file = new AdiosFile();
+        file.open("adios_global.bp", comm);
+        
+        System.out.println(">>> AdiosGroup.open ... ");
+        AdiosGroup group = new AdiosGroup(file);
+        group.open("temperature");
+
+        System.out.println(">>> AdiosVarinfo.inq ... ");
+        AdiosVarinfo var = new AdiosVarinfo(group);
+        var.inq("temperature");
+
+        long[] start = {0, 0};
+        long[] count = {1, NX};
+        System.out.println(">>> AdiosVarinfo.read ... ");
+        double[] output = new double[NX];
+        var.read(start, count, output);
+
+        System.out.println("temperature.length = " + output.length);
+        for (int i = 0; i < output.length; i++) {
+            System.out.println("temperature[" + i + "] = " + output[i]);
+        }
+
+        System.out.println(">>> AdiosVarinfo.inq ... ");
+        AdiosVarinfo var2 = new AdiosVarinfo(group);
+        var2.inq("NX");
+        System.out.println("NX = " + var2.readIntValue());
+
+
+        System.out.println(">>> AdiosVarinfo.inq ... ");
+        AdiosVarinfo var3 = new AdiosVarinfo(group);
+        var3.inq("ascii");
+        byte[] output3 = new byte[NX];
+        var3.read(start, count, output3);
+
+        System.out.println("ascii.length = " + output3.length);
+        for (int i = 0; i < output3.length; i++) {
+            System.out.println("ascii[" + i + "] = " + output3[i]);
+        }
+
+        var.close();
+        var2.close();
+        var3.close();
+        group.close();
+        file.close();
+
+        System.out.println();
+        System.out.println(file);
+        System.out.println(group);
+        System.out.println(var);
+        System.out.println(var2);
+    }
+}
diff --git a/examples/C/global-array/adios_global.xml b/wrappers/java/test/test1.sh
old mode 100644
new mode 100755
similarity index 63%
copy from examples/C/global-array/adios_global.xml
copy to wrappers/java/test/test1.sh
index bbf5a65..056ce16
--- a/examples/C/global-array/adios_global.xml
+++ b/wrappers/java/test/test1.sh
@@ -1,3 +1,19 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0` ADIOSJAR SRCDIR TARGET"
+}
+
+if [ $# -lt 3 ]  ; then
+    usage
+    exit 1
+fi
+
+ADIOSJAR=$1
+SRCDIR=$2
+TARGET=$3
+
+cat << EOF > config.xml
 <?xml version="1.0"?>
 <adios-config host-language="C">
     <adios-group name="temperature" coordination-communicator="comm" stats="On">
@@ -6,6 +22,7 @@
     <var name="rank" type="integer"/>
     <global-bounds dimensions="size,NX" offsets="rank,0">
        <var name="temperature" gwrite="t" type="double" dimensions="1,NX"/>
+       <var name="ascii" gwrite="t" type="byte" dimensions="1,NX"/>
     </global-bounds>
     <attribute name="description" path="/temperature" value="Global array written from 'size' processes" type="string"/>
 </adios-group>
@@ -15,4 +32,9 @@
 <buffer size-MB="2" allocate-time="now"/>
 
 </adios-config>
+EOF
 
+rm -f adios_global.bp
+javac -classpath $ADIOSJAR -d . $SRCDIR/$TARGET.java
+java -Djava.library.path=. -classpath $ADIOSJAR:. $TARGET
+exit $?
diff --git a/wrappers/java/test/test2.sh b/wrappers/java/test/test2.sh
new file mode 100755
index 0000000..66b5d34
--- /dev/null
+++ b/wrappers/java/test/test2.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0` ADIOSJAR SRCDIR TARGET"
+}
+
+if [ $# -lt 3 ]  ; then
+    usage
+    exit 1
+fi
+
+ADIOSJAR=$1
+SRCDIR=$2
+TARGET=$3
+
+rm -f adios_noxml.bp
+javac -classpath $ADIOSJAR -d . $SRCDIR/$TARGET.java
+java -Djava.library.path=. -classpath $ADIOSJAR:. $TARGET
+exit $?
diff --git a/wrappers/matlab/.svn/all-wcprops b/wrappers/matlab/.svn/all-wcprops
new file mode 100644
index 0000000..491b157
--- /dev/null
+++ b/wrappers/matlab/.svn/all-wcprops
@@ -0,0 +1,11 @@
+K 25
+svn:wc:ra_dav:version-url
+V 51
+/svn-ewok/ADIOS/!svn/ver/1902/trunk/wrappers/matlab
+END
+Makefile
+K 25
+svn:wc:ra_dav:version-url
+V 60
+/svn-ewok/ADIOS/!svn/ver/1902/trunk/wrappers/matlab/Makefile
+END
diff --git a/wrappers/matlab/.svn/entries b/wrappers/matlab/.svn/entries
new file mode 100644
index 0000000..bfa03a9
--- /dev/null
+++ b/wrappers/matlab/.svn/entries
@@ -0,0 +1,307 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/matlab
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-13T15:34:31.777172Z
+1902
+pnorbert
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+adiosreadc.c
+file
+
+
+
+
+2012-07-02T16:20:11.425313Z
+3ea16f644e9e2d15091440b9bcd135a4
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+16249
+

+adiosclose.m
+file
+
+
+
+
+2012-07-02T16:20:11.428316Z
+d09f2e35d0a9ca36fa21226983d05530
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+4055
+

+adiosopenc.c
+file
+
+
+
+
+2012-07-02T16:20:11.447313Z
+01042afd43dcf3efe22cbc7540779a7c
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+17757
+

+adiosread.m
+file
+
+
+
+
+2012-07-02T16:20:11.451313Z
+3440ca1d78651ccec3cedc7186b09781
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+8764
+

+adiosclosec.c
+file
+
+
+
+
+2012-07-02T16:20:11.454319Z
+2ffa73b2cc43d2fd1f94e0a5bdc3b863
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3975
+

+adios.m
+file
+
+
+
+
+2012-07-02T16:20:11.458313Z
+2579aedcd70023671f05badbb19f018a
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2668
+

+adiosopen.m
+file
+
+
+
+
+2012-07-02T16:20:11.462313Z
+745eec5b35cda4d851c2a249cd793692
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+5385
+

+Makefile
+file
+
+
+
+
+2012-07-13T15:33:36.130699Z
+aff0d2289af40e16e42f88512e0beaf9
+2012-07-13T15:34:31.777172Z
+1902
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1055
+

diff --git a/wrappers/matlab/.svn/format b/wrappers/matlab/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/matlab/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/matlab/.svn/text-base/Makefile.svn-base b/wrappers/matlab/.svn/text-base/Makefile.svn-base
new file mode 100644
index 0000000..95a983d
--- /dev/null
+++ b/wrappers/matlab/.svn/text-base/Makefile.svn-base
@@ -0,0 +1,30 @@
+include ../../adios_config.flags
+
+MEXOPTS=-g -DDEBUG
+default:
+	@echo "ADIOS reader methods for MATLAB"
+	@echo "Have 'mex' compiler in the path and run"
+	@echo "> make matlab"
+
+
+matlab: adiosopenc adiosclosec adiosreadc
+
+adiosopenc:  
+	mex adiosopenc.c ${MEXOPTS} -D_NOMPI  -DADIOS_USE_READ_API_1 -I. -I../../src/public -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
+
+adiosreadc: 
+	mex adiosreadc.c ${MEXOPTS} -D_NOMPI -DADIOS_USE_READ_API_1 -I. -I../../src/public -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
+
+adiosclosec:
+	mex adiosclosec.c ${MEXOPTS} -D_NOMPI -DADIOS_USE_READ_API_1 -I. -I../../src/public -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
+
+#adiosdbgc:
+#	mex adiosdbgc.c ${MEXOPTS} -D_NOMPI -I. -I../../src/public -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
+
+clean:
+	rm -f *.mexa64 core* *.o 
+
+install:
+	@echo "Install *.m and *.mexa64 into MATLABPATH"
+	@echo "Do not have 'adios' anywhere in the path where you install the files"
+	@echo "otherwise 'help adios' will not work in Matlab"
diff --git a/tools/matlab/adios.m b/wrappers/matlab/.svn/text-base/adios.m.svn-base
similarity index 100%
copy from tools/matlab/adios.m
copy to wrappers/matlab/.svn/text-base/adios.m.svn-base
diff --git a/tools/matlab/adiosclose.m b/wrappers/matlab/.svn/text-base/adiosclose.m.svn-base
similarity index 100%
copy from tools/matlab/adiosclose.m
copy to wrappers/matlab/.svn/text-base/adiosclose.m.svn-base
diff --git a/tools/matlab/adiosclosec.c b/wrappers/matlab/.svn/text-base/adiosclosec.c.svn-base
similarity index 100%
copy from tools/matlab/adiosclosec.c
copy to wrappers/matlab/.svn/text-base/adiosclosec.c.svn-base
diff --git a/tools/matlab/adiosopen.m b/wrappers/matlab/.svn/text-base/adiosopen.m.svn-base
similarity index 100%
copy from tools/matlab/adiosopen.m
copy to wrappers/matlab/.svn/text-base/adiosopen.m.svn-base
diff --git a/tools/matlab/adiosopenc.c b/wrappers/matlab/.svn/text-base/adiosopenc.c.svn-base
similarity index 100%
copy from tools/matlab/adiosopenc.c
copy to wrappers/matlab/.svn/text-base/adiosopenc.c.svn-base
diff --git a/tools/matlab/adiosread.m b/wrappers/matlab/.svn/text-base/adiosread.m.svn-base
similarity index 100%
copy from tools/matlab/adiosread.m
copy to wrappers/matlab/.svn/text-base/adiosread.m.svn-base
diff --git a/tools/matlab/adiosreadc.c b/wrappers/matlab/.svn/text-base/adiosreadc.c.svn-base
similarity index 100%
copy from tools/matlab/adiosreadc.c
copy to wrappers/matlab/.svn/text-base/adiosreadc.c.svn-base
diff --git a/wrappers/matlab/Makefile b/wrappers/matlab/Makefile
new file mode 100644
index 0000000..95a983d
--- /dev/null
+++ b/wrappers/matlab/Makefile
@@ -0,0 +1,30 @@
+include ../../adios_config.flags
+
+MEXOPTS=-g -DDEBUG
+default:
+	@echo "ADIOS reader methods for MATLAB"
+	@echo "Have 'mex' compiler in the path and run"
+	@echo "> make matlab"
+
+
+matlab: adiosopenc adiosclosec adiosreadc
+
+adiosopenc:  
+	mex adiosopenc.c ${MEXOPTS} -D_NOMPI  -DADIOS_USE_READ_API_1 -I. -I../../src/public -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
+
+adiosreadc: 
+	mex adiosreadc.c ${MEXOPTS} -D_NOMPI -DADIOS_USE_READ_API_1 -I. -I../../src/public -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
+
+adiosclosec:
+	mex adiosclosec.c ${MEXOPTS} -D_NOMPI -DADIOS_USE_READ_API_1 -I. -I../../src/public -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
+
+#adiosdbgc:
+#	mex adiosdbgc.c ${MEXOPTS} -D_NOMPI -I. -I../../src/public -L. -L../../src ${ADIOSREAD_SEQ_INC} ${ADIOSREAD_SEQ_CLIB}
+
+clean:
+	rm -f *.mexa64 core* *.o 
+
+install:
+	@echo "Install *.m and *.mexa64 into MATLABPATH"
+	@echo "Do not have 'adios' anywhere in the path where you install the files"
+	@echo "otherwise 'help adios' will not work in Matlab"
diff --git a/tools/matlab/adios.m b/wrappers/matlab/adios.m
similarity index 100%
rename from tools/matlab/adios.m
rename to wrappers/matlab/adios.m
diff --git a/tools/matlab/adiosclose.m b/wrappers/matlab/adiosclose.m
similarity index 100%
rename from tools/matlab/adiosclose.m
rename to wrappers/matlab/adiosclose.m
diff --git a/tools/matlab/adiosclosec.c b/wrappers/matlab/adiosclosec.c
similarity index 100%
rename from tools/matlab/adiosclosec.c
rename to wrappers/matlab/adiosclosec.c
diff --git a/tools/matlab/adiosopen.m b/wrappers/matlab/adiosopen.m
similarity index 100%
rename from tools/matlab/adiosopen.m
rename to wrappers/matlab/adiosopen.m
diff --git a/tools/matlab/adiosopenc.c b/wrappers/matlab/adiosopenc.c
similarity index 100%
rename from tools/matlab/adiosopenc.c
rename to wrappers/matlab/adiosopenc.c
diff --git a/tools/matlab/adiosread.m b/wrappers/matlab/adiosread.m
similarity index 100%
rename from tools/matlab/adiosread.m
rename to wrappers/matlab/adiosread.m
diff --git a/tools/matlab/adiosreadc.c b/wrappers/matlab/adiosreadc.c
similarity index 100%
rename from tools/matlab/adiosreadc.c
rename to wrappers/matlab/adiosreadc.c
diff --git a/wrappers/numpy/.svn/all-wcprops b/wrappers/numpy/.svn/all-wcprops
new file mode 100644
index 0000000..1ecdf34
--- /dev/null
+++ b/wrappers/numpy/.svn/all-wcprops
@@ -0,0 +1,17 @@
+K 25
+svn:wc:ra_dav:version-url
+V 50
+/svn-ewok/ADIOS/!svn/ver/1863/trunk/wrappers/numpy
+END
+CMakeLists.txt
+K 25
+svn:wc:ra_dav:version-url
+V 65
+/svn-ewok/ADIOS/!svn/ver/1754/trunk/wrappers/numpy/CMakeLists.txt
+END
+adios.pyx
+K 25
+svn:wc:ra_dav:version-url
+V 60
+/svn-ewok/ADIOS/!svn/ver/1863/trunk/wrappers/numpy/adios.pyx
+END
diff --git a/wrappers/numpy/.svn/entries b/wrappers/numpy/.svn/entries
new file mode 100644
index 0000000..87d81c3
--- /dev/null
+++ b/wrappers/numpy/.svn/entries
@@ -0,0 +1,146 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/numpy
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-11T18:43:46.979736Z
+1863
+jyc
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+test
+dir
+

+Modules
+dir
+

+example
+dir
+

+CMakeLists.txt
+file
+
+
+
+
+2012-07-03T20:21:38.816346Z
+33570f269f50487877b9050d7b2ee708
+2012-07-03T18:27:58.466885Z
+1754
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1693
+

+README
+file
+
+
+
+
+2012-07-02T16:20:14.206072Z
+692410289fad3128eef47efd5960fda5
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+872
+

+adios.pyx
+file
+
+
+
+
+2012-07-11T21:22:26.342699Z
+4f3ea6cc7be26bddc7c35bf866985046
+2012-07-11T18:43:46.979736Z
+1863
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+18550
+

diff --git a/wrappers/numpy/.svn/format b/wrappers/numpy/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/numpy/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/numpy/.svn/text-base/CMakeLists.txt.svn-base b/wrappers/numpy/.svn/text-base/CMakeLists.txt.svn-base
new file mode 100644
index 0000000..26afa91
--- /dev/null
+++ b/wrappers/numpy/.svn/text-base/CMakeLists.txt.svn-base
@@ -0,0 +1,60 @@
+cmake_minimum_required (VERSION 2.8)
+set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules)
+include(${CMAKE_CURRENT_SOURCE_DIR}/Modules/CMakeUtilityFunctions.cmake)
+
+project (AdiosPython CXX)
+
+find_package (PythonLibs REQUIRED)
+include_directories (${PYTHON_INCLUDE_DIRS})
+##print(PYTHON_INCLUDE_DIRS)
+
+find_package (PythonInterp REQUIRED)
+find_package (Numpy REQUIRED)
+include_directories (${PYTHON_NUMPY_INCLUDE_DIR})
+find_package (MPI4Py REQUIRED)
+
+option (ADIOS_USE_MPI "Use parallel ADIOS" ON)
+
+find_package (ADIOS REQUIRED)
+add_definitions (${ADIOS_COMPILE_FLAGS})  
+add_definitions (-DADIOS_USE_READ_API_1)
+include_directories (${ADIOS_INCLUDE_PATH})
+
+find_package (MPI REQUIRED)
+include_directories (${MPI_CXX_INCLUDE_PATH})
+
+set (PSRCS
+  adios.pyx
+  )
+
+foreach (FILE ${PSRCS})
+  string (REGEX REPLACE ".pyx" ".cpp" OUTFILE ${FILE})
+
+  add_custom_command (
+    OUTPUT ${OUTFILE}
+    COMMAND cython -o ${CMAKE_CURRENT_BINARY_DIR}/${OUTFILE} -I${PYTHON_MPI4PY_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
+    DEPENDS ${FILE}
+    )
+  list (APPEND SRCS ${OUTFILE})
+endforeach ()
+
+add_library (adios MODULE
+  ${SRCS}
+  )
+
+target_link_libraries (adios
+  ${ADIOS_LIBRARIES}
+  ${PYTHON_LIBRARIES}
+  ${MPI_CXX_LIBRARIES}
+  )
+
+set_target_properties (adios
+  PROPERTIES OUTPUT_NAME adios
+  PREFIX ""
+  ##LINK_FLAGS "-undefined dynamic_lookup"
+  )
+
+ENABLE_TESTING()
+add_test (test_write ${CMAKE_CURRENT_SOURCE_DIR}/test/test_adios_write.sh ${CMAKE_CURRENT_SOURCE_DIR}/test)
+add_test (test_read ${CMAKE_CURRENT_SOURCE_DIR}/test/test_adios_read.sh ${CMAKE_CURRENT_SOURCE_DIR}/test)
+add_test (test_noxml ${CMAKE_CURRENT_SOURCE_DIR}/test/test_adios_noxml.sh ${CMAKE_CURRENT_SOURCE_DIR}/test)
diff --git a/wrappers/numpy/.svn/text-base/README.svn-base b/wrappers/numpy/.svn/text-base/README.svn-base
new file mode 100644
index 0000000..e745cb2
--- /dev/null
+++ b/wrappers/numpy/.svn/text-base/README.svn-base
@@ -0,0 +1,37 @@
+ADIOS Python/Numpy wrapper
+-----------------
+
+This directory contains the codes for the ADIOS python/numpy wrapper
+to to call the native ADIOS library. This module is built by Cython.
+
+
+== Build == 
+
+This program can be built with CMake (http://www.cmake.org/). You may
+want to a build directory and run cmake pointing the source directory
+containing CMakeLists.txt (this directory). For example, 
+
+$ mkdir build; cd build
+$ cmake /dir/to/source
+
+CMake will search installed ADIOS library and Python/Numpy. Once
+completed, type make to build:
+
+$ make
+Or, 
+$ make VERBOSE=1
+if you need verbose output.
+
+After successful building, you can see adios.so. This file can be
+loaded in Python.
+
+== Test == 
+
+This program contains a test program. To run testing after building,
+type the following command:
+
+$ make test
+
+If you need a verbose output, type the following
+
+$ ctest -V
diff --git a/wrappers/numpy/.svn/text-base/adios.pyx.svn-base b/wrappers/numpy/.svn/text-base/adios.pyx.svn-base
new file mode 100644
index 0000000..43c3dc5
--- /dev/null
+++ b/wrappers/numpy/.svn/text-base/adios.pyx.svn-base
@@ -0,0 +1,607 @@
+A"""
+ ADIOS is freely available under the terms of the BSD license described
+ in the COPYING file in the top level directory of this source distribution.
+
+ Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+"""
+
+import numpy as np
+cimport numpy as np
+
+import mpi4py.MPI as MPI 
+cimport mpi4py.MPI as MPI
+
+import cython
+cimport cython
+
+## ==========
+## ADIOS Exported Functions
+## ==========
+
+from libc.stdint cimport uint32_t, int64_t, uint64_t
+from libc.stdlib cimport malloc, free
+
+cdef extern from "adios_types.h":
+    ctypedef enum ADIOS_DATATYPES:
+        adios_unknown
+        adios_byte
+        adios_short
+        adios_integer
+        adios_long
+        adios_unsigned_byte
+        adios_unsigned_short
+        adios_unsigned_integer
+        adios_unsigned_long
+        adios_real
+        adios_double
+        adios_long_double
+        adios_string
+        adios_complex
+        adios_double_complex
+
+    ctypedef enum ADIOS_BUFFER_ALLOC_WHEN:
+        ADIOS_BUFFER_ALLOC_UNKNOWN
+        ADIOS_BUFFER_ALLOC_NOW
+        ADIOS_BUFFER_ALLOC_LATER
+
+    ctypedef enum ADIOS_FLAG:
+        pass
+
+cdef extern from "adios.h":
+    ctypedef char* const_char_ptr "const char*"
+    cdef int adios_init (char * config)
+    
+    cdef int adios_finalize (int mype)
+    
+    cdef int adios_open (int64_t * fd,
+                         char * group_name,
+                         char * name, 
+                         char * mode,
+                         void * comm)
+    
+    cdef int adios_group_size (int64_t fd_p,
+                               uint64_t data_size,
+                               uint64_t * total_size)
+    
+    cdef int adios_write (int64_t fd_p,
+                          char * name,
+                          void * var)
+    
+    cdef int adios_read (int64_t fd_p,
+                         char * name,
+                         void * buffer,
+                         uint64_t buffer_size)
+
+    cdef int adios_close(int64_t fd_p)
+    
+    cdef int adios_init_noxml ()
+    
+    cdef int adios_allocate_buffer (ADIOS_BUFFER_ALLOC_WHEN when,
+                                    uint64_t buffer_size)
+    
+    cdef int adios_declare_group (int64_t * id,
+                                  char * name,
+                                  char * time_index,
+                                  ADIOS_FLAG stats)
+    
+    cdef int adios_define_var (int64_t group_id,
+                               char * name,
+                               char * path,
+                               ADIOS_DATATYPES type,
+                               char * dimensions,
+                               char * global_dimensions,
+                               char * local_offsets)
+    
+    cdef int adios_define_attribute (int64_t group,
+                                     char * name,
+                                     char * path,
+                                     ADIOS_DATATYPES type,
+                                     char * value,
+                                     char * var)
+    
+    cdef int adios_select_method (int64_t group,
+                                  char * method,
+                                  char * parameters,
+                                  char * base_path)
+
+cdef extern from "adios_read.h":
+    ctypedef struct MPI_Comm:
+        pass
+
+    ctypedef struct ADIOS_FILE:
+        uint64_t fh
+        int      groups_count
+        int      vars_count
+        int      attrs_count
+        int      tidx_start
+        int      ntimesteps
+        int      version
+        uint64_t file_size
+        int      endianness
+        char     ** group_namelist
+        void     * internal_data
+
+    ctypedef struct ADIOS_GROUP:
+        uint64_t gh
+        int      grpid
+        int      vars_count
+        char     ** var_namelist
+        int      attrs_count
+        char     ** attr_namelist
+        ADIOS_FILE * fp
+        int      timestep
+        int      lasttimestep
+
+    ctypedef struct ADIOS_VARINFO:
+        int        grpid
+        int        varid
+        ADIOS_DATATYPES   type
+        int        ndim
+        uint64_t * dims
+        int        timedim
+        int        characteristics_count
+        void     * value
+        void     * gmin
+        void     * gmax
+        double   * gavg
+        double   * gstd_dev
+        void     ** mins
+        void     ** maxs
+        double   ** avgs
+        double   ** std_devs
+
+
+    cdef ADIOS_FILE * adios_fopen (char *, MPI_Comm)
+    cdef int adios_fclose (ADIOS_FILE *)
+
+    cdef ADIOS_GROUP * adios_gopen (ADIOS_FILE *, char *)
+    cdef ADIOS_GROUP * adios_gopen_byid (ADIOS_FILE *, int)
+    cdef int adios_gclose (ADIOS_GROUP *)
+
+    cdef ADIOS_VARINFO * adios_inq_var (ADIOS_GROUP *, char *)
+    cdef ADIOS_VARINFO * adios_inq_var_byid (ADIOS_GROUP *, int)
+    cdef void adios_free_varinfo(ADIOS_VARINFO *)
+    cdef int64_t adios_read_var_byid (ADIOS_GROUP *, int,
+                             uint64_t *, uint64_t *,
+                             void *)
+
+    cdef char * adios_errmsg()
+    cdef int adios_errno
+
+
+## ==========
+## ADIOS Enum
+## ==========
+
+class DATATYPE(object):
+    unknown = -1
+    byte = 0
+    short = 1
+    integer = 2
+    long = 4
+    unsigned_byte = 50
+    unsigned_short = 51
+    unsigned_integer = 52
+    unsigned_long = 54
+    real = 5
+    double = 6
+    long_double = 7
+    string = 9
+    complex = 10
+    double_complex = 11
+
+class FLAG(object):
+    UNKNOWN = 0
+    YES = 1
+    NO = 2
+    
+class BUFFER_ALLOC_WHEN(object):
+    UNKNOWN = 0
+    NOW = 1
+    LATER = 2
+    
+## ==========
+## ADIOS Write API
+## ==========
+
+cpdef init(char * config):
+    return adios_init(config)
+
+cpdef int64_t open(char * group_name,
+                   char * name,
+                   char * mode,
+                   MPI.Comm comm = MPI.COMM_WORLD):
+    cdef int64_t fd
+    cdef int result
+    result = adios_open(&fd, group_name, name, mode, &comm.ob_mpi)
+    return fd
+
+cpdef int64_t set_group_size(int64_t fd_p, uint64_t data_size):
+    cdef uint64_t total_size
+    cdef int result
+    result = adios_group_size(fd_p, data_size, &total_size)
+    return total_size
+
+cpdef int write (int64_t fd_p, char * name, np.ndarray val):
+    cdef np.ndarray val_
+    if val.flags.contiguous:
+        val_ = val
+    else:
+        val_ = np.array(val, copy=True)
+
+    return adios_write (fd_p, name, <void *> val_.data)
+
+cpdef int write_int (int64_t fd_p, char * name, int val):
+    return adios_write (fd_p, name, &val)
+
+cpdef int write_long (int64_t fd_p, char * name, long val):
+    return adios_write (fd_p, name, &val)
+
+cpdef int write_float (int64_t fd_p, char * name, float val):
+    return adios_write (fd_p, name, &val)
+
+cpdef int read(int64_t fd_p, char * name, np.ndarray val):
+    assert val.flags.contiguous, 'Only contiguous arrays are supported.'
+    print "Reading ... ", val.itemsize * val.size, "(bytes)"
+    return adios_read(fd_p, name, <void *> val.data, val.itemsize * val.size)
+
+cpdef int close(int64_t fd_p):
+    return adios_close(fd_p)
+
+cpdef finalize(int mype = 0):
+    return adios_finalize(mype)
+
+## ==========
+## ADIOS No-XML API
+## ==========
+cpdef int init_noxml():
+    return adios_init_noxml()
+
+cpdef int allocate_buffer(int when,
+                          uint64_t buffer_size):
+    return adios_allocate_buffer(<ADIOS_BUFFER_ALLOC_WHEN> when,
+                                 buffer_size)
+
+cpdef int64_t declare_group(char * name,
+                            char * time_index,
+                            int stats):
+    cdef int64_t id = 0
+    adios_declare_group (&id,
+                         name,
+                         time_index,
+                         <ADIOS_FLAG> stats)
+    return id
+
+cpdef int define_var(int64_t group_id,
+                     char * name,
+                     char * path,
+                     int type,
+                     char * dimensions,
+                     char * global_dimensions,
+                     char * local_offsets):
+    return adios_define_var(group_id,
+                            name, path,
+                            <ADIOS_DATATYPES> type,
+                            dimensions,
+                            global_dimensions,
+                            local_offsets)
+
+cpdef int define_attribute (int64_t group,
+                            char * name,
+                            char * path,
+                            int type,
+                            char * value,
+                            char * var):
+    return adios_define_attribute (group,
+                                   name,
+                                   path,
+                                   <ADIOS_DATATYPES> type,
+                                   value,
+                                   var)
+
+cpdef int select_method (int64_t group,
+                         char * method,
+                         char * parameters,
+                         char * base_path):
+    return adios_select_method (group,
+                                method,
+                                parameters,
+                                base_path)
+
+
+## ==========
+## ADIOS Read API
+## ==========
+
+cpdef type adios2nptype(ADIOS_DATATYPES t):
+    cdef type ntype = None
+    if t == adios_byte:
+        ntype = np.int8
+    elif t == adios_short:
+        ntype = np.int16
+    elif t == adios_integer:
+        ntype = np.int32
+    elif t == adios_long:
+        ntype = np.int64
+    elif t == adios_unsigned_byte:
+        ntype = np.uint8
+    elif t == adios_unsigned_short:
+        ntype = np.uint16
+    elif t == adios_unsigned_integer:
+        ntype = np.uint32
+    elif t == adios_unsigned_long:
+        ntype = np.uint64
+    elif t == adios_real:
+        ntype = np.float32
+    elif t == adios_double:
+        ntype = np.float64
+    elif t == adios_long_double:
+        ntype = np.float128
+    elif t == adios_complex:
+        ntype = np.complex64
+    elif t == adios_double_complex:
+        ntype = np.complex128
+    else:
+        ntype = None
+
+    return ntype
+
+"""
+cpdef int np2adiostype(np.dtype t):
+    cdef int atype = -1
+    if t.type == np.float64:
+        atype = DATATYPE.double
+    else:
+        atype = -1
+
+    return atype
+"""
+
+cdef printAdiosFile(ADIOS_FILE * f):
+    print '%15s : %lu' % ('fh', f.fh)
+    print '%15s : %d' % ('groups_count', f.groups_count)
+    print '%15s : %d' % ('vars_count', f.vars_count)
+    print '%15s : %d' % ('attrs_count', f.attrs_count)      
+    print '%15s : %d' % ('tidx_start', f.tidx_start)       
+    print '%15s : %d' % ('ntimesteps', f.ntimesteps)       
+    print '%15s : %d' % ('version', f.version)          
+    print '%15s : %lu' % ('file_size', f.file_size)
+    print '%15s : %d' % ('endianness', f.endianness)
+    print '%15s : %s' % ('group_namelist', [f.group_namelist[i] for i in range(f.groups_count)])
+
+cdef printAdiosGroup(ADIOS_GROUP * g):
+    print '%15s : %lu' % ('gh', g.gh)
+    print '%15s : %d' % ('grpid', g.grpid)
+    print '%15s : %d' % ('vars_count', g.vars_count)
+    print '%15s : %s' % ('var_namelist', [g.var_namelist[i] for i in range(g.vars_count)])
+    print '%15s : %d' % ('attrs_count', g.attrs_count)      
+    print '%15s : %s' % ('attr_namelist', [g.attr_namelist[i] for i in range(g.attrs_count)])
+    print '%15s : %lu' % ('fp', <unsigned long> g.fp)
+
+cdef printAdiosVariable(ADIOS_VARINFO * v):
+    print '%15s : %d' % ('grpid', v.grpid)
+    print '%15s : %d' % ('varid', v.varid)
+    print '%15s : %s' % ('type', adios2nptype(v.type))
+    print '%15s : %d' % ('ndim', v.ndim)
+    print '%15s : %s' % ('dims', [v.dims[i] for i in range(v.ndim)])
+    print '%15s : %d' % ('timedim', v.timedim)
+
+cdef adios2scalar(ADIOS_DATATYPES t, void * val):
+    if t == adios_byte :
+        return (<char *> val)[0]
+    elif t == adios_short:
+        return (<short *> val)[0]
+    elif t == adios_integer:
+        return (<int *> val)[0]
+    elif t == adios_long:
+        return (<long *> val)[0]
+    elif t == adios_unsigned_byte:
+        return (<unsigned char *> val)[0]
+    elif t == adios_unsigned_short:
+        return (<unsigned short *> val)[0]
+    elif t == adios_unsigned_integer:
+        return (<unsigned int *> val)[0]
+    elif t == adios_unsigned_long:
+        return (<unsigned long *> val)[0]
+    elif t == adios_real:
+        return (<float *> val)[0]
+    elif t == adios_double:
+        return (<double *> val)[0]
+    elif t == adios_long_double:
+        return (<long double *> val)[0]
+    else:
+        return None
+
+## ==========
+## ADIOS Class Definition
+## ==========
+    
+cdef class AdiosFile:
+    """ Private Memeber """
+    cpdef ADIOS_FILE * fp
+
+    """ Public Memeber """
+    cpdef public bytes name
+    cpdef public int groups_count
+    cpdef public int vars_count
+    cpdef public int attrs_count
+    cpdef public int tidx_start
+    cpdef public int ntimesteps
+    cpdef public int version
+    cpdef public int file_size
+    cpdef public int endianness
+    
+    cpdef public dict group
+    
+    def __init__(self, char * fname, MPI.Comm comm = MPI.COMM_WORLD):
+        self.fp = NULL
+        self.group = {}
+        
+        self.fp = adios_fopen(fname, comm.ob_mpi)
+        assert self.fp != NULL, 'Not an open file'
+
+        self.name         = fname.split('/')[-1]  ## basename
+        self.groups_count = self.fp.groups_count
+        self.vars_count   = self.fp.vars_count  
+        self.attrs_count  = self.fp.attrs_count 
+        self.tidx_start   = self.fp.tidx_start  
+        self.ntimesteps   = self.fp.ntimesteps  
+        self.version      = self.fp.version     
+        self.file_size    = self.fp.file_size   
+        self.endianness   = self.fp.endianness  
+    
+        cdef AdiosGroup g
+        for grpname in [self.fp.group_namelist[i] for i in range(self.groups_count)]:
+            g = AdiosGroup(self, grpname)
+            self.group[grpname] = g
+
+    def __del__(self):
+        self.close()
+            
+    cpdef close(self):
+        assert self.fp != NULL, 'Not an open file'
+        for g in self.group.values():
+            g.close()
+        adios_fclose(self.fp)
+        self.fp = NULL
+        
+    cpdef printself(self):
+        assert self.fp != NULL, 'Not an open file'
+        print '=== AdiosFile ==='
+        print '%15s : %lu' % ('fp', <unsigned long> self.fp)
+        printAdiosFile(self.fp)
+
+
+cdef class AdiosGroup:
+    """ Private Memeber """
+    cdef AdiosFile file
+    cdef ADIOS_GROUP * gp
+
+    """ Public Memeber """
+    cpdef public bytes name
+    cpdef public int grpid
+    cpdef public int vars_count
+    cpdef public int attrs_count
+    cpdef public int timestep
+    cpdef public int lasttimestep
+    
+    cpdef public dict var
+    
+    def __init__(self, AdiosFile file, char * name):
+        self.file = file
+        self.var = {}
+        
+        self.gp = adios_gopen(self.file.fp, name)
+        assert self.gp != NULL, 'Not an open group'
+
+        self.name         = name
+        self.grpid        = self.gp.grpid        
+        self.vars_count   = self.gp.vars_count   
+        self.attrs_count  = self.gp.attrs_count  
+        self.timestep     = self.gp.timestep     
+        self.lasttimestep = self.gp.lasttimestep 
+        
+        cdef AdiosVariable v
+        for varname in [self.gp.var_namelist[i] for i in range(self.vars_count)]:
+            v = AdiosVariable(self, varname)
+            self.var[varname] = v
+
+    def __del__(self):
+        self.close()
+
+    cpdef close(self):
+        assert self.gp != NULL, 'Not an open file'
+        for v in self.var.values():
+            v.close()
+        adios_gclose(self.gp)
+        self.gp = NULL
+        
+    cpdef printself(self):
+        assert self.gp != NULL, 'Not an open file'
+        print '=== AdiosGroup ==='
+        print '%15s : %lu' % ('gp', <unsigned long> self.gp)
+        printAdiosGroup(self.gp)
+        
+cdef class AdiosVariable:
+    """ Private Memeber """
+    cdef AdiosGroup group
+    cdef ADIOS_VARINFO * vp
+
+    """ Public Memeber """
+    cpdef public bytes name
+    cpdef public int varid
+    cpdef public type type
+    cpdef public int ndim
+    cpdef public tuple dims
+    cpdef public int timedim
+    cpdef public int characteristics_count
+    
+    def __init__(self, AdiosGroup group, char * name):
+        self.group = group
+        self.vp = NULL
+
+        self.vp = adios_inq_var(self.group.gp, name)
+        assert self.group.gp != NULL, 'Not an open group'
+
+        self.name                  = name
+        self.varid                 = self.vp.varid                
+        self.type                  = adios2nptype(self.vp.type)
+        self.ndim                  = self.vp.ndim                 
+        self.timedim               = self.vp.timedim              
+        self.characteristics_count = self.vp.characteristics_count
+        
+        self.dims = tuple([self.vp.dims[i] for i in range(self.vp.ndim)])
+        
+    def __del__(self):
+        self.close()
+
+    cpdef close(self):
+        assert self.vp != NULL, 'Not an open file'
+        adios_free_varinfo(self.vp)
+        self.vp = NULL
+        
+    cpdef read(self, tuple offset = (), tuple count = ()):
+        cdef type ntype = adios2nptype(self.vp.type)
+        assert ntype is not None, 'Data type is not supported yet'
+        
+        cdef list lshape = [self.vp.dims[i] for i in range(self.vp.ndim)]
+        cdef np.ndarray npshape = np.array(lshape, dtype=np.int64)
+        
+        cdef np.ndarray npoffset
+        if len(offset) == 0:
+            npoffset = npshape.copy()
+            npoffset.fill(0)
+        else:
+            npoffset = np.array(offset, dtype=np.int64)
+            assert npshape.ndim == npoffset.ndim, 'Offset dimension mismatch'
+        
+        cdef np.ndarray npcount
+        if len(count) == 0:
+            npcount = npshape - npoffset
+        else:
+            npcount = np.array(count, dtype=np.int64)
+            npcount = npcount - npoffset
+
+        assert npshape.ndim == npcount.ndim, 'Shape dimension mismatch.'
+        assert (npshape - npoffset >= npcount).all(), 'Count is larger than shape.'
+            
+        cdef np.ndarray var = np.zeros(npcount, dtype=ntype)
+        cdef int64_t nbytes = adios_read_var_byid(
+            self.group.gp, 
+            self.vp.varid, 
+            <uint64_t *> npoffset.data, 
+            <uint64_t *> npcount.data, 
+            <void *> var.data
+            )
+
+        if nbytes < 0:
+            print "[WARNING] bytes read :", nbytes
+
+        return var
+
+    """ Print self """
+    cpdef printself(self):
+        assert self.vp != NULL, 'Not an open file'
+        print '=== AdiosVariable ==='
+        print '%15s : %lu' % ('vp', <unsigned long> self.vp)
+        printAdiosVariable(self.vp)
diff --git a/wrappers/numpy/CMakeLists.txt b/wrappers/numpy/CMakeLists.txt
new file mode 100644
index 0000000..26afa91
--- /dev/null
+++ b/wrappers/numpy/CMakeLists.txt
@@ -0,0 +1,60 @@
+cmake_minimum_required (VERSION 2.8)
+set (CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/Modules)
+include(${CMAKE_CURRENT_SOURCE_DIR}/Modules/CMakeUtilityFunctions.cmake)
+
+project (AdiosPython CXX)
+
+find_package (PythonLibs REQUIRED)
+include_directories (${PYTHON_INCLUDE_DIRS})
+##print(PYTHON_INCLUDE_DIRS)
+
+find_package (PythonInterp REQUIRED)
+find_package (Numpy REQUIRED)
+include_directories (${PYTHON_NUMPY_INCLUDE_DIR})
+find_package (MPI4Py REQUIRED)
+
+option (ADIOS_USE_MPI "Use parallel ADIOS" ON)
+
+find_package (ADIOS REQUIRED)
+add_definitions (${ADIOS_COMPILE_FLAGS})  
+add_definitions (-DADIOS_USE_READ_API_1)
+include_directories (${ADIOS_INCLUDE_PATH})
+
+find_package (MPI REQUIRED)
+include_directories (${MPI_CXX_INCLUDE_PATH})
+
+set (PSRCS
+  adios.pyx
+  )
+
+foreach (FILE ${PSRCS})
+  string (REGEX REPLACE ".pyx" ".cpp" OUTFILE ${FILE})
+
+  add_custom_command (
+    OUTPUT ${OUTFILE}
+    COMMAND cython -o ${CMAKE_CURRENT_BINARY_DIR}/${OUTFILE} -I${PYTHON_MPI4PY_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${FILE}
+    DEPENDS ${FILE}
+    )
+  list (APPEND SRCS ${OUTFILE})
+endforeach ()
+
+add_library (adios MODULE
+  ${SRCS}
+  )
+
+target_link_libraries (adios
+  ${ADIOS_LIBRARIES}
+  ${PYTHON_LIBRARIES}
+  ${MPI_CXX_LIBRARIES}
+  )
+
+set_target_properties (adios
+  PROPERTIES OUTPUT_NAME adios
+  PREFIX ""
+  ##LINK_FLAGS "-undefined dynamic_lookup"
+  )
+
+ENABLE_TESTING()
+add_test (test_write ${CMAKE_CURRENT_SOURCE_DIR}/test/test_adios_write.sh ${CMAKE_CURRENT_SOURCE_DIR}/test)
+add_test (test_read ${CMAKE_CURRENT_SOURCE_DIR}/test/test_adios_read.sh ${CMAKE_CURRENT_SOURCE_DIR}/test)
+add_test (test_noxml ${CMAKE_CURRENT_SOURCE_DIR}/test/test_adios_noxml.sh ${CMAKE_CURRENT_SOURCE_DIR}/test)
diff --git a/wrappers/numpy/Modules/.svn/entries b/wrappers/numpy/Modules/.svn/entries
new file mode 100644
index 0000000..9c0f547
--- /dev/null
+++ b/wrappers/numpy/Modules/.svn/entries
@@ -0,0 +1,205 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/numpy/Modules
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+FindADIOS.cmake
+file
+
+
+
+
+2012-07-02T16:20:14.089074Z
+85035b1c47413d257bec292b0b31ea82
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+4915
+

+FindMPI4Py.cmake
+file
+
+
+
+
+2012-07-02T16:20:14.156073Z
+9905d7f629d6cc2c55c1334f4833a23e
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+2276
+

+FindPackageHandleStandardArgs.cmake
+file
+
+
+
+
+2012-07-02T16:20:14.106070Z
+dbd7b4e1b87232a7fe8f57cf8ef10360
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+11465
+

+FindNumpy.cmake
+file
+
+
+
+
+2012-07-02T16:20:14.092074Z
+13786a3a06c8dea6ce96a5a8af35fd24
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+1977
+

+CMakeUtilityFunctions.cmake
+file
+
+
+
+
+2012-07-02T16:20:14.140073Z
+5a708f6f902199b8aab71c8d8a8f3a4a
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+319
+

diff --git a/wrappers/numpy/Modules/.svn/format b/wrappers/numpy/Modules/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/numpy/Modules/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/numpy/Modules/.svn/text-base/CMakeUtilityFunctions.cmake.svn-base b/wrappers/numpy/Modules/.svn/text-base/CMakeUtilityFunctions.cmake.svn-base
new file mode 100644
index 0000000..c29cb8a
--- /dev/null
+++ b/wrappers/numpy/Modules/.svn/text-base/CMakeUtilityFunctions.cmake.svn-base
@@ -0,0 +1,19 @@
+function (print VAR)
+  set(NAME ${VAR})
+  list (APPEND VARS ${${VAR}})
+
+  set(MSG)
+  set(IS_FIRST TRUE)
+
+  foreach(ELM ${VARS})
+    if (IS_FIRST)
+      set(MSG ${ELM})
+      set(IS_FIRST FALSE)
+    else ()
+      set(MSG ${MSG}, ${ELM})
+    endif ()
+  endforeach()
+
+  message("${NAME} = "${MSG})
+endfunction(print VAR)
+
diff --git a/wrappers/numpy/Modules/.svn/text-base/FindADIOS.cmake.svn-base b/wrappers/numpy/Modules/.svn/text-base/FindADIOS.cmake.svn-base
new file mode 100644
index 0000000..8a55c77
--- /dev/null
+++ b/wrappers/numpy/Modules/.svn/text-base/FindADIOS.cmake.svn-base
@@ -0,0 +1,136 @@
+# - Find a ADIOS implementation
+#
+# === Variables ===
+#
+# This module will set the following variables:
+#   ADIOS_USE_MPI         Can be set to ON to force the use of the MPI library
+#                         Defaults to ON.
+#   ADIOS_FOUND           TRUE if FindADIOS found ADIOS flags
+#   ADIOS_COMPILE_FLAGS   Compilation flags for ADIOS programs
+#   ADIOS_INCLUDE_PATH    Include path(s) for ADIOS header
+#   ADIOS_LINK_FLAGS      Linking flags for ADIOS programs
+#   ADIOS_LIBRARIES       All libraries to link ADIOS programs against
+# 
+# === Example ===
+#
+#   set (ADIOS_USE_MPI OFF)
+#   find_package (ADIOS)
+#   if (ADIOS_FOUND)
+#     add_definitions (${ADIOS_COMPILE_FLAGS})  
+#     include_directories (${ADIOS_INCLUDE_PATH})
+#     target_link_libraries(foo ${ADIOS_LIBRARIES})
+#   endif ()
+#
+
+# NOTE: 
+# This module is written based FindMPI. Most routines are copied from FindMPI.
+
+# include this to handle the QUIETLY and REQUIRED arguments
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(GetPrerequisites)
+
+if(NOT DEFINED ADIOS_USE_MPI)
+  set(ADIOS_USE_MPI TRUE)
+endif()
+
+if (ADIOS_USE_MPI)
+  set(CONFIG_OPTION "")
+else ()
+  set(CONFIG_OPTION "-s")
+endif()
+
+execute_process(
+  COMMAND adios_config -c ${CONFIG_OPTION}
+  OUTPUT_VARIABLE ADIOS_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+# Extract compile flags from the compile command line
+string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" ADIOS_ALL_COMPILE_FLAGS "${ADIOS_COMPILE_CMDLINE}")
+set(ADIOS_COMPILE_FLAGS_WORK)
+
+foreach(FLAG ${ADIOS_ALL_COMPILE_FLAGS})
+  if (ADIOS_COMPILE_FLAGS_WORK)
+    set(ADIOS_COMPILE_FLAGS_WORK "${ADIOS_COMPILE_FLAGS_WORK} ${FLAG}")
+  else()
+    set(ADIOS_COMPILE_FLAGS_WORK ${FLAG})
+  endif()
+endforeach()
+
+# Extract include paths from compile command line
+string(REGEX MATCHALL "(^| )-I([^\" ]+|\"[^\"]+\")" ADIOS_ALL_INCLUDE_PATHS "${ADIOS_COMPILE_CMDLINE}")
+unset(ADIOS_INCLUDE_PATH_WORK)
+foreach(IPATH ${ADIOS_ALL_INCLUDE_PATHS})
+  string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH})
+  string(REGEX REPLACE "//" "/" IPATH ${IPATH})
+  list(APPEND ADIOS_INCLUDE_PATH_WORK ${IPATH})
+endforeach()
+
+execute_process(
+  COMMAND adios_config -l ${CONFIG_OPTION}
+  OUTPUT_VARIABLE  ADIOS_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+
+# Extract linker paths from the link command line
+string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" ADIOS_ALL_LINK_PATHS "${ADIOS_LINK_CMDLINE}")
+unset(ADIOS_LINK_PATH)
+foreach(LPATH ${ADIOS_ALL_LINK_PATHS})
+  string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
+  string(REGEX REPLACE "//" "/" LPATH ${LPATH})
+  list(APPEND ADIOS_LINK_PATH ${LPATH})
+endforeach()
+
+# try using showme:libdirs if extracting didn't work.
+if (NOT ADIOS_LINK_PATH)
+  set(ADIOS_LINK_PATH ${ADIOS_LIBDIRS})
+  separate_arguments(ADIOS_LINK_PATH)
+endif()
+
+# Extract linker flags from the link command line
+string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")" ADIOS_ALL_LINK_FLAGS "${ADIOS_LINK_CMDLINE}")
+set(ADIOS_LINK_FLAGS_WORK)
+foreach(FLAG ${ADIOS_ALL_LINK_FLAGS})
+  if (ADIOS_LINK_FLAGS_WORK)
+    set(ADIOS_LINK_FLAGS_WORK "${ADIOS_LINK_FLAGS_WORK} ${FLAG}")
+  else()
+    set(ADIOS_LINK_FLAGS_WORK ${FLAG})
+  endif()
+endforeach()
+
+# Extract the set of libraries to link against from the link command
+# line
+string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" ADIOS_LIBNAMES "${ADIOS_LINK_CMDLINE}")
+
+# Determine full path names for all of the libraries that one needs
+# to link against in an MPI program
+unset(ADIOS_LIBRARIES_WORK)
+foreach(LIB ${ADIOS_LIBNAMES})
+  string(REGEX REPLACE "^ ?-l" "" LIB ${LIB})
+  # ADIOS_LIB is cached by find_library, but we don't want that.  Clear it first.
+  set(ADIOS_LIB "ADIOS_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
+  find_library(ADIOS_LIB NAMES ${LIB} HINTS ${ADIOS_LINK_PATH})
+
+  if (ADIOS_LIB)
+    list(APPEND ADIOS_LIBRARIES_WORK ${ADIOS_LIB})
+  elseif (NOT ADIOS_FIND_QUIETLY)
+    message(WARNING "Unable to find ADIOS library ${LIB}")
+  endif()
+endforeach()
+
+# Sanity check ADIOS_LIBRARIES to make sure there are enough libraries
+list(LENGTH ADIOS_LIBRARIES_WORK ADIOS_NUMLIBS)
+list(LENGTH ADIOS_LIBNAMES ADIOS_NUMLIBS_EXPECTED)
+if (NOT ADIOS_NUMLIBS EQUAL ADIOS_NUMLIBS_EXPECTED)
+  message("Expected ${ADIOS_NUMLIBS_EXPECTED} but found ${ADIOS_NUMLIBS}")
+  set(ADIOS_LIBRARIES_WORK "ADIOS_LIBRARIES-NOTFOUND")
+endif()
+
+# If we found MPI, set up all of the appropriate cache entries
+set(ADIOS_COMPILE_FLAGS ${ADIOS_COMPILE_FLAGS_WORK} CACHE STRING "ADIOS compilation flags"         FORCE)
+set(ADIOS_INCLUDE_PATH  ${ADIOS_INCLUDE_PATH_WORK}  CACHE STRING "ADIOS include path"              FORCE)
+set(ADIOS_LINK_FLAGS    ${ADIOS_LINK_FLAGS_WORK}    CACHE STRING "ADIOS linking flags"             FORCE)
+set(ADIOS_LIBRARIES     ${ADIOS_LIBRARIES_WORK}     CACHE STRING "ADIOS libraries to link against" FORCE)
+
+find_package_handle_standard_args(ADIOS DEFAULT_MSG ADIOS_INCLUDE_PATH ADIOS_LIBRARIES)
+
+
diff --git a/wrappers/numpy/Modules/.svn/text-base/FindMPI4Py.cmake.svn-base b/wrappers/numpy/Modules/.svn/text-base/FindMPI4Py.cmake.svn-base
new file mode 100644
index 0000000..8e362b3
--- /dev/null
+++ b/wrappers/numpy/Modules/.svn/text-base/FindMPI4Py.cmake.svn-base
@@ -0,0 +1,65 @@
+# Copied from FindNumpy.cmake
+# ---
+#
+# $Id: $
+#
+# Author(s):  Anton Deguet
+# Created on: 2010-01-20
+#
+# (C) Copyright 2010 Johns Hopkins University (JHU), All Rights
+# Reserved.
+#
+# --- begin cisst license - do not edit ---
+# 
+# This software is provided "as is" under an open source license, with
+# no warranty.  The complete license can be found in license.txt and
+# http://www.cisst.org/cisst/license.txt.
+# 
+# --- end cisst license ---
+#
+# File based on FindNUMARRAY distributed with ITK 3.4 (see itk.org)
+#
+# Main modifications:
+# - use Numpy instead of Numarray for all naming
+# - added path for Python 2.5 and 2.6
+# - renamed python script generated (det_npp became determineNumpyPath)
+# - use lower case for CMake commands and keywords
+# - updated python script to use get_include, not get_numpy_include which is now deprecated
+#
+# ---
+#
+# Try to find mpi4py python package
+# Once done this will define
+#
+# PYTHON_MPI4PY_FOUND        - system has numpy development package and it should be used
+# PYTHON_MPI4PY_INCLUDE_DIR  - directory where the arrayobject.h header file can be found
+#
+#
+
+# include this to handle the QUIETLY and REQUIRED arguments
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(GetPrerequisites)
+
+if(PYTHON_EXECUTABLE)
+    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determineMPI4PyPath.py "try: import mpi4py; print mpi4py.get_include()\nexcept: pass\n")
+    exec_program("${PYTHON_EXECUTABLE}"
+                 ARGS "\"${CMAKE_CURRENT_BINARY_DIR}/determineMPI4PyPath.py\""
+                 OUTPUT_VARIABLE MPI4PY_PATH
+                 )
+endif(PYTHON_EXECUTABLE)
+
+find_path(PYTHON_MPI4PY_INCLUDE_DIR mpi4py/mpi4py.h
+          "${MPI4PY_PATH}"
+          "${PYTHON_INCLUDE_PATH}/mpi4py/"
+          /usr/include/python2.6/mpi4py/
+          /usr/include/python2.5/mpi4py/
+          /usr/include/python2.4/mpi4py/
+          /usr/include/python2.3/mpi4py/
+          DOC "Directory where the mpi4py.h header file can be found. This file is part of the mpi4py package"
+    )
+
+##if(PYTHON_MPI4PY_INCLUDE_DIR)
+##    set(PYTHON_MPI4PY_FOUND 1 CACHE INTERNAL "Python mpi4py development package is available")
+##endif(PYTHON_MPI4PY_INCLUDE_DIR)
+
+find_package_handle_standard_args(PYTHON_MPI4PY DEFAULT_MSG PYTHON_MPI4PY_INCLUDE_DIR)
diff --git a/wrappers/numpy/Modules/.svn/text-base/FindNumpy.cmake.svn-base b/wrappers/numpy/Modules/.svn/text-base/FindNumpy.cmake.svn-base
new file mode 100644
index 0000000..6dfb1af
--- /dev/null
+++ b/wrappers/numpy/Modules/.svn/text-base/FindNumpy.cmake.svn-base
@@ -0,0 +1,57 @@
+#
+# $Id: $
+#
+# Author(s):  Anton Deguet
+# Created on: 2010-01-20
+#
+# (C) Copyright 2010 Johns Hopkins University (JHU), All Rights
+# Reserved.
+#
+# --- begin cisst license - do not edit ---
+# 
+# This software is provided "as is" under an open source license, with
+# no warranty.  The complete license can be found in license.txt and
+# http://www.cisst.org/cisst/license.txt.
+# 
+# --- end cisst license ---
+#
+# File based on FindNUMARRAY distributed with ITK 3.4 (see itk.org)
+#
+# Main modifications:
+# - use Numpy instead of Numarray for all naming
+# - added path for Python 2.5 and 2.6
+# - renamed python script generated (det_npp became determineNumpyPath)
+# - use lower case for CMake commands and keywords
+# - updated python script to use get_include, not get_numpy_include which is now deprecated
+#
+# ---
+#
+# Try to find numpy python package
+# Once done this will define
+#
+# PYTHON_NUMPY_FOUND        - system has numpy development package and it should be used
+# PYTHON_NUMPY_INCLUDE_DIR  - directory where the arrayobject.h header file can be found
+#
+#
+if(PYTHON_EXECUTABLE)
+    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determineNumpyPath.py "try: import numpy; print numpy.get_include()\nexcept: pass\n")
+    exec_program("${PYTHON_EXECUTABLE}"
+                 ARGS "\"${CMAKE_CURRENT_BINARY_DIR}/determineNumpyPath.py\""
+                 OUTPUT_VARIABLE NUMPY_PATH
+                 )
+endif(PYTHON_EXECUTABLE)
+
+find_path(PYTHON_NUMPY_INCLUDE_DIR numpy/arrayobject.h
+          "${NUMPY_PATH}"
+          "${PYTHON_INCLUDE_PATH}/numpy/"
+          /usr/include/python2.6/numpy/
+          /usr/include/python2.5/numpy/
+          /usr/include/python2.4/numpy/
+          /usr/include/python2.3/numpy/
+          DOC "Directory where the arrayobject.h header file can be found. This file is part of the numpy package"
+    )
+
+if(PYTHON_NUMPY_INCLUDE_DIR)
+    set(PYTHON_NUMPY_FOUND 1 CACHE INTERNAL "Python numpy development package is available")
+endif(PYTHON_NUMPY_INCLUDE_DIR)
+
diff --git a/wrappers/numpy/Modules/.svn/text-base/FindPackageHandleStandardArgs.cmake.svn-base b/wrappers/numpy/Modules/.svn/text-base/FindPackageHandleStandardArgs.cmake.svn-base
new file mode 100644
index 0000000..1acb021
--- /dev/null
+++ b/wrappers/numpy/Modules/.svn/text-base/FindPackageHandleStandardArgs.cmake.svn-base
@@ -0,0 +1,260 @@
+# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
+#
+# This function is intended to be used in FindXXX.cmake modules files.
+# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE().
+# It also sets the <UPPERCASED_NAME>_FOUND variable.
+# The package is considered found if all variables <var1>... listed contain
+# valid results, e.g. valid filepaths.
+#
+# There are two modes of this function. The first argument in both modes is
+# the name of the Find-module where it is called (in original casing).
+#
+# The first simple mode looks like this:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
+# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# If DEFAULT_MSG is given as second argument, then the function will generate
+# itself useful success and error messages. You can also supply a custom error message
+# for the failure case. This is not recommended.
+#
+# The second mode is more powerful and also supports version checking:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
+#                                           [VERSION_VAR   <versionvar>
+#                                           [CONFIG_MODE]
+#                                           [FAIL_MESSAGE "Custom failure message"] )
+#
+# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# After REQUIRED_VARS the variables which are required for this package are listed.
+# Following VERSION_VAR the name of the variable can be specified which holds
+# the version of the package which has been found. If this is done, this version
+# will be checked against the (potentially) specified required version used
+# in the find_package() call. The EXACT keyword is also handled. The default
+# messages include information about the required version and the version
+# which has been actually found, both if the version is ok or not.
+# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
+# a find_package(... NO_MODULE) call, in this case all the information
+# provided by the config-mode of find_package() will be evaluated
+# automatically.
+# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
+# used, the default message will be displayed.
+#
+# Example for mode 1:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
+#
+# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
+# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
+# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
+# independent whether QUIET was used or not.
+# If it is found, success will be reported, including the content of <var1>.
+# On repeated Cmake runs, the same message won't be printed again.
+#
+# Example for mode 2:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
+#                                             VERSION_VAR BISON_VERSION)
+# In this case, BISON is considered to be found if the variable(s) listed
+# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
+# Also the version of BISON will be checked by using the version contained
+# in BISON_VERSION.
+# Since no FAIL_MESSAGE is given, the default messages will be printed.
+#
+# Another example for mode 2:
+#
+#    FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
+# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE)
+# and adds an additional search directory for automoc4.
+# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
+# success/error message.
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+INCLUDE(FindPackageMessage)
+INCLUDE(CMakeParseArguments)
+
+# internal helper macro
+MACRO(_FPHSA_FAILURE_MESSAGE _msg)
+  IF (${_NAME}_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "${_msg}")
+  ELSE (${_NAME}_FIND_REQUIRED)
+    IF (NOT ${_NAME}_FIND_QUIETLY)
+      MESSAGE(STATUS "${_msg}")
+    ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+  ENDIF (${_NAME}_FIND_REQUIRED)
+ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
+
+
+# internal helper macro to generate the failure message when used in CONFIG_MODE:
+MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+  # <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
+  IF(${_NAME}_CONFIG)
+    _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
+  ELSE(${_NAME}_CONFIG)
+    # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
+    # List them all in the error message:
+    IF(${_NAME}_CONSIDERED_CONFIGS)
+      SET(configsText "")
+      LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
+      MATH(EXPR configsCount "${configsCount} - 1")
+      FOREACH(currentConfigIndex RANGE ${configsCount})
+        LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
+        LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
+        SET(configsText "${configsText}    ${filename} (version ${version})\n")
+      ENDFOREACH(currentConfigIndex)
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
+
+    ELSE(${_NAME}_CONSIDERED_CONFIGS)
+      # Simple case: No Config-file was found at all:
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
+    ENDIF(${_NAME}_CONSIDERED_CONFIGS)
+  ENDIF(${_NAME}_CONFIG)
+ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+
+
+FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
+
+# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
+# new extended or in the "old" mode:
+  SET(options CONFIG_MODE)
+  SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
+  SET(multiValueArgs REQUIRED_VARS)
+  SET(_KEYWORDS_FOR_EXTENDED_MODE  ${options} ${oneValueArgs} ${multiValueArgs} )
+  LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
+
+  IF(${INDEX} EQUAL -1)
+    SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
+    SET(FPHSA_REQUIRED_VARS ${ARGN})
+    SET(FPHSA_VERSION_VAR)
+  ELSE(${INDEX} EQUAL -1)
+
+    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}"  ${_FIRST_ARG} ${ARGN})
+
+    IF(FPHSA_UNPARSED_ARGUMENTS)
+      MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
+    ENDIF(FPHSA_UNPARSED_ARGUMENTS)
+
+    IF(NOT FPHSA_FAIL_MESSAGE)
+      SET(FPHSA_FAIL_MESSAGE  "DEFAULT_MSG")
+    ENDIF(NOT FPHSA_FAIL_MESSAGE)
+  ENDIF(${INDEX} EQUAL -1)
+
+# now that we collected all arguments, process them
+
+  IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+    SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
+  ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+
+  # In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
+  # when it successfully found the config-file, including version checking:
+  IF(FPHSA_CONFIG_MODE)
+    LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
+    LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
+    SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
+  ENDIF(FPHSA_CONFIG_MODE)
+
+  IF(NOT FPHSA_REQUIRED_VARS)
+    MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
+  ENDIF(NOT FPHSA_REQUIRED_VARS)
+
+  LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
+
+  STRING(TOUPPER ${_NAME} _NAME_UPPER)
+  STRING(TOLOWER ${_NAME} _NAME_LOWER)
+
+  # collect all variables which were not found, so they can be printed, so the
+  # user knows better what went wrong (#6375)
+  SET(MISSING_VARS "")
+  SET(DETAILS "")
+  SET(${_NAME_UPPER}_FOUND TRUE)
+  # check if all passed variables are valid
+  FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
+    IF(NOT ${_CURRENT_VAR})
+      SET(${_NAME_UPPER}_FOUND FALSE)
+      SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
+    ELSE(NOT ${_CURRENT_VAR})
+      SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
+    ENDIF(NOT ${_CURRENT_VAR})
+  ENDFOREACH(_CURRENT_VAR)
+
+
+  # version handling:
+  SET(VERSION_MSG "")
+  SET(VERSION_OK TRUE)
+  SET(VERSION ${${FPHSA_VERSION_VAR}} )
+  IF (${_NAME}_FIND_VERSION)
+
+    IF(VERSION)
+
+      IF(${_NAME}_FIND_VERSION_EXACT)       # exact version required
+        IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
+        ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+
+      ELSE(${_NAME}_FIND_VERSION_EXACT)     # minimum version specified:
+        IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
+        ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ELSE(VERSION)
+
+      # if the package was not found, but a version was given, add that to the output:
+      IF(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
+      ELSE(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ENDIF(VERSION)
+  ELSE (${_NAME}_FIND_VERSION)
+    IF(VERSION)
+      SET(VERSION_MSG "(found version \"${VERSION}\")")
+    ENDIF(VERSION)
+  ENDIF (${_NAME}_FIND_VERSION)
+
+  IF(VERSION_OK)
+    SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
+  ELSE(VERSION_OK)
+    SET(${_NAME_UPPER}_FOUND FALSE)
+  ENDIF(VERSION_OK)
+
+
+  # print the result:
+  IF (${_NAME_UPPER}_FOUND)
+    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}")
+  ELSE (${_NAME_UPPER}_FOUND)
+
+    IF(FPHSA_CONFIG_MODE)
+      _FPHSA_HANDLE_FAILURE_CONFIG_MODE()
+    ELSE(FPHSA_CONFIG_MODE)
+      IF(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
+      ELSE(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
+      ENDIF(NOT VERSION_OK)
+    ENDIF(FPHSA_CONFIG_MODE)
+
+  ENDIF (${_NAME_UPPER}_FOUND)
+
+  SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
+
+ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)
diff --git a/wrappers/numpy/Modules/CMakeUtilityFunctions.cmake b/wrappers/numpy/Modules/CMakeUtilityFunctions.cmake
new file mode 100644
index 0000000..c29cb8a
--- /dev/null
+++ b/wrappers/numpy/Modules/CMakeUtilityFunctions.cmake
@@ -0,0 +1,19 @@
+function (print VAR)
+  set(NAME ${VAR})
+  list (APPEND VARS ${${VAR}})
+
+  set(MSG)
+  set(IS_FIRST TRUE)
+
+  foreach(ELM ${VARS})
+    if (IS_FIRST)
+      set(MSG ${ELM})
+      set(IS_FIRST FALSE)
+    else ()
+      set(MSG ${MSG}, ${ELM})
+    endif ()
+  endforeach()
+
+  message("${NAME} = "${MSG})
+endfunction(print VAR)
+
diff --git a/wrappers/numpy/Modules/FindADIOS.cmake b/wrappers/numpy/Modules/FindADIOS.cmake
new file mode 100644
index 0000000..8a55c77
--- /dev/null
+++ b/wrappers/numpy/Modules/FindADIOS.cmake
@@ -0,0 +1,136 @@
+# - Find a ADIOS implementation
+#
+# === Variables ===
+#
+# This module will set the following variables:
+#   ADIOS_USE_MPI         Can be set to ON to force the use of the MPI library
+#                         Defaults to ON.
+#   ADIOS_FOUND           TRUE if FindADIOS found ADIOS flags
+#   ADIOS_COMPILE_FLAGS   Compilation flags for ADIOS programs
+#   ADIOS_INCLUDE_PATH    Include path(s) for ADIOS header
+#   ADIOS_LINK_FLAGS      Linking flags for ADIOS programs
+#   ADIOS_LIBRARIES       All libraries to link ADIOS programs against
+# 
+# === Example ===
+#
+#   set (ADIOS_USE_MPI OFF)
+#   find_package (ADIOS)
+#   if (ADIOS_FOUND)
+#     add_definitions (${ADIOS_COMPILE_FLAGS})  
+#     include_directories (${ADIOS_INCLUDE_PATH})
+#     target_link_libraries(foo ${ADIOS_LIBRARIES})
+#   endif ()
+#
+
+# NOTE: 
+# This module is written based FindMPI. Most routines are copied from FindMPI.
+
+# include this to handle the QUIETLY and REQUIRED arguments
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(GetPrerequisites)
+
+if(NOT DEFINED ADIOS_USE_MPI)
+  set(ADIOS_USE_MPI TRUE)
+endif()
+
+if (ADIOS_USE_MPI)
+  set(CONFIG_OPTION "")
+else ()
+  set(CONFIG_OPTION "-s")
+endif()
+
+execute_process(
+  COMMAND adios_config -c ${CONFIG_OPTION}
+  OUTPUT_VARIABLE ADIOS_COMPILE_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+# Extract compile flags from the compile command line
+string(REGEX MATCHALL "(^| )-[Df]([^\" ]+|\"[^\"]+\")" ADIOS_ALL_COMPILE_FLAGS "${ADIOS_COMPILE_CMDLINE}")
+set(ADIOS_COMPILE_FLAGS_WORK)
+
+foreach(FLAG ${ADIOS_ALL_COMPILE_FLAGS})
+  if (ADIOS_COMPILE_FLAGS_WORK)
+    set(ADIOS_COMPILE_FLAGS_WORK "${ADIOS_COMPILE_FLAGS_WORK} ${FLAG}")
+  else()
+    set(ADIOS_COMPILE_FLAGS_WORK ${FLAG})
+  endif()
+endforeach()
+
+# Extract include paths from compile command line
+string(REGEX MATCHALL "(^| )-I([^\" ]+|\"[^\"]+\")" ADIOS_ALL_INCLUDE_PATHS "${ADIOS_COMPILE_CMDLINE}")
+unset(ADIOS_INCLUDE_PATH_WORK)
+foreach(IPATH ${ADIOS_ALL_INCLUDE_PATHS})
+  string(REGEX REPLACE "^ ?-I" "" IPATH ${IPATH})
+  string(REGEX REPLACE "//" "/" IPATH ${IPATH})
+  list(APPEND ADIOS_INCLUDE_PATH_WORK ${IPATH})
+endforeach()
+
+execute_process(
+  COMMAND adios_config -l ${CONFIG_OPTION}
+  OUTPUT_VARIABLE  ADIOS_LINK_CMDLINE OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+
+
+# Extract linker paths from the link command line
+string(REGEX MATCHALL "(^| |-Wl,)-L([^\" ]+|\"[^\"]+\")" ADIOS_ALL_LINK_PATHS "${ADIOS_LINK_CMDLINE}")
+unset(ADIOS_LINK_PATH)
+foreach(LPATH ${ADIOS_ALL_LINK_PATHS})
+  string(REGEX REPLACE "^(| |-Wl,)-L" "" LPATH ${LPATH})
+  string(REGEX REPLACE "//" "/" LPATH ${LPATH})
+  list(APPEND ADIOS_LINK_PATH ${LPATH})
+endforeach()
+
+# try using showme:libdirs if extracting didn't work.
+if (NOT ADIOS_LINK_PATH)
+  set(ADIOS_LINK_PATH ${ADIOS_LIBDIRS})
+  separate_arguments(ADIOS_LINK_PATH)
+endif()
+
+# Extract linker flags from the link command line
+string(REGEX MATCHALL "(^| )-Wl,([^\" ]+|\"[^\"]+\")" ADIOS_ALL_LINK_FLAGS "${ADIOS_LINK_CMDLINE}")
+set(ADIOS_LINK_FLAGS_WORK)
+foreach(FLAG ${ADIOS_ALL_LINK_FLAGS})
+  if (ADIOS_LINK_FLAGS_WORK)
+    set(ADIOS_LINK_FLAGS_WORK "${ADIOS_LINK_FLAGS_WORK} ${FLAG}")
+  else()
+    set(ADIOS_LINK_FLAGS_WORK ${FLAG})
+  endif()
+endforeach()
+
+# Extract the set of libraries to link against from the link command
+# line
+string(REGEX MATCHALL "(^| )-l([^\" ]+|\"[^\"]+\")" ADIOS_LIBNAMES "${ADIOS_LINK_CMDLINE}")
+
+# Determine full path names for all of the libraries that one needs
+# to link against in an MPI program
+unset(ADIOS_LIBRARIES_WORK)
+foreach(LIB ${ADIOS_LIBNAMES})
+  string(REGEX REPLACE "^ ?-l" "" LIB ${LIB})
+  # ADIOS_LIB is cached by find_library, but we don't want that.  Clear it first.
+  set(ADIOS_LIB "ADIOS_LIB-NOTFOUND" CACHE FILEPATH "Cleared" FORCE)
+  find_library(ADIOS_LIB NAMES ${LIB} HINTS ${ADIOS_LINK_PATH})
+
+  if (ADIOS_LIB)
+    list(APPEND ADIOS_LIBRARIES_WORK ${ADIOS_LIB})
+  elseif (NOT ADIOS_FIND_QUIETLY)
+    message(WARNING "Unable to find ADIOS library ${LIB}")
+  endif()
+endforeach()
+
+# Sanity check ADIOS_LIBRARIES to make sure there are enough libraries
+list(LENGTH ADIOS_LIBRARIES_WORK ADIOS_NUMLIBS)
+list(LENGTH ADIOS_LIBNAMES ADIOS_NUMLIBS_EXPECTED)
+if (NOT ADIOS_NUMLIBS EQUAL ADIOS_NUMLIBS_EXPECTED)
+  message("Expected ${ADIOS_NUMLIBS_EXPECTED} but found ${ADIOS_NUMLIBS}")
+  set(ADIOS_LIBRARIES_WORK "ADIOS_LIBRARIES-NOTFOUND")
+endif()
+
+# If we found MPI, set up all of the appropriate cache entries
+set(ADIOS_COMPILE_FLAGS ${ADIOS_COMPILE_FLAGS_WORK} CACHE STRING "ADIOS compilation flags"         FORCE)
+set(ADIOS_INCLUDE_PATH  ${ADIOS_INCLUDE_PATH_WORK}  CACHE STRING "ADIOS include path"              FORCE)
+set(ADIOS_LINK_FLAGS    ${ADIOS_LINK_FLAGS_WORK}    CACHE STRING "ADIOS linking flags"             FORCE)
+set(ADIOS_LIBRARIES     ${ADIOS_LIBRARIES_WORK}     CACHE STRING "ADIOS libraries to link against" FORCE)
+
+find_package_handle_standard_args(ADIOS DEFAULT_MSG ADIOS_INCLUDE_PATH ADIOS_LIBRARIES)
+
+
diff --git a/wrappers/numpy/Modules/FindMPI4Py.cmake b/wrappers/numpy/Modules/FindMPI4Py.cmake
new file mode 100644
index 0000000..8e362b3
--- /dev/null
+++ b/wrappers/numpy/Modules/FindMPI4Py.cmake
@@ -0,0 +1,65 @@
+# Copied from FindNumpy.cmake
+# ---
+#
+# $Id: $
+#
+# Author(s):  Anton Deguet
+# Created on: 2010-01-20
+#
+# (C) Copyright 2010 Johns Hopkins University (JHU), All Rights
+# Reserved.
+#
+# --- begin cisst license - do not edit ---
+# 
+# This software is provided "as is" under an open source license, with
+# no warranty.  The complete license can be found in license.txt and
+# http://www.cisst.org/cisst/license.txt.
+# 
+# --- end cisst license ---
+#
+# File based on FindNUMARRAY distributed with ITK 3.4 (see itk.org)
+#
+# Main modifications:
+# - use Numpy instead of Numarray for all naming
+# - added path for Python 2.5 and 2.6
+# - renamed python script generated (det_npp became determineNumpyPath)
+# - use lower case for CMake commands and keywords
+# - updated python script to use get_include, not get_numpy_include which is now deprecated
+#
+# ---
+#
+# Try to find mpi4py python package
+# Once done this will define
+#
+# PYTHON_MPI4PY_FOUND        - system has numpy development package and it should be used
+# PYTHON_MPI4PY_INCLUDE_DIR  - directory where the arrayobject.h header file can be found
+#
+#
+
+# include this to handle the QUIETLY and REQUIRED arguments
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(GetPrerequisites)
+
+if(PYTHON_EXECUTABLE)
+    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determineMPI4PyPath.py "try: import mpi4py; print mpi4py.get_include()\nexcept: pass\n")
+    exec_program("${PYTHON_EXECUTABLE}"
+                 ARGS "\"${CMAKE_CURRENT_BINARY_DIR}/determineMPI4PyPath.py\""
+                 OUTPUT_VARIABLE MPI4PY_PATH
+                 )
+endif(PYTHON_EXECUTABLE)
+
+find_path(PYTHON_MPI4PY_INCLUDE_DIR mpi4py/mpi4py.h
+          "${MPI4PY_PATH}"
+          "${PYTHON_INCLUDE_PATH}/mpi4py/"
+          /usr/include/python2.6/mpi4py/
+          /usr/include/python2.5/mpi4py/
+          /usr/include/python2.4/mpi4py/
+          /usr/include/python2.3/mpi4py/
+          DOC "Directory where the mpi4py.h header file can be found. This file is part of the mpi4py package"
+    )
+
+##if(PYTHON_MPI4PY_INCLUDE_DIR)
+##    set(PYTHON_MPI4PY_FOUND 1 CACHE INTERNAL "Python mpi4py development package is available")
+##endif(PYTHON_MPI4PY_INCLUDE_DIR)
+
+find_package_handle_standard_args(PYTHON_MPI4PY DEFAULT_MSG PYTHON_MPI4PY_INCLUDE_DIR)
diff --git a/wrappers/numpy/Modules/FindNumpy.cmake b/wrappers/numpy/Modules/FindNumpy.cmake
new file mode 100644
index 0000000..6dfb1af
--- /dev/null
+++ b/wrappers/numpy/Modules/FindNumpy.cmake
@@ -0,0 +1,57 @@
+#
+# $Id: $
+#
+# Author(s):  Anton Deguet
+# Created on: 2010-01-20
+#
+# (C) Copyright 2010 Johns Hopkins University (JHU), All Rights
+# Reserved.
+#
+# --- begin cisst license - do not edit ---
+# 
+# This software is provided "as is" under an open source license, with
+# no warranty.  The complete license can be found in license.txt and
+# http://www.cisst.org/cisst/license.txt.
+# 
+# --- end cisst license ---
+#
+# File based on FindNUMARRAY distributed with ITK 3.4 (see itk.org)
+#
+# Main modifications:
+# - use Numpy instead of Numarray for all naming
+# - added path for Python 2.5 and 2.6
+# - renamed python script generated (det_npp became determineNumpyPath)
+# - use lower case for CMake commands and keywords
+# - updated python script to use get_include, not get_numpy_include which is now deprecated
+#
+# ---
+#
+# Try to find numpy python package
+# Once done this will define
+#
+# PYTHON_NUMPY_FOUND        - system has numpy development package and it should be used
+# PYTHON_NUMPY_INCLUDE_DIR  - directory where the arrayobject.h header file can be found
+#
+#
+if(PYTHON_EXECUTABLE)
+    file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determineNumpyPath.py "try: import numpy; print numpy.get_include()\nexcept: pass\n")
+    exec_program("${PYTHON_EXECUTABLE}"
+                 ARGS "\"${CMAKE_CURRENT_BINARY_DIR}/determineNumpyPath.py\""
+                 OUTPUT_VARIABLE NUMPY_PATH
+                 )
+endif(PYTHON_EXECUTABLE)
+
+find_path(PYTHON_NUMPY_INCLUDE_DIR numpy/arrayobject.h
+          "${NUMPY_PATH}"
+          "${PYTHON_INCLUDE_PATH}/numpy/"
+          /usr/include/python2.6/numpy/
+          /usr/include/python2.5/numpy/
+          /usr/include/python2.4/numpy/
+          /usr/include/python2.3/numpy/
+          DOC "Directory where the arrayobject.h header file can be found. This file is part of the numpy package"
+    )
+
+if(PYTHON_NUMPY_INCLUDE_DIR)
+    set(PYTHON_NUMPY_FOUND 1 CACHE INTERNAL "Python numpy development package is available")
+endif(PYTHON_NUMPY_INCLUDE_DIR)
+
diff --git a/wrappers/numpy/Modules/FindPackageHandleStandardArgs.cmake b/wrappers/numpy/Modules/FindPackageHandleStandardArgs.cmake
new file mode 100644
index 0000000..1acb021
--- /dev/null
+++ b/wrappers/numpy/Modules/FindPackageHandleStandardArgs.cmake
@@ -0,0 +1,260 @@
+# FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> ... )
+#
+# This function is intended to be used in FindXXX.cmake modules files.
+# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE().
+# It also sets the <UPPERCASED_NAME>_FOUND variable.
+# The package is considered found if all variables <var1>... listed contain
+# valid results, e.g. valid filepaths.
+#
+# There are two modes of this function. The first argument in both modes is
+# the name of the Find-module where it is called (in original casing).
+#
+# The first simple mode looks like this:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(<name> (DEFAULT_MSG|"Custom failure message") <var1>...<varN> )
+# If the variables <var1> to <varN> are all valid, then <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# If DEFAULT_MSG is given as second argument, then the function will generate
+# itself useful success and error messages. You can also supply a custom error message
+# for the failure case. This is not recommended.
+#
+# The second mode is more powerful and also supports version checking:
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS <var1>...<varN>]
+#                                           [VERSION_VAR   <versionvar>
+#                                           [CONFIG_MODE]
+#                                           [FAIL_MESSAGE "Custom failure message"] )
+#
+# As above, if <var1> through <varN> are all valid, <UPPERCASED_NAME>_FOUND
+# will be set to TRUE.
+# After REQUIRED_VARS the variables which are required for this package are listed.
+# Following VERSION_VAR the name of the variable can be specified which holds
+# the version of the package which has been found. If this is done, this version
+# will be checked against the (potentially) specified required version used
+# in the find_package() call. The EXACT keyword is also handled. The default
+# messages include information about the required version and the version
+# which has been actually found, both if the version is ok or not.
+# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
+# a find_package(... NO_MODULE) call, in this case all the information
+# provided by the config-mode of find_package() will be evaluated
+# automatically.
+# Via FAIL_MESSAGE a custom failure message can be specified, if this is not
+# used, the default message will be displayed.
+#
+# Example for mode 1:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2  DEFAULT_MSG  LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
+#
+# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and
+# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE.
+# If it is not found and REQUIRED was used, it fails with FATAL_ERROR,
+# independent whether QUIET was used or not.
+# If it is found, success will be reported, including the content of <var1>.
+# On repeated Cmake runs, the same message won't be printed again.
+#
+# Example for mode 2:
+#
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON  REQUIRED_VARS BISON_EXECUTABLE
+#                                             VERSION_VAR BISON_VERSION)
+# In this case, BISON is considered to be found if the variable(s) listed
+# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case.
+# Also the version of BISON will be checked by using the version contained
+# in BISON_VERSION.
+# Since no FAIL_MESSAGE is given, the default messages will be printed.
+#
+# Another example for mode 2:
+#
+#    FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4)
+#    FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4  CONFIG_MODE)
+# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE)
+# and adds an additional search directory for automoc4.
+# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper
+# success/error message.
+
+#=============================================================================
+# Copyright 2007-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+INCLUDE(FindPackageMessage)
+INCLUDE(CMakeParseArguments)
+
+# internal helper macro
+MACRO(_FPHSA_FAILURE_MESSAGE _msg)
+  IF (${_NAME}_FIND_REQUIRED)
+    MESSAGE(FATAL_ERROR "${_msg}")
+  ELSE (${_NAME}_FIND_REQUIRED)
+    IF (NOT ${_NAME}_FIND_QUIETLY)
+      MESSAGE(STATUS "${_msg}")
+    ENDIF (NOT ${_NAME}_FIND_QUIETLY)
+  ENDIF (${_NAME}_FIND_REQUIRED)
+ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg)
+
+
+# internal helper macro to generate the failure message when used in CONFIG_MODE:
+MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+  # <name>_CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found:
+  IF(${_NAME}_CONFIG)
+    _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})")
+  ELSE(${_NAME}_CONFIG)
+    # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version.
+    # List them all in the error message:
+    IF(${_NAME}_CONSIDERED_CONFIGS)
+      SET(configsText "")
+      LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount)
+      MATH(EXPR configsCount "${configsCount} - 1")
+      FOREACH(currentConfigIndex RANGE ${configsCount})
+        LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename)
+        LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version)
+        SET(configsText "${configsText}    ${filename} (version ${version})\n")
+      ENDFOREACH(currentConfigIndex)
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}")
+
+    ELSE(${_NAME}_CONSIDERED_CONFIGS)
+      # Simple case: No Config-file was found at all:
+      _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}")
+    ENDIF(${_NAME}_CONSIDERED_CONFIGS)
+  ENDIF(${_NAME}_CONFIG)
+ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE)
+
+
+FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG)
+
+# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in
+# new extended or in the "old" mode:
+  SET(options CONFIG_MODE)
+  SET(oneValueArgs FAIL_MESSAGE VERSION_VAR)
+  SET(multiValueArgs REQUIRED_VARS)
+  SET(_KEYWORDS_FOR_EXTENDED_MODE  ${options} ${oneValueArgs} ${multiValueArgs} )
+  LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX)
+
+  IF(${INDEX} EQUAL -1)
+    SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG})
+    SET(FPHSA_REQUIRED_VARS ${ARGN})
+    SET(FPHSA_VERSION_VAR)
+  ELSE(${INDEX} EQUAL -1)
+
+    CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}"  ${_FIRST_ARG} ${ARGN})
+
+    IF(FPHSA_UNPARSED_ARGUMENTS)
+      MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"")
+    ENDIF(FPHSA_UNPARSED_ARGUMENTS)
+
+    IF(NOT FPHSA_FAIL_MESSAGE)
+      SET(FPHSA_FAIL_MESSAGE  "DEFAULT_MSG")
+    ENDIF(NOT FPHSA_FAIL_MESSAGE)
+  ENDIF(${INDEX} EQUAL -1)
+
+# now that we collected all arguments, process them
+
+  IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+    SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}")
+  ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG")
+
+  # In config-mode, we rely on the variable <package>_CONFIG, which is set by find_package()
+  # when it successfully found the config-file, including version checking:
+  IF(FPHSA_CONFIG_MODE)
+    LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
+    LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
+    SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
+  ENDIF(FPHSA_CONFIG_MODE)
+
+  IF(NOT FPHSA_REQUIRED_VARS)
+    MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()")
+  ENDIF(NOT FPHSA_REQUIRED_VARS)
+
+  LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR)
+
+  STRING(TOUPPER ${_NAME} _NAME_UPPER)
+  STRING(TOLOWER ${_NAME} _NAME_LOWER)
+
+  # collect all variables which were not found, so they can be printed, so the
+  # user knows better what went wrong (#6375)
+  SET(MISSING_VARS "")
+  SET(DETAILS "")
+  SET(${_NAME_UPPER}_FOUND TRUE)
+  # check if all passed variables are valid
+  FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS})
+    IF(NOT ${_CURRENT_VAR})
+      SET(${_NAME_UPPER}_FOUND FALSE)
+      SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}")
+    ELSE(NOT ${_CURRENT_VAR})
+      SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]")
+    ENDIF(NOT ${_CURRENT_VAR})
+  ENDFOREACH(_CURRENT_VAR)
+
+
+  # version handling:
+  SET(VERSION_MSG "")
+  SET(VERSION_OK TRUE)
+  SET(VERSION ${${FPHSA_VERSION_VAR}} )
+  IF (${_NAME}_FIND_VERSION)
+
+    IF(VERSION)
+
+      IF(${_NAME}_FIND_VERSION_EXACT)       # exact version required
+        IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+          SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")")
+        ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}")
+
+      ELSE(${_NAME}_FIND_VERSION_EXACT)     # minimum version specified:
+        IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"")
+          SET(VERSION_OK FALSE)
+        ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+          SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")")
+        ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ELSE(VERSION)
+
+      # if the package was not found, but a version was given, add that to the output:
+      IF(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")")
+      ELSE(${_NAME}_FIND_VERSION_EXACT)
+         SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")")
+      ENDIF(${_NAME}_FIND_VERSION_EXACT)
+
+    ENDIF(VERSION)
+  ELSE (${_NAME}_FIND_VERSION)
+    IF(VERSION)
+      SET(VERSION_MSG "(found version \"${VERSION}\")")
+    ENDIF(VERSION)
+  ENDIF (${_NAME}_FIND_VERSION)
+
+  IF(VERSION_OK)
+    SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]")
+  ELSE(VERSION_OK)
+    SET(${_NAME_UPPER}_FOUND FALSE)
+  ENDIF(VERSION_OK)
+
+
+  # print the result:
+  IF (${_NAME_UPPER}_FOUND)
+    FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}")
+  ELSE (${_NAME_UPPER}_FOUND)
+
+    IF(FPHSA_CONFIG_MODE)
+      _FPHSA_HANDLE_FAILURE_CONFIG_MODE()
+    ELSE(FPHSA_CONFIG_MODE)
+      IF(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})")
+      ELSE(NOT VERSION_OK)
+        _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}")
+      ENDIF(NOT VERSION_OK)
+    ENDIF(FPHSA_CONFIG_MODE)
+
+  ENDIF (${_NAME_UPPER}_FOUND)
+
+  SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE)
+
+ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG)
diff --git a/wrappers/numpy/README b/wrappers/numpy/README
new file mode 100644
index 0000000..e745cb2
--- /dev/null
+++ b/wrappers/numpy/README
@@ -0,0 +1,37 @@
+ADIOS Python/Numpy wrapper
+-----------------
+
+This directory contains the codes for the ADIOS python/numpy wrapper
+to to call the native ADIOS library. This module is built by Cython.
+
+
+== Build == 
+
+This program can be built with CMake (http://www.cmake.org/). You may
+want to a build directory and run cmake pointing the source directory
+containing CMakeLists.txt (this directory). For example, 
+
+$ mkdir build; cd build
+$ cmake /dir/to/source
+
+CMake will search installed ADIOS library and Python/Numpy. Once
+completed, type make to build:
+
+$ make
+Or, 
+$ make VERBOSE=1
+if you need verbose output.
+
+After successful building, you can see adios.so. This file can be
+loaded in Python.
+
+== Test == 
+
+This program contains a test program. To run testing after building,
+type the following command:
+
+$ make test
+
+If you need a verbose output, type the following
+
+$ ctest -V
diff --git a/wrappers/numpy/adios.pyx b/wrappers/numpy/adios.pyx
new file mode 100644
index 0000000..43c3dc5
--- /dev/null
+++ b/wrappers/numpy/adios.pyx
@@ -0,0 +1,607 @@
+A"""
+ ADIOS is freely available under the terms of the BSD license described
+ in the COPYING file in the top level directory of this source distribution.
+
+ Copyright (c) 2008 - 2009.  UT-BATTELLE, LLC. All rights reserved.
+"""
+
+import numpy as np
+cimport numpy as np
+
+import mpi4py.MPI as MPI 
+cimport mpi4py.MPI as MPI
+
+import cython
+cimport cython
+
+## ==========
+## ADIOS Exported Functions
+## ==========
+
+from libc.stdint cimport uint32_t, int64_t, uint64_t
+from libc.stdlib cimport malloc, free
+
+cdef extern from "adios_types.h":
+    ctypedef enum ADIOS_DATATYPES:
+        adios_unknown
+        adios_byte
+        adios_short
+        adios_integer
+        adios_long
+        adios_unsigned_byte
+        adios_unsigned_short
+        adios_unsigned_integer
+        adios_unsigned_long
+        adios_real
+        adios_double
+        adios_long_double
+        adios_string
+        adios_complex
+        adios_double_complex
+
+    ctypedef enum ADIOS_BUFFER_ALLOC_WHEN:
+        ADIOS_BUFFER_ALLOC_UNKNOWN
+        ADIOS_BUFFER_ALLOC_NOW
+        ADIOS_BUFFER_ALLOC_LATER
+
+    ctypedef enum ADIOS_FLAG:
+        pass
+
+cdef extern from "adios.h":
+    ctypedef char* const_char_ptr "const char*"
+    cdef int adios_init (char * config)
+    
+    cdef int adios_finalize (int mype)
+    
+    cdef int adios_open (int64_t * fd,
+                         char * group_name,
+                         char * name, 
+                         char * mode,
+                         void * comm)
+    
+    cdef int adios_group_size (int64_t fd_p,
+                               uint64_t data_size,
+                               uint64_t * total_size)
+    
+    cdef int adios_write (int64_t fd_p,
+                          char * name,
+                          void * var)
+    
+    cdef int adios_read (int64_t fd_p,
+                         char * name,
+                         void * buffer,
+                         uint64_t buffer_size)
+
+    cdef int adios_close(int64_t fd_p)
+    
+    cdef int adios_init_noxml ()
+    
+    cdef int adios_allocate_buffer (ADIOS_BUFFER_ALLOC_WHEN when,
+                                    uint64_t buffer_size)
+    
+    cdef int adios_declare_group (int64_t * id,
+                                  char * name,
+                                  char * time_index,
+                                  ADIOS_FLAG stats)
+    
+    cdef int adios_define_var (int64_t group_id,
+                               char * name,
+                               char * path,
+                               ADIOS_DATATYPES type,
+                               char * dimensions,
+                               char * global_dimensions,
+                               char * local_offsets)
+    
+    cdef int adios_define_attribute (int64_t group,
+                                     char * name,
+                                     char * path,
+                                     ADIOS_DATATYPES type,
+                                     char * value,
+                                     char * var)
+    
+    cdef int adios_select_method (int64_t group,
+                                  char * method,
+                                  char * parameters,
+                                  char * base_path)
+
+cdef extern from "adios_read.h":
+    ctypedef struct MPI_Comm:
+        pass
+
+    ctypedef struct ADIOS_FILE:
+        uint64_t fh
+        int      groups_count
+        int      vars_count
+        int      attrs_count
+        int      tidx_start
+        int      ntimesteps
+        int      version
+        uint64_t file_size
+        int      endianness
+        char     ** group_namelist
+        void     * internal_data
+
+    ctypedef struct ADIOS_GROUP:
+        uint64_t gh
+        int      grpid
+        int      vars_count
+        char     ** var_namelist
+        int      attrs_count
+        char     ** attr_namelist
+        ADIOS_FILE * fp
+        int      timestep
+        int      lasttimestep
+
+    ctypedef struct ADIOS_VARINFO:
+        int        grpid
+        int        varid
+        ADIOS_DATATYPES   type
+        int        ndim
+        uint64_t * dims
+        int        timedim
+        int        characteristics_count
+        void     * value
+        void     * gmin
+        void     * gmax
+        double   * gavg
+        double   * gstd_dev
+        void     ** mins
+        void     ** maxs
+        double   ** avgs
+        double   ** std_devs
+
+
+    cdef ADIOS_FILE * adios_fopen (char *, MPI_Comm)
+    cdef int adios_fclose (ADIOS_FILE *)
+
+    cdef ADIOS_GROUP * adios_gopen (ADIOS_FILE *, char *)
+    cdef ADIOS_GROUP * adios_gopen_byid (ADIOS_FILE *, int)
+    cdef int adios_gclose (ADIOS_GROUP *)
+
+    cdef ADIOS_VARINFO * adios_inq_var (ADIOS_GROUP *, char *)
+    cdef ADIOS_VARINFO * adios_inq_var_byid (ADIOS_GROUP *, int)
+    cdef void adios_free_varinfo(ADIOS_VARINFO *)
+    cdef int64_t adios_read_var_byid (ADIOS_GROUP *, int,
+                             uint64_t *, uint64_t *,
+                             void *)
+
+    cdef char * adios_errmsg()
+    cdef int adios_errno
+
+
+## ==========
+## ADIOS Enum
+## ==========
+
+class DATATYPE(object):
+    unknown = -1
+    byte = 0
+    short = 1
+    integer = 2
+    long = 4
+    unsigned_byte = 50
+    unsigned_short = 51
+    unsigned_integer = 52
+    unsigned_long = 54
+    real = 5
+    double = 6
+    long_double = 7
+    string = 9
+    complex = 10
+    double_complex = 11
+
+class FLAG(object):
+    UNKNOWN = 0
+    YES = 1
+    NO = 2
+    
+class BUFFER_ALLOC_WHEN(object):
+    UNKNOWN = 0
+    NOW = 1
+    LATER = 2
+    
+## ==========
+## ADIOS Write API
+## ==========
+
+cpdef init(char * config):
+    return adios_init(config)
+
+cpdef int64_t open(char * group_name,
+                   char * name,
+                   char * mode,
+                   MPI.Comm comm = MPI.COMM_WORLD):
+    cdef int64_t fd
+    cdef int result
+    result = adios_open(&fd, group_name, name, mode, &comm.ob_mpi)
+    return fd
+
+cpdef int64_t set_group_size(int64_t fd_p, uint64_t data_size):
+    cdef uint64_t total_size
+    cdef int result
+    result = adios_group_size(fd_p, data_size, &total_size)
+    return total_size
+
+cpdef int write (int64_t fd_p, char * name, np.ndarray val):
+    cdef np.ndarray val_
+    if val.flags.contiguous:
+        val_ = val
+    else:
+        val_ = np.array(val, copy=True)
+
+    return adios_write (fd_p, name, <void *> val_.data)
+
+cpdef int write_int (int64_t fd_p, char * name, int val):
+    return adios_write (fd_p, name, &val)
+
+cpdef int write_long (int64_t fd_p, char * name, long val):
+    return adios_write (fd_p, name, &val)
+
+cpdef int write_float (int64_t fd_p, char * name, float val):
+    return adios_write (fd_p, name, &val)
+
+cpdef int read(int64_t fd_p, char * name, np.ndarray val):
+    assert val.flags.contiguous, 'Only contiguous arrays are supported.'
+    print "Reading ... ", val.itemsize * val.size, "(bytes)"
+    return adios_read(fd_p, name, <void *> val.data, val.itemsize * val.size)
+
+cpdef int close(int64_t fd_p):
+    return adios_close(fd_p)
+
+cpdef finalize(int mype = 0):
+    return adios_finalize(mype)
+
+## ==========
+## ADIOS No-XML API
+## ==========
+cpdef int init_noxml():
+    return adios_init_noxml()
+
+cpdef int allocate_buffer(int when,
+                          uint64_t buffer_size):
+    return adios_allocate_buffer(<ADIOS_BUFFER_ALLOC_WHEN> when,
+                                 buffer_size)
+
+cpdef int64_t declare_group(char * name,
+                            char * time_index,
+                            int stats):
+    cdef int64_t id = 0
+    adios_declare_group (&id,
+                         name,
+                         time_index,
+                         <ADIOS_FLAG> stats)
+    return id
+
+cpdef int define_var(int64_t group_id,
+                     char * name,
+                     char * path,
+                     int type,
+                     char * dimensions,
+                     char * global_dimensions,
+                     char * local_offsets):
+    return adios_define_var(group_id,
+                            name, path,
+                            <ADIOS_DATATYPES> type,
+                            dimensions,
+                            global_dimensions,
+                            local_offsets)
+
+cpdef int define_attribute (int64_t group,
+                            char * name,
+                            char * path,
+                            int type,
+                            char * value,
+                            char * var):
+    return adios_define_attribute (group,
+                                   name,
+                                   path,
+                                   <ADIOS_DATATYPES> type,
+                                   value,
+                                   var)
+
+cpdef int select_method (int64_t group,
+                         char * method,
+                         char * parameters,
+                         char * base_path):
+    return adios_select_method (group,
+                                method,
+                                parameters,
+                                base_path)
+
+
+## ==========
+## ADIOS Read API
+## ==========
+
+cpdef type adios2nptype(ADIOS_DATATYPES t):
+    cdef type ntype = None
+    if t == adios_byte:
+        ntype = np.int8
+    elif t == adios_short:
+        ntype = np.int16
+    elif t == adios_integer:
+        ntype = np.int32
+    elif t == adios_long:
+        ntype = np.int64
+    elif t == adios_unsigned_byte:
+        ntype = np.uint8
+    elif t == adios_unsigned_short:
+        ntype = np.uint16
+    elif t == adios_unsigned_integer:
+        ntype = np.uint32
+    elif t == adios_unsigned_long:
+        ntype = np.uint64
+    elif t == adios_real:
+        ntype = np.float32
+    elif t == adios_double:
+        ntype = np.float64
+    elif t == adios_long_double:
+        ntype = np.float128
+    elif t == adios_complex:
+        ntype = np.complex64
+    elif t == adios_double_complex:
+        ntype = np.complex128
+    else:
+        ntype = None
+
+    return ntype
+
+"""
+cpdef int np2adiostype(np.dtype t):
+    cdef int atype = -1
+    if t.type == np.float64:
+        atype = DATATYPE.double
+    else:
+        atype = -1
+
+    return atype
+"""
+
+cdef printAdiosFile(ADIOS_FILE * f):
+    print '%15s : %lu' % ('fh', f.fh)
+    print '%15s : %d' % ('groups_count', f.groups_count)
+    print '%15s : %d' % ('vars_count', f.vars_count)
+    print '%15s : %d' % ('attrs_count', f.attrs_count)      
+    print '%15s : %d' % ('tidx_start', f.tidx_start)       
+    print '%15s : %d' % ('ntimesteps', f.ntimesteps)       
+    print '%15s : %d' % ('version', f.version)          
+    print '%15s : %lu' % ('file_size', f.file_size)
+    print '%15s : %d' % ('endianness', f.endianness)
+    print '%15s : %s' % ('group_namelist', [f.group_namelist[i] for i in range(f.groups_count)])
+
+cdef printAdiosGroup(ADIOS_GROUP * g):
+    print '%15s : %lu' % ('gh', g.gh)
+    print '%15s : %d' % ('grpid', g.grpid)
+    print '%15s : %d' % ('vars_count', g.vars_count)
+    print '%15s : %s' % ('var_namelist', [g.var_namelist[i] for i in range(g.vars_count)])
+    print '%15s : %d' % ('attrs_count', g.attrs_count)      
+    print '%15s : %s' % ('attr_namelist', [g.attr_namelist[i] for i in range(g.attrs_count)])
+    print '%15s : %lu' % ('fp', <unsigned long> g.fp)
+
+cdef printAdiosVariable(ADIOS_VARINFO * v):
+    print '%15s : %d' % ('grpid', v.grpid)
+    print '%15s : %d' % ('varid', v.varid)
+    print '%15s : %s' % ('type', adios2nptype(v.type))
+    print '%15s : %d' % ('ndim', v.ndim)
+    print '%15s : %s' % ('dims', [v.dims[i] for i in range(v.ndim)])
+    print '%15s : %d' % ('timedim', v.timedim)
+
+cdef adios2scalar(ADIOS_DATATYPES t, void * val):
+    if t == adios_byte :
+        return (<char *> val)[0]
+    elif t == adios_short:
+        return (<short *> val)[0]
+    elif t == adios_integer:
+        return (<int *> val)[0]
+    elif t == adios_long:
+        return (<long *> val)[0]
+    elif t == adios_unsigned_byte:
+        return (<unsigned char *> val)[0]
+    elif t == adios_unsigned_short:
+        return (<unsigned short *> val)[0]
+    elif t == adios_unsigned_integer:
+        return (<unsigned int *> val)[0]
+    elif t == adios_unsigned_long:
+        return (<unsigned long *> val)[0]
+    elif t == adios_real:
+        return (<float *> val)[0]
+    elif t == adios_double:
+        return (<double *> val)[0]
+    elif t == adios_long_double:
+        return (<long double *> val)[0]
+    else:
+        return None
+
+## ==========
+## ADIOS Class Definition
+## ==========
+    
+cdef class AdiosFile:
+    """ Private Memeber """
+    cpdef ADIOS_FILE * fp
+
+    """ Public Memeber """
+    cpdef public bytes name
+    cpdef public int groups_count
+    cpdef public int vars_count
+    cpdef public int attrs_count
+    cpdef public int tidx_start
+    cpdef public int ntimesteps
+    cpdef public int version
+    cpdef public int file_size
+    cpdef public int endianness
+    
+    cpdef public dict group
+    
+    def __init__(self, char * fname, MPI.Comm comm = MPI.COMM_WORLD):
+        self.fp = NULL
+        self.group = {}
+        
+        self.fp = adios_fopen(fname, comm.ob_mpi)
+        assert self.fp != NULL, 'Not an open file'
+
+        self.name         = fname.split('/')[-1]  ## basename
+        self.groups_count = self.fp.groups_count
+        self.vars_count   = self.fp.vars_count  
+        self.attrs_count  = self.fp.attrs_count 
+        self.tidx_start   = self.fp.tidx_start  
+        self.ntimesteps   = self.fp.ntimesteps  
+        self.version      = self.fp.version     
+        self.file_size    = self.fp.file_size   
+        self.endianness   = self.fp.endianness  
+    
+        cdef AdiosGroup g
+        for grpname in [self.fp.group_namelist[i] for i in range(self.groups_count)]:
+            g = AdiosGroup(self, grpname)
+            self.group[grpname] = g
+
+    def __del__(self):
+        self.close()
+            
+    cpdef close(self):
+        assert self.fp != NULL, 'Not an open file'
+        for g in self.group.values():
+            g.close()
+        adios_fclose(self.fp)
+        self.fp = NULL
+        
+    cpdef printself(self):
+        assert self.fp != NULL, 'Not an open file'
+        print '=== AdiosFile ==='
+        print '%15s : %lu' % ('fp', <unsigned long> self.fp)
+        printAdiosFile(self.fp)
+
+
+cdef class AdiosGroup:
+    """ Private Memeber """
+    cdef AdiosFile file
+    cdef ADIOS_GROUP * gp
+
+    """ Public Memeber """
+    cpdef public bytes name
+    cpdef public int grpid
+    cpdef public int vars_count
+    cpdef public int attrs_count
+    cpdef public int timestep
+    cpdef public int lasttimestep
+    
+    cpdef public dict var
+    
+    def __init__(self, AdiosFile file, char * name):
+        self.file = file
+        self.var = {}
+        
+        self.gp = adios_gopen(self.file.fp, name)
+        assert self.gp != NULL, 'Not an open group'
+
+        self.name         = name
+        self.grpid        = self.gp.grpid        
+        self.vars_count   = self.gp.vars_count   
+        self.attrs_count  = self.gp.attrs_count  
+        self.timestep     = self.gp.timestep     
+        self.lasttimestep = self.gp.lasttimestep 
+        
+        cdef AdiosVariable v
+        for varname in [self.gp.var_namelist[i] for i in range(self.vars_count)]:
+            v = AdiosVariable(self, varname)
+            self.var[varname] = v
+
+    def __del__(self):
+        self.close()
+
+    cpdef close(self):
+        assert self.gp != NULL, 'Not an open file'
+        for v in self.var.values():
+            v.close()
+        adios_gclose(self.gp)
+        self.gp = NULL
+        
+    cpdef printself(self):
+        assert self.gp != NULL, 'Not an open file'
+        print '=== AdiosGroup ==='
+        print '%15s : %lu' % ('gp', <unsigned long> self.gp)
+        printAdiosGroup(self.gp)
+        
+cdef class AdiosVariable:
+    """ Private Memeber """
+    cdef AdiosGroup group
+    cdef ADIOS_VARINFO * vp
+
+    """ Public Memeber """
+    cpdef public bytes name
+    cpdef public int varid
+    cpdef public type type
+    cpdef public int ndim
+    cpdef public tuple dims
+    cpdef public int timedim
+    cpdef public int characteristics_count
+    
+    def __init__(self, AdiosGroup group, char * name):
+        self.group = group
+        self.vp = NULL
+
+        self.vp = adios_inq_var(self.group.gp, name)
+        assert self.group.gp != NULL, 'Not an open group'
+
+        self.name                  = name
+        self.varid                 = self.vp.varid                
+        self.type                  = adios2nptype(self.vp.type)
+        self.ndim                  = self.vp.ndim                 
+        self.timedim               = self.vp.timedim              
+        self.characteristics_count = self.vp.characteristics_count
+        
+        self.dims = tuple([self.vp.dims[i] for i in range(self.vp.ndim)])
+        
+    def __del__(self):
+        self.close()
+
+    cpdef close(self):
+        assert self.vp != NULL, 'Not an open file'
+        adios_free_varinfo(self.vp)
+        self.vp = NULL
+        
+    cpdef read(self, tuple offset = (), tuple count = ()):
+        cdef type ntype = adios2nptype(self.vp.type)
+        assert ntype is not None, 'Data type is not supported yet'
+        
+        cdef list lshape = [self.vp.dims[i] for i in range(self.vp.ndim)]
+        cdef np.ndarray npshape = np.array(lshape, dtype=np.int64)
+        
+        cdef np.ndarray npoffset
+        if len(offset) == 0:
+            npoffset = npshape.copy()
+            npoffset.fill(0)
+        else:
+            npoffset = np.array(offset, dtype=np.int64)
+            assert npshape.ndim == npoffset.ndim, 'Offset dimension mismatch'
+        
+        cdef np.ndarray npcount
+        if len(count) == 0:
+            npcount = npshape - npoffset
+        else:
+            npcount = np.array(count, dtype=np.int64)
+            npcount = npcount - npoffset
+
+        assert npshape.ndim == npcount.ndim, 'Shape dimension mismatch.'
+        assert (npshape - npoffset >= npcount).all(), 'Count is larger than shape.'
+            
+        cdef np.ndarray var = np.zeros(npcount, dtype=ntype)
+        cdef int64_t nbytes = adios_read_var_byid(
+            self.group.gp, 
+            self.vp.varid, 
+            <uint64_t *> npoffset.data, 
+            <uint64_t *> npcount.data, 
+            <void *> var.data
+            )
+
+        if nbytes < 0:
+            print "[WARNING] bytes read :", nbytes
+
+        return var
+
+    """ Print self """
+    cpdef printself(self):
+        assert self.vp != NULL, 'Not an open file'
+        print '=== AdiosVariable ==='
+        print '%15s : %lu' % ('vp', <unsigned long> self.vp)
+        printAdiosVariable(self.vp)
diff --git a/wrappers/numpy/example/.svn/all-wcprops b/wrappers/numpy/example/.svn/all-wcprops
new file mode 100644
index 0000000..c9142f8
--- /dev/null
+++ b/wrappers/numpy/example/.svn/all-wcprops
@@ -0,0 +1,11 @@
+K 25
+svn:wc:ra_dav:version-url
+V 58
+/svn-ewok/ADIOS/!svn/ver/1863/trunk/wrappers/numpy/example
+END
+ncdf2bp.py
+K 25
+svn:wc:ra_dav:version-url
+V 69
+/svn-ewok/ADIOS/!svn/ver/1863/trunk/wrappers/numpy/example/ncdf2bp.py
+END
diff --git a/wrappers/numpy/example/.svn/entries b/wrappers/numpy/example/.svn/entries
new file mode 100644
index 0000000..e8a3a29
--- /dev/null
+++ b/wrappers/numpy/example/.svn/entries
@@ -0,0 +1,62 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/numpy/example
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-11T18:43:46.979736Z
+1863
+jyc
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+

+ncdf2bp.py
+file
+
+
+
+
+2012-07-11T21:22:26.205699Z
+3c05a4f617e1735b69bb3e2f0f40e77b
+2012-07-11T18:43:46.979736Z
+1863
+jyc
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+3484
+

diff --git a/wrappers/numpy/example/.svn/format b/wrappers/numpy/example/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/numpy/example/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/numpy/example/.svn/prop-base/ncdf2bp.py.svn-base b/wrappers/numpy/example/.svn/prop-base/ncdf2bp.py.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/wrappers/numpy/example/.svn/prop-base/ncdf2bp.py.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/wrappers/numpy/example/.svn/text-base/ncdf2bp.py.svn-base b/wrappers/numpy/example/.svn/text-base/ncdf2bp.py.svn-base
new file mode 100644
index 0000000..4fa4f7b
--- /dev/null
+++ b/wrappers/numpy/example/.svn/text-base/ncdf2bp.py.svn-base
@@ -0,0 +1,126 @@
+#!/usr/bin/env python
+from adios import *
+from scipy.io import netcdf
+import numpy as np
+import sys
+import os
+import operator
+
+def usage():
+    print os.path.basename(sys.argv[0]), "netcdf_file"
+
+if len(sys.argv) < 2:
+    usage()
+    sys.exit(0)
+
+##fname = "MERRA100.prod.assim.tavg3_3d_mst_Cp.19791010.SUB.nc"
+
+fname = sys.argv[1]
+fout = '.'.join(fname.split('.')[:-1]) + ".bp"
+
+tname = "time"
+if len(sys.argv) > 2:
+    tname = sys.argv[2]
+
+## Open NetCDF file
+f = netcdf.netcdf_file(fname, 'r')
+
+## Check dimension
+assert (all(map(lambda x: x is not None,
+                [ val for k, val in f.dimensions.items()
+                  if k != tname])))
+
+## Two types of variables : time-dependent or time-independent
+dimvar = {n:v for n,v in f.variables.items() if n in f.dimensions.keys()}
+var = {n:v for n,v in f.variables.items() if n not in f.dimensions.keys()}
+tdepvar = {n:v for n,v in var.items() if tname in v.dimensions}
+tindvar = {n:v for n,v in var.items() if tname not in v.dimensions}
+
+## Time dimension
+assert (len(set([v.dimensions.index(tname) for v in tdepvar.values()]))==1)
+tdx = tdepvar.values()[0].dimensions.index(tname)
+
+assert (all([v.data.shape[tdx] for v in tdepvar.values()]))
+tdim = tdepvar.values()[0].shape[tdx]
+
+## Init ADIOS without xml
+init_noxml()
+allocate_buffer(BUFFER_ALLOC_WHEN.NOW, 10)
+gid = declare_group ("group", tname, FLAG.YES)
+select_method (gid, "MPI", "", "")
+
+d1size = 0
+for name, val in f.dimensions.items():
+    if name == tname:
+        continue
+    print "Dimension : %s (%d)" % (name, val)
+    define_var (gid, name, "", DATATYPE.integer, "", "", "")
+    d1size += 4
+
+"""
+d2size = 0
+for name, var in dimvar.items():
+    if name == tname:
+        continue
+    if name in f.dimensions.keys():
+        name = "v_" + name
+    print "Variable : %s (%s)" % (name, ','.join(var.dimensions))
+    define_var (gid, name, "", DATATYPE.double,
+                ','.join(var.dimensions),
+                "",
+                "")
+    d2size += reduce(operator.mul, var.shape) * 8
+
+v1size = 0
+for name, var in tindvar.items():
+    print "Variable : %s (%s)" % (name, ','.join(var.dimensions))
+    define_var (gid, name, "", DATATYPE.double,
+                ','.join(var.dimensions),
+                "",
+                "")
+    v1size += reduce(operator.mul, var.shape) * 8
+"""
+    
+v2size = 0
+for name, var in tdepvar.items():
+    print "Variable : %s (%s)" % (name, ','.join(var.dimensions))
+    define_var (gid, name, "", DATATYPE.double,
+                ','.join(var.dimensions),
+                ','.join([dname for dname in var.dimensions
+                          if dname != tname]),
+                "0,0,0")
+    v2size += reduce(operator.mul, var.shape) / tdim * 8
+
+print "Count (dim, var) : ", (d1size, v2size)
+
+## Clean old file
+if os.access(fout, os.F_OK):
+    os.remove(fout)
+
+for it in range(tdim):
+    print 
+    print "Time step : %d" % (it)
+    
+    fd = open("group", fout, "a")
+    groupsize = d1size + v2size
+    set_group_size(fd, groupsize)
+
+    for name, val in f.dimensions.items():
+        if name == tname:
+            continue
+        print "Dimension writing : %s (%d)" % (name, val)
+        write_int(fd, name, val)
+        
+    for name, var in tdepvar.items():
+        arr = np.array(var.data.take([it], axis=tdx),
+                       dtype=np.float64)
+        print "Variable writing : %s %s" % (name, arr.shape)
+        write(fd, name, arr)
+
+    close(fd)
+    
+f.close()
+finalize()
+
+print
+print "Done. Saved:", fout
diff --git a/wrappers/numpy/example/ncdf2bp.py b/wrappers/numpy/example/ncdf2bp.py
new file mode 100755
index 0000000..4fa4f7b
--- /dev/null
+++ b/wrappers/numpy/example/ncdf2bp.py
@@ -0,0 +1,126 @@
+#!/usr/bin/env python
+from adios import *
+from scipy.io import netcdf
+import numpy as np
+import sys
+import os
+import operator
+
+def usage():
+    print os.path.basename(sys.argv[0]), "netcdf_file"
+
+if len(sys.argv) < 2:
+    usage()
+    sys.exit(0)
+
+##fname = "MERRA100.prod.assim.tavg3_3d_mst_Cp.19791010.SUB.nc"
+
+fname = sys.argv[1]
+fout = '.'.join(fname.split('.')[:-1]) + ".bp"
+
+tname = "time"
+if len(sys.argv) > 2:
+    tname = sys.argv[2]
+
+## Open NetCDF file
+f = netcdf.netcdf_file(fname, 'r')
+
+## Check dimension
+assert (all(map(lambda x: x is not None,
+                [ val for k, val in f.dimensions.items()
+                  if k != tname])))
+
+## Two types of variables : time-dependent or time-independent
+dimvar = {n:v for n,v in f.variables.items() if n in f.dimensions.keys()}
+var = {n:v for n,v in f.variables.items() if n not in f.dimensions.keys()}
+tdepvar = {n:v for n,v in var.items() if tname in v.dimensions}
+tindvar = {n:v for n,v in var.items() if tname not in v.dimensions}
+
+## Time dimension
+assert (len(set([v.dimensions.index(tname) for v in tdepvar.values()]))==1)
+tdx = tdepvar.values()[0].dimensions.index(tname)
+
+assert (all([v.data.shape[tdx] for v in tdepvar.values()]))
+tdim = tdepvar.values()[0].shape[tdx]
+
+## Init ADIOS without xml
+init_noxml()
+allocate_buffer(BUFFER_ALLOC_WHEN.NOW, 10)
+gid = declare_group ("group", tname, FLAG.YES)
+select_method (gid, "MPI", "", "")
+
+d1size = 0
+for name, val in f.dimensions.items():
+    if name == tname:
+        continue
+    print "Dimension : %s (%d)" % (name, val)
+    define_var (gid, name, "", DATATYPE.integer, "", "", "")
+    d1size += 4
+
+"""
+d2size = 0
+for name, var in dimvar.items():
+    if name == tname:
+        continue
+    if name in f.dimensions.keys():
+        name = "v_" + name
+    print "Variable : %s (%s)" % (name, ','.join(var.dimensions))
+    define_var (gid, name, "", DATATYPE.double,
+                ','.join(var.dimensions),
+                "",
+                "")
+    d2size += reduce(operator.mul, var.shape) * 8
+
+v1size = 0
+for name, var in tindvar.items():
+    print "Variable : %s (%s)" % (name, ','.join(var.dimensions))
+    define_var (gid, name, "", DATATYPE.double,
+                ','.join(var.dimensions),
+                "",
+                "")
+    v1size += reduce(operator.mul, var.shape) * 8
+"""
+    
+v2size = 0
+for name, var in tdepvar.items():
+    print "Variable : %s (%s)" % (name, ','.join(var.dimensions))
+    define_var (gid, name, "", DATATYPE.double,
+                ','.join(var.dimensions),
+                ','.join([dname for dname in var.dimensions
+                          if dname != tname]),
+                "0,0,0")
+    v2size += reduce(operator.mul, var.shape) / tdim * 8
+
+print "Count (dim, var) : ", (d1size, v2size)
+
+## Clean old file
+if os.access(fout, os.F_OK):
+    os.remove(fout)
+
+for it in range(tdim):
+    print 
+    print "Time step : %d" % (it)
+    
+    fd = open("group", fout, "a")
+    groupsize = d1size + v2size
+    set_group_size(fd, groupsize)
+
+    for name, val in f.dimensions.items():
+        if name == tname:
+            continue
+        print "Dimension writing : %s (%d)" % (name, val)
+        write_int(fd, name, val)
+        
+    for name, var in tdepvar.items():
+        arr = np.array(var.data.take([it], axis=tdx),
+                       dtype=np.float64)
+        print "Variable writing : %s %s" % (name, arr.shape)
+        write(fd, name, arr)
+
+    close(fd)
+    
+f.close()
+finalize()
+
+print
+print "Done. Saved:", fout
diff --git a/wrappers/numpy/test/.svn/all-wcprops b/wrappers/numpy/test/.svn/all-wcprops
new file mode 100644
index 0000000..fa1c551
--- /dev/null
+++ b/wrappers/numpy/test/.svn/all-wcprops
@@ -0,0 +1,17 @@
+K 25
+svn:wc:ra_dav:version-url
+V 55
+/svn-ewok/ADIOS/!svn/ver/1813/trunk/wrappers/numpy/test
+END
+test_adios_write.sh
+K 25
+svn:wc:ra_dav:version-url
+V 75
+/svn-ewok/ADIOS/!svn/ver/1813/trunk/wrappers/numpy/test/test_adios_write.sh
+END
+adios_noxml_test.py
+K 25
+svn:wc:ra_dav:version-url
+V 75
+/svn-ewok/ADIOS/!svn/ver/1813/trunk/wrappers/numpy/test/adios_noxml_test.py
+END
diff --git a/wrappers/numpy/test/.svn/entries b/wrappers/numpy/test/.svn/entries
new file mode 100644
index 0000000..a7ba325
--- /dev/null
+++ b/wrappers/numpy/test/.svn/entries
@@ -0,0 +1,239 @@
+9
+
+dir
+2164
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS/trunk/wrappers/numpy/test
+https://svn.ccs.ornl.gov/svn-ewok/ADIOS
+
+
+
+2012-07-09T13:26:45.576652Z
+1813
+jyc
+
+
+svn:special svn:externals svn:needs-lock
+
+
+
+
+
+
+
+
+
+
+
+18e33b39-b44e-0410-86dd-cc212c48616b
+
+
+
+
+
+
+0
+

+adios_write_test.py
+file
+
+
+
+
+2012-07-02T16:20:13.661075Z
+9eb575e782a35dd38367c7ee2c6e8c70
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+441
+

+adios_read_test.py
+file
+
+
+
+
+2012-07-02T16:20:13.679070Z
+d6600beaac16fab30ab7b34f7394622d
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+215
+

+test_adios_write.sh
+file
+
+
+
+
+2012-07-09T13:28:40.340793Z
+78bd9cf98f1db48269702dec39365ec8
+2012-07-09T13:26:45.576652Z
+1813
+jyc
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+822
+

+test_adios_read.sh
+file
+
+
+
+
+2012-07-02T16:20:13.686070Z
+7440c6f775f174ba0c1f71182fc2907e
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+823
+

+adios_noxml_test.py
+file
+
+
+
+
+2012-07-09T13:28:40.384786Z
+df21c98536cb0621ce30ea61f2af95ce
+2012-07-09T13:26:45.576652Z
+1813
+jyc
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+769
+

+test_adios_noxml.sh
+file
+
+
+
+
+2012-07-02T16:20:13.723071Z
+56f8a128dff64c79b4b06d6052d012a3
+2012-07-02T18:08:51.289750Z
+1744
+pnorbert
+has-props
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+194
+

diff --git a/wrappers/numpy/test/.svn/format b/wrappers/numpy/test/.svn/format
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/wrappers/numpy/test/.svn/format
@@ -0,0 +1 @@
+9
diff --git a/wrappers/numpy/test/.svn/prop-base/test_adios_noxml.sh.svn-base b/wrappers/numpy/test/.svn/prop-base/test_adios_noxml.sh.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/wrappers/numpy/test/.svn/prop-base/test_adios_noxml.sh.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/wrappers/numpy/test/.svn/prop-base/test_adios_read.sh.svn-base b/wrappers/numpy/test/.svn/prop-base/test_adios_read.sh.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/wrappers/numpy/test/.svn/prop-base/test_adios_read.sh.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/wrappers/numpy/test/.svn/prop-base/test_adios_write.sh.svn-base b/wrappers/numpy/test/.svn/prop-base/test_adios_write.sh.svn-base
new file mode 100644
index 0000000..869ac71
--- /dev/null
+++ b/wrappers/numpy/test/.svn/prop-base/test_adios_write.sh.svn-base
@@ -0,0 +1,5 @@
+K 14
+svn:executable
+V 1
+*
+END
diff --git a/wrappers/numpy/test/.svn/text-base/adios_noxml_test.py.svn-base b/wrappers/numpy/test/.svn/text-base/adios_noxml_test.py.svn-base
new file mode 100644
index 0000000..c769db7
--- /dev/null
+++ b/wrappers/numpy/test/.svn/text-base/adios_noxml_test.py.svn-base
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+from adios import *
+import numpy as np
+
+init_noxml()
+allocate_buffer(BUFFER_ALLOC_WHEN.NOW, 10)
+gid = declare_group ("temperature", "", FLAG.YES)
+select_method (gid, "MPI", "", "")
+define_var (gid, "NX", "", DATATYPE.integer, "", "", "")
+define_var (gid, "size", "", DATATYPE.integer, "", "", "")
+define_var (gid, "rank", "", DATATYPE.integer, "", "", "")
+define_var (gid, "temperature", "", DATATYPE.double, "1,NX", "size,NX", "")
+
+fd = open("temperature", "adios_noxml.bp", "w")
+
+NX = 10
+size = 1
+rank = 0
+groupsize =  4 + 4 + 4 + 8 * 1 * NX
+t = np.array(range(NX), dtype=np.float64)
+set_group_size(fd, groupsize)
+write_int(fd, "NX", NX)
+write_int(fd, "size", size)
+write_int(fd, "rank", rank)
+write(fd, "temperature", t)
+close(fd)
+
+finalize()
+
diff --git a/wrappers/numpy/test/.svn/text-base/adios_read_test.py.svn-base b/wrappers/numpy/test/.svn/text-base/adios_read_test.py.svn-base
new file mode 100644
index 0000000..8be4c68
--- /dev/null
+++ b/wrappers/numpy/test/.svn/text-base/adios_read_test.py.svn-base
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+from adios import *
+import numpy as np
+
+f = AdiosFile("adios_test.bp")
+f.printself()
+g = f.group["temperature"]
+g.printself()
+v = g.var["/temperature"]
+v.printself()
+
+print v.read()
+
+f.close()
diff --git a/wrappers/numpy/test/.svn/text-base/adios_write_test.py.svn-base b/wrappers/numpy/test/.svn/text-base/adios_write_test.py.svn-base
new file mode 100644
index 0000000..15997ee
--- /dev/null
+++ b/wrappers/numpy/test/.svn/text-base/adios_write_test.py.svn-base
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+import adios
+import numpy as np
+
+adios.init("config.xml")
+fd = adios.open("temperature", "adios_test.bp", "w")
+
+NX = 10
+size = 1
+rank = 0
+groupsize =  4 + 4 + 4 + 8 * 1 * NX
+t = np.array(range(NX), dtype=np.float64)
+adios.set_group_size(fd, groupsize)
+adios.write_int(fd, "NX", NX)
+adios.write_int(fd, "size", size)
+adios.write_int(fd, "rank", rank)
+adios.write(fd, "temperature", t)
+adios.close(fd)
+
+adios.finalize()
+
diff --git a/wrappers/numpy/test/.svn/text-base/test_adios_noxml.sh.svn-base b/wrappers/numpy/test/.svn/text-base/test_adios_noxml.sh.svn-base
new file mode 100644
index 0000000..2c62462
--- /dev/null
+++ b/wrappers/numpy/test/.svn/text-base/test_adios_noxml.sh.svn-base
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0`"
+}
+
+if [ $# -lt 1 ]  ; then
+    usage
+    exit 1
+fi
+
+SRCDIR=$1
+
+PYTHONPATH=.:$PYTHONPATH python $SRCDIR/adios_noxml_test.py
+exit $?
diff --git a/examples/C/global-array/adios_global.xml b/wrappers/numpy/test/.svn/text-base/test_adios_read.sh.svn-base
similarity index 63%
copy from examples/C/global-array/adios_global.xml
copy to wrappers/numpy/test/.svn/text-base/test_adios_read.sh.svn-base
index bbf5a65..323e962 100644
--- a/examples/C/global-array/adios_global.xml
+++ b/wrappers/numpy/test/.svn/text-base/test_adios_read.sh.svn-base
@@ -1,6 +1,20 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0`"
+}
+
+if [ $# -lt 1 ]  ; then
+    usage
+    exit 1
+fi
+
+SRCDIR=$1
+
+cat << EOF > config.xml
 <?xml version="1.0"?>
 <adios-config host-language="C">
-    <adios-group name="temperature" coordination-communicator="comm" stats="On">
+    <adios-group name="temperature">
     <var name="NX" type="integer"/>
     <var name="size" type="integer"/>
     <var name="rank" type="integer"/>
@@ -10,9 +24,12 @@
     <attribute name="description" path="/temperature" value="Global array written from 'size' processes" type="string"/>
 </adios-group>
 
-<method group="temperature" method="MPI">stripe_count=1;stripe_size=10485760;num_aggregators=2;merging_pgs=0</method>
+<method group="temperature" method="POSIX"/>
 
 <buffer size-MB="2" allocate-time="now"/>
 
 </adios-config>
+EOF
 
+PYTHONPATH=.:$PYTHONPATH python $SRCDIR/adios_read_test.py
+exit $?
diff --git a/examples/C/global-array/adios_global.xml b/wrappers/numpy/test/.svn/text-base/test_adios_write.sh.svn-base
similarity index 63%
copy from examples/C/global-array/adios_global.xml
copy to wrappers/numpy/test/.svn/text-base/test_adios_write.sh.svn-base
index bbf5a65..2bedb5b 100644
--- a/examples/C/global-array/adios_global.xml
+++ b/wrappers/numpy/test/.svn/text-base/test_adios_write.sh.svn-base
@@ -1,6 +1,20 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0`"
+}
+
+if [ $# -lt 1 ]  ; then
+    usage
+    exit 1
+fi
+
+SRCDIR=$1
+
+cat << EOF > config.xml
 <?xml version="1.0"?>
 <adios-config host-language="C">
-    <adios-group name="temperature" coordination-communicator="comm" stats="On">
+    <adios-group name="temperature">
     <var name="NX" type="integer"/>
     <var name="size" type="integer"/>
     <var name="rank" type="integer"/>
@@ -10,9 +24,12 @@
     <attribute name="description" path="/temperature" value="Global array written from 'size' processes" type="string"/>
 </adios-group>
 
-<method group="temperature" method="MPI">stripe_count=1;stripe_size=10485760;num_aggregators=2;merging_pgs=0</method>
+<method group="temperature" method="MPI"/>
 
 <buffer size-MB="2" allocate-time="now"/>
 
 </adios-config>
+EOF
 
+PYTHONPATH=.:$PYTHONPATH python $SRCDIR/adios_write_test.py
+exit $?
diff --git a/wrappers/numpy/test/adios_noxml_test.py b/wrappers/numpy/test/adios_noxml_test.py
new file mode 100644
index 0000000..c769db7
--- /dev/null
+++ b/wrappers/numpy/test/adios_noxml_test.py
@@ -0,0 +1,29 @@
+#!/usr/bin/env python
+from adios import *
+import numpy as np
+
+init_noxml()
+allocate_buffer(BUFFER_ALLOC_WHEN.NOW, 10)
+gid = declare_group ("temperature", "", FLAG.YES)
+select_method (gid, "MPI", "", "")
+define_var (gid, "NX", "", DATATYPE.integer, "", "", "")
+define_var (gid, "size", "", DATATYPE.integer, "", "", "")
+define_var (gid, "rank", "", DATATYPE.integer, "", "", "")
+define_var (gid, "temperature", "", DATATYPE.double, "1,NX", "size,NX", "")
+
+fd = open("temperature", "adios_noxml.bp", "w")
+
+NX = 10
+size = 1
+rank = 0
+groupsize =  4 + 4 + 4 + 8 * 1 * NX
+t = np.array(range(NX), dtype=np.float64)
+set_group_size(fd, groupsize)
+write_int(fd, "NX", NX)
+write_int(fd, "size", size)
+write_int(fd, "rank", rank)
+write(fd, "temperature", t)
+close(fd)
+
+finalize()
+
diff --git a/wrappers/numpy/test/adios_read_test.py b/wrappers/numpy/test/adios_read_test.py
new file mode 100644
index 0000000..8be4c68
--- /dev/null
+++ b/wrappers/numpy/test/adios_read_test.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+from adios import *
+import numpy as np
+
+f = AdiosFile("adios_test.bp")
+f.printself()
+g = f.group["temperature"]
+g.printself()
+v = g.var["/temperature"]
+v.printself()
+
+print v.read()
+
+f.close()
diff --git a/wrappers/numpy/test/adios_write_test.py b/wrappers/numpy/test/adios_write_test.py
new file mode 100644
index 0000000..15997ee
--- /dev/null
+++ b/wrappers/numpy/test/adios_write_test.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+import adios
+import numpy as np
+
+adios.init("config.xml")
+fd = adios.open("temperature", "adios_test.bp", "w")
+
+NX = 10
+size = 1
+rank = 0
+groupsize =  4 + 4 + 4 + 8 * 1 * NX
+t = np.array(range(NX), dtype=np.float64)
+adios.set_group_size(fd, groupsize)
+adios.write_int(fd, "NX", NX)
+adios.write_int(fd, "size", size)
+adios.write_int(fd, "rank", rank)
+adios.write(fd, "temperature", t)
+adios.close(fd)
+
+adios.finalize()
+
diff --git a/wrappers/numpy/test/test_adios_noxml.sh b/wrappers/numpy/test/test_adios_noxml.sh
new file mode 100755
index 0000000..2c62462
--- /dev/null
+++ b/wrappers/numpy/test/test_adios_noxml.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0`"
+}
+
+if [ $# -lt 1 ]  ; then
+    usage
+    exit 1
+fi
+
+SRCDIR=$1
+
+PYTHONPATH=.:$PYTHONPATH python $SRCDIR/adios_noxml_test.py
+exit $?
diff --git a/examples/C/global-array/adios_global.xml b/wrappers/numpy/test/test_adios_read.sh
old mode 100644
new mode 100755
similarity index 63%
copy from examples/C/global-array/adios_global.xml
copy to wrappers/numpy/test/test_adios_read.sh
index bbf5a65..323e962
--- a/examples/C/global-array/adios_global.xml
+++ b/wrappers/numpy/test/test_adios_read.sh
@@ -1,6 +1,20 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0`"
+}
+
+if [ $# -lt 1 ]  ; then
+    usage
+    exit 1
+fi
+
+SRCDIR=$1
+
+cat << EOF > config.xml
 <?xml version="1.0"?>
 <adios-config host-language="C">
-    <adios-group name="temperature" coordination-communicator="comm" stats="On">
+    <adios-group name="temperature">
     <var name="NX" type="integer"/>
     <var name="size" type="integer"/>
     <var name="rank" type="integer"/>
@@ -10,9 +24,12 @@
     <attribute name="description" path="/temperature" value="Global array written from 'size' processes" type="string"/>
 </adios-group>
 
-<method group="temperature" method="MPI">stripe_count=1;stripe_size=10485760;num_aggregators=2;merging_pgs=0</method>
+<method group="temperature" method="POSIX"/>
 
 <buffer size-MB="2" allocate-time="now"/>
 
 </adios-config>
+EOF
 
+PYTHONPATH=.:$PYTHONPATH python $SRCDIR/adios_read_test.py
+exit $?
diff --git a/examples/C/global-array/adios_global.xml b/wrappers/numpy/test/test_adios_write.sh
old mode 100644
new mode 100755
similarity index 63%
copy from examples/C/global-array/adios_global.xml
copy to wrappers/numpy/test/test_adios_write.sh
index bbf5a65..2bedb5b
--- a/examples/C/global-array/adios_global.xml
+++ b/wrappers/numpy/test/test_adios_write.sh
@@ -1,6 +1,20 @@
+#!/bin/bash
+
+function usage {
+    echo "USAGE : `basename $0`"
+}
+
+if [ $# -lt 1 ]  ; then
+    usage
+    exit 1
+fi
+
+SRCDIR=$1
+
+cat << EOF > config.xml
 <?xml version="1.0"?>
 <adios-config host-language="C">
-    <adios-group name="temperature" coordination-communicator="comm" stats="On">
+    <adios-group name="temperature">
     <var name="NX" type="integer"/>
     <var name="size" type="integer"/>
     <var name="rank" type="integer"/>
@@ -10,9 +24,12 @@
     <attribute name="description" path="/temperature" value="Global array written from 'size' processes" type="string"/>
 </adios-group>
 
-<method group="temperature" method="MPI">stripe_count=1;stripe_size=10485760;num_aggregators=2;merging_pgs=0</method>
+<method group="temperature" method="MPI"/>
 
 <buffer size-MB="2" allocate-time="now"/>
 
 </adios-config>
+EOF
 
+PYTHONPATH=.:$PYTHONPATH python $SRCDIR/adios_write_test.py
+exit $?

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



More information about the debian-science-commits mailing list